RPM Package Manager, CVS Repository /cvs/ ____________________________________________________________________________ Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: jbj@rpm5.org Module: pcre Date: 23-Aug-2010 15:09:02 Branch: rpm-5_3 Handle: 2010082313085208 Modified files: (Branch: rpm-5_3) pcre AUTHORS CMakeLists.txt ChangeLog INSTALL LICENCE Makefile.am NEWS NON-UNIX-USE README RunTest config.h.generic configure.ac depcomp missing pcre-config.in pcre.h.generic pcre.h.in pcre_chartables.c.dist pcre_compile.c pcre_dfa_exec.c pcre_exec.c pcre_globals.c pcre_internal.h pcre_printint.src pcre_scanner.cc pcre_scanner_unittest.cc pcre_study.c pcre_tables.c pcre_ucd.c pcre_xclass.c pcrecpp.cc pcrecpp.h pcrecpp_unittest.cc pcredemo.c pcregexp.pas pcregrep.c pcreposix.c pcreposix.h pcretest.c perltest.pl ucp.h pcre/doc pcre.3 pcre.txt pcre_compile.3 pcre_compile2.3 pcreapi.3 pcrecompat.3 pcregrep.1 pcregrep.txt pcrepattern.3 pcreperform.3 pcreposix.3 pcresample.3 pcrestack.3 pcresyntax.3 pcretest.1 pcretest.txt pcre/doc/html pcre.html pcre_compile.html pcre_compile2.html pcreapi.html pcrecompat.html pcredemo.html pcregrep.html pcrepattern.html pcreperform.html pcreposix.html pcresample.html pcrestack.html pcresyntax.html pcretest.html pcre/testdata testinput1 testinput10 testinput11 testinput12 testinput2 testinput5 testinput6 testinput7 testinput9 testoutput1 testoutput10 testoutput11 testoutput12 testoutput2 testoutput5 testoutput6 testoutput7 testoutput9 Log: - pcre: upgrade to 8.10. Summary: Revision Changes Path 1.1.1.2.2.1 +2 -2 pcre/AUTHORS 1.1.1.2.2.1 +4 -0 pcre/CMakeLists.txt 1.1.1.3.2.1 +288 -0 pcre/ChangeLog 1.1.1.2.2.1 +93 -19 pcre/INSTALL 1.1.1.3.2.1 +2 -2 pcre/LICENCE 1.3.2.1 +3 -11 pcre/Makefile.am 1.1.1.3.2.1 +24 -0 pcre/NEWS 1.1.1.3.2.1 +13 -10 pcre/NON-UNIX-USE 1.1.1.3.2.1 +5 -5 pcre/README 1.1.1.2.2.1 +6 -6 pcre/RunTest 1.1.1.3.2.1 +16 -6 pcre/config.h.generic 1.1.1.3.2.1 +101 -28 pcre/configure.ac 1.1.1.1.4.1 +63 -20 pcre/depcomp 1.1.1.3.2.1 +24 -15 pcre/doc/html/pcre.html 1.1.1.2.2.1 +2 -1 pcre/doc/html/pcre_compile.html 1.1.1.2.2.1 +2 -1 pcre/doc/html/pcre_compile2.html 1.1.1.3.2.1 +114 -20 pcre/doc/html/pcreapi.html 1.1.1.2.2.1 +5 -10 pcre/doc/html/pcrecompat.html 1.1.1.1.2.1 +15 -5 pcre/doc/html/pcredemo.html 1.1.1.3.2.1 +17 -5 pcre/doc/html/pcregrep.html 1.1.1.3.2.1 +354 -110 pcre/doc/html/pcrepattern.html 1.1.1.1.4.1 +28 -6 pcre/doc/html/pcreperform.html 1.1.1.3.2.1 +9 -4 pcre/doc/html/pcreposix.html 1.1.1.2.2.1 +11 -4 pcre/doc/html/pcresample.html 1.1.1.1.4.1 +37 -24 pcre/doc/html/pcrestack.html 1.1.1.2.2.1 +84 -54 pcre/doc/html/pcresyntax.html 1.1.1.3.2.1 +78 -47 pcre/doc/html/pcretest.html 1.1.1.3.2.1 +30 -17 pcre/doc/pcre.3 1.1.1.3.2.1 +1329 -973 pcre/doc/pcre.txt 1.1.1.2.2.1 +2 -1 pcre/doc/pcre_compile.3 1.1.1.2.2.1 +2 -1 pcre/doc/pcre_compile2.3 1.1.1.3.2.1 +123 -20 pcre/doc/pcreapi.3 1.1.1.2.2.1 +5 -9 pcre/doc/pcrecompat.3 1.1.1.3.2.1 +15 -4 pcre/doc/pcregrep.1 1.1.1.3.2.1 +35 -22 pcre/doc/pcregrep.txt 1.1.1.3.2.1 +364 -113 pcre/doc/pcrepattern.3 1.1.1.1.4.1 +30 -6 pcre/doc/pcreperform.3 1.1.1.3.2.1 +11 -3 pcre/doc/pcreposix.3 1.1.1.2.2.1 +10 -4 pcre/doc/pcresample.3 1.1.1.1.4.1 +45 -30 pcre/doc/pcrestack.3 1.1.1.2.2.1 +40 -11 pcre/doc/pcresyntax.3 1.1.1.3.2.1 +76 -44 pcre/doc/pcretest.1 1.1.1.3.2.1 +94 -65 pcre/doc/pcretest.txt 1.1.1.1.4.1 +28 -17 pcre/missing 1.1.1.2.2.1 +12 -2 pcre/pcre-config.in 1.1.1.3.2.1 +6 -3 pcre/pcre.h.generic 1.1.1.3.2.1 +4 -1 pcre/pcre.h.in 1.1.1.1.4.1 +1 -1 pcre/pcre_chartables.c.dist 1.1.1.3.2.1 +663 -259 pcre/pcre_compile.c 1.1.1.3.2.1 +203 -52 pcre/pcre_dfa_exec.c 1.1.1.3.2.1 +786 -333 pcre/pcre_exec.c 1.1.1.1.4.1 +24 -3 pcre/pcre_globals.c 1.1.1.3.2.1 +92 -43 pcre/pcre_internal.h 1.1.1.3.2.1 +30 -2 pcre/pcre_printint.src 1.1.1.1.4.1 +2 -2 pcre/pcre_scanner.cc 1.1.1.1.4.1 +4 -4 pcre/pcre_scanner_unittest.cc 1.1.1.2.2.1 +227 -69 pcre/pcre_study.c 1.1.1.2.2.1 +170 -113 pcre/pcre_tables.c 1.1.1.2.2.1 +2255 -2054 pcre/pcre_ucd.c 1.1.1.2.2.1 +32 -4 pcre/pcre_xclass.c 1.1.1.1.4.1 +70 -43 pcre/pcrecpp.cc 1.1.1.2.2.1 +1 -0 pcre/pcrecpp.h 1.1.1.1.4.1 +16 -3 pcre/pcrecpp_unittest.cc 1.1.1.2.2.1 +15 -5 pcre/pcredemo.c 1.1.1.1.4.1 +26 -1 pcre/pcregexp.pas 1.2.2.1 +117 -35 pcre/pcregrep.c 1.1.1.3.2.1 +42 -21 pcre/pcreposix.c 1.5.2.1 +1 -0 pcre/pcreposix.h 1.4.2.1 +402 -21 pcre/pcretest.c 1.1.1.2.2.1 +25 -7 pcre/perltest.pl 1.1.1.3.2.1 +10 -4 pcre/testdata/testinput1 1.1.1.2.2.1 +12 -1 pcre/testdata/testinput10 1.1.1.1.2.1 +147 -0 pcre/testdata/testinput11 1.1.1.1.2.1 +300 -0 pcre/testdata/testinput12 1.1.1.3.2.1 +329 -7 pcre/testdata/testinput2 1.1.1.3.2.1 +52 -0 pcre/testdata/testinput5 1.1.1.3.2.1 +53 -7 pcre/testdata/testinput6 1.1.1.3.2.1 +18 -0 pcre/testdata/testinput7 1.1.1.2.2.1 +139 -0 pcre/testdata/testinput9 1.1.1.3.2.1 +15 -6 pcre/testdata/testoutput1 1.1.1.2.2.1 +42 -1 pcre/testdata/testoutput10 1.1.1.1.2.1 +230 -0 pcre/testdata/testoutput11 1.1.1.1.2.1 +705 -0 pcre/testdata/testoutput12 1.1.1.3.2.1 +679 -16 pcre/testdata/testoutput2 1.1.1.3.2.1 +150 -0 pcre/testdata/testoutput5 1.1.1.3.2.1 +72 -12 pcre/testdata/testoutput6 1.1.1.3.2.1 +26 -0 pcre/testdata/testoutput7 1.1.1.2.2.1 +360 -0 pcre/testdata/testoutput9 1.1.1.2.2.1 +17 -1 pcre/ucp.h ____________________________________________________________________________ patch -p0 <<'@@ .' Index: pcre/AUTHORS ============================================================================ $ cvs diff -u -r1.1.1.2 -r1.1.1.2.2.1 AUTHORS --- pcre/AUTHORS 18 Aug 2009 21:25:52 -0000 1.1.1.2 +++ pcre/AUTHORS 23 Aug 2010 13:08:52 -0000 1.1.1.2.2.1 @@ -8,7 +8,7 @@ University of Cambridge Computing Service, Cambridge, England. -Copyright (c) 1997-2009 University of Cambridge +Copyright (c) 1997-2010 University of Cambridge All rights reserved @@ -17,7 +17,7 @@ Written by: Google Inc. -Copyright (c) 2007-2008 Google Inc +Copyright (c) 2007-2010 Google Inc All rights reserved #### @@ . patch -p0 <<'@@ .' Index: pcre/CMakeLists.txt ============================================================================ $ cvs diff -u -r1.1.1.2 -r1.1.1.2.2.1 CMakeLists.txt --- pcre/CMakeLists.txt 18 Aug 2009 21:25:58 -0000 1.1.1.2 +++ pcre/CMakeLists.txt 23 Aug 2010 13:08:52 -0000 1.1.1.2.2.1 @@ -35,6 +35,8 @@ # to disable the final configuration report. # 2009-04-11 PH applied Christian Ehrlicher's patch to show compiler flags that # are set by specifying a release type. +# 2010-01-02 PH added test for stdint.h +# 2010-03-02 PH addes test for inttypes.h PROJECT(PCRE C CXX) @@ -55,6 +57,8 @@ INCLUDE(CheckTypeSize) CHECK_INCLUDE_FILE(dirent.h HAVE_DIRENT_H) +CHECK_INCLUDE_FILE(stdint.h HAVE_STDINT_H) +CHECK_INCLUDE_FILE(inttypes.h HAVE_INTTYPES_H) CHECK_INCLUDE_FILE(sys/stat.h HAVE_SYS_STAT_H) CHECK_INCLUDE_FILE(sys/types.h HAVE_SYS_TYPES_H) CHECK_INCLUDE_FILE(unistd.h HAVE_UNISTD_H) @@ . patch -p0 <<'@@ .' Index: pcre/ChangeLog ============================================================================ $ cvs diff -u -r1.1.1.3 -r1.1.1.3.2.1 ChangeLog --- pcre/ChangeLog 5 Dec 2009 13:54:00 -0000 1.1.1.3 +++ pcre/ChangeLog 23 Aug 2010 13:08:52 -0000 1.1.1.3.2.1 @@ -1,6 +1,294 @@ ChangeLog for PCRE ------------------ +Version 8.10 25-Jun-2010 +------------------------ + +1. Added support for (*MARK:ARG) and for ARG additions to PRUNE, SKIP, and + THEN. + +2. (*ACCEPT) was not working when inside an atomic group. + +3. Inside a character class, \B is treated as a literal by default, but + faulted if PCRE_EXTRA is set. This mimics Perl's behaviour (the -w option + causes the error). The code is unchanged, but I tidied the documentation. + +4. Inside a character class, PCRE always treated \R and \X as literals, + whereas Perl faults them if its -w option is set. I have changed PCRE so + that it faults them when PCRE_EXTRA is set. + +5. Added support for \N, which always matches any character other than + newline. (It is the same as "." when PCRE_DOTALL is not set.) + +6. When compiling pcregrep with newer versions of gcc which may have + FORTIFY_SOURCE set, several warnings "ignoring return value of 'fwrite', + declared with attribute warn_unused_result" were given. Just casting the + result to (void) does not stop the warnings; a more elaborate fudge is + needed. I've used a macro to implement this. + +7. Minor change to pcretest.c to avoid a compiler warning. + +8. Added four artifical Unicode properties to help with an option to make + \s etc use properties (see next item). The new properties are: Xan + (alphanumeric), Xsp (Perl space), Xps (POSIX space), and Xwd (word). + +9. Added PCRE_UCP to make \b, \d, \s, \w, and certain POSIX character classes + use Unicode properties. (*UCP) at the start of a pattern can be used to set + this option. Modified pcretest to add /W to test this facility. Added + REG_UCP to make it available via the POSIX interface. + +10. Added --line-buffered to pcregrep. + +11. In UTF-8 mode, if a pattern that was compiled with PCRE_CASELESS was + studied, and the match started with a letter with a code point greater than + 127 whose first byte was different to the first byte of the other case of + the letter, the other case of this starting letter was not recognized + (#976). + +12. If a pattern that was studied started with a repeated Unicode property + test, for example, \p{Nd}+, there was the theoretical possibility of + setting up an incorrect bitmap of starting bytes, but fortunately it could + not have actually happened in practice until change 8 above was made (it + added property types that matched character-matching opcodes). + +13. pcre_study() now recognizes \h, \v, and \R when constructing a bit map of + possible starting bytes for non-anchored patterns. + +14. Extended the "auto-possessify" feature of pcre_compile(). It now recognizes + \R, and also a number of cases that involve Unicode properties, both + explicit and implicit when PCRE_UCP is set. + +15. If a repeated Unicode property match (e.g. \p{Lu}*) was used with non-UTF-8 + input, it could crash or give wrong results if characters with values + greater than 0xc0 were present in the subject string. (Detail: it assumed + UTF-8 input when processing these items.) + +16. Added a lot of (int) casts to avoid compiler warnings in systems where + size_t is 64-bit (#991). + +17. Added a check for running out of memory when PCRE is compiled with + --disable-stack-for-recursion (#990). + +18. If the last data line in a file for pcretest does not have a newline on + the end, a newline was missing in the output. + +19. The default pcre_chartables.c file recognizes only ASCII characters (values + less than 128) in its various bitmaps. However, there is a facility for + generating tables according to the current locale when PCRE is compiled. It + turns out that in some environments, 0x85 and 0xa0, which are Unicode space + characters, are recognized by isspace() and therefore were getting set in + these tables, and indeed these tables seem to approximate to ISO 8859. This + caused a problem in UTF-8 mode when pcre_study() was used to create a list + of bytes that can start a match. For \s, it was including 0x85 and 0xa0, + which of course cannot start UTF-8 characters. I have changed the code so + that only real ASCII characters (less than 128) and the correct starting + bytes for UTF-8 encodings are set for characters greater than 127 when in + UTF-8 mode. (When PCRE_UCP is set - see 9 above - the code is different + altogether.) + +20. Added the /T option to pcretest so as to be able to run tests with non- + standard character tables, thus making it possible to include the tests + used for 19 above in the standard set of tests. + +21. A pattern such as (?&t)(?#()(?(DEFINE)(?<t>a)) which has a forward + reference to a subpattern the other side of a comment that contains an + opening parenthesis caused either an internal compiling error, or a + reference to the wrong subpattern. + + +Version 8.02 19-Mar-2010 +------------------------ + +1. The Unicode data tables have been updated to Unicode 5.2.0. + +2. Added the option --libs-cpp to pcre-config, but only when C++ support is + configured. + +3. Updated the licensing terms in the pcregexp.pas file, as agreed with the + original author of that file, following a query about its status. + +4. On systems that do not have stdint.h (e.g. Solaris), check for and include + inttypes.h instead. This fixes a bug that was introduced by change 8.01/8. + +5. A pattern such as (?&t)*+(?(DEFINE)(?<t>.)) which has a possessive + quantifier applied to a forward-referencing subroutine call, could compile + incorrect code or give the error "internal error: previously-checked + referenced subpattern not found". + +6. Both MS Visual Studio and Symbian OS have problems with initializing + variables to point to external functions. For these systems, therefore, + pcre_malloc etc. are now initialized to local functions that call the + relevant global functions. + +7. There were two entries missing in the vectors called coptable and poptable + in pcre_dfa_exec.c. This could lead to memory accesses outsize the vectors. + I've fixed the data, and added a kludgy way of testing at compile time that + the lengths are correct (equal to the number of opcodes). + +8. Following on from 7, I added a similar kludge to check the length of the + eint vector in pcreposix.c. + +9. Error texts for pcre_compile() are held as one long string to avoid too + much relocation at load time. To find a text, the string is searched, + counting zeros. There was no check for running off the end of the string, + which could happen if a new error number was added without updating the + string. + +10. \K gave a compile-time error if it appeared in a lookbehind assersion. + +11. \K was not working if it appeared in an atomic group or in a group that + was called as a "subroutine", or in an assertion. Perl 5.11 documents that + \K is "not well defined" if used in an assertion. PCRE now accepts it if + the assertion is positive, but not if it is negative. + +12. Change 11 fortuitously reduced the size of the stack frame used in the + "match()" function of pcre_exec.c by one pointer. Forthcoming + implementation of support for (*MARK) will need an extra pointer on the + stack; I have reserved it now, so that the stack frame size does not + decrease. + +13. A pattern such as (?P<L1>(?P<L2>0)|(?P>L2)(?P>L1)) in which the only other + item in branch that calls a recursion is a subroutine call - as in the + second branch in the above example - was incorrectly given the compile- + time error "recursive call could loop indefinitely" because pcre_compile() + was not correctly checking the subroutine for matching a non-empty string. + +14. The checks for overrunning compiling workspace could trigger after an + overrun had occurred. This is a "should never occur" error, but it can be + triggered by pathological patterns such as hundreds of nested parentheses. + The checks now trigger 100 bytes before the end of the workspace. + +15. Fix typo in configure.ac: "srtoq" should be "strtoq". + + +Version 8.01 19-Jan-2010 +------------------------ + +1. If a pattern contained a conditional subpattern with only one branch (in + particular, this includes all (*DEFINE) patterns), a call to pcre_study() + computed the wrong minimum data length (which is of course zero for such + subpatterns). This could cause incorrect "no match" results. + +2. For patterns such as (?i)a(?-i)b|c where an option setting at the start of + the pattern is reset in the first branch, pcre_compile() failed with + "internal error: code overflow at offset...". This happened only when + the reset was to the original external option setting. (An optimization + abstracts leading options settings into an external setting, which was the + cause of this.) + +3. A pattern such as ^(?!a(*SKIP)b) where a negative assertion contained one + of the verbs SKIP, PRUNE, or COMMIT, did not work correctly. When the + assertion pattern did not match (meaning that the assertion was true), it + was incorrectly treated as false if the SKIP had been reached during the + matching. This also applied to assertions used as conditions. + +4. If an item that is not supported by pcre_dfa_exec() was encountered in an + assertion subpattern, including such a pattern used as a condition, + unpredictable results occurred, instead of the error return + PCRE_ERROR_DFA_UITEM. + +5. The C++ GlobalReplace function was not working like Perl for the special + situation when an empty string is matched. It now does the fancy magic + stuff that is necessary. + +6. In pcre_internal.h, obsolete includes to setjmp.h and stdarg.h have been + removed. (These were left over from very, very early versions of PCRE.) + +7. Some cosmetic changes to the code to make life easier when compiling it + as part of something else: + + (a) Change DEBUG to PCRE_DEBUG. + + (b) In pcre_compile(), rename the member of the "branch_chain" structure + called "current" as "current_branch", to prevent a collision with the + Linux macro when compiled as a kernel module. + + (c) In pcre_study(), rename the function set_bit() as set_table_bit(), to + prevent a collision with the Linux macro when compiled as a kernel + module. + +8. In pcre_compile() there are some checks for integer overflows that used to + cast potentially large values to (double). This has been changed to that + when building, a check for int64_t is made, and if it is found, it is used + instead, thus avoiding the use of floating point arithmetic. (There is no + other use of FP in PCRE.) If int64_t is not found, the fallback is to + double. + +9. Added two casts to avoid signed/unsigned warnings from VS Studio Express + 2005 (difference between two addresses compared to an unsigned value). + +10. Change the standard AC_CHECK_LIB test for libbz2 in configure.ac to a + custom one, because of the following reported problem in Windows: + + - libbz2 uses the Pascal calling convention (WINAPI) for the functions + under Win32. + - The standard autoconf AC_CHECK_LIB fails to include "bzlib.h", + therefore missing the function definition. + - The compiler thus generates a "C" signature for the test function. + - The linker fails to find the "C" function. + - PCRE fails to configure if asked to do so against libbz2. + +11. When running libtoolize from libtool-2.2.6b as part of autogen.sh, these + messages were output: + + Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and + rerunning libtoolize, to keep the correct libtool macros in-tree. + Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am. + + I have done both of these things. + +12. Although pcre_dfa_exec() does not use nearly as much stack as pcre_exec() + most of the time, it *can* run out if it is given a pattern that contains a + runaway infinite recursion. I updated the discussion in the pcrestack man + page. + +13. Now that we have gone to the x.xx style of version numbers, the minor + version may start with zero. Using 08 or 09 is a bad idea because users + might check the value of PCRE_MINOR in their code, and 08 or 09 may be + interpreted as invalid octal numbers. I've updated the previous comment in + configure.ac, and also added a check that gives an error if 08 or 09 are + used. + +14. Change 8.00/11 was not quite complete: code had been accidentally omitted, + causing partial matching to fail when the end of the subject matched \W + in a UTF-8 pattern where \W was quantified with a minimum of 3. + +15. There were some discrepancies between the declarations in pcre_internal.h + of _pcre_is_newline(), _pcre_was_newline(), and _pcre_valid_utf8() and + their definitions. The declarations used "const uschar *" and the + definitions used USPTR. Even though USPTR is normally defined as "const + unsigned char *" (and uschar is typedeffed as "unsigned char"), it was + reported that: "This difference in casting confuses some C++ compilers, for + example, SunCC recognizes above declarations as different functions and + generates broken code for hbpcre." I have changed the declarations to use + USPTR. + +16. GNU libtool is named differently on some systems. The autogen.sh script now + tries several variants such as glibtoolize (MacOSX) and libtoolize1x + (FreeBSD). + +17. Applied Craig's patch that fixes an HP aCC compile error in pcre 8.00 + (strtoXX undefined when compiling pcrecpp.cc). The patch contains this + comment: "Figure out how to create a longlong from a string: strtoll and + equivalent. It's not enough to call AC_CHECK_FUNCS: hpux has a strtoll, for + instance, but it only takes 2 args instead of 3!" + +18. A subtle bug concerned with back references has been fixed by a change of + specification, with a corresponding code fix. A pattern such as + ^(xa|=?\1a)+$ which contains a back reference inside the group to which it + refers, was giving matches when it shouldn't. For example, xa=xaaa would + match that pattern. Interestingly, Perl (at least up to 5.11.3) has the + same bug. Such groups have to be quantified to be useful, or contained + inside another quantified group. (If there's no repetition, the reference + can never match.) The problem arises because, having left the group and + moved on to the rest of the pattern, a later failure that backtracks into + the group uses the captured value from the final iteration of the group + rather than the correct earlier one. I have fixed this in PCRE by forcing + any group that contains a reference to itself to be an atomic group; that + is, there cannot be any backtracking into it once it has completed. This is + similar to recursive and subroutine calls. + + Version 8.00 19-Oct-09 ---------------------- @@ . patch -p0 <<'@@ .' Index: pcre/INSTALL ============================================================================ $ cvs diff -u -r1.1.1.2 -r1.1.1.2.2.1 INSTALL --- pcre/INSTALL 18 Aug 2009 21:25:51 -0000 1.1.1.2 +++ pcre/INSTALL 23 Aug 2010 13:08:52 -0000 1.1.1.2.2.1 @@ -2,10 +2,12 @@ ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, -2006, 2007, 2008 Free Software Foundation, Inc. +2006, 2007, 2008, 2009 Free Software Foundation, Inc. - This file is free documentation; the Free Software Foundation gives -unlimited permission to copy, distribute and modify it. + Copying and distribution of this file, with or without modification, +are permitted in any medium without royalty provided the copyright +notice and this notice are preserved. This file is offered as-is, +without warranty of any kind. Basic Installation ================== @@ -13,7 +15,11 @@ Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for -instructions specific to this package. +instructions specific to this package. Some packages provide this +`INSTALL' file but do not implement all of the features documented +below. The lack of an optional feature in a given package is not +necessarily a bug. More recommendations for GNU packages can be found +in *note Makefile Conventions: (standards)Makefile Conventions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses @@ -42,7 +48,7 @@ you want to change it or regenerate `configure' using a newer version of `autoconf'. -The simplest way to compile this package is: + The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. @@ -53,12 +59,22 @@ 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with - the package. + the package, generally using the just-built uninstalled binaries. 4. Type `make install' to install the programs and any data files and - documentation. + documentation. When installing into a prefix owned by root, it is + recommended that the package be configured and built as a regular + user, and only the `make install' phase executed with root + privileges. + + 5. Optionally, type `make installcheck' to repeat any self-tests, but + this time using the binaries in their final installed location. + This target does not install anything. Running this target as a + regular user, particularly if the prior `make install' required + root privileges, verifies that the installation completed + correctly. - 5. You can remove the program binaries and object files from the + 6. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is @@ -67,8 +83,15 @@ all sorts of other programs in order to regenerate files that came with the distribution. - 6. Often, you can also type `make uninstall' to remove the installed - files again. + 7. Often, you can also type `make uninstall' to remove the installed + files again. In practice, not all packages have tested that + uninstallation works correctly, even though it is required by the + GNU Coding Standards. + + 8. Some packages, particularly those that use Automake, provide `make + distcheck', which can by used by developers to test that all other + targets like `make install' and `make uninstall' work correctly. + This target is generally not run by end users. Compilers and Options ===================== @@ -93,7 +116,8 @@ own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the -source code in the directory that `configure' is in and in `..'. +source code in the directory that `configure' is in and in `..'. This +is known as a "VPATH" build. With a non-GNU `make', it is safer to compile the package for one architecture at a time in the source code directory. After you have @@ -120,7 +144,8 @@ By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving -`configure' the option `--prefix=PREFIX'. +`configure' the option `--prefix=PREFIX', where PREFIX must be an +absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you @@ -131,15 +156,46 @@ In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories -you can set and what kinds of files go in them. +you can set and what kinds of files go in them. In general, the +default for these options is expressed in terms of `${prefix}', so that +specifying just `--prefix' will affect all of the other directory +specifications that were not explicitly provided. + + The most portable way to affect installation locations is to pass the +correct locations to `configure'; however, many packages provide one or +both of the following shortcuts of passing variable assignments to the +`make install' command line to change installation locations without +having to reconfigure or recompile. + + The first method involves providing an override variable for each +affected directory. For example, `make install +prefix=/alternate/directory' will choose an alternate location for all +directory configuration variables that were expressed in terms of +`${prefix}'. Any directories that were specified during `configure', +but not in terms of `${prefix}', must each be overridden at install +time for the entire installation to be relocated. The approach of +makefile variable overrides for each directory variable is required by +the GNU Coding Standards, and ideally causes no recompilation. +However, some platforms have known limitations with the semantics of +shared libraries that end up requiring recompilation when using this +method, particularly noticeable in packages that use GNU Libtool. + + The second method involves providing the `DESTDIR' variable. For +example, `make install DESTDIR=/alternate/directory' will prepend +`/alternate/directory' before all installation names. The approach of +`DESTDIR' overrides is not required by the GNU Coding Standards, and +does not work on platforms that have drive letters. On the other hand, +it does better at avoiding recompilation issues, and works well even +when some directory options were not specified in terms of `${prefix}' +at `configure' time. + +Optional Features +================= If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. -Optional Features -================= - Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE @@ -152,6 +208,13 @@ you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. + Some packages offer the ability to configure how verbose the +execution of `make' will be. For these packages, running `./configure +--enable-silent-rules' sets the default to minimal output, which can be +overridden with `make V=1'; while running `./configure +--disable-silent-rules' sets the default to verbose, which can be +overridden with `make V=0'. + Particular systems ================== @@ -159,7 +222,7 @@ CC is not installed, it is recommended to use the following options in order to use an ANSI C compiler: - ./configure CC="cc -Ae" + ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" and if that doesn't work, install pre-built binaries of GCC for HP-UX. @@ -174,6 +237,16 @@ ./configure CC="cc -nodtk" + On Solaris, don't put `/usr/ucb' early in your `PATH'. This +directory contains several dysfunctional programs; working variants of +these programs are available in `/usr/bin'. So, if you need `/usr/ucb' +in your `PATH', put it _after_ `/usr/bin'. + + On Haiku, software installed for all users goes in `/boot/common', +not `/usr/local'. It is recommended to use the following options: + + ./configure --prefix=/boot/common + Specifying the System Type ========================== @@ -189,7 +262,8 @@ where SYSTEM can have one of these forms: - OS KERNEL-OS + OS + KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't @@ -277,7 +351,7 @@ `configure' can determine that directory automatically. `--prefix=DIR' - Use DIR as the installation prefix. *Note Installation Names:: + Use DIR as the installation prefix. *note Installation Names:: for more details, including other options available for fine-tuning the installation locations. @@ . patch -p0 <<'@@ .' Index: pcre/LICENCE ============================================================================ $ cvs diff -u -r1.1.1.3 -r1.1.1.3.2.1 LICENCE --- pcre/LICENCE 5 Dec 2009 13:54:00 -0000 1.1.1.3 +++ pcre/LICENCE 23 Aug 2010 13:08:52 -0000 1.1.1.3.2.1 @@ -22,7 +22,7 @@ University of Cambridge Computing Service, Cambridge, England. -Copyright (c) 1997-2009 University of Cambridge +Copyright (c) 1997-2010 University of Cambridge All rights reserved. @@ -31,7 +31,7 @@ Contributed by: Google Inc. -Copyright (c) 2007-2008, Google Inc. +Copyright (c) 2007-2010, Google Inc. All rights reserved. @@ . patch -p0 <<'@@ .' Index: pcre/Makefile.am ============================================================================ $ cvs diff -u -r1.3 -r1.3.2.1 Makefile.am --- pcre/Makefile.am 5 Dec 2009 14:17:31 -0000 1.3 +++ pcre/Makefile.am 23 Aug 2010 13:08:52 -0000 1.3.2.1 @@ -1,5 +1,7 @@ ## Process this file with automake to produce Makefile.in. +ACLOCAL_AMFLAGS = -I m4 + dist_noinst_DATA = noinst_DATA = dist_noinst_MANS = @@ -65,7 +67,6 @@ endif # The Libtool libraries to install. We'll add to this later. -lib_LTLIBRARIES = noinst_LTLIBRARIES = # Unit tests you want to run when people type 'make check'. @@ -140,7 +141,6 @@ pcre_scanner.h endif # WITH_PCRE_CPP -#bin_SCRIPTS = pcre-config noinst_SCRIPTS = pcre-config ## --------------------------------------------------------------- @@ -167,7 +167,6 @@ ## The main pcre library -#lib_LTLIBRARIES += libpcre.la noinst_LTLIBRARIES += libpcre.la libpcre_la_SOURCES = \ pcre_compile.c \ @@ -206,7 +205,6 @@ CLEANFILES += pcre_chartables.c ## A version of the main pcre library that has a posix re API. -#lib_LTLIBRARIES += libpcreposix.la noinst_LTLIBRARIES += libpcreposix.la libpcreposix_la_SOURCES = \ pcreposix.c @@ -216,7 +214,6 @@ ## There's a C++ library as well. if WITH_PCRE_CPP -#lib_LTLIBRARIES += libpcrecpp.la noinst_LTLIBRARIES += libpcrecpp.la libpcrecpp_la_SOURCES = \ pcrecpp_internal.h \ @@ -251,14 +248,12 @@ TESTS += RunTest dist_noinst_SCRIPTS += RunTest EXTRA_DIST += RunTest.bat -#bin_PROGRAMS += pcretest noinst_PROGRAMS += pcretest pcretest_SOURCES = pcretest.c pcretest_LDADD = libpcreposix.la TESTS += RunGrepTest dist_noinst_SCRIPTS += RunGrepTest -#bin_PROGRAMS += pcregrep noinst_PROGRAMS += pcregrep pcregrep_SOURCES = pcregrep.c pcregrep_LDADD = libpcreposix.la @@ -343,10 +338,8 @@ # We have .pc files for pkg-config users. pkgconfigdir = $(libdir)/pkgconfig -#pkgconfig_DATA = libpcre.pc -noinst_DATA += libpcre.pc +noinst_DATA = libpcre.pc libpcreposix.pc if WITH_PCRE_CPP -#pkgconfig_DATA += libpcrecpp.pc noinst_DATA += libpcrecpp.pc endif @@ -393,7 +386,6 @@ EXTRA_DIST += $(pcrecpp_man) if WITH_PCRE_CPP -#man_MANS = $(pcrecpp_man) noinst_MANS = $(pcrecpp_man) endif @@ . patch -p0 <<'@@ .' Index: pcre/NEWS ============================================================================ $ cvs diff -u -r1.1.1.3 -r1.1.1.3.2.1 NEWS --- pcre/NEWS 5 Dec 2009 13:54:02 -0000 1.1.1.3 +++ pcre/NEWS 23 Aug 2010 13:08:52 -0000 1.1.1.3.2.1 @@ -1,6 +1,30 @@ News about PCRE releases ------------------------ +Release 8.10 25-Jun-2010 +------------------------ + +There are two major additions: support for (*MARK) and friends, and the option +PCRE_UCP, which changes the behaviour of \b, \d, \s, and \w (and their +opposites) so that they make use of Unicode properties. There are also a number +of lesser new features, and several bugs have been fixed. A new option, +--line-buffered, has been added to pcregrep, for use when it is connected to +pipes. + + +Release 8.02 19-Mar-2010 +------------------------ + +Another bug-fix release. + + +Release 8.01 19-Jan-2010 +------------------------ + +This is a bug-fix release. Several bugs in the code itself and some bugs and +infelicities in the build system have been fixed. + + Release 8.00 19-Oct-09 ---------------------- @@ . patch -p0 <<'@@ .' Index: pcre/NON-UNIX-USE ============================================================================ $ cvs diff -u -r1.1.1.3 -r1.1.1.3.2.1 NON-UNIX-USE --- pcre/NON-UNIX-USE 5 Dec 2009 13:54:03 -0000 1.1.1.3 +++ pcre/NON-UNIX-USE 23 Aug 2010 13:08:52 -0000 1.1.1.3.2.1 @@ -127,12 +127,16 @@ your system has static and shared libraries, you may have to do this once for each type. - (8) Similarly, compile pcreposix.c (remembering -DHAVE_CONFIG_H if necessary) - and link the result (on its own) as the pcreposix library. + (8) Similarly, if you want to build the POSIX wrapper functions, ensure that + you have the pcreposix.h file and then compile pcreposix.c (remembering + -DHAVE_CONFIG_H if necessary). Link the result (on its own) as the + pcreposix library. (9) Compile the test program pcretest.c (again, don't forget -DHAVE_CONFIG_H). - This needs the functions in the pcre and pcreposix libraries when linking. - It also needs the pcre_printint.src source file, which it #includes. + This needs the functions in the PCRE library when linking. It also needs + the pcreposix wrapper functions unless you compile it with -DNOPOSIX. The + pcretest.c program also needs the pcre_printint.src source file, which it + #includes. (10) Run pcretest on the testinput files in the testdata directory, and check that the output matches the corresponding testoutput files. Note that the @@ -184,9 +188,9 @@ LINKING PROGRAMS IN WINDOWS ENVIRONMENTS If you want to statically link a program against a PCRE library in the form of -a non-dll .a file, you must define PCRE_STATIC before including pcre.h, -otherwise the pcre_malloc() and pcre_free() exported functions will be declared -__declspec(dllimport), with unwanted results. +a non-dll .a file, you must define PCRE_STATIC before including pcre.h or +pcrecpp.h, otherwise the pcre_malloc() and pcre_free() exported functions will +be declared __declspec(dllimport), with unwanted results. CALLING CONVENTIONS IN WINDOWS ENVIRONMENTS @@ -273,8 +277,7 @@ The test files that are supplied with PCRE are in Unix format, with LF characters as line terminators. It may be necessary to change the line -terminators in order to get some of the tests to work. We hope to improve -things in this area in future. +terminators in order to get some of the tests to work. BUILDING PCRE ON WINDOWS WITH CMAKE @@ -494,5 +497,5 @@ ========================= -Last Updated: 05 October 2009 +Last Updated: 26 May 2010 **** @@ . patch -p0 <<'@@ .' Index: pcre/README ============================================================================ $ cvs diff -u -r1.1.1.3 -r1.1.1.3.2.1 README --- pcre/README 5 Dec 2009 13:53:58 -0000 1.1.1.3 +++ pcre/README 23 Aug 2010 13:08:53 -0000 1.1.1.3.2.1 @@ -311,10 +311,10 @@ . RunTest is a script for running tests on the basic C library . RunGrepTest is a script for running tests on the pcregrep command -Versions of config.h and pcre.h are distributed in the PCRE tarballs under -the names config.h.generic and pcre.h.generic. These are provided for the -benefit of those who have to built PCRE without the benefit of "configure". If -you use "configure", the .generic versions are not used. +Versions of config.h and pcre.h are distributed in the PCRE tarballs under the +names config.h.generic and pcre.h.generic. These are provided for those who +have to built PCRE without using "configure" or CMake. If you use "configure" +or CMake, the .generic versions are not used. If a C++ compiler is found, the following files are also built: @@ -796,4 +796,4 @@ Philip Hazel Email local part: ph10 Email domain: cam.ac.uk -Last updated: 19 October 2009 +Last updated: 19 January 2010 @@ . patch -p0 <<'@@ .' Index: pcre/RunTest ============================================================================ $ cvs diff -u -r1.1.1.2 -r1.1.1.2.2.1 RunTest --- pcre/RunTest 5 Dec 2009 13:54:01 -0000 1.1.1.2 +++ pcre/RunTest 23 Aug 2010 13:08:53 -0000 1.1.1.2.2.1 @@ -133,10 +133,10 @@ echo PCRE C library tests ./pcretest /dev/null -# Primary test, Perl-compatible for both 5.8 and 5.10 +# Primary test, compatible with Perl 5.8, 5.10, 5.11 if [ $do1 = yes ] ; then - echo "Test 1: main functionality (Perl 5.8 & 5.10 compatible)" + echo "Test 1: main functionality (Perl 5.8, 5.10, 5.11 compatible)" $valgrind ./pcretest -q $testdata/testinput1 testtry if [ $? = 0 ] ; then $cf $testdata/testoutput1 testtry @@ -215,7 +215,7 @@ # Additional tests for UTF8 support if [ $do4 = yes ] ; then - echo "Test 4: UTF-8 support (Perl 5.8 & 5.10 compatible)" + echo "Test 4: UTF-8 support (Perl 5.8, 5.10, 5.11 compatible)" $valgrind ./pcretest -q $testdata/testinput4 testtry if [ $? = 0 ] ; then $cf $testdata/testoutput4 testtry @@ -237,7 +237,7 @@ fi if [ $do6 = yes ] ; then - echo "Test 6: Unicode property support (Perl 5.10 compatible)" + echo "Test 6: Unicode property support (Perl 5.10, 5.11 compatible)" $valgrind ./pcretest -q $testdata/testinput6 testtry if [ $? = 0 ] ; then $cf $testdata/testoutput6 testtry @@ -299,10 +299,10 @@ echo "OK" fi -# Test of Perl 5.10 features +# Test of Perl 5.10, 5.11 features if [ $do11 = yes ] ; then - echo "Test 11: Perl 5.10 features" + echo "Test 11: Perl 5.10, 5.11 features" $valgrind ./pcretest -q $testdata/testinput11 testtry if [ $? = 0 ] ; then $cf $testdata/testoutput11 testtry @@ . patch -p0 <<'@@ .' Index: pcre/config.h.generic ============================================================================ $ cvs diff -u -r1.1.1.3 -r1.1.1.3.2.1 config.h.generic --- pcre/config.h.generic 5 Dec 2009 13:53:53 -0000 1.1.1.3 +++ pcre/config.h.generic 23 Aug 2010 13:08:53 -0000 1.1.1.3.2.1 @@ -123,10 +123,13 @@ #define HAVE_STRING_H 1 #endif -/* Define to 1 if you have the `strtoll' function. */ +/* Define to 1 if you have `strtoimax'. */ +/* #undef HAVE_STRTOIMAX */ + +/* Define to 1 if you have `strtoll'. */ /* #undef HAVE_STRTOLL */ -/* Define to 1 if you have the `strtoq' function. */ +/* Define to 1 if you have `strtoq'. */ #ifndef HAVE_STRTOQ #define HAVE_STRTOQ 1 #endif @@ -162,7 +165,7 @@ #define HAVE_ZLIB_H 1 #endif -/* Define to 1 if you have the `_strtoi64' function. */ +/* Define to 1 if you have `_strtoi64'. */ /* #undef HAVE__STRTOI64 */ /* The value of LINK_SIZE determines the number of bytes used to store links @@ -247,13 +250,16 @@ #define PACKAGE_NAME "PCRE" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "PCRE 8.00" +#define PACKAGE_STRING "PCRE 8.10" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "pcre" +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + /* Define to the version of this package. */ -#define PACKAGE_VERSION "8.00" +#define PACKAGE_VERSION "8.10" /* If you are compiling for a system other than a Unix-like system or @@ -309,11 +315,15 @@ /* Version number of package */ #ifndef VERSION -#define VERSION "8.00" +#define VERSION "8.10" #endif /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ +/* Define to the type of a signed integer type of width exactly 64 bits if + such a type exists and the standard includes do not define it. */ +/* #undef int64_t */ + /* Define to `unsigned int' if <sys/types.h> does not define. */ /* #undef size_t */ @@ . patch -p0 <<'@@ .' Index: pcre/configure.ac ============================================================================ $ cvs diff -u -r1.1.1.3 -r1.1.1.3.2.1 configure.ac --- pcre/configure.ac 5 Dec 2009 13:53:53 -0000 1.1.1.3 +++ pcre/configure.ac 23 Aug 2010 13:08:53 -0000 1.1.1.3.2.1 @@ -1,15 +1,17 @@ dnl Process this file with autoconf to produce a configure script. -dnl NOTE FOR MAINTAINERS: Do not use major or minor version numbers with -dnl leading zeros, because they may be treated as octal constants. The -dnl PCRE_PRERELEASE feature is for identifying release candidates. It might -dnl be defined as -RC2, for example. For real releases, it should be defined -dnl empty. +dnl NOTE FOR MAINTAINERS: Do not use minor version numbers 08 or 09 because +dnl the leading zeros may cause them to be treated as invalid octal constants +dnl if a PCRE user writes code that uses PCRE_MINOR as a number. There is now +dnl a check further down that throws an error if 08 or 09 are used. + +dnl The PCRE_PRERELEASE feature is for identifying release candidates. It might +dnl be defined as -RC2, for example. For real releases, it should be empty. m4_define(pcre_major, [8]) -m4_define(pcre_minor, [00]) +m4_define(pcre_minor, [10]) m4_define(pcre_prerelease, []) -m4_define(pcre_date, [2009-10-19]) +m4_define(pcre_date, [2010-06-25]) # Libtool shared library interface versions (current:revision:age) m4_define(libpcre_version, [0:1:0]) @@ -22,6 +24,9 @@ AM_INIT_AUTOMAKE([dist-bzip2 dist-zip]) AC_CONFIG_HEADERS(config.h) +# This was added at the suggestion of libtoolize (03-Jan-10) +AC_CONFIG_MACRO_DIR([m4]) + # The default CFLAGS and CXXFLAGS in Autoconf are "-g -O2" for gcc and just # "-g" for any other compiler. There doesn't seem to be a standard way of # getting rid of the -g (which I don't think is needed for a production @@ -66,6 +71,9 @@ AC_COMPILE_IFELSE(AC_LANG_PROGRAM([],[]),, CXX=""; CXXCP=""; CXXFLAGS="") AC_LANG_POP +# Check for a 64-bit integer type +AC_TYPE_INT64_T + AC_PROG_INSTALL AC_LIBTOOL_WIN32_DLL AC_PROG_LIBTOOL @@ -76,6 +84,15 @@ PCRE_PRERELEASE="pcre_prerelease" PCRE_DATE="pcre_date" +if test "$PCRE_MINOR" = "08" -o "$PCRE_MINOR" = "09" +then + echo "***" + echo "*** Minor version number $PCRE_MINOR must not be used. ***" + echo "*** Use only 01 to 07 or 10 onwards, to avoid octal issues. ***" + echo "***" + exit 1 +fi + AC_SUBST(PCRE_MAJOR) AC_SUBST(PCRE_MINOR) AC_SUBST(PCRE_PRERELEASE) @@ -87,11 +104,13 @@ htmldir='${docdir}/html' fi -# Handle --disable-cpp +# Handle --disable-cpp. The substitution of enable_cpp is needed for use in +# pcre-config. AC_ARG_ENABLE(cpp, AS_HELP_STRING([--disable-cpp], [disable C++ support]), , enable_cpp=yes) +AC_SUBST(enable_cpp) # Handle --enable-rebuild-chartables AC_ARG_ENABLE(rebuild-chartables, @@ -323,6 +342,49 @@ AC_CHECK_HEADERS(type_traits.h, [pcre_have_type_traits="1"], [pcre_have_type_traits="0"]) +# (This isn't c++-specific, but is only used in pcrecpp.cc, so try this +# in a c++ context. This matters becuase strtoimax is C99 and may not +# be supported by the C++ compiler.) +# Figure out how to create a longlong from a string: strtoll and +# equiv. It's not enough to call AC_CHECK_FUNCS: hpux has a +# strtoll, for instance, but it only takes 2 args instead of 3! +# We have to call AH_TEMPLATE since AC_DEFINE_UNQUOTED below is complex. +AH_TEMPLATE(HAVE_STRTOQ, [Define to 1 if you have `strtoq'.]) +AH_TEMPLATE(HAVE_STRTOLL, [Define to 1 if you have `strtoll'.]) +AH_TEMPLATE(HAVE__STRTOI64, [Define to 1 if you have `_strtoi64'.]) +AH_TEMPLATE(HAVE_STRTOIMAX, [Define to 1 if you have `strtoimax'.]) +have_strto_fn=0 +for fn in strtoq strtoll _strtoi64 strtoimax; do + AC_MSG_CHECKING([for $fn]) + if test "$fn" = strtoimax; then + include=stdint.h + else + include=stdlib.h + fi + AC_COMPILE_IFELSE(AC_LANG_PROGRAM([#include <$include>], + [char* e; return $fn("100", &e, 10)]), + [AC_MSG_RESULT(yes) + AC_DEFINE_UNQUOTED(HAVE_`echo $fn | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`, 1, + [Define to 1 if you have `$fn'.]) + have_strto_fn=1 + break], + [AC_MSG_RESULT(no)]) +done + +if test "$have_strto_fn" = 1; then + AC_CHECK_TYPES([long long], + [pcre_have_long_long="1"], + [pcre_have_long_long="0"]) + AC_CHECK_TYPES([unsigned long long], + [pcre_have_ulong_long="1"], + [pcre_have_ulong_long="0"]) +else + pcre_have_long_long="0" + pcre_have_ulong_long="0" +fi +AC_SUBST(pcre_have_long_long) +AC_SUBST(pcre_have_ulong_long) + AC_LANG_POP fi # Using AC_SUBST eliminates the need to include config.h in a public .h file @@ -338,24 +400,6 @@ AC_C_CONST AC_TYPE_SIZE_T -pcre_have_strotolonglong=0 -AC_CHECK_FUNCS(strtoq strtoll _strtoi64, [pcre_have_strotolonglong="1"; break]) -# If we can't convert a string to a long long, pretend we don't even -# have a long long. -if test $pcre_have_strotolonglong = "0"; then - pcre_have_long_long="0" - pcre_have_ulong_long="0" -else - AC_CHECK_TYPES([long long], - [pcre_have_long_long="1"], - [pcre_have_long_long="0"]) - AC_CHECK_TYPES([unsigned long long], - [pcre_have_ulong_long="1"], - [pcre_have_ulong_long="0"]) -fi -AC_SUBST(pcre_have_long_long) -AC_SUBST(pcre_have_ulong_long) - # Checks for library functions. AC_CHECK_FUNCS(bcopy memmove strerror) @@ -365,10 +409,39 @@ AC_CHECK_HEADERS([zlib.h], [HAVE_ZLIB_H=1]) AC_CHECK_LIB([z], [gzopen], [HAVE_LIBZ=1]) -# Check for the availability of libbz2 +# Check for the availability of libbz2. Originally we just used AC_CHECK_LIB, +# as for libz. However, this had the following problem, diagnosed and fixed by +# a user: +# +# - libbz2 uses the Pascal calling convention (WINAPI) for the functions +# under Win32. +# - The standard autoconf AC_CHECK_LIB fails to include "bzlib.h", +# therefore missing the function definition. +# - The compiler thus generates a "C" signature for the test function. +# - The linker fails to find the "C" function. +# - PCRE fails to configure if asked to do so against libbz2. +# +# Solution: +# +# - Replace the AC_CHECK_LIB test with a custom test. AC_CHECK_HEADERS([bzlib.h], [HAVE_BZLIB_H=1]) -AC_CHECK_LIB([bz2], [BZ2_bzopen], [HAVE_LIBBZ2=1]) +# Original test +# AC_CHECK_LIB([bz2], [BZ2_bzopen], [HAVE_LIBBZ2=1]) +# +# Custom test follows + +AC_MSG_CHECKING([for libbz2]) +OLD_LIBS="$LIBS" +LIBS="$LIBS -lbz2" +AC_LINK_IFELSE( AC_LANG_PROGRAM([[ +#ifdef HAVE_BZLIB_H +#include <bzlib.h> +#endif]], +[[return (int)BZ2_bzopen("conftest", "rb");]]), +[AC_MSG_RESULT([yes]);HAVE_LIBBZ2=1; break;], +AC_MSG_RESULT([no])) +LIBS="$OLD_LIBS" # Check for the availabiity of libreadline @@ . patch -p0 <<'@@ .' Index: pcre/depcomp ============================================================================ $ cvs diff -u -r1.1.1.1 -r1.1.1.1.4.1 depcomp --- pcre/depcomp 14 Jan 2009 20:18:54 -0000 1.1.1.1 +++ pcre/depcomp 23 Aug 2010 13:08:53 -0000 1.1.1.1.4.1 @@ -1,10 +1,10 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2007-03-29.01 +scriptversion=2009-04-28.21; # UTC -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 Free Software -# Foundation, Inc. +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free +# Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -87,6 +87,15 @@ depmode=dashmstdout fi +cygpath_u="cygpath -u -f -" +if test "$depmode" = msvcmsys; then + # This is just like msvisualcpp but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u="sed s,\\\\\\\\,/,g" + depmode=msvisualcpp +fi + case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what @@ -192,14 +201,14 @@ ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' -' ' ' >> $depfile - echo >> $depfile +' ' ' >> "$depfile" + echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ - >> $depfile + >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile @@ -328,7 +337,12 @@ if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add `dependent.h:' lines. - sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile" + sed -ne '2,${ + s/^ *// + s/ \\*$// + s/$/:/ + p + }' "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi @@ -404,7 +418,7 @@ # Remove the call to Libtool. if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do + while test "X$1" != 'X--mode=compile'; do shift done shift @@ -455,32 +469,39 @@ "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do + while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift - cleared=no - for arg in "$@"; do + cleared=no eat=no + for arg + do case $cleared in no) set ""; shift cleared=yes ;; esac + if test $eat = yes; then + eat=no + continue + fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. + -arch) + eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done - obj_suffix="`echo $object | sed 's/^.*\././'`" + obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" @@ -500,7 +521,7 @@ # Remove the call to Libtool. if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do + while test "X$1" != 'X--mode=compile'; do shift done shift @@ -538,13 +559,27 @@ msvisualcpp) # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout, regardless of -o, - # because we must use -o when running libtool. + # always write the preprocessed file to stdout. "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + IFS=" " for arg do case "$arg" in + -o) + shift + ;; + $object) + shift + ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift @@ -557,16 +592,23 @@ ;; esac done - "$@" -E | - sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" + "$@" -E 2>/dev/null | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" - . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" - . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; +msvcmsys) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + none) exec "$@" ;; @@ -585,5 +627,6 @@ # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" # End: @@ . patch -p0 <<'@@ .' Index: pcre/doc/html/pcre.html ============================================================================ $ cvs diff -u -r1.1.1.3 -r1.1.1.3.2.1 pcre.html --- pcre/doc/html/pcre.html 5 Dec 2009 13:54:15 -0000 1.1.1.3 +++ pcre/doc/html/pcre.html 23 Aug 2010 13:08:59 -0000 1.1.1.3.2.1 @@ -30,10 +30,11 @@ for requesting some minor changes that give better JavaScript compatibility. </P> <P> -The current implementation of PCRE corresponds approximately with Perl 5.10, -including support for UTF-8 encoded strings and Unicode general category -properties. However, UTF-8 and Unicode support has to be explicitly enabled; it -is not the default. The Unicode tables correspond to Unicode release 5.1. +The current implementation of PCRE corresponds approximately with Perl +5.10/5.11, including support for UTF-8 encoded strings and Unicode general +category properties. However, UTF-8 and Unicode support has to be explicitly +enabled; it is not the default. The Unicode tables correspond to Unicode +release 5.2.0. </P> <P> In addition to the Perl-compatible matching function, PCRE contains an @@ -255,21 +256,29 @@ </P> <P> 6. The character escapes \b, \B, \d, \D, \s, \S, \w, and \W correctly -test characters of any code value, but the characters that PCRE recognizes as -digits, spaces, or word characters remain the same set as before, all with -values less than 256. This remains true even when PCRE includes Unicode -property support, because to do otherwise would slow down PCRE in many common -cases. If you really want to test for a wider sense of, say, "digit", you -must use Unicode property tests such as \p{Nd}. Note that this also applies to -\b, because it is defined in terms of \w and \W. +test characters of any code value, but, by default, the characters that PCRE +recognizes as digits, spaces, or word characters remain the same set as before, +all with values less than 256. This remains true even when PCRE is built to +include Unicode property support, because to do otherwise would slow down PCRE +in many common cases. Note that this also applies to \b, because it is defined +in terms of \w and \W. If you really want to test for a wider sense of, say, +"digit", you can use explicit Unicode property tests such as \p{Nd}. +Alternatively, if you set the PCRE_UCP option, the way that the character +escapes work is changed so that Unicode properties are used to determine which +characters match. There are more details in the section on +generic character types +in the +pcrepattern +documentation. </P> <P> 7. Similarly, characters that match the POSIX named character classes are all -low-valued characters. +low-valued characters, unless the PCRE_UCP option is set. </P> <P> 8. However, the Perl 5.10 horizontal and vertical whitespace matching escapes -(\h, \H, \v, and \V) do match all the appropriate Unicode characters. +(\h, \H, \v, and \V) do match all the appropriate Unicode characters, +whether or not PCRE_UCP is set. </P> <P> 9. Case-insensitive matching applies only to characters whose values are less @@ -298,9 +307,9 @@ </P> <br><a name="SEC6" href="#TOC1">REVISION</a><br> <P> -Last updated: 28 September 2009 +Last updated: 12 May 2010 <br> -Copyright © 1997-2009 University of Cambridge. +Copyright © 1997-2010 University of Cambridge. <br> <p> Return to the PCRE index page. @@ . patch -p0 <<'@@ .' Index: pcre/doc/html/pcre_compile.html ============================================================================ $ cvs diff -u -r1.1.1.2 -r1.1.1.2.2.1 pcre_compile.html --- pcre/doc/html/pcre_compile.html 5 Dec 2009 13:54:15 -0000 1.1.1.2 +++ pcre/doc/html/pcre_compile.html 23 Aug 2010 13:08:59 -0000 1.1.1.2.2.1 @@ -66,11 +66,12 @@ PCRE_NO_UTF8_CHECK Do not check the pattern for UTF-8 validity (only relevant if PCRE_UTF8 is set) + PCRE_UCP Use Unicode properties for \d, \w, etc. PCRE_UNGREEDY Invert greediness of quantifiers PCRE_UTF8 Run in UTF-8 mode </pre> PCRE must be built with UTF-8 support in order to use PCRE_UTF8 and -PCRE_NO_UTF8_CHECK. +PCRE_NO_UTF8_CHECK, and with UCP support if PCRE_UCP is used. </P> <P> The yield of the function is a pointer to a private data structure that @@ . patch -p0 <<'@@ .' Index: pcre/doc/html/pcre_compile2.html ============================================================================ $ cvs diff -u -r1.1.1.2 -r1.1.1.2.2.1 pcre_compile2.html --- pcre/doc/html/pcre_compile2.html 5 Dec 2009 13:54:14 -0000 1.1.1.2 +++ pcre/doc/html/pcre_compile2.html 23 Aug 2010 13:08:59 -0000 1.1.1.2.2.1 @@ -70,11 +70,12 @@ PCRE_NO_UTF8_CHECK Do not check the pattern for UTF-8 validity (only relevant if PCRE_UTF8 is set) + PCRE_UCP Use Unicode properties for \d, \w, etc. PCRE_UNGREEDY Invert greediness of quantifiers PCRE_UTF8 Run in UTF-8 mode </pre> PCRE must be built with UTF-8 support in order to use PCRE_UTF8 and -PCRE_NO_UTF8_CHECK. +PCRE_NO_UTF8_CHECK, and with UCP support if PCRE_UCP is used. </P> <P> The yield of the function is a pointer to a private data structure that @@ . patch -p0 <<'@@ .' Index: pcre/doc/html/pcreapi.html ============================================================================ $ cvs diff -u -r1.1.1.3 -r1.1.1.3.2.1 pcreapi.html --- pcre/doc/html/pcreapi.html 5 Dec 2009 13:54:16 -0000 1.1.1.3 +++ pcre/doc/html/pcreapi.html 23 Aug 2010 13:08:59 -0000 1.1.1.3.2.1 @@ -161,6 +161,13 @@ Applications can use these to include support for different releases of PCRE. </P> <P> +In a Windows environment, if you want to statically link an application program +against a non-dll <b>pcre.a</b> file, you must define PCRE_STATIC before +including <b>pcre.h</b> or <b>pcrecpp.h</b>, because otherwise the +<b>pcre_malloc()</b> and <b>pcre_free()</b> exported functions will be declared +<b>__declspec(dllimport)</b>, with unwanted results. +</P> +<P> The functions <b>pcre_compile()</b>, <b>pcre_compile2()</b>, <b>pcre_study()</b>, and <b>pcre_exec()</b> are used for compiling and matching regular expressions in a Perl-compatible manner. A sample program that demonstrates the simplest @@ -560,8 +567,9 @@ special meaning causes an error, thus reserving these combinations for future expansion. By default, as in Perl, a backslash followed by a letter with no special meaning is treated as a literal. (Perl can, however, be persuaded to -give a warning for this.) There are at present no other features controlled by -this option. It can also be set by a (?X) option setting within a pattern. +give an error for this, by running it with the -w option.) There are at present +no other features controlled by this option. It can also be set by a (?X) +option setting within a pattern. <pre> PCRE_FIRSTLINE </pre> @@ -648,6 +656,19 @@ they acquire numbers in the usual way). There is no equivalent of this option in Perl. <pre> + PCRE_UCP +</pre> +This option changes the way PCRE processes \b, \d, \s, \w, and some of the +POSIX character classes. By default, only ASCII characters are recognized, but +if PCRE_UCP is set, Unicode properties are used instead to classify characters. +More details are given in the section on +generic character types +in the +pcrepattern +page. If you set PCRE_UCP, matching one of the items it affects takes much +longer. The option is available only if PCRE has been compiled with Unicode +property support. +<pre> PCRE_UNGREEDY </pre> This option inverts the "greediness" of the quantifiers so that they are not @@ -741,19 +762,24 @@ 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 found + 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, 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 + 59 an argument is not allowed for (*ACCEPT), (*FAIL), or (*COMMIT) 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 + 65 different names for subpatterns of the same number are + not allowed + 66 (*MARK) must have an argument + 67 this version of PCRE is not compiled with PCRE_UCP support </pre> 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. @@ -820,17 +846,27 @@ single fixed starting character. A bitmap of possible starting bytes is created. This speeds up finding a position in the subject at which to start matching. +</P> +<P> +The two optimizations just described can be disabled by setting the +PCRE_NO_START_OPTIMIZE option when calling <b>pcre_exec()</b> or +<b>pcre_dfa_exec()</b>. You might want to do this if your pattern contains +callouts, or make use of (*MARK), and you make use of these in cases where +matching fails. See the discussion of PCRE_NO_START_OPTIMIZE +below. <a name="localesupport"></a></P> <br><a name="SEC10" href="#TOC1">LOCALE SUPPORT</a><br> <P> 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 Unicode 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. +less than 128. By default, higher-valued codes never match escapes such as \w +or \d, but they can be tested with \p if PCRE is built with Unicode character +property support. Alternatively, the PCRE_UCP option can be set at compile +time; this causes \w and friends to use Unicode property support instead of +built-in tables. The use of locales with Unicode 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. </P> <P> PCRE contains an internal set of tables that are used when the final argument @@ -1207,6 +1243,7 @@ unsigned long int <i>match_limit_recursion</i>; void *<i>callout_data</i>; const unsigned char *<i>tables</i>; + unsigned char **<i>mark</i>; </pre> The <i>flags</i> field is a bitmap that specifies which of the other fields are set. The flag bits are: @@ -1216,6 +1253,7 @@ PCRE_EXTRA_MATCH_LIMIT_RECURSION PCRE_EXTRA_CALLOUT_DATA PCRE_EXTRA_TABLES + PCRE_EXTRA_MARK </pre> Other flag bits should be set to zero. The <i>study_data</i> field is set in the <b>pcre_extra</b> block that is returned by <b>pcre_study()</b>, together with @@ -1282,6 +1320,21 @@ called. See the pcreprecompile documentation for a discussion of saving compiled patterns for later use. +</P> +<P> +If PCRE_EXTRA_MARK is set in the <i>flags</i> field, the <i>mark</i> field must +be set to point to a <b>char *</b> variable. If the pattern contains any +backtracking control verbs such as (*MARK:NAME), and the execution ends up with +a name to pass back, a pointer to the name string (zero terminated) is placed +in the variable pointed to by the <i>mark</i> field. The names are within the +compiled pattern; if you wish to retain such a name you must copy it before +freeing the memory of a compiled pattern. If there is no name to pass back, the +variable pointed to by the <i>mark</i> field set to NULL. For details of the +backtracking control verbs, see the section entitled +"Backtracking control" +in the +pcrepattern +documentation. <a name="execoptions"></a></P> <br><b> Option bits for <b>pcre_exec()</b> @@ -1395,12 +1448,47 @@ PCRE_NO_START_OPTIMIZE </pre> There are a number of optimizations that <b>pcre_exec()</b> uses at the start of -a match, in order to speed up the process. For example, if it is known that a -match must start with a specific character, it searches the subject for that -character, and fails immediately if it cannot find it, without actually running -the main matching function. When callouts are in use, these optimizations can -cause them to be skipped. This option disables the "start-up" optimizations, -causing performance to suffer, but ensuring that the callouts do occur. +a match, in order to speed up the process. For example, if it is known that an +unanchored match must start with a specific character, it searches the subject +for that character, and fails immediately if it cannot find it, without +actually running the main matching function. This means that a special item +such as (*COMMIT) at the start of a pattern is not considered until after a +suitable starting point for the match has been found. When callouts or (*MARK) +items are in use, these "start-up" optimizations can cause them to be skipped +if the pattern is never actually used. The start-up optimizations are in effect +a pre-scan of the subject that takes place before the pattern is run. +</P> +<P> +The PCRE_NO_START_OPTIMIZE option disables the start-up optimizations, possibly +causing performance to suffer, but ensuring that in cases where the result is +"no match", the callouts do occur, and that items such as (*COMMIT) and (*MARK) +are considered at every possible starting position in the subject string. +Setting PCRE_NO_START_OPTIMIZE can change the outcome of a matching operation. +Consider the pattern +<pre> + (*COMMIT)ABC +</pre> +When this is compiled, PCRE records the fact that a match must start with the +character "A". Suppose the subject string is "DEFABC". The start-up +optimization scans along the subject, finds "A" and runs the first match +attempt from there. The (*COMMIT) item means that the pattern must match the +current starting position, which in this case, it does. However, if the same +match is run with PCRE_NO_START_OPTIMIZE set, the initial scan along the +subject string does not happen. The first match attempt is run starting from +"D" and when this fails, (*COMMIT) prevents any further matches being tried, so +the overall result is "no match". If the pattern is studied, more start-up +optimizations may be used. For example, a minimum length for the subject may be +recorded. Consider the pattern +<pre> + (*MARK:A)(X|Y) +</pre> +The minimum length for a match is one character. If the subject is "ABC", there +will be attempts to match "ABC", "BC", "C", and then finally an empty string. +If the pattern is studied, the final attempt does not take place, because PCRE +knows that the subject is too short, and so the (*MARK) is never encountered. +In this case, studying the pattern does not affect the overall match result, +which is still "no match", but it does affect the auxiliary information that is +returned. <pre> PCRE_NO_UTF8_CHECK </pre> @@ -1603,6 +1691,11 @@ gets a block of memory at the start of matching to use for this purpose. If the call via <b>pcre_malloc()</b> fails, this error is given. The memory is automatically freed at the end of matching. +</P> +<P> +This error is also given if <b>pcre_stack_malloc()</b> fails in +<b>pcre_exec()</b>. This can happen only when PCRE has been compiled with +<b>--disable-stack-for-recursion</b>. <pre> PCRE_ERROR_NOSUBSTRING (-7) </pre> @@ -1939,9 +2032,10 @@ The unused bits of the <i>options</i> argument for <b>pcre_dfa_exec()</b> must be zero. The only bits that may be set are PCRE_ANCHORED, PCRE_NEWLINE_<i>xxx</i>, PCRE_NOTBOL, PCRE_NOTEOL, PCRE_NOTEMPTY, PCRE_NOTEMPTY_ATSTART, -PCRE_NO_UTF8_CHECK, PCRE_PARTIAL_HARD, PCRE_PARTIAL_SOFT, PCRE_DFA_SHORTEST, -and PCRE_DFA_RESTART. All but the last four of these are exactly the same as -for <b>pcre_exec()</b>, so their description is not repeated here. +PCRE_NO_UTF8_CHECK, PCRE_BSR_ANYCRLF, PCRE_BSR_UNICODE, PCRE_NO_START_OPTIMIZE, +PCRE_PARTIAL_HARD, PCRE_PARTIAL_SOFT, PCRE_DFA_SHORTEST, and PCRE_DFA_RESTART. +All but the last four of these are exactly the same as for <b>pcre_exec()</b>, +so their description is not repeated here. <pre> PCRE_PARTIAL_HARD PCRE_PARTIAL_SOFT @@ -2067,9 +2161,9 @@ </P> <br><a name="SEC22" href="#TOC1">REVISION</a><br> <P> -Last updated: 03 October 2009 +Last updated: 21 June 2010 <br> -Copyright © 1997-2009 University of Cambridge. +Copyright © 1997-2010 University of Cambridge. <br> <p> Return to the PCRE index page. @@ . patch -p0 <<'@@ .' Index: pcre/doc/html/pcrecompat.html ============================================================================ $ cvs diff -u -r1.1.1.2 -r1.1.1.2.2.1 pcrecompat.html --- pcre/doc/html/pcrecompat.html 5 Dec 2009 13:54:14 -0000 1.1.1.2 +++ pcre/doc/html/pcrecompat.html 23 Aug 2010 13:08:59 -0000 1.1.1.2.2.1 @@ -18,7 +18,7 @@ <P> This document describes the differences in the ways that PCRE and Perl handle regular expressions. The differences described here are with respect to Perl -5.10. +5.10/5.11. </P> <P> 1. PCRE has only a subset of Perl's UTF-8 and Unicode support. Details of what @@ -102,12 +102,7 @@ the pattern /^(a(b)?)+$/ in Perl leaves $2 unset, but in PCRE it is set to "b". </P> <P> -11. PCRE does support Perl 5.10's backtracking verbs (*ACCEPT), (*FAIL), (*F), -(*COMMIT), (*PRUNE), (*SKIP), and (*THEN), but only in the forms without an -argument. PCRE does not support (*MARK). -</P> -<P> -12. PCRE's handling of duplicate subpattern numbers and duplicate subpattern +11. PCRE's handling of duplicate subpattern numbers and duplicate subpattern names is not as general as Perl's. This is a consequence of the fact the PCRE works internally just with numbers, using an external table to translate between numbers and names. In particular, a pattern such as (?|(?<a>A)|(?<b)B), @@ -118,7 +113,7 @@ an error is given at compile time. </P> <P> -13. PCRE provides some extensions to the Perl regular expression facilities. +12. PCRE provides some extensions to the Perl regular expression facilities. Perl 5.10 includes new features that are not in earlier versions of Perl, some of which (such as named parentheses) have been in PCRE for some time. This list is with respect to Perl 5.10: @@ -187,9 +182,9 @@ REVISION </b><br> <P> -Last updated: 04 October 2009 +Last updated: 12 May 2010 <br> -Copyright © 1997-2009 University of Cambridge. +Copyright © 1997-2010 University of Cambridge. <br> <p> Return to the PCRE index page. @@ . patch -p0 <<'@@ .' Index: pcre/doc/html/pcredemo.html ============================================================================ $ cvs diff -u -r1.1.1.1 -r1.1.1.1.2.1 pcredemo.html --- pcre/doc/html/pcredemo.html 5 Dec 2009 13:54:16 -0000 1.1.1.1 +++ pcre/doc/html/pcredemo.html 23 Aug 2010 13:08:59 -0000 1.1.1.1.2.1 @@ -24,14 +24,24 @@ pcresample documentation for a short discussion ("man pcresample" if you have the PCRE man pages installed). -In Unix-like environments, compile this program thuswise: +In Unix-like environments, if PCRE is installed in your standard system +libraries, you should be able to compile this program using this command: - gcc -Wall pcredemo.c -I/usr/local/include -L/usr/local/lib \ - -R/usr/local/lib -lpcre +gcc -Wall pcredemo.c -lpcre -o pcredemo + +If PCRE is not installed in a standard place, it is likely to be installed with +support for the pkg-config mechanism. If you have pkg-config, you can compile +this program using this command: + +gcc -Wall pcredemo.c `pkg-config --cflags --libs libpcre` -o pcredemo + +If you do not have pkg-config, you may have to use this: + +gcc -Wall pcredemo.c -I/usr/local/include -L/usr/local/lib \ + -R/usr/local/lib -lpcre -o pcredemo Replace "/usr/local/include" and "/usr/local/lib" with wherever the include and -library files for PCRE are installed on your system. You don't need -I and -L -if PCRE is installed in the standard system libraries. Only some operating +library files for PCRE are installed on your system. Only some operating systems (e.g. Solaris) use the -R option. Building under Windows: @@ . patch -p0 <<'@@ .' Index: pcre/doc/html/pcregrep.html ============================================================================ $ cvs diff -u -r1.1.1.3 -r1.1.1.3.2.1 pcregrep.html --- pcre/doc/html/pcregrep.html 5 Dec 2009 13:54:15 -0000 1.1.1.3 +++ pcre/doc/html/pcregrep.html 23 Aug 2010 13:08:59 -0000 1.1.1.3.2.1 @@ -178,8 +178,8 @@ connected to a terminal. More resources are used when colouring is enabled, because <b>pcregrep</b> has to search for all possible matches in a line, not just one, in order to colour them all. -</P> -<P> +<br> +<br> The colour that is used can be specified by setting the environment variable PCREGREP_COLOUR or PCREGREP_COLOR. The value of this variable should be a string of two numbers, separated by a semicolon. They are copied directly into @@ -338,6 +338,17 @@ short form for this option. </P> <P> +<b>--line-buffered</b> +When this option is given, input is read and processed line by line, and the +output is flushed after each write. By default, input is read in large chunks, +unless <b>pcregrep</b> can determine that it is reading from a terminal (which +is currently possible only in Unix environments). Output to terminal is +normally automatically flushed by the operating system. This option can be +useful when the input or output is attached to a pipe and you do not want +<b>pcregrep</b> to buffer up large amounts of data. However, its use will affect +performance, and the <b>-M</b> (multiline) option ceases to work. +</P> +<P> <b>--line-offsets</b> Instead of showing lines or parts of lines that match, show each match as a line number, the offset from the start of the line, and a length. The line @@ -365,7 +376,8 @@ <b>pcregrep</b> ensures that at least 8K characters or the rest of the document (whichever is the shorter) are available for forward matching, and similarly the previous 8K characters (or all the previous characters, if fewer than 8K) -are guaranteed to be available for lookbehind assertions. +are guaranteed to be available for lookbehind assertions. This option does not +work when input is read line by line (see \fP--line-buffered\fP.) </P> <P> <b>-N</b> <i>newline-type</i>, <b>--newline=</b><i>newline-type</i> @@ -538,9 +550,9 @@ </P> <br><a name="SEC13" href="#TOC1">REVISION</a><br> <P> -Last updated: 13 September 2009 +Last updated: 21 May 2010 <br> -Copyright © 1997-2009 University of Cambridge. +Copyright © 1997-2010 University of Cambridge. <br> <p> Return to the PCRE index page. @@ . patch -p0 <<'@@ .' Index: pcre/doc/html/pcrepattern.html ============================================================================ $ cvs diff -u -r1.1.1.3 -r1.1.1.3.2.1 pcrepattern.html --- pcre/doc/html/pcrepattern.html 5 Dec 2009 13:54:16 -0000 1.1.1.3 +++ pcre/doc/html/pcrepattern.html 23 Aug 2010 13:08:59 -0000 1.1.1.3.2.1 @@ -18,7 +18,7 @@ <li><a name="TOC3" href="#SEC3">CHARACTERS AND METACHARACTERS</a> <li><a name="TOC4" href="#SEC4">BACKSLASH</a> <li><a name="TOC5" href="#SEC5">CIRCUMFLEX AND DOLLAR</a> -<li><a name="TOC6" href="#SEC6">FULL STOP (PERIOD, DOT)</a> +<li><a name="TOC6" href="#SEC6">FULL STOP (PERIOD, DOT) AND \N</a> <li><a name="TOC7" href="#SEC7">MATCHING A SINGLE BYTE</a> <li><a name="TOC8" href="#SEC8">SQUARE BRACKETS AND CHARACTER CLASSES</a> <li><a name="TOC9" href="#SEC9">POSIX CHARACTER CLASSES</a> @@ -78,6 +78,17 @@ page. </P> <P> +Another special sequence that may appear at the start of a pattern or in +combination with (*UTF8) is: +<pre> + (*UCP) +</pre> +This has the same effect as setting the PCRE_UCP option: it causes sequences +such as \d and \w to use Unicode properties to determine character types, +instead of recognizing only characters with codes less than 128 via a lookup +table. +</P> +<P> The remainder of this document discusses the patterns that are supported by PCRE when its main matching function, <b>pcre_exec()</b>, is used. From release 6.0, PCRE offers a second matching function, @@ -124,9 +135,11 @@ is used. </P> <P> -The newline convention does not affect what the \R escape sequence matches. By -default, this is any Unicode newline sequence, for Perl compatibility. However, -this can be changed; see the description of \R in the section entitled +The newline convention affects the interpretation of the dot metacharacter when +PCRE_DOTALL is not set, and also the behaviour of \N. However, it does not +affect what the \R escape sequence matches. By default, this is any Unicode +newline sequence, for Perl compatibility. However, this can be changed; see the +description of \R in the section entitled "Newline sequences" below. A change of \R setting can be combined with a change of newline convention. @@ -239,7 +252,7 @@ \n linefeed (hex 0A) \r carriage return (hex 0D) \t tab (hex 09) - \ddd character with octal code ddd, or backreference + \ddd character with octal code ddd, or back reference \xhh character with hex code hh \x{hhh..} character with hex code hhh.. </pre> @@ -308,11 +321,11 @@ <P> All the sequences that define a single character value can be used both inside and outside character classes. In addition, inside a character class, the -sequence \b is interpreted as the backspace character (hex 08), and the -sequences \R and \X are interpreted as the characters "R" and "X", -respectively. Outside a character class, these sequences have different -meanings -(see below). +sequence \b is interpreted as the backspace character (hex 08). The sequences +\B, \N, \R, and \X are not special inside a character class. Like any other +unrecognized escape sequences, they are treated as the literal characters "B", +"N", "R", and "X" by default, but cause an error if the PCRE_EXTRA option is +set. Outside a character class, these sequences have different meanings. </P> <br><b> Absolute and relative back references @@ -337,13 +350,12 @@ synonymous. The former is a back reference; the latter is a subroutine call. -</P> +<a name="genericchartypes"></a></P> <br><b> Generic character types </b><br> <P> -Another use of backslash is for specifying generic character types. The -following are always recognized: +Another use of backslash is for specifying generic character types: <pre> \d any decimal digit \D any character that is not a decimal digit @@ -356,13 +368,17 @@ \w any "word" character \W any "non-word" character </pre> -Each pair of escape sequences partitions the complete set of characters into -two disjoint sets. Any given character matches one, and only one, of each pair. +There is also the single sequence \N, which matches a non-newline character. +This is the same as +the "." metacharacter +when PCRE_DOTALL is not set. </P> <P> -These character type sequences can appear both inside and outside character +Each pair of lower and upper case escape sequences partitions the complete set +of characters into two disjoint sets. Any given character matches one, and only +one, of each pair. The sequences can appear both inside and outside character 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 +matching point is at the end of the subject string, all of them fail, because there is no character to match. </P> <P> @@ -373,17 +389,41 @@ does. </P> <P> -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 Unicode -character property support is available. These sequences retain their original -meanings from before UTF-8 support was available, mainly for efficiency -reasons. Note that this also affects \b, because it is defined in terms of \w -and \W. +A "word" character is an underscore or any character that is a letter or digit. +By default, the definition of letters and digits is controlled 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 then matched by \w. The use of locales with +Unicode is discouraged. +</P> +<P> +By default, in UTF-8 mode, characters with values greater than 128 never match +\d, \s, or \w, and always match \D, \S, and \W. These sequences retain +their original meanings from before UTF-8 support was available, mainly for +efficiency reasons. However, if PCRE is compiled with Unicode property support, +and the PCRE_UCP option is set, the behaviour is changed so that Unicode +properties are used to determine character types, as follows: +<pre> + \d any character that \p{Nd} matches (decimal digit) + \s any character that \p{Z} matches, plus HT, LF, FF, CR + \w any character that \p{L} or \p{N} matches, plus underscore +</pre> +The upper case escapes match the inverse sets of characters. Note that \d +matches only decimal digits, whereas \w matches any Unicode digit, as well as +any Unicode letter, and underscore. Note also that PCRE_UCP affects \b, and +\B because they are defined in terms of \w and \W. Matching these sequences +is noticeably slower when PCRE_UCP is set. </P> <P> 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 UTF-8 mode. -The horizontal space characters are: +other sequences, which match only ASCII characters by default, these always +match certain high-valued codepoints in UTF-8 mode, whether or not PCRE_UCP is +set. The horizontal space characters are: <pre> U+0009 Horizontal tab U+0020 Space @@ -414,21 +454,8 @@ U+0085 Next line U+2028 Line separator U+2029 Paragraph separator -</PRE> +<a name="newlineseq"></a></PRE> </P> -<P> -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 controlled 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. -<a name="newlineseq"></a></P> <br><b> Newline sequences </b><br> @@ -471,11 +498,13 @@ 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 can start with: +convention; for example, a pattern can start with: <pre> (*ANY)(*BSR_ANYCRLF) </pre> -Inside a character class, \R matches the letter "R". +They can also be combined with the (*UTF8) or (*UCP) special sequences. Inside +a character class, \R is treated as an unrecognized escape sequence, and so +matches the letter "R" by default, but causes an error if PCRE_EXTRA is set. <a name="uniextseq"></a></P> <br><b> Unicode character properties @@ -492,10 +521,13 @@ \X an extended Unicode sequence </pre> The property names represented by <i>xx</i> above are limited to the Unicode -script names, the general category properties, and "Any", which matches any -character (including newline). Other properties such as "InMusicalSymbols" are -not currently supported by PCRE. Note that \P{Any} does not match any -characters, so always causes a match failure. +script names, the general category properties, "Any", which matches any +character (including newline), and some special PCRE properties (described +in the +next section). +Other Perl properties such as "InMusicalSymbols" are not currently supported by +PCRE. Note that \P{Any} does not match any characters, so always causes a +match failure. </P> <P> Sets of Unicode characters are defined as belonging to certain scripts. A @@ -511,13 +543,17 @@ <P> Arabic, Armenian, +Avestan, Balinese, +Bamum, Bengali, Bopomofo, Braille, Buginese, Buhid, Canadian_Aboriginal, +Carian, +Cham, Cherokee, Common, Coptic, @@ -526,6 +562,7 @@ Cyrillic, Deseret, Devanagari, +Egyptian_Hieroglyphs, Ethiopic, Georgian, Glagolitic, @@ -538,16 +575,27 @@ Hanunoo, Hebrew, Hiragana, +Imperial_Aramaic, Inherited, +Inscriptional_Pahlavi, +Inscriptional_Parthian, +Javanese, +Kaithi, Kannada, Katakana, +Kayah_Li, Kharoshthi, Khmer, Lao, Latin, +Lepcha, Limbu, Linear_B, +Lisu, +Lycian, +Lydian, Malayalam, +Meetei_Mayek, Mongolian, Myanmar, New_Tai_Lue, @@ -555,18 +603,27 @@ Ogham, Old_Italic, Old_Persian, +Old_South_Arabian, +Old_Turkic, +Ol_Chiki, Oriya, Osmanya, Phags_Pa, Phoenician, +Rejang, Runic, +Samaritan, +Saurashtra, Shavian, Sinhala, +Sundanese, Syloti_Nagri, Syriac, Tagalog, Tagbanwa, Tai_Le, +Tai_Tham, +Tai_Viet, Tamil, Telugu, Thaana, @@ -574,13 +631,14 @@ Tibetan, Tifinagh, Ugaritic, +Vai, Yi. </P> <P> -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 property name. For -example, \p{^Lu} is the same as \P{Lu}. +Each character has exactly one Unicode 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 property +name. For example, \p{^Lu} is the same as \P{Lu}. </P> <P> If only one letter is specified with \p or \P, it includes all the general @@ -681,7 +739,30 @@ 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. +properties in PCRE by default, though you can make them do so by setting the +PCRE_UCP option for <b>pcre_compile()</b> or by starting the pattern with +(*UCP). +<a name="extraprops"></a></P> +<br><b> +PCRE's additional properties +</b><br> +<P> +As well as the standard Unicode properties described in the previous +section, PCRE supports four more that make it possible to convert traditional +escape sequences such as \w and \s and POSIX character classes to use Unicode +properties. PCRE uses these non-standard, non-Perl properties internally when +PCRE_UCP is set. They are: +<pre> + Xan Any alphanumeric character + Xps Any POSIX space character + Xsp Any Perl space character + Xwd Any Perl "word" character +</pre> +Xan matches characters that have either the L (letter) or the N (number) +property. Xps matches the characters tab, linefeed, vertical tab, formfeed, or +carriage return, and any other character that has the Z (separator) property. +Xsp is the same as Xps, except that vertical tab is excluded. Xwd matches the +same characters as Xan, plus underscore. <a name="resetmatchstart"></a></P> <br><b> Resetting the match start @@ -705,6 +786,11 @@ (foo)\Kbar </pre> matches "foobar", the first substring is still set to "foo". +</P> +<P> +Perl documents that the use of \K within assertions is "not well defined". In +PCRE, \K is acted upon when it occurs inside positive assertions, but is +ignored in negative assertions. <a name="smallassertions"></a></P> <br><b> Simple assertions @@ -725,17 +811,22 @@ \z matches only at the end of the subject \G matches at the first matching position in the subject </pre> -These assertions may not appear in character classes (but note that \b has a -different meaning, namely the backspace character, inside a character class). +Inside a character class, \b has a different meaning; it matches the backspace +character. If any other of these assertions appears in a character class, by +default it matches the corresponding literal character (for example, \B +matches the letter B). However, if the PCRE_EXTRA option is set, an "invalid +escape sequence" error is generated instead. </P> <P> 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. Neither PCRE nor Perl has a -separte "start of word" or "end of word" metasequence. However, whatever -follows \b normally determines which it is. For example, the fragment -\ba matches "a" at the start of a word. +first or last character matches \w, respectively. In UTF-8 mode, the meanings +of \w and \W can be changed by setting the PCRE_UCP option. When this is +done, it also affects \b and \B. Neither PCRE nor Perl has a separate "start +of word" or "end of word" metasequence. However, whatever follows \b normally +determines which it is. For example, the fragment \ba matches "a" at the start +of a word. </P> <P> The \A, \Z, and \z assertions differ from the traditional circumflex and @@ -822,8 +913,8 @@ 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. -</P> -<br><a name="SEC6" href="#TOC1">FULL STOP (PERIOD, DOT)</a><br> +<a name="fullstopdot"></a></P> +<br><a name="SEC6" href="#TOC1">FULL STOP (PERIOD, DOT) AND \N</a><br> <P> Outside a character class, a dot in the pattern matches any one character in the subject string except (by default) a character that signifies the end of a @@ -848,6 +939,11 @@ dollar, the only relationship being that they both involve newlines. Dot has no special meaning in a character class. </P> +<P> +The escape sequence \N always behaves as a dot does when PCRE_DOTALL is not +set. In other words, it matches any one character except one that signifies the +end of a line. +</P> <br><a name="SEC7" href="#TOC1">MATCHING A SINGLE BYTE</a><br> <P> Outside a character class, the escape sequence \C matches any one byte, both @@ -944,12 +1040,12 @@ property support. </P> <P> -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 circumflex 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 character types \d, \D, \h, \H, \p, \P, \s, \S, \v, \V, \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 +circumflex 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. </P> <P> The only metacharacters that are recognized in character classes are backslash, @@ -968,7 +1064,7 @@ [01[:alpha:]%] </pre> matches "0", "1", any alphabetic character, or "%". The supported class names -are +are: <pre> alnum letters and digits alpha letters @@ -979,7 +1075,7 @@ graph printing characters, excluding space lower lower case letters print printing characters, including space - punct printing characters, excluding letters and digits + punct printing characters, excluding letters and digits and space space white space (not quite the same as \s) upper upper case letters word "word" characters (same as \w) @@ -1002,8 +1098,24 @@ supported, and an error is given if they are encountered. </P> <P> -In UTF-8 mode, characters with values greater than 128 do not match any of -the POSIX character classes. +By default, in UTF-8 mode, characters with values greater than 128 do not match +any of the POSIX character classes. However, if the PCRE_UCP option is passed +to <b>pcre_compile()</b>, some of the classes are changed so that Unicode +character properties are used. This is achieved by replacing the POSIX classes +by other sequences, as follows: +<pre> + [:alnum:] becomes \p{Xan} + [:alpha:] becomes \p{L} + [:blank:] becomes \h + [:digit:] becomes \p{Nd} + [:lower:] becomes \p{Ll} + [:space:] becomes \p{Xps} + [:upper:] becomes \p{Lu} + [:word:] becomes \p{Xwd} +</pre> +Negated versions, such as [:^alpha:] use \P instead of \p. The other POSIX +classes are unchanged, and match only characters with code points less than +128. </P> <br><a name="SEC10" href="#TOC1">VERTICAL BAR</a><br> <P> @@ -1076,8 +1188,9 @@ the application has set or what has been defaulted. Details are given in the section entitled "Newline sequences" -above. There is also the (*UTF8) leading sequence that can be used to set UTF-8 -mode; this is equivalent to setting the PCRE_UTF8 option. +above. There are also the (*UTF8) and (*UCP) leading sequences that can be used +to set UTF-8 and Unicode property modes; they are equivalent to setting the +PCRE_UTF8 and the PCRE_UCP options, respectively. <a name="subpattern"></a></P> <br><a name="SEC12" href="#TOC1">SUBPATTERNS</a><br> <P> @@ -1157,9 +1270,9 @@ / ( a ) (?| x ( y ) z | (p (q) r) | (t) u (v) ) ( z ) /x # 1 2 2 3 2 3 4 </pre> -A backreference to a numbered subpattern uses the most recent value that is set -for that number by any subpattern. The following pattern matches "abcabc" or -"defdef": +A back reference to a numbered subpattern uses the most recent value that is +set for that number by any subpattern. The following pattern matches "abcabc" +or "defdef": <pre> /(?|(abc)|(def))\1/ </pre> @@ -1193,7 +1306,7 @@ In PCRE, a subpattern can be named in one of three ways: (?<name>...) or (?'name'...) as in Perl, or (?P<name>...) as in Python. References to capturing parentheses from other parts of the pattern, such as -backreferences, +back references, recursion, and conditions, @@ -1232,7 +1345,7 @@ matched. This saves searching to find which numbered subpattern it was. </P> <P> -If you make a backreference to a non-unique named subpattern from elsewhere in +If you make a back reference to a non-unique named subpattern from elsewhere in the pattern, the one that corresponds to the first occurrence of the name is used. In the absence of duplicate numbers (see the previous section) this is the one with the lowest number. If you use a named reference in a condition @@ -1385,7 +1498,7 @@ </P> <P> However, there is one situation where the optimization cannot be used. When .* -is inside capturing parentheses that are the subject of a backreference +is inside capturing parentheses that are the subject of a back reference elsewhere in the pattern, a match at the start may fail where a later one succeeds. Consider, for example: <pre> @@ -1616,6 +1729,9 @@ "Comments" below) can be used. </P> +<br><b> +Recursive back references +</b><br> <P> A back reference that occurs inside the parentheses to which it refers fails when the subpattern is first used, so, for example, (a\1) never matches. @@ -1630,6 +1746,13 @@ that the first iteration does not need to match the back reference. This can be done using alternation, as in the example above, or by a quantifier with a minimum of zero. +</P> +<P> +Back references of this type cause the group that they reference to be treated +as an +atomic group. +Once the whole group has been matched, a subsequent matching failure cannot +cause backtracking into the middle of the group. <a name="bigassertions"></a></P> <br><a name="SEC18" href="#TOC1">ASSERTIONS</a><br> <P> @@ -2248,7 +2371,7 @@ description of the interface to the callout function is given in the pcrecallout documentation. -</P> +<a name="backtrackcontrol"></a></P> <br><a name="SEC25" href="#TOC1">BACKTRACKING CONTROL</a><br> <P> Perl 5.10 introduced a number of "Special Backtracking Control Verbs", which @@ -2272,16 +2395,28 @@ </P> <P> The new verbs make use of what was previously invalid syntax: an opening -parenthesis followed by an asterisk. In Perl, they are generally of the form -(*VERB:ARG) but PCRE does not support the use of arguments, so its general -form is just (*VERB). Any number of these verbs may occur in a pattern. There -are two kinds: +parenthesis followed by an asterisk. They are generally of the form +(*VERB) or (*VERB:NAME). Some may take either form, with differing behaviour, +depending on whether or not an argument is present. An name is a sequence of +letters, digits, and underscores. If the name is empty, that is, if the closing +parenthesis immediately follows the colon, the effect is as if the colon were +not there. Any number of these verbs may occur in a pattern. +</P> +<P> +PCRE contains some optimizations that are used to speed up matching by running +some checks at the start of each match attempt. For example, it may know the +minimum length of matching subject, or that a particular character must be +present. When one of these optimizations suppresses the running of a match, any +included backtracking verbs will not, of course, be processed. You can suppress +the start-of-match optimizations by setting the PCRE_NO_START_OPTIMIZE option +when calling <b>pcre_exec()</b>. </P> <br><b> Verbs that act immediately </b><br> <P> -The following verbs act as soon as they are encountered: +The following verbs act as soon as they are encountered. They may not be +followed by a name. <pre> (*ACCEPT) </pre> @@ -2309,43 +2444,140 @@ each backtrack happens (in this example, 10 times). </P> <br><b> +Recording which path was taken +</b><br> +<P> +There is one verb whose main purpose is to track how a match was arrived at, +though it also has a secondary use in conjunction with advancing the match +starting point (see (*SKIP) below). +<pre> + (*MARK:NAME) or (*:NAME) +</pre> +A name is always required with this verb. There may be as many instances of +(*MARK) as you like in a pattern, and their names do not have to be unique. +</P> +<P> +When a match succeeds, the name of the last-encountered (*MARK) is passed back +to the caller via the <i>pcre_extra</i> data structure, as described in the +section on pcre_extra +in the +pcreapi +documentation. No data is returned for a partial match. Here is an example of +<b>pcretest</b> output, where the /K modifier requests the retrieval and +outputting of (*MARK) data: +<pre> + /X(*MARK:A)Y|X(*MARK:B)Z/K + XY + 0: XY + MK: A + XZ + 0: XZ + MK: B +</pre> +The (*MARK) name is tagged with "MK:" in this output, and in this example it +indicates which of the two alternatives matched. This is a more efficient way +of obtaining this information than putting each alternative in its own +capturing parentheses. +</P> +<P> +A name may also be returned after a failed match if the final path through the +pattern involves (*MARK). However, unless (*MARK) used in conjunction with +(*COMMIT), this is unlikely to happen for an unanchored pattern because, as the +starting point for matching is advanced, the final check is often with an empty +string, causing a failure before (*MARK) is reached. For example: +<pre> + /X(*MARK:A)Y|X(*MARK:B)Z/K + XP + No match +</pre> +There are three potential starting points for this match (starting with X, +starting with P, and with an empty string). If the pattern is anchored, the +result is different: +<pre> + /^X(*MARK:A)Y|^X(*MARK:B)Z/K + XP + No match, mark = B +</pre> +PCRE's start-of-match optimizations can also interfere with this. For example, +if, as a result of a call to <b>pcre_study()</b>, it knows the minimum +subject length for a match, a shorter subject will not be scanned at all. +</P> +<P> +Note that similar anomalies (though different in detail) exist in Perl, no +doubt for the same reasons. The use of (*MARK) data after a failed match of an +unanchored pattern is not recommended, unless (*COMMIT) is involved. +</P> +<br><b> Verbs that act after backtracking </b><br> <P> The following verbs do nothing when they are encountered. Matching continues -with what follows, but if there is no subsequent match, a failure is forced. -The verbs differ in exactly what kind of failure occurs. +with what follows, but if there is no subsequent match, causing a backtrack to +the verb, a failure is forced. That is, backtracking cannot pass to the left of +the verb. However, when one of these verbs appears inside an atomic group, its +effect is confined to that group, because once the group has been matched, +there is never any backtracking into it. In this situation, backtracking can +"jump back" to the left of the entire atomic group. (Remember also, as stated +above, that this localization also applies in subroutine calls and assertions.) +</P> +<P> +These verbs differ in exactly what kind of failure occurs when backtracking +reaches them. <pre> (*COMMIT) </pre> -This verb causes the whole match to fail outright if the rest of the pattern -does not match. Even if the pattern is unanchored, no further attempts to find -a match by advancing the starting point take place. Once (*COMMIT) has been -passed, <b>pcre_exec()</b> is committed to finding a match at the current -starting point, or not at all. For example: +This verb, which may not be followed by a name, causes the whole match to fail +outright if the rest of the pattern does not match. Even if the pattern is +unanchored, no further attempts to find a match by advancing the starting point +take place. Once (*COMMIT) has been passed, <b>pcre_exec()</b> is committed to +finding a match at the current starting point, or not at all. For example: <pre> a+(*COMMIT)b </pre> This matches "xxaab" but not "aacaab". It can be thought of as a kind of -dynamic anchor, or "I've started, so I must finish." -<pre> - (*PRUNE) -</pre> -This verb causes the match to fail at the current position if the rest of the -pattern does not match. If the pattern is unanchored, the normal "bumpalong" -advance to the next starting character then happens. Backtracking can occur as -usual to the left of (*PRUNE), or when matching to the right of (*PRUNE), but -if there is no match to the right, backtracking cannot cross (*PRUNE). -In simple cases, the use of (*PRUNE) is just an alternative to an atomic -group or possessive quantifier, but there are some uses of (*PRUNE) that cannot -be expressed in any other way. +dynamic anchor, or "I've started, so I must finish." The name of the most +recently passed (*MARK) in the path is passed back when (*COMMIT) forces a +match failure. +</P> +<P> +Note that (*COMMIT) at the start of a pattern is not the same as an anchor, +unless PCRE's start-of-match optimizations are turned off, as shown in this +<b>pcretest</b> example: +<pre> + /(*COMMIT)abc/ + xyzabc + 0: abc + xyzabc\Y + No match +</pre> +PCRE knows that any match must start with "a", so the optimization skips along +the subject to "a" before running the first match attempt, which succeeds. When +the optimization is disabled by the \Y escape in the second subject, the match +starts at "x" and so the (*COMMIT) causes it to fail without trying any other +starting points. +<pre> + (*PRUNE) or (*PRUNE:NAME) +</pre> +This verb causes the match to fail at the current starting position in the +subject if the rest of the pattern does not match. If the pattern is +unanchored, the normal "bumpalong" advance to the next starting character then +happens. Backtracking can occur as usual to the left of (*PRUNE), before it is +reached, or when matching to the right of (*PRUNE), but if there is no match to +the right, backtracking cannot cross (*PRUNE). In simple cases, the use of +(*PRUNE) is just an alternative to an atomic group or possessive quantifier, +but there are some uses of (*PRUNE) that cannot be expressed in any other way. +The behaviour of (*PRUNE:NAME) is the same as (*MARK:NAME)(*PRUNE) when the +match fails completely; the name is passed back if this is the final attempt. +(*PRUNE:NAME) does not pass back a name if the match succeeds. In an anchored +pattern (*PRUNE) has the same effect as (*COMMIT). <pre> (*SKIP) </pre> -This verb is like (*PRUNE), except that if the pattern is unanchored, the -"bumpalong" advance is not to the next character, but to the position in the -subject where (*SKIP) was encountered. (*SKIP) signifies that whatever text -was matched leading up to it cannot be part of a successful match. Consider: +This verb, when given without a name, is like (*PRUNE), except that if the +pattern is unanchored, the "bumpalong" advance is not to the next character, +but to the position in the subject where (*SKIP) was encountered. (*SKIP) +signifies that whatever text was matched leading up to it cannot be part of a +successful match. Consider: <pre> a+(*SKIP)b </pre> @@ -2356,7 +2588,17 @@ first match attempt, the second attempt would start at the second character instead of skipping on to "c". <pre> - (*THEN) + (*SKIP:NAME) +</pre> +When (*SKIP) has an associated name, its behaviour is modified. If the +following pattern fails to match, the previous path through the pattern is +searched for the most recent (*MARK) that has the same name. If one is found, +the "bumpalong" advance is to the subject position that corresponds to that +(*MARK) instead of to where (*SKIP) was encountered. If no (*MARK) with a +matching name is found, normal "bumpalong" of one character happens (the +(*SKIP) is ignored). +<pre> + (*THEN) or (*THEN:NAME) </pre> This verb causes a skip to the next alternation if the rest of the pattern does not match. That is, it cancels pending backtracking, but only within the @@ -2367,8 +2609,10 @@ </pre> If the COND1 pattern matches, FOO is tried (and possibly further items after the end of the group if FOO succeeds); on failure the matcher skips to the -second alternative and tries COND2, without backtracking into COND1. If (*THEN) -is used outside of any alternation, it acts exactly like (*PRUNE). +second alternative and tries COND2, without backtracking into COND1. The +behaviour of (*THEN:NAME) is exactly the same as (*MARK:NAME)(*THEN) if the +overall match fails. If (*THEN) is not directly inside an alternation, it acts +like (*PRUNE). </P> <br><a name="SEC26" href="#TOC1">SEE ALSO</a><br> <P> @@ -2386,9 +2630,9 @@ </P> <br><a name="SEC28" href="#TOC1">REVISION</a><br> <P> -Last updated: 18 October 2009 +Last updated: 18 May 2010 <br> -Copyright © 1997-2009 University of Cambridge. +Copyright © 1997-2010 University of Cambridge. <br> <p> Return to the PCRE index page. @@ . patch -p0 <<'@@ .' Index: pcre/doc/html/pcreperform.html ============================================================================ $ cvs diff -u -r1.1.1.1 -r1.1.1.1.4.1 pcreperform.html --- pcre/doc/html/pcreperform.html 14 Jan 2009 20:20:10 -0000 1.1.1.1 +++ pcre/doc/html/pcreperform.html 23 Aug 2010 13:08:59 -0000 1.1.1.1.4.1 @@ -21,14 +21,15 @@ of them. </P> <br><b> -MEMORY USAGE +COMPILED PATTERN MEMORY USAGE </b><br> <P> Patterns are compiled by PCRE into a reasonably efficient byte code, so that most simple patterns do not use much memory. However, there is one case where -memory usage can be unexpectedly large. When a parenthesized subpattern has a -quantifier with a minimum greater than 1 and/or a limited maximum, the whole -subpattern is repeated in the compiled code. For example, the pattern +the memory usage of a compiled pattern can be unexpectedly large. If a +parenthesized subpattern has a quantifier with a minimum greater than 1 and/or +a limited maximum, the whole subpattern is repeated in the compiled code. For +example, the pattern <pre> (abc|def){2,4} </pre> @@ -73,6 +74,18 @@ that PCRE cannot otherwise handle. </P> <br><b> +STACK USAGE AT RUN TIME +</b><br> +<P> +When <b>pcre_exec()</b> is used for matching, certain kinds of pattern can cause +it to use large amounts of the process stack. In some environments the default +process stack is quite small, and if it runs out the result is often SIGSEGV. +This issue is probably the most frequently raised problem with PCRE. Rewriting +your pattern can often help. The +pcrestack +documentation discusses this issue in detail. +</P> +<br><b> PROCESSING TIME </b><br> <P> @@ -92,6 +105,15 @@ be faster. </P> <P> +By default, the escape sequences \b, \d, \s, and \w, and the POSIX +character classes such as [:alpha:] do not use Unicode properties, partly for +backwards compatibility, and partly for performance reasons. However, you can +set PCRE_UCP if you want Unicode character properties to be used. This can +double the matching time for items such as \d, when matched with +<b>pcre_exec()</b>; the performance loss is less with <b>pcre_dfa_exec()</b>, and +in both cases there is not much difference for \b. +</P> +<P> When a pattern begins with .* not in parentheses, or in parentheses that are not the subject of a backreference, and the PCRE_DOTALL option is set, the pattern is implicitly anchored by PCRE, since it can match only at the start of @@ -164,9 +186,9 @@ REVISION </b><br> <P> -Last updated: 06 March 2007 +Last updated: 16 May 2010 <br> -Copyright © 1997-2007 University of Cambridge. +Copyright © 1997-2010 University of Cambridge. <br> <p> Return to the PCRE index page. @@ . patch -p0 <<'@@ .' Index: pcre/doc/html/pcreposix.html ============================================================================ $ cvs diff -u -r1.1.1.3 -r1.1.1.3.2.1 pcreposix.html --- pcre/doc/html/pcreposix.html 5 Dec 2009 13:54:14 -0000 1.1.1.3 +++ pcre/doc/html/pcreposix.html 23 Aug 2010 13:08:59 -0000 1.1.1.3.2.1 @@ -87,8 +87,6 @@ constants whose names start with "REG_"; these are used for setting options and identifying error codes. </P> -<P> -</P> <br><a name="SEC3" href="#TOC1">COMPILING A PATTERN</a><br> <P> The function <b>regcomp()</b> is called to compile a pattern into an @@ -126,6 +124,13 @@ <i>nmatch</i> and <i>pmatch</i> arguments are ignored, and no captured strings are returned. <pre> + REG_UCP +</pre> +The PCRE_UCP option is set when the regular expression is passed for +compilation to the native function. This causes PCRE to use Unicode properties +when matchine \d, \w, etc., instead of just recognizing ASCII values. Note +that REG_UTF8 is not part of the POSIX standard. +<pre> REG_UNGREEDY </pre> The PCRE_UNGREEDY option is set when the regular expression is passed for @@ -277,9 +282,9 @@ </P> <br><a name="SEC9" href="#TOC1">REVISION</a><br> <P> -Last updated: 02 September 2009 +Last updated: 16 May 2010 <br> -Copyright © 1997-2009 University of Cambridge. +Copyright © 1997-2010 University of Cambridge. <br> <p> Return to the PCRE index page. @@ . patch -p0 <<'@@ .' Index: pcre/doc/html/pcresample.html ============================================================================ $ cvs diff -u -r1.1.1.2 -r1.1.1.2.2.1 pcresample.html --- pcre/doc/html/pcresample.html 5 Dec 2009 13:54:16 -0000 1.1.1.2 +++ pcre/doc/html/pcresample.html 23 Aug 2010 13:08:59 -0000 1.1.1.2.2.1 @@ -50,8 +50,15 @@ <pre> gcc -o pcredemo -I/usr/local/include pcredemo.c -L/usr/local/lib -lpcre </pre> -Once you have compiled the demonstration program, you can run simple tests like -this: +In a Windows environment, if you want to statically link the program against a +non-dll <b>pcre.a</b> file, you must uncomment the line that defines PCRE_STATIC +before including <b>pcre.h</b>, because otherwise the <b>pcre_malloc()</b> and +<b>pcre_free()</b> exported functions will be declared +<b>__declspec(dllimport)</b>, with unwanted results. +</P> +<P> +Once you have compiled and linked the demonstration program, you can run simple +tests like this: <pre> ./pcredemo 'cat|dog' 'the cat sat on the mat' ./pcredemo -g 'cat|dog' 'the dog sat on the cat' @@ -93,9 +100,9 @@ REVISION </b><br> <P> -Last updated: 30 September 2009 +Last updated: 26 May 2010 <br> -Copyright © 1997-2009 University of Cambridge. +Copyright © 1997-2010 University of Cambridge. <br> <p> Return to the PCRE index page. @@ . patch -p0 <<'@@ .' Index: pcre/doc/html/pcrestack.html ============================================================================ $ cvs diff -u -r1.1.1.1 -r1.1.1.1.4.1 pcrestack.html --- pcre/doc/html/pcrestack.html 14 Jan 2009 20:20:13 -0000 1.1.1.1 +++ pcre/doc/html/pcrestack.html 23 Aug 2010 13:08:59 -0000 1.1.1.1.4.1 @@ -31,19 +31,22 @@ </P> <P> The <b>pcre_dfa_exec()</b> function operates in an entirely different way, and -hardly uses recursion at all. The limit on its complexity is the amount of -workspace it is given. The comments that follow do NOT apply to -<b>pcre_dfa_exec()</b>; they are relevant only for <b>pcre_exec()</b>. +uses recursion only when there is a regular expression recursion or subroutine +call in the pattern. This includes the processing of assertion and "once-only" +subpatterns, which are handled like subroutine calls. Normally, these are never +very deep, and the limit on the complexity of <b>pcre_dfa_exec()</b> is +controlled by the amount of workspace it is given. However, it is possible to +write patterns with runaway infinite recursions; such patterns will cause +<b>pcre_dfa_exec()</b> to run out of stack. At present, there is no protection +against this. </P> <P> -You can set limits on the number of times that <b>match()</b> is called, both in -total and recursively. If the limit is exceeded, an error occurs. For details, -see the -section on extra data for pcre_exec() -in the -pcreapi -documentation. +The comments that follow do NOT apply to <b>pcre_dfa_exec()</b>; they are +relevant only for <b>pcre_exec()</b>. </P> +<br><b> +Reducing <b>pcre_exec()</b>'s stack usage +</b><br> <P> Each time that <b>match()</b> is actually called recursively, it uses memory from the process stack. For certain kinds of pattern and data, very large @@ -78,13 +81,13 @@ than one character whenever possible. </P> <br><b> -Compiling PCRE to use heap instead of stack +Compiling PCRE to use heap instead of stack for <b>pcre_exec()</b> </b><br> <P> 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 to do this are given in -the +PCRE to use heap memory instead of stack for remembering back-up points when +<b>pcre_exec()</b> is running. This makes it run a lot more slowly, however. +Details of how to do this are given in the pcrebuild documentation. When built in this way, instead of using the stack, PCRE obtains and frees memory by calling the functions that are pointed to by the @@ -95,16 +98,19 @@ customized memory handlers that are more efficient than the standard functions. </P> <br><b> -Limiting PCRE's stack usage +Limiting <b>pcre_exec()</b>'s stack usage </b><br> <P> -PCRE has an internal counter that can be used to limit the depth of recursion, -and thus cause <b>pcre_exec()</b> 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 +You can set limits on the number of times that <b>match()</b> is called, both in +total and recursively. If a limit is exceeded, <b>pcre_exec()</b> returns an +error code. Setting suitable limits should prevent it from running out of +stack. The default values of the limits are very large, and unlikely ever to +operate. They can be changed when PCRE is built, and they can also be set when <b>pcre_exec()</b> is called. For details of these interfaces, see the pcrebuild -and +documentation and the +section on extra data for pcre_exec() +in the pcreapi documentation. </P> @@ -112,8 +118,15 @@ 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 <b>pcretest</b> test program has a command -line option (<b>-S</b>) that can be used to increase the size of its stack. +support around 128000 recursions. +</P> +<P> +In Unix-like environments, the <b>pcretest</b> test program has a command line +option (<b>-S</b>) that can be used to increase the size of its stack. As long +as the stack is large enough, another option (<b>-M</b>) can be used to find the +smallest limits that allow a particular pattern to match a given subject +string. This is done by calling <b>pcre_exec()</b> repeatedly with different +limits. </P> <br><b> Changing stack size in Unix-like systems @@ -163,9 +176,9 @@ REVISION </b><br> <P> -Last updated: 09 July 2008 +Last updated: 03 January 2010 <br> -Copyright © 1997-2008 University of Cambridge. +Copyright © 1997-2010 University of Cambridge. <br> <p> Return to the PCRE index page. @@ . patch -p0 <<'@@ .' Index: pcre/doc/html/pcresyntax.html ============================================================================ $ cvs diff -u -r1.1.1.2 -r1.1.1.2.2.1 pcresyntax.html --- pcre/doc/html/pcresyntax.html 18 Aug 2009 21:26:12 -0000 1.1.1.2 +++ pcre/doc/html/pcresyntax.html 23 Aug 2010 13:08:59 -0000 1.1.1.2.2.1 @@ -17,28 +17,29 @@ <li><a name="TOC2" href="#SEC2">QUOTING</a> <li><a name="TOC3" href="#SEC3">CHARACTERS</a> <li><a name="TOC4" href="#SEC4">CHARACTER TYPES</a> -<li><a name="TOC5" href="#SEC5">GENERAL CATEGORY PROPERTY CODES FOR \p and \P</a> -<li><a name="TOC6" href="#SEC6">SCRIPT NAMES FOR \p AND \P</a> -<li><a name="TOC7" href="#SEC7">CHARACTER CLASSES</a> -<li><a name="TOC8" href="#SEC8">QUANTIFIERS</a> -<li><a name="TOC9" href="#SEC9">ANCHORS AND SIMPLE ASSERTIONS</a> -<li><a name="TOC10" href="#SEC10">MATCH POINT RESET</a> -<li><a name="TOC11" href="#SEC11">ALTERNATION</a> -<li><a name="TOC12" href="#SEC12">CAPTURING</a> -<li><a name="TOC13" href="#SEC13">ATOMIC GROUPS</a> -<li><a name="TOC14" href="#SEC14">COMMENT</a> -<li><a name="TOC15" href="#SEC15">OPTION SETTING</a> -<li><a name="TOC16" href="#SEC16">LOOKAHEAD AND LOOKBEHIND ASSERTIONS</a> -<li><a name="TOC17" href="#SEC17">BACKREFERENCES</a> -<li><a name="TOC18" href="#SEC18">SUBROUTINE REFERENCES (POSSIBLY RECURSIVE)</a> -<li><a name="TOC19" href="#SEC19">CONDITIONAL PATTERNS</a> -<li><a name="TOC20" href="#SEC20">BACKTRACKING CONTROL</a> -<li><a name="TOC21" href="#SEC21">NEWLINE CONVENTIONS</a> -<li><a name="TOC22" href="#SEC22">WHAT \R MATCHES</a> -<li><a name="TOC23" href="#SEC23">CALLOUTS</a> -<li><a name="TOC24" href="#SEC24">SEE ALSO</a> -<li><a name="TOC25" href="#SEC25">AUTHOR</a> -<li><a name="TOC26" href="#SEC26">REVISION</a> +<li><a name="TOC5" href="#SEC5">GENERAL CATEGORY PROPERTIES FOR \p and \P</a> +<li><a name="TOC6" href="#SEC6">PCRE SPECIAL CATEGORY PROPERTIES FOR \p and \P</a> +<li><a name="TOC7" href="#SEC7">SCRIPT NAMES FOR \p AND \P</a> +<li><a name="TOC8" href="#SEC8">CHARACTER CLASSES</a> +<li><a name="TOC9" href="#SEC9">QUANTIFIERS</a> +<li><a name="TOC10" href="#SEC10">ANCHORS AND SIMPLE ASSERTIONS</a> +<li><a name="TOC11" href="#SEC11">MATCH POINT RESET</a> +<li><a name="TOC12" href="#SEC12">ALTERNATION</a> +<li><a name="TOC13" href="#SEC13">CAPTURING</a> +<li><a name="TOC14" href="#SEC14">ATOMIC GROUPS</a> +<li><a name="TOC15" href="#SEC15">COMMENT</a> +<li><a name="TOC16" href="#SEC16">OPTION SETTING</a> +<li><a name="TOC17" href="#SEC17">LOOKAHEAD AND LOOKBEHIND ASSERTIONS</a> +<li><a name="TOC18" href="#SEC18">BACKREFERENCES</a> +<li><a name="TOC19" href="#SEC19">SUBROUTINE REFERENCES (POSSIBLY RECURSIVE)</a> +<li><a name="TOC20" href="#SEC20">CONDITIONAL PATTERNS</a> +<li><a name="TOC21" href="#SEC21">BACKTRACKING CONTROL</a> +<li><a name="TOC22" href="#SEC22">NEWLINE CONVENTIONS</a> +<li><a name="TOC23" href="#SEC23">WHAT \R MATCHES</a> +<li><a name="TOC24" href="#SEC24">CALLOUTS</a> +<li><a name="TOC25" href="#SEC25">SEE ALSO</a> +<li><a name="TOC26" href="#SEC26">AUTHOR</a> +<li><a name="TOC27" href="#SEC27">REVISION</a> </ul> <br><a name="SEC1" href="#TOC1">PCRE REGULAR EXPRESSION SYNTAX SUMMARY</a><br> <P> @@ -80,6 +81,7 @@ \D a character that is not a decimal digit \h a horizontal whitespace character \H a character that is not a horizontal whitespace character + \N a character that is not a newline \p{<i>xx</i>} a character with the <i>xx</i> property \P{<i>xx</i>} a character without the <i>xx</i> property \R a newline sequence @@ -91,9 +93,11 @@ \W a "non-word" character \X an extended Unicode sequence </pre> -In PCRE, \d, \D, \s, \S, \w, and \W recognize only ASCII characters. +In PCRE, by default, \d, \D, \s, \S, \w, and \W recognize only ASCII +characters, even in UTF-8 mode. However, this can be changed by setting the +PCRE_UCP option. </P> -<br><a name="SEC5" href="#TOC1">GENERAL CATEGORY PROPERTY CODES FOR \p and \P</a><br> +<br><a name="SEC5" href="#TOC1">GENERAL CATEGORY PROPERTIES FOR \p and \P</a><br> <P> <pre> C Other @@ -142,11 +146,22 @@ Zs Space separator </PRE> </P> -<br><a name="SEC6" href="#TOC1">SCRIPT NAMES FOR \p AND \P</a><br> +<br><a name="SEC6" href="#TOC1">PCRE SPECIAL CATEGORY PROPERTIES FOR \p and \P</a><br> +<P> +<pre> + Xan Alphanumeric: union of properties L and N + Xps POSIX space: property Z or tab, NL, VT, FF, CR + Xsp Perl space: property Z or tab, NL, FF, CR + Xwd Perl word: property Xan or underscore +</PRE> +</P> +<br><a name="SEC7" href="#TOC1">SCRIPT NAMES FOR \p AND \P</a><br> <P> Arabic, Armenian, +Avestan, Balinese, +Bamum, Bengali, Bopomofo, Braille, @@ -163,6 +178,7 @@ Cyrillic, Deseret, Devanagari, +Egyptian_Hieroglyphs, Ethiopic, Georgian, Glagolitic, @@ -175,7 +191,12 @@ Hanunoo, Hebrew, Hiragana, +Imperial_Aramaic, Inherited, +Inscriptional_Pahlavi, +Inscriptional_Parthian, +Javanese, +Kaithi, Kannada, Katakana, Kayah_Li, @@ -186,9 +207,11 @@ Lepcha, Limbu, Linear_B, +Lisu, Lycian, Lydian, Malayalam, +Meetei_Mayek, Mongolian, Myanmar, New_Tai_Lue, @@ -196,6 +219,8 @@ Ogham, Old_Italic, Old_Persian, +Old_South_Arabian, +Old_Turkic, Ol_Chiki, Oriya, Osmanya, @@ -203,15 +228,18 @@ Phoenician, Rejang, Runic, +Samaritan, Saurashtra, Shavian, Sinhala, -Sudanese, +Sundanese, Syloti_Nagri, Syriac, Tagalog, Tagbanwa, Tai_Le, +Tai_Tham, +Tai_Viet, Tamil, Telugu, Thaana, @@ -222,7 +250,7 @@ Vai, Yi. </P> -<br><a name="SEC7" href="#TOC1">CHARACTER CLASSES</a><br> +<br><a name="SEC8" href="#TOC1">CHARACTER CLASSES</a><br> <P> <pre> [...] positive character class @@ -246,10 +274,11 @@ word same as \w xdigit hexadecimal digit </pre> -In PCRE, POSIX character set names recognize only ASCII characters. You can use +In PCRE, POSIX character set names recognize only ASCII characters by default, +but some of them use Unicode properties if PCRE_UCP is set. You can use \Q...\E inside a character class. </P> -<br><a name="SEC8" href="#TOC1">QUANTIFIERS</a><br> +<br><a name="SEC9" href="#TOC1">QUANTIFIERS</a><br> <P> <pre> ? 0 or 1, greedy @@ -270,10 +299,10 @@ {n,}? n or more, lazy </PRE> </P> -<br><a name="SEC9" href="#TOC1">ANCHORS AND SIMPLE ASSERTIONS</a><br> +<br><a name="SEC10" href="#TOC1">ANCHORS AND SIMPLE ASSERTIONS</a><br> <P> <pre> - \b word boundary (only ASCII letters recognized) + \b word boundary \B not a word boundary ^ start of subject also after internal newline in multiline mode @@ -287,19 +316,19 @@ \G first matching position in subject </PRE> </P> -<br><a name="SEC10" href="#TOC1">MATCH POINT RESET</a><br> +<br><a name="SEC11" href="#TOC1">MATCH POINT RESET</a><br> <P> <pre> \K reset start of match </PRE> </P> -<br><a name="SEC11" href="#TOC1">ALTERNATION</a><br> +<br><a name="SEC12" href="#TOC1">ALTERNATION</a><br> <P> <pre> expr|expr|expr... </PRE> </P> -<br><a name="SEC12" href="#TOC1">CAPTURING</a><br> +<br><a name="SEC13" href="#TOC1">CAPTURING</a><br> <P> <pre> (...) capturing group @@ -311,19 +340,19 @@ capturing groups in each alternative </PRE> </P> -<br><a name="SEC13" href="#TOC1">ATOMIC GROUPS</a><br> +<br><a name="SEC14" href="#TOC1">ATOMIC GROUPS</a><br> <P> <pre> (?>...) atomic, non-capturing group </PRE> </P> -<br><a name="SEC14" href="#TOC1">COMMENT</a><br> +<br><a name="SEC15" href="#TOC1">COMMENT</a><br> <P> <pre> (?#....) comment (not nestable) </PRE> </P> -<br><a name="SEC15" href="#TOC1">OPTION SETTING</a><br> +<br><a name="SEC16" href="#TOC1">OPTION SETTING</a><br> <P> <pre> (?i) caseless @@ -334,13 +363,14 @@ (?x) extended (ignore white space) (?-...) unset option(s) </pre> -The following is recognized only at the start of a pattern or after one of the +The following are recognized only at the start of a pattern or after one of the newline-setting options with similar syntax: <pre> - (*UTF8) set UTF-8 mode + (*UTF8) set UTF-8 mode (PCRE_UTF8) + (*UCP) set PCRE_UCP (use Unicode properties for \d etc) </PRE> </P> -<br><a name="SEC16" href="#TOC1">LOOKAHEAD AND LOOKBEHIND ASSERTIONS</a><br> +<br><a name="SEC17" href="#TOC1">LOOKAHEAD AND LOOKBEHIND ASSERTIONS</a><br> <P> <pre> (?=...) positive look ahead @@ -350,7 +380,7 @@ </pre> Each top-level branch of a look behind must be of a fixed length. </P> -<br><a name="SEC17" href="#TOC1">BACKREFERENCES</a><br> +<br><a name="SEC18" href="#TOC1">BACKREFERENCES</a><br> <P> <pre> \n reference by number (can be ambiguous) @@ -364,7 +394,7 @@ (?P=name) reference by name (Python) </PRE> </P> -<br><a name="SEC18" href="#TOC1">SUBROUTINE REFERENCES (POSSIBLY RECURSIVE)</a><br> +<br><a name="SEC19" href="#TOC1">SUBROUTINE REFERENCES (POSSIBLY RECURSIVE)</a><br> <P> <pre> (?R) recurse whole pattern @@ -383,7 +413,7 @@ \g'-n' call subpattern by relative number (PCRE extension) </PRE> </P> -<br><a name="SEC19" href="#TOC1">CONDITIONAL PATTERNS</a><br> +<br><a name="SEC20" href="#TOC1">CONDITIONAL PATTERNS</a><br> <P> <pre> (?(condition)yes-pattern) @@ -402,7 +432,7 @@ (?(assert)... assertion condition </PRE> </P> -<br><a name="SEC20" href="#TOC1">BACKTRACKING CONTROL</a><br> +<br><a name="SEC21" href="#TOC1">BACKTRACKING CONTROL</a><br> <P> The following act immediately they are reached: <pre> @@ -420,10 +450,10 @@ (*THEN) local failure, backtrack to next alternation </PRE> </P> -<br><a name="SEC21" href="#TOC1">NEWLINE CONVENTIONS</a><br> +<br><a name="SEC22" href="#TOC1">NEWLINE CONVENTIONS</a><br> <P> These are recognized only at the very start of the pattern or after a -(*BSR_...) or (*UTF8) option. +(*BSR_...) or (*UTF8) or (*UCP) option. <pre> (*CR) carriage return only (*LF) linefeed only @@ -432,28 +462,28 @@ (*ANY) any Unicode newline sequence </PRE> </P> -<br><a name="SEC22" href="#TOC1">WHAT \R MATCHES</a><br> +<br><a name="SEC23" href="#TOC1">WHAT \R MATCHES</a><br> <P> These are recognized only at the very start of the pattern or after a -(*...) option that sets the newline convention or UTF-8 mode. +(*...) option that sets the newline convention or UTF-8 or UCP mode. <pre> (*BSR_ANYCRLF) CR, LF, or CRLF (*BSR_UNICODE) any Unicode newline sequence </PRE> </P> -<br><a name="SEC23" href="#TOC1">CALLOUTS</a><br> +<br><a name="SEC24" href="#TOC1">CALLOUTS</a><br> <P> <pre> (?C) callout (?Cn) callout with data n </PRE> </P> -<br><a name="SEC24" href="#TOC1">SEE ALSO</a><br> +<br><a name="SEC25" href="#TOC1">SEE ALSO</a><br> <P> <b>pcrepattern</b>(3), <b>pcreapi</b>(3), <b>pcrecallout</b>(3), <b>pcrematching</b>(3), <b>pcre</b>(3). </P> -<br><a name="SEC25" href="#TOC1">AUTHOR</a><br> +<br><a name="SEC26" href="#TOC1">AUTHOR</a><br> <P> Philip Hazel <br> @@ -462,11 +492,11 @@ Cambridge CB2 3QH, England. <br> </P> -<br><a name="SEC26" href="#TOC1">REVISION</a><br> +<br><a name="SEC27" href="#TOC1">REVISION</a><br> <P> -Last updated: 11 April 2009 +Last updated: 12 May 2010 <br> -Copyright © 1997-2009 University of Cambridge. +Copyright © 1997-2010 University of Cambridge. <br> <p> Return to the PCRE index page. @@ . patch -p0 <<'@@ .' Index: pcre/doc/html/pcretest.html ============================================================================ $ cvs diff -u -r1.1.1.3 -r1.1.1.3.2.1 pcretest.html --- pcre/doc/html/pcretest.html 5 Dec 2009 13:54:15 -0000 1.1.1.3 +++ pcre/doc/html/pcretest.html 23 Aug 2010 13:08:59 -0000 1.1.1.3.2.1 @@ -201,9 +201,11 @@ <pre> /caseless/i </pre> -The following table shows additional modifiers for setting PCRE options that do -not correspond to anything in Perl: +The following table shows additional modifiers for setting PCRE compile-time +options that do not correspond to anything in Perl: <pre> + <b>/8</b> PCRE_UTF8 + <b>/?</b> PCRE_NO_UTF8_CHECK <b>/A</b> PCRE_ANCHORED <b>/C</b> PCRE_AUTO_CALLOUT <b>/E</b> PCRE_DOLLAR_ENDONLY @@ -211,6 +213,7 @@ <b>/J</b> PCRE_DUPNAMES <b>/N</b> PCRE_NO_AUTO_CAPTURE <b>/U</b> PCRE_UNGREEDY + <b>/W</b> PCRE_UCP <b>/X</b> PCRE_EXTRA <b>/<JS></b> PCRE_JAVASCRIPT_COMPAT <b>/<cr></b> PCRE_NEWLINE_CR @@ -221,13 +224,16 @@ <b>/<bsr_anycrlf></b> PCRE_BSR_ANYCRLF <b>/<bsr_unicode></b> PCRE_BSR_UNICODE </pre> -Those specifying line ending sequences are literal strings as shown, but the -letters can be in either case. This example sets multiline matching with CRLF -as the line ending sequence: +The modifiers that are enclosed in angle brackets are literal strings as shown, +including the angle brackets, but the letters can be in either case. This +example sets multiline matching with CRLF as the line ending sequence: <pre> /^abc/m<crlf> </pre> -Details of the meanings of these PCRE options are given in the +As well as turning on the PCRE_UTF8 option, the <b>/8</b> modifier also causes +any non-printing characters in output strings to be printed using the +\x{hh...} notation if they are valid UTF-8 sequences. Full details of the PCRE +options are given in the pcreapi documentation. </P> @@ -274,24 +280,6 @@ for different internal link sizes. </P> <P> -The <b>/L</b> modifier must be followed directly by the name of a locale, for -example, -<pre> - /pattern/Lfr_FR -</pre> -For this reason, it must be the last modifier. The given locale is set, -<b>pcre_maketables()</b> is called to build a set of character tables for the -locale, and this is then passed to <b>pcre_compile()</b> when compiling the -regular expression. Without an <b>/L</b> modifier, NULL is passed as the tables -pointer; that is, <b>/L</b> applies only to the expression on which it appears. -</P> -<P> -The <b>/I</b> modifier requests that <b>pcretest</b> output information about the -compiled pattern (whether it is anchored, has a fixed first character, and -so on). It does this by calling <b>pcre_fullinfo()</b> after compiling a -pattern. If the pattern is studied, the results of that are also output. -</P> -<P> The <b>/D</b> modifier is a PCRE debugging feature, and is equivalent to <b>/BI</b>, that is, both the <b>/B</b> and the <b>/I</b> modifiers. </P> @@ -305,32 +293,75 @@ reloading compiled patterns below. </P> <P> +The <b>/I</b> modifier requests that <b>pcretest</b> output information about the +compiled pattern (whether it is anchored, has a fixed first character, and +so on). It does this by calling <b>pcre_fullinfo()</b> after compiling a +pattern. If the pattern is studied, the results of that are also output. +</P> +<P> +The <b>/K</b> modifier requests <b>pcretest</b> to show names from backtracking +control verbs that are returned from calls to <b>pcre_exec()</b>. It causes +<b>pcretest</b> to create a <b>pcre_extra</b> block if one has not already been +created by a call to <b>pcre_study()</b>, and to set the PCRE_EXTRA_MARK flag +and the <b>mark</b> field within it, every time that <b>pcre_exec()</b> is +called. If the variable that the <b>mark</b> field points to is non-NULL for a +match, non-match, or partial match, <b>pcretest</b> prints the string to which +it points. For a match, this is shown on a line by itself, tagged with "MK:". +For a non-match it is added to the message. +</P> +<P> +The <b>/L</b> modifier must be followed directly by the name of a locale, for +example, +<pre> + /pattern/Lfr_FR +</pre> +For this reason, it must be the last modifier. The given locale is set, +<b>pcre_maketables()</b> is called to build a set of character tables for the +locale, and this is then passed to <b>pcre_compile()</b> when compiling the +regular expression. Without an <b>/L</b> (or <b>/T</b>) modifier, NULL is passed +as the tables pointer; that is, <b>/L</b> applies only to the expression on +which it appears. +</P> +<P> +The <b>/M</b> modifier causes the size of memory block used to hold the compiled +pattern to be output. +</P> +<P> The <b>/S</b> modifier causes <b>pcre_study()</b> to be called after the expression has been compiled, and the results used when the expression is matched. </P> <P> -The <b>/M</b> modifier causes the size of memory block used to hold the compiled -pattern to be output. +The <b>/T</b> modifier must be followed by a single digit. It causes a specific +set of built-in character tables to be passed to <b>pcre_compile()</b>. It is +used in the standard PCRE tests to check behaviour with different character +tables. The digit specifies the tables as follows: +<pre> + 0 the default ASCII tables, as distributed in + pcre_chartables.c.dist + 1 a set of tables defining ISO 8859 characters +</pre> +In table 1, some characters whose codes are greater than 128 are identified as +letters, digits, spaces, etc. </P> +<br><b> +Using the POSIX wrapper API +</b><br> <P> The <b>/P</b> modifier causes <b>pcretest</b> to call PCRE via the POSIX wrapper -API rather than its native API. When this is done, all other modifiers except -<b>/i</b>, <b>/m</b>, and <b>/+</b> are ignored. REG_ICASE is set if <b>/i</b> is -present, and REG_NEWLINE is set if <b>/m</b> is present. The wrapper functions -force PCRE_DOLLAR_ENDONLY always, and PCRE_DOTALL unless REG_NEWLINE is set. -</P> -<P> -The <b>/8</b> modifier causes <b>pcretest</b> to call PCRE with the PCRE_UTF8 -option set. This turns on support for UTF-8 character handling in PCRE, -provided that it was compiled with this support enabled. This modifier also -causes any non-printing characters in output strings to be printed using the -\x{hh...} notation if they are valid UTF-8 sequences. -</P> -<P> -If the <b>/?</b> modifier is used with <b>/8</b>, it causes <b>pcretest</b> to -call <b>pcre_compile()</b> with the PCRE_NO_UTF8_CHECK option, to suppress the -checking of the string for UTF-8 validity. +API rather than its native API. When <b>/P</b> is set, the following modifiers +set options for the <b>regcomp()</b> function: +<pre> + /i REG_ICASE + /m REG_NEWLINE + /N REG_NOSUB + /s REG_DOTALL ) + /U REG_UNGREEDY ) These options are not part of + /W REG_UCP ) the POSIX standard + /8 REG_UTF8 ) +</pre> +The <b>/+</b> modifier works as described above. All other modifiers are +ignored. </P> <br><a name="SEC5" href="#TOC1">DATA LINES</a><br> <P> @@ -418,9 +449,9 @@ </P> <P> If the <b>/P</b> modifier was present on the pattern, causing the POSIX wrapper -API to be used, the only option-setting sequences that have any effect are \B -and \Z, causing REG_NOTBOL and REG_NOTEOL, respectively, to be passed to -<b>regexec()</b>. +API to be used, the only option-setting sequences that have any effect are \B, +\N, and \Z, causing REG_NOTBOL, REG_NOTEMPTY, and REG_NOTEOL, respectively, +to be passed to <b>regexec()</b>. </P> <P> The use of \x{hh...} to represent UTF-8 characters is not dependent on the use @@ -709,9 +740,9 @@ </P> <br><a name="SEC15" href="#TOC1">REVISION</a><br> <P> -Last updated: 26 September 2009 +Last updated: 14 June 2010 <br> -Copyright © 1997-2009 University of Cambridge. +Copyright © 1997-2010 University of Cambridge. <br> <p> Return to the PCRE index page. @@ . patch -p0 <<'@@ .' Index: pcre/doc/pcre.3 ============================================================================ $ cvs diff -u -r1.1.1.3 -r1.1.1.3.2.1 pcre.3 --- pcre/doc/pcre.3 5 Dec 2009 13:54:12 -0000 1.1.1.3 +++ pcre/doc/pcre.3 23 Aug 2010 13:08:56 -0000 1.1.1.3.2.1 @@ -11,10 +11,11 @@ support for one or two .NET and Oniguruma syntax items, and there is an option for requesting some minor changes that give better JavaScript compatibility. .P -The current implementation of PCRE corresponds approximately with Perl 5.10, -including support for UTF-8 encoded strings and Unicode general category -properties. However, UTF-8 and Unicode support has to be explicitly enabled; it -is not the default. The Unicode tables correspond to Unicode release 5.1. +The current implementation of PCRE corresponds approximately with Perl +5.10/5.11, including support for UTF-8 encoded strings and Unicode general +category properties. However, UTF-8 and Unicode support has to be explicitly +enabled; it is not the default. The Unicode tables correspond to Unicode +release 5.2.0. .P In addition to the Perl-compatible matching function, PCRE contains an alternative function that matches the same compiled patterns in a different @@ -150,7 +151,6 @@ . . .\" HTML <a name="utf8support"></a> -. .SH "UTF-8 AND UNICODE PROPERTY SUPPORT" .rs .sp @@ -189,7 +189,6 @@ . . .\" HTML <a name="utf8strings"></a> -. .SS "Validity of UTF-8 strings" .rs .sp @@ -231,6 +230,7 @@ PCRE_NO_UTF8_CHECK to bypass the more restrictive test. However, in this situation, you will have to apply your own validity check. . +. .SS "General comments about UTF-8 mode" .rs .sp @@ -250,19 +250,32 @@ the alternative matching function, \fBpcre_dfa_exec()\fP. .P 6. The character escapes \eb, \eB, \ed, \eD, \es, \eS, \ew, and \eW correctly -test characters of any code value, but the characters that PCRE recognizes as -digits, spaces, or word characters remain the same set as before, all with -values less than 256. This remains true even when PCRE includes Unicode -property support, because to do otherwise would slow down PCRE in many common -cases. If you really want to test for a wider sense of, say, "digit", you -must use Unicode property tests such as \ep{Nd}. Note that this also applies to -\eb, because it is defined in terms of \ew and \eW. +test characters of any code value, but, by default, the characters that PCRE +recognizes as digits, spaces, or word characters remain the same set as before, +all with values less than 256. This remains true even when PCRE is built to +include Unicode property support, because to do otherwise would slow down PCRE +in many common cases. Note that this also applies to \eb, because it is defined +in terms of \ew and \eW. If you really want to test for a wider sense of, say, +"digit", you can use explicit Unicode property tests such as \ep{Nd}. +Alternatively, if you set the PCRE_UCP option, the way that the character +escapes work is changed so that Unicode properties are used to determine which +characters match. There are more details in the section on +.\" HTML <a href="pcrepattern.html#genericchartypes"> +.\" </a> +generic character types +.\" +in the +.\" HREF +\fBpcrepattern\fP +.\" +documentation. .P 7. Similarly, characters that match the POSIX named character classes are all -low-valued characters. +low-valued characters, unless the PCRE_UCP option is set. .P 8. However, the Perl 5.10 horizontal and vertical whitespace matching escapes -(\eh, \eH, \ev, and \eV) do match all the appropriate Unicode characters. +(\eh, \eH, \ev, and \eV) do match all the appropriate Unicode characters, +whether or not PCRE_UCP is set. .P 9. Case-insensitive matching applies only to characters whose values are less than 128, unless PCRE is built with Unicode property support. Even when Unicode @@ -293,6 +306,6 @@ .rs .sp .nf -Last updated: 28 September 2009 -Copyright (c) 1997-2009 University of Cambridge. +Last updated: 12 May 2010 +Copyright (c) 1997-2010 University of Cambridge. .fi @@ . patch -p0 <<'@@ .' Index: pcre/doc/pcre.txt ============================================================================ $ cvs diff -u -r1.1.1.3 -r1.1.1.3.2.1 pcre.txt --- pcre/doc/pcre.txt 5 Dec 2009 13:54:12 -0000 1.1.1.3 +++ pcre/doc/pcre.txt 23 Aug 2010 13:08:56 -0000 1.1.1.3.2.1 @@ -26,10 +26,10 @@ give better JavaScript compatibility. The current implementation of PCRE corresponds approximately with Perl - 5.10, including support for UTF-8 encoded strings and Unicode general - category properties. However, UTF-8 and Unicode support has to be + 5.10/5.11, including support for UTF-8 encoded strings and Unicode gen- + eral category properties. However, UTF-8 and Unicode support has to be explicitly enabled; it is not the default. The Unicode tables corre- - spond to Unicode release 5.1. + spond to Unicode release 5.2.0. In addition to the Perl-compatible matching function, PCRE contains an alternative function that matches the same compiled patterns in a dif- @@ -222,21 +222,25 @@ not available in the alternative matching function, pcre_dfa_exec(). 6. The character escapes \b, \B, \d, \D, \s, \S, \w, and \W correctly - test characters of any code value, but the characters that PCRE recog- - nizes as digits, spaces, or word characters remain the same set as - before, all with values less than 256. This remains true even when PCRE - includes Unicode property support, because to do otherwise would slow - down PCRE in many common cases. If you really want to test for a wider - sense of, say, "digit", you must use Unicode property tests such as - \p{Nd}. Note that this also applies to \b, because it is defined in - terms of \w and \W. + test characters of any code value, but, by default, the characters that + PCRE recognizes as digits, spaces, or word characters remain the same + set as before, all with values less than 256. This remains true even + when PCRE is built to include Unicode property support, because to do + otherwise would slow down PCRE in many common cases. Note that this + also applies to \b, because it is defined in terms of \w and \W. If you + really want to test for a wider sense of, say, "digit", you can use + explicit Unicode property tests such as \p{Nd}. Alternatively, if you + set the PCRE_UCP option, the way that the character escapes work is + changed so that Unicode properties are used to determine which charac- + ters match. There are more details in the section on generic character + types in the pcrepattern documentation. 7. Similarly, characters that match the POSIX named character classes - are all low-valued characters. + are all low-valued characters, unless the PCRE_UCP option is set. 8. However, the Perl 5.10 horizontal and vertical whitespace matching escapes (\h, \H, \v, and \V) do match all the appropriate Unicode char- - acters. + acters, whether or not PCRE_UCP is set. 9. Case-insensitive matching applies only to characters whose values are less than 128, unless PCRE is built with Unicode property support. @@ -263,8 +267,8 @@ REVISION - Last updated: 28 September 2009 - Copyright (c) 1997-2009 University of Cambridge. + Last updated: 12 May 2010 + Copyright (c) 1997-2010 University of Cambridge. ------------------------------------------------------------------------------ @@ -902,6 +906,12 @@ bers for the library. Applications can use these to include support for different releases of PCRE. + In a Windows environment, if you want to statically link an application + program against a non-dll pcre.a file, you must define PCRE_STATIC + before including pcre.h or pcrecpp.h, because otherwise the pcre_mal- + loc() and pcre_free() exported functions will be declared + __declspec(dllimport), with unwanted results. + The functions pcre_compile(), pcre_compile2(), pcre_study(), and pcre_exec() are used for compiling and matching regular expressions in a Perl-compatible manner. A sample program that demonstrates the sim- @@ -1281,48 +1291,49 @@ letter that has no special meaning causes an error, thus reserving these combinations for future expansion. By default, as in Perl, a backslash followed by a letter with no special meaning is treated as a - literal. (Perl can, however, be persuaded to give a warning for this.) - There are at present no other features controlled by this option. It - can also be set by a (?X) option setting within a pattern. + literal. (Perl can, however, be persuaded to give an error for this, by + running it with the -w option.) There are at present no other features + controlled by this option. It can also be set by a (?X) option setting + within a pattern. PCRE_FIRSTLINE - If this option is set, an unanchored pattern is required to match - before or at the first newline in the subject string, though the + If this option is set, an unanchored pattern is required to match + 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 + 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 + (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 + (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 @@ -1331,32 +1342,32 @@ 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. @@ -1366,46 +1377,56 @@ 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_UCP + + This option changes the way PCRE processes \b, \d, \s, \w, and some of + the POSIX character classes. By default, only ASCII characters are rec- + ognized, but if PCRE_UCP is set, Unicode properties are used instead to + classify characters. More details are given in the section on generic + character types in the pcrepattern page. If you set PCRE_UCP, matching + one of the items it affects takes much longer. The option is available + only if PCRE has been compiled with Unicode property support. + 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 @@ -1461,20 +1482,24 @@ 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 - found + 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, 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 + 59 an argument is not allowed for (*ACCEPT), (*FAIL), or (*COMMIT) 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 + 65 different names for subpatterns of the same number are + not allowed + 66 (*MARK) must have an argument + 67 this version of PCRE is not compiled with PCRE_UCP support 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. @@ -1534,59 +1559,68 @@ bytes is created. This speeds up finding a position in the subject at which to start matching. + The two optimizations just described can be disabled by setting the + PCRE_NO_START_OPTIMIZE option when calling pcre_exec() or + pcre_dfa_exec(). You might want to do this if your pattern contains + callouts, or make use of (*MARK), and you make use of these in cases + where matching fails. See the discussion of PCRE_NO_START_OPTIMIZE + below. + 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 - not try to mix the two. + 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. By default, higher-valued codes + never match escapes such as \w or \d, but they can be tested with \p if + PCRE is built with Unicode character property support. Alternatively, + the PCRE_UCP option can be set at compile time; this causes \w and + friends to use Unicode property support instead of built-in tables. The + use of locales with Unicode is discouraged. If you are handling charac- + ters with codes greater than 128, you should either use UTF-8 and Uni- + code, 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. @@ -1596,15 +1630,15 @@ 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 @@ -1612,9 +1646,9 @@ 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; @@ -1625,131 +1659,131 @@ 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. PCRE_INFO_MINLENGTH - If the pattern was studied and a minimum length for matching subject - strings was computed, its value is returned. Otherwise the returned - value is -1. The value is a number of characters, not bytes (this may - be relevant in UTF-8 mode). The fourth argument should point to an int - variable. A non-negative value is a lower bound to the length of any - matching string. There may not be any strings of that length that do + If the pattern was studied and a minimum length for matching subject + strings was computed, its value is returned. Otherwise the returned + value is -1. The value is a number of characters, not bytes (this may + be relevant in UTF-8 mode). The fourth argument should point to an int + variable. A non-negative value is a lower bound to the length of any + matching string. There may not be any strings of that length that do actually match, but every string that does match is at least that long. PCRE_INFO_NAMECOUNT 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- + sis, most significant byte first. The rest of the entry is the corre- sponding name, zero terminated. - The names are in alphabetical order. Duplicate names may appear if (?| + The names are in alphabetical order. Duplicate names may appear if (?| is used to create multiple groups with the same number, as described in - the section on duplicate subpattern numbers in the pcrepattern page. - Duplicate names for subpatterns with different numbers are permitted - only if PCRE_DUPNAMES is set. In all cases of duplicate names, they - appear in the table in the order in which they were found in the pat- - tern. In the absence of (?| this is the order of increasing number; + the section on duplicate subpattern numbers in the pcrepattern page. + Duplicate names for subpatterns with different numbers are permitted + only if PCRE_DUPNAMES is set. In all cases of duplicate names, they + appear in the table in the order in which they were found in the pat- + tern. In the absence of (?| this is the order of increasing number; when (?| is used this is not necessarily the case because later subpat- terns may have lower numbers. - As a simple example of the name/number table, consider the following - pattern (assume PCRE_EXTENDED is set, so white space - including new- + As a simple example of the name/number table, consider the following + pattern (assume PCRE_EXTENDED is set, so white space - including new- lines - is ignored): (?<date> (?<year>(\d\d)?\d\d) - (?<month>\d\d) - (?<day>\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 ??: @@ -1758,31 +1792,31 @@ 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 with - pcre_exec(), otherwise 0. The fourth argument should point to an int - variable. From release 8.00, this always returns 1, because the - restrictions that previously applied to partial matching have been - lifted. The pcrepartial documentation gives details of partial match- + Return 1 if the pattern can be used for partial matching with + pcre_exec(), otherwise 0. The fourth argument should point to an int + variable. From release 8.00, this always returns 1, because the + restrictions that previously applied to partial matching have been + lifted. The pcrepartial documentation gives details of partial match- ing. 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 @@ -1796,7 +1830,7 @@ 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. @@ -1804,10 +1838,10 @@ 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(). If pcre_extra is NULL, or there is no study - data, zero is returned. The fourth argument should point to a size_t + created by pcre_study(). If pcre_extra is NULL, or there is no study + data, zero is returned. The fourth argument should point to a size_t variable. @@ -1815,21 +1849,21 @@ 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). @@ -1837,21 +1871,21 @@ 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.) @@ -1861,18 +1895,18 @@ 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 - was studied, the result of the study should be passed in the extra - argument. This function is the main matching facility of the library, + 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 + was studied, the result of the study should be passed in the extra + 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(): @@ -1891,10 +1925,10 @@ 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; @@ -1903,8 +1937,9 @@ unsigned long int match_limit_recursion; void *callout_data; const unsigned char *tables; + unsigned char **mark; - 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 @@ -1912,85 +1947,98 @@ PCRE_EXTRA_MATCH_LIMIT_RECURSION PCRE_EXTRA_CALLOUT_DATA PCRE_EXTRA_TABLES + PCRE_EXTRA_MARK - 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 a pattern that uses nested unlim- + 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 a pattern that uses nested unlim- ited 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 callout_data field is used in conjunction with the "callout" fea- + The callout_data field is used in conjunction with the "callout" fea- ture, and 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. + If PCRE_EXTRA_MARK is set in the flags field, the mark field must be + set to point to a char * variable. If the pattern contains any back- + tracking control verbs such as (*MARK:NAME), and the execution ends up + with a name to pass back, a pointer to the name string (zero termi- + nated) is placed in the variable pointed to by the mark field. The + names are within the compiled pattern; if you wish to retain such a + name you must copy it before freeing the memory of a compiled pattern. + If there is no name to pass back, the variable pointed to by the mark + field set to NULL. For details of the backtracking control verbs, see + the section entitled "Backtracking control" in the pcrepattern documen- + tation. + 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, - PCRE_NOTBOL, PCRE_NOTEOL, PCRE_NOTEMPTY, PCRE_NOTEMPTY_ATSTART, - PCRE_NO_START_OPTIMIZE, PCRE_NO_UTF8_CHECK, PCRE_PARTIAL_SOFT, and + 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_NOTEMPTY_ATSTART, + PCRE_NO_START_OPTIMIZE, PCRE_NO_UTF8_CHECK, PCRE_PARTIAL_SOFT, and PCRE_PARTIAL_HARD. 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 @@ -1999,94 +2047,129 @@ 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 an - 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 an + 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". PCRE_NOTEMPTY_ATSTART - This is like PCRE_NOTEMPTY, except that an empty string match that is - not at the start of the subject is permitted. If the pattern is + This is like PCRE_NOTEMPTY, except that an empty string match that is + not at the start of the subject is permitted. If the pattern is anchored, such a match can occur only if the pattern contains \K. - Perl has no direct equivalent of PCRE_NOTEMPTY or - PCRE_NOTEMPTY_ATSTART, but it does make a special 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 + Perl has no direct equivalent of PCRE_NOTEMPTY or + PCRE_NOTEMPTY_ATSTART, but it does make a special 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 off- - set with PCRE_NOTEMPTY_ATSTART and PCRE_ANCHORED, and then if that + set with PCRE_NOTEMPTY_ATSTART and PCRE_ANCHORED, and then if that fails, by advancing the starting offset (see below) and trying an ordi- - nary match again. There is some code that demonstrates how to do this + nary match again. There is some code that demonstrates how to do this in the pcredemo sample program. PCRE_NO_START_OPTIMIZE - There are a number of optimizations that pcre_exec() uses at the start - of a match, in order to speed up the process. For example, if it is - known that a match must start with a specific character, it searches - the subject for that character, and fails immediately if it cannot find - it, without actually running the main matching function. When callouts - are in use, these optimizations can cause them to be skipped. This - option disables the "start-up" optimizations, causing performance to - suffer, but ensuring that the callouts do occur. + There are a number of optimizations that pcre_exec() uses at the start + of a match, in order to speed up the process. For example, if it is + known that an unanchored match must start with a specific character, it + searches the subject for that character, and fails immediately if it + cannot find it, without actually running the main matching function. + This means that a special item such as (*COMMIT) at the start of a pat- + tern is not considered until after a suitable starting point for the + match has been found. When callouts or (*MARK) items are in use, these + "start-up" optimizations can cause them to be skipped if the pattern is + never actually used. The start-up optimizations are in effect a pre- + scan of the subject that takes place before the pattern is run. + + The PCRE_NO_START_OPTIMIZE option disables the start-up optimizations, + possibly causing performance to suffer, but ensuring that in cases + where the result is "no match", the callouts do occur, and that items + such as (*COMMIT) and (*MARK) are considered at every possible starting + position in the subject string. Setting PCRE_NO_START_OPTIMIZE can + change the outcome of a matching operation. Consider the pattern + + (*COMMIT)ABC + + When this is compiled, PCRE records the fact that a match must start + with the character "A". Suppose the subject string is "DEFABC". The + start-up optimization scans along the subject, finds "A" and runs the + first match attempt from there. The (*COMMIT) item means that the pat- + tern must match the current starting position, which in this case, it + does. However, if the same match is run with PCRE_NO_START_OPTIMIZE + set, the initial scan along the subject string does not happen. The + first match attempt is run starting from "D" and when this fails, + (*COMMIT) prevents any further matches being tried, so the overall + result is "no match". If the pattern is studied, more start-up opti- + mizations may be used. For example, a minimum length for the subject + may be recorded. Consider the pattern + + (*MARK:A)(X|Y) + + The minimum length for a match is one character. If the subject is + "ABC", there will be attempts to match "ABC", "BC", "C", and then + finally an empty string. If the pattern is studied, the final attempt + does not take place, because PCRE knows that the subject is too short, + and so the (*MARK) is never encountered. In this case, studying the + pattern does not affect the overall match result, which is still "no + match", but it does affect the auxiliary information that is returned. PCRE_NO_UTF8_CHECK @@ -2273,6 +2356,10 @@ purpose. If the call via pcre_malloc() fails, this error is given. The memory is automatically freed at the end of matching. + This error is also given if pcre_stack_malloc() fails in pcre_exec(). + This can happen only when PCRE has been compiled with --disable-stack- + for-recursion. + PCRE_ERROR_NOSUBSTRING (-7) This error is used by the pcre_copy_substring(), pcre_get_substring(), @@ -2584,49 +2671,50 @@ 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_NOTEMPTY_ATSTART, PCRE_NO_UTF8_CHECK, PCRE_PARTIAL_HARD, PCRE_PAR- - TIAL_SOFT, PCRE_DFA_SHORTEST, and PCRE_DFA_RESTART. All but the last - four of these are exactly the same as for pcre_exec(), so their + PCRE_NOTEMPTY_ATSTART, PCRE_NO_UTF8_CHECK, PCRE_BSR_ANYCRLF, + PCRE_BSR_UNICODE, PCRE_NO_START_OPTIMIZE, PCRE_PARTIAL_HARD, PCRE_PAR- + TIAL_SOFT, PCRE_DFA_SHORTEST, and PCRE_DFA_RESTART. All but the last + four of these are exactly the same as for pcre_exec(), so their description is not repeated here. PCRE_PARTIAL_HARD PCRE_PARTIAL_SOFT - These have the same general effect as they do for pcre_exec(), but the - details are slightly different. When PCRE_PARTIAL_HARD is set for - pcre_dfa_exec(), it returns PCRE_ERROR_PARTIAL if the end of the sub- - ject is reached and there is still at least one matching possibility + These have the same general effect as they do for pcre_exec(), but the + details are slightly different. When PCRE_PARTIAL_HARD is set for + pcre_dfa_exec(), it returns PCRE_ERROR_PARTIAL if the end of the sub- + ject is reached and there is still at least one matching possibility that requires additional characters. This happens even if some complete matches have also been found. When PCRE_PARTIAL_SOFT is set, 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 possibility. The portion of the - string that was inspected when the longest partial match was found is + of the subject is reached, there have been no complete matches, but + there is still at least one matching possibility. The portion of the + string that was inspected when the longest partial match was found is set as the first matching string in both cases. 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() returns a partial match, it is possible to call it - again, with additional 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 + again, with additional 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 <.*> @@ -2641,61 +2729,61 @@ <something> <something else> <something> <something else> <something further> - 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- + pcrebuild(3), pcrecallout(3), pcrecpp(3)(3), pcrematching(3), pcrepar- tial(3), pcreposix(3), pcreprecompile(3), pcresample(3), pcrestack(3). @@ -2708,8 +2796,8 @@ REVISION - Last updated: 03 October 2009 - Copyright (c) 1997-2009 University of Cambridge. + Last updated: 21 June 2010 + Copyright (c) 1997-2010 University of Cambridge. ------------------------------------------------------------------------------ @@ -2905,7 +2993,7 @@ This document describes the differences in the ways that PCRE and Perl handle regular expressions. The differences described here are with - respect to Perl 5.10. + respect to Perl 5.10/5.11. 1. PCRE has only a subset of Perl's UTF-8 and Unicode support. Details of what it does have are given in the section on UTF-8 support in the @@ -2976,11 +3064,7 @@ matching "aba" against the pattern /^(a(b)?)+$/ in Perl leaves $2 unset, but in PCRE it is set to "b". - 11. PCRE does support Perl 5.10's backtracking verbs (*ACCEPT), - (*FAIL), (*F), (*COMMIT), (*PRUNE), (*SKIP), and (*THEN), but only in - the forms without an argument. PCRE does not support (*MARK). - - 12. PCRE's handling of duplicate subpattern numbers and duplicate sub- + 11. PCRE's handling of duplicate subpattern numbers and duplicate sub- pattern names is not as general as Perl's. This is a consequence of the fact the PCRE works internally just with numbers, using an external ta- ble to translate between numbers and names. In particular, a pattern @@ -2991,7 +3075,7 @@ turing subpattern number 1. To avoid this confusing situation, an error is given at compile time. - 13. PCRE provides some extensions to the Perl regular expression facil- + 12. PCRE provides some extensions to the Perl regular expression facil- ities. Perl 5.10 includes new features that are not in earlier ver- sions of Perl, some of which (such as named parentheses) have been in PCRE for some time. This list is with respect to Perl 5.10: @@ -3046,8 +3130,8 @@ REVISION - Last updated: 04 October 2009 - Copyright (c) 1997-2009 University of Cambridge. + Last updated: 12 May 2010 + Copyright (c) 1997-2010 University of Cambridge. ------------------------------------------------------------------------------ @@ -3089,6 +3173,16 @@ below. There is also a summary of UTF-8 features in the section on UTF-8 support in the main pcre page. + Another special sequence that may appear at the start of a pattern or + in combination with (*UTF8) is: + + (*UCP) + + This has the same effect as setting the PCRE_UCP option: it causes + sequences such as \d and \w to use Unicode properties to determine + character types, instead of recognizing only characters with codes less + than 128 via a lookup table. + The remainder of this document discusses the patterns that are sup- ported by PCRE when its main matching function, pcre_exec(), is used. From release 6.0, PCRE offers a second matching function, @@ -3129,11 +3223,13 @@ and that they must be in upper case. If more than one of them is present, the last one is used. - The newline convention does not affect what the \R escape sequence - matches. By default, this is any Unicode newline sequence, for Perl - compatibility. However, this can be changed; see the description of \R - in the section entitled "Newline sequences" below. A change of \R set- - ting can be combined with a change of newline convention. + The newline convention affects the interpretation of the dot metachar- + acter when PCRE_DOTALL is not set, and also the behaviour of \N. How- + ever, it does not affect what the \R escape sequence matches. By + default, this is any Unicode newline sequence, for Perl compatibility. + However, this can be changed; see the description of \R in the section + entitled "Newline sequences" below. A change of \R setting can be com- + bined with a change of newline convention. CHARACTERS AND METACHARACTERS @@ -3246,7 +3342,7 @@ \n linefeed (hex 0A) \r carriage return (hex 0D) \t tab (hex 09) - \ddd character with octal code ddd, or backreference + \ddd character with octal code ddd, or back reference \xhh character with hex code hh \x{hhh..} character with hex code hhh.. @@ -3315,9 +3411,11 @@ All the sequences that define a single character value can be used both inside and outside character classes. In addition, inside a character class, the sequence \b is interpreted as the backspace character (hex - 08), and the sequences \R and \X are interpreted as the characters "R" - and "X", respectively. Outside a character class, these sequences have - different meanings (see below). + 08). The sequences \B, \N, \R, and \X are not special inside a charac- + ter class. Like any other unrecognized escape sequences, they are + treated as the literal characters "B", "N", "R", and "X" by default, + but cause an error if the PCRE_EXTRA option is set. Outside a character + class, these sequences have different meanings. Absolute and relative back references @@ -3337,8 +3435,7 @@ Generic character types - Another use of backslash is for specifying generic character types. The - following are always recognized: + Another use of backslash is for specifying generic character types: \d any decimal digit \D any character that is not a decimal digit @@ -3351,14 +3448,17 @@ \w any "word" character \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, - 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 - of them fail, since there is no character to match. + There is also the single sequence \N, which matches a non-newline char- + acter. This is the same as the "." metacharacter when PCRE_DOTALL is + not set. + + Each pair of lower and upper case escape sequences partitions the com- + plete set of characters into two disjoint sets. Any given character + matches one, and only one, of each pair. The sequences can appear both + inside and outside character 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, because 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 @@ -3366,16 +3466,37 @@ "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, - \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 - their original meanings from before UTF-8 support was available, mainly - for efficiency reasons. Note that this also affects \b, because it is - defined in terms of \w and \W. + A "word" character is an underscore or any character that is a letter + or digit. By default, 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 then matched by \w. The + use of locales with Unicode is discouraged. + + By default, in UTF-8 mode, characters with values greater than 128 + never match \d, \s, or \w, and always match \D, \S, and \W. These + sequences retain their original meanings from before UTF-8 support was + available, mainly for efficiency reasons. However, if PCRE is compiled + with Unicode property support, and the PCRE_UCP option is set, the be- + haviour is changed so that Unicode properties are used to determine + character types, as follows: + + \d any character that \p{Nd} matches (decimal digit) + \s any character that \p{Z} matches, plus HT, LF, FF, CR + \w any character that \p{L} or \p{N} matches, plus underscore + + The upper case escapes match the inverse sets of characters. Note that + \d matches only decimal digits, whereas \w matches any Unicode digit, + as well as any Unicode letter, and underscore. Note also that PCRE_UCP + affects \b, and \B because they are defined in terms of \w and \W. + Matching these sequences is noticeably slower when PCRE_UCP is set. 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 - UTF-8 mode. The horizontal space characters are: + the other sequences, which match only ASCII characters by default, + these always match certain high-valued codepoints in UTF-8 mode, + whether or not PCRE_UCP is set. The horizontal space characters are: U+0009 Horizontal tab U+0020 Space @@ -3407,15 +3528,6 @@ U+2028 Line separator 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 - locales with Unicode is discouraged. - Newline sequences Outside a character class, by default, the escape sequence \R matches @@ -3454,29 +3566,33 @@ 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 can start with: + newline convention; for example, a pattern can start with: (*ANY)(*BSR_ANYCRLF) - Inside a character class, \R matches the letter "R". + They can also be combined with the (*UTF8) or (*UCP) special sequences. + Inside a character class, \R is treated as an unrecognized escape + sequence, and so matches the letter "R" by default, but causes an error + if PCRE_EXTRA is set. 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 - 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 - not match any characters, so always causes a match failure. + The property names represented by xx above are limited to the Unicode + script names, the general category properties, "Any", which matches any + character (including newline), and some special PCRE properties + (described in the next section). Other Perl properties such as "InMu- + sicalSymbols" 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. @@ -3488,20 +3604,26 @@ 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, - Cypriot, Cyrillic, Deseret, Devanagari, Ethiopic, Georgian, Glagolitic, - 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, - 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 - a two-letter abbreviation. For compatibility with Perl, negation can be - specified by including a circumflex between the opening brace and the - property name. For example, \p{^Lu} is the same as \P{Lu}. + Arabic, Armenian, Avestan, Balinese, Bamum, Bengali, Bopomofo, Braille, + Buginese, Buhid, Canadian_Aboriginal, Carian, Cham, Cherokee, Common, + Coptic, Cuneiform, Cypriot, Cyrillic, Deseret, Devanagari, Egyp- + tian_Hieroglyphs, Ethiopic, Georgian, Glagolitic, Gothic, Greek, + Gujarati, Gurmukhi, Han, Hangul, Hanunoo, Hebrew, Hiragana, Impe- + rial_Aramaic, Inherited, Inscriptional_Pahlavi, Inscriptional_Parthian, + Javanese, Kaithi, Kannada, Katakana, Kayah_Li, Kharoshthi, Khmer, Lao, + Latin, Lepcha, Limbu, Linear_B, Lisu, Lycian, Lydian, Malayalam, + Meetei_Mayek, Mongolian, Myanmar, New_Tai_Lue, Nko, Ogham, Old_Italic, + Old_Persian, Old_South_Arabian, Old_Turkic, Ol_Chiki, Oriya, Osmanya, + Phags_Pa, Phoenician, Rejang, Runic, Samaritan, Saurashtra, Shavian, + Sinhala, Sundanese, Syloti_Nagri, Syriac, Tagalog, Tagbanwa, Tai_Le, + Tai_Tham, Tai_Viet, Tamil, Telugu, Thaana, Thai, Tibetan, Tifinagh, + Ugaritic, Vai, Yi. + + Each character has exactly one Unicode general category property, spec- + ified by a two-letter abbreviation. For compatibility with Perl, nega- + tion can be 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 @@ -3593,7 +3715,28 @@ 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. + \w do not use Unicode properties in PCRE by default, though you can + make them do so by setting the PCRE_UCP option for pcre_compile() or by + starting the pattern with (*UCP). + + PCRE's additional properties + + As well as the standard Unicode properties described in the previous + section, PCRE supports four more that make it possible to convert tra- + ditional escape sequences such as \w and \s and POSIX character classes + to use Unicode properties. PCRE uses these non-standard, non-Perl prop- + erties internally when PCRE_UCP is set. They are: + + Xan Any alphanumeric character + Xps Any POSIX space character + Xsp Any Perl space character + Xwd Any Perl "word" character + + Xan matches characters that have either the L (letter) or the N (num- + ber) property. Xps matches the characters tab, linefeed, vertical tab, + formfeed, or carriage return, and any other character that has the Z + (separator) property. Xsp is the same as Xps, except that vertical tab + is excluded. Xwd matches the same characters as Xan, plus underscore. Resetting the match start @@ -3614,6 +3757,10 @@ matches "foobar", the first substring is still set to "foo". + Perl documents that the use of \K within assertions is "not well + defined". In PCRE, \K is acted upon when it occurs inside positive + assertions, but is ignored in negative assertions. + Simple assertions The final use of backslash is for certain simple assertions. An asser- @@ -3630,44 +3777,49 @@ \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 - 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 - string if the first or last character matches \w, respectively. Neither - PCRE nor Perl has a separte "start of word" or "end of word" metase- - quence. However, whatever follows \b normally determines which it is. + Inside a character class, \b has a different meaning; it matches the + backspace character. If any other of these assertions appears in a + character class, by default it matches the corresponding literal char- + acter (for example, \B matches the letter B). However, if the + PCRE_EXTRA option is set, an "invalid escape sequence" error is gener- + ated instead. + + 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. In + UTF-8 mode, the meanings of \w and \W can be changed by setting the + PCRE_UCP option. When this is done, it also affects \b and \B. Neither + PCRE nor Perl has a separate "start of word" or "end of word" metase- + quence. However, whatever follows \b normally determines which it is. For example, the fragment \ba matches "a" at the start of a word. - 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. @@ -3675,90 +3827,94 @@ 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) +FULL STOP (PERIOD, DOT) AND \N 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. + The escape sequence \N always behaves as a dot does when PCRE_DOTALL is + not set. In other words, it matches any one character except one that + signifies the end of a line. + 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. @@ -3768,103 +3924,103 @@ closing square bracket. A closing square bracket on its own is not spe- cial by default. However, if the PCRE_JAVASCRIPT_COMPAT option is set, a lone closing square bracket causes a compile-time error. 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 circumflex, if + square bracket is required as a member of the class, 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 + A character class matches a single character in the subject. In UTF-8 mode, the character may be more than one byte long. 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 in UTF8-mode for characters 128 and above, you must - ensure that PCRE is compiled with Unicode property support as well as + 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 in UTF8-mode 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 - 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, - 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 character types \d, \D, \h, \H, \p, \P, \s, \S, \v, \V, \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 circumflex can conveniently be used with the upper case char- + acter 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, 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:]%] matches "0", "1", any alphabetic character, or "%". The supported class - names are + names are: alnum letters and digits alpha letters @@ -3875,29 +4031,45 @@ graph printing characters, excluding space lower lower case letters print printing characters, including space - punct printing characters, excluding letters and digits + punct printing characters, excluding letters and digits and space space white space (not quite the same as \s) upper upper case letters 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. - In UTF-8 mode, characters with values greater than 128 do not match any - of the POSIX character classes. + By default, in UTF-8 mode, characters with values greater than 128 do + not match any of the POSIX character classes. However, if the PCRE_UCP + option is passed to pcre_compile(), some of the classes are changed so + that Unicode character properties are used. This is achieved by replac- + ing the POSIX classes by other sequences, as follows: + + [:alnum:] becomes \p{Xan} + [:alpha:] becomes \p{L} + [:blank:] becomes \h + [:digit:] becomes \p{Nd} + [:lower:] becomes \p{Ll} + [:space:] becomes \p{Xps} + [:upper:] becomes \p{Lu} + [:word:] becomes \p{Xwd} + + Negated versions, such as [:^alpha:] use \P instead of \p. The other + POSIX classes are unchanged, and match only characters with code points + less than 128. VERTICAL BAR @@ -3968,8 +4140,9 @@ cases the pattern can contain special leading sequences such as (*CRLF) to override what the application has set or what has been defaulted. Details are given in the section entitled "Newline sequences" above. - There is also the (*UTF8) leading sequence that can be used to set - UTF-8 mode; this is equivalent to setting the PCRE_UTF8 option. + There are also the (*UTF8) and (*UCP) leading sequences that can be + used to set UTF-8 and Unicode property modes; they are equivalent to + setting the PCRE_UTF8 and the PCRE_UCP options, respectively. SUBPATTERNS @@ -3981,18 +4154,18 @@ 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)) @@ -4000,12 +4173,12 @@ 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)) @@ -4013,96 +4186,96 @@ 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 to a numbered subpattern uses the most recent value - that is set for that number by any subpattern. The following pattern + A back reference to a numbered subpattern uses the most recent value + that is set for that number by any subpattern. The following pattern matches "abcabc" or "defdef": /(?|(abc)|(def))\1/ - In contrast, a recursive or "subroutine" call to a numbered subpattern - always refers to the first one in the pattern with the given number. + In contrast, a recursive or "subroutine" call to a numbered subpattern + always refers to the first one in the pattern with the given number. The following pattern matches "abcabc" or "defabc": /(?|(abc)|(def))(?1)/ - If a condition test for a subpattern's having matched refers to a non- - unique number, the test is true if any of the subpatterns of that num- + If a condition test for a subpattern's having matched refers to a non- + unique number, the test is true if any of the subpatterns of that num- ber have matched. - 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- - tax. Perl allows identically numbered subpatterns to have different + 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. Perl allows identically numbered subpatterns to have different names, but PCRE does not. - In PCRE, a subpattern can be named in one of three ways: (?<name>...) - or (?'name'...) as in Perl, or (?P<name>...) 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 + In PCRE, a subpattern can be named in one of three ways: (?<name>...) + or (?'name'...) as in Perl, or (?P<name>...) 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 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. (Duplicate names are also always permitted for subpatterns with - the same number, set up as described in the previous section.) Dupli- - cate names 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. (Duplicate names are also always permitted for subpatterns with + the same number, set up as described in the previous section.) Dupli- + cate names 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: @@ -4112,38 +4285,38 @@ (?<DN>Thu)(?:rsday)?| (?<DN>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 + 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 backreference to a non-unique named subpattern from else- - where in the pattern, the one that corresponds to the first occurrence - of the name is used. In the absence of duplicate numbers (see the pre- - vious section) this is the one with the lowest number. If you use a - named reference in a condition test (see the section about conditions - below), either to check whether a subpattern has matched, or to check - for recursion, all subpatterns with the same name are tested. If the - condition is true for any one of them, the overall condition is true. + If you make a back reference to a non-unique named subpattern from + elsewhere in the pattern, the one that corresponds to the first occur- + rence of the name is used. In the absence of duplicate numbers (see the + previous section) this is the one with the lowest number. If you use a + named reference in a condition test (see the section about conditions + below), either to check whether a subpattern has matched, or to check + for recursion, all subpatterns with the same name are tested. If the + condition is true for any one of them, the overall condition is true. This is the same behaviour as testing by number. For further details of the interfaces for handling named subpatterns, see the pcreapi documen- tation. Warning: You cannot use different names to distinguish between two sub- - patterns with the same number because PCRE uses only the numbers when + patterns with the same number because PCRE uses only the numbers when matching. For this reason, an error is given at compile time if differ- - ent names are given to subpatterns with the same number. However, you - can give the same name to subpatterns with the same number, even when + ent names are given to subpatterns with the same number. However, you + can give the same name to subpatterns with the same number, even when PCRE_DUPNAMES is not set. 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 @@ -4157,17 +4330,17 @@ a parenthesized subpattern (unless it is an assertion) a recursive or "subroutine" call to a subpattern - 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,} @@ -4176,49 +4349,49 @@ \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. This may be use- - ful for subpatterns that are referenced as subroutines from elsewhere + 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- + For convenience, the three most common quantifiers have single-charac- ter abbreviations: * is equivalent to {0,} + is equivalent to {1,} ? is equivalent to {0,1} - It is possible to construct infinite loops by following a subpattern + It is possible to construct infinite loops by following a subpattern that can match no characters with a quantifier that has no upper limit, for example: (a?)* Earlier versions of Perl and PCRE used to give an error at compile time - for such patterns. However, because there are cases where this can be - useful, such patterns are now accepted, but if any repetition of the - subpattern does in fact match no characters, the loop is forcibly bro- + for such patterns. However, because there are cases where this can be + useful, such patterns are now accepted, but if any repetition of the + subpattern does in fact match no characters, the loop is forcibly bro- ken. - By default, the quantifiers are "greedy", that is, they match as much - as possible (up to the maximum number of permitted times), without - causing the rest of the pattern to fail. The classic example of where + By default, the quantifiers are "greedy", that is, they match as much + as possible (up to the maximum number of permitted times), without + causing the rest of the pattern to fail. The classic example of where this gives problems is in trying to match comments in C programs. These - appear between /* and */ and within the comment, individual * and / - characters may appear. An attempt to match C comments by applying the + appear between /* and */ and within the comment, individual * and / + characters may appear. An attempt to match C comments by applying the pattern /\*.*\*/ @@ -4227,19 +4400,19 @@ /* first comment */ not comment /* second comment */ - fails, because it matches the entire string owing to the greediness of + fails, because it matches the entire string owing to the greediness of the .* item. - However, if a quantifier is followed by a question mark, it ceases to + However, if a quantifier is followed by a question mark, it ceases to be greedy, and instead matches the minimum number of times possible, so the pattern /\*.*?\*/ - does the right thing with the C comments. The meaning of the various - quantifiers is not otherwise changed, just the preferred number of - matches. Do not confuse this use of question mark with its use as a - quantifier in its own right. Because it has two uses, it can sometimes + does the right thing with the C comments. The meaning of the various + quantifiers is not otherwise changed, just the preferred number of + matches. Do not confuse this use of question mark with its use as a + quantifier in its own right. Because it has two uses, it can sometimes appear doubled, as in \d??\d @@ -4247,36 +4420,36 @@ which matches one digit by preference, but can match two if that is the only way the rest of the pattern matches. - If the PCRE_UNGREEDY option is set (an option that is not available in - Perl), the quantifiers are not greedy by default, but individual ones - can be made greedy by following them with a question mark. In other + If the PCRE_UNGREEDY option is set (an option that is not available in + Perl), the quantifiers are not greedy by default, but individual ones + can be made greedy by following them with a question mark. In other words, it inverts the default behaviour. - When a parenthesized subpattern is quantified with a minimum repeat - count that is greater than 1 or with a limited maximum, more memory is - required for the compiled pattern, in proportion to the size of the + When a parenthesized subpattern is quantified with a minimum repeat + count that is greater than 1 or with a limited maximum, more memory is + required for the compiled pattern, in proportion to the size of the minimum or maximum. If a pattern starts with .* or .{0,} and the PCRE_DOTALL option (equiv- - alent to Perl's /s) is set, thus allowing the dot to match newlines, - the pattern is implicitly anchored, because whatever follows will be - tried against every character position in the subject string, so there - is no point in retrying the overall match at any position after the - first. PCRE normally treats such a pattern as though it were preceded + alent to Perl's /s) is set, thus allowing the dot to match newlines, + the pattern is implicitly anchored, because whatever follows will be + tried against every character position in the subject string, so there + is no point in retrying the overall match at any position after the + first. PCRE normally treats such a pattern as though it were preceded by \A. - In cases where it is known that the subject string contains no new- - lines, it is worth setting PCRE_DOTALL in order to obtain this opti- + In cases where it is known that the subject string contains no new- + lines, it is worth setting PCRE_DOTALL in order to obtain this opti- mization, or alternatively using ^ to indicate anchoring explicitly. - However, there is one situation where the optimization cannot be used. - When .* is inside capturing parentheses that are the subject of a - backreference elsewhere in the pattern, a match at the start may fail - where a later one succeeds. Consider, for example: + However, there is one situation where the optimization cannot be used. + When .* is inside capturing parentheses that are the subject of a back + reference elsewhere in the pattern, a match at the start may fail where + a later one succeeds. Consider, for example: (.*)abc\1 - If the subject is "xyz123abc123" the match point is the fourth charac- + If the subject is "xyz123abc123" the match point is the fourth charac- ter. For this reason, such a pattern is not implicitly anchored. When a capturing subpattern is repeated, the value captured is the sub- @@ -4285,8 +4458,8 @@ (tweedle[dume]{3}\s*)+ has matched "tweedledum tweedledee" the value of the captured substring - is "tweedledee". However, if there are nested capturing subpatterns, - the corresponding captured values may have been set in previous itera- + is "tweedledee". However, if there are nested capturing subpatterns, + the corresponding captured values may have been set in previous itera- tions. For example, after /(a|(b))+/ @@ -4296,53 +4469,53 @@ ATOMIC GROUPING AND POSSESSIVE QUANTIFIERS - With both maximizing ("greedy") and minimizing ("ungreedy" or "lazy") - repetition, failure of what follows normally causes the repeated item - to be re-evaluated to see if a different number of repeats allows the - rest of the pattern to match. Sometimes it is useful to prevent this, - either to change the nature of the match, or to cause it fail earlier - than it otherwise might, when the author of the pattern knows there is + With both maximizing ("greedy") and minimizing ("ungreedy" or "lazy") + repetition, failure of what follows normally causes the repeated item + to be re-evaluated to see if a different number of repeats allows the + rest of the pattern to match. Sometimes it is useful to prevent this, + either to change the nature of the match, or to cause it fail earlier + than it otherwise might, when the author of the pattern knows there is no point in carrying on. - Consider, for example, the pattern \d+foo when applied to the subject + Consider, for example, the pattern \d+foo when applied to the subject line 123456bar After matching all 6 digits and then failing to match "foo", the normal - action of the matcher is to try again with only 5 digits matching the - \d+ item, and then with 4, and so on, before ultimately failing. - "Atomic grouping" (a term taken from Jeffrey Friedl's book) provides - the means for specifying that once a subpattern has matched, it is not + action of the matcher is to try again with only 5 digits matching the + \d+ item, and then with 4, and so on, before ultimately failing. + "Atomic grouping" (a term taken from Jeffrey Friedl's book) provides + the means for specifying that once a subpattern has matched, it is not to be re-evaluated in this way. - If we use atomic grouping for the previous example, the matcher gives - up immediately on failing to match "foo" the first time. The notation + If we use atomic grouping for the previous example, the matcher gives + up immediately on failing to match "foo" the first time. The notation is a kind of special parenthesis, starting with (?> as in this example: (?>\d+)foo - This kind of parenthesis "locks up" the part of the pattern it con- - tains once it has matched, and a failure further into the pattern is - prevented from backtracking into it. Backtracking past it to previous + This kind of parenthesis "locks up" the part of the pattern it con- + tains once it has matched, and a failure further into the pattern is + prevented from backtracking into it. Backtracking past it to previous items, however, works as normal. - An alternative description is that a subpattern of this type matches - the string of characters that an identical standalone pattern would + An alternative description is that a subpattern of this type matches + the string of characters that an identical standalone pattern would match, if anchored at the current point in the subject string. Atomic grouping subpatterns are not capturing subpatterns. Simple cases such as the above example can be thought of as a maximizing repeat that - must swallow everything it can. So, while both \d+ and \d+? are pre- - pared to adjust the number of digits they match in order to make the + must swallow everything it can. So, while both \d+ and \d+? are pre- + pared to adjust the number of digits they match in order to make the rest of the pattern match, (?>\d+) can only match an entire sequence of digits. - Atomic groups in general can of course contain arbitrarily complicated - subpatterns, and can be nested. However, when the subpattern for an + Atomic groups in general can of course contain arbitrarily complicated + subpatterns, and can be nested. However, when the subpattern for an atomic group is just a single repeated item, as in the example above, a - simpler notation, called a "possessive quantifier" can be used. This - consists of an additional + character following a quantifier. Using + simpler notation, called a "possessive quantifier" can be used. This + consists of an additional + character following a quantifier. Using this notation, the previous example can be rewritten as \d++foo @@ -4352,45 +4525,45 @@ (abc|xyz){2,3}+ - Possessive quantifiers are always greedy; the setting of the + Possessive quantifiers are always greedy; the setting of the PCRE_UNGREEDY option is ignored. They are a convenient notation for the - simpler forms of atomic group. However, there is no difference in the - meaning of a possessive quantifier and the equivalent atomic group, - though there may be a performance difference; possessive quantifiers + simpler forms of atomic group. However, there is no difference in the + meaning of a possessive quantifier and the equivalent atomic group, + though there may be a performance difference; possessive quantifiers should be slightly faster. - The possessive quantifier syntax is an extension to the Perl 5.8 syn- - tax. Jeffrey Friedl originated the idea (and the name) in the first + The possessive quantifier syntax is an extension to the Perl 5.8 syn- + tax. Jeffrey Friedl originated the idea (and the name) in the first edition of his book. Mike McCloskey liked it, so implemented it when he - built Sun's Java package, and PCRE copied it from there. It ultimately + built Sun's Java package, and PCRE copied it from there. It ultimately found its way into Perl at release 5.10. PCRE has an optimization that automatically "possessifies" certain sim- - ple pattern constructs. For example, the sequence A+B is treated as - A++B because there is no point in backtracking into a sequence of A's + ple pattern constructs. For example, the sequence A+B is treated as + A++B because there is no point in backtracking into a sequence of A's when B must follow. - When a pattern contains an unlimited repeat inside a subpattern that - can itself be repeated an unlimited number of times, the use of an - atomic group is the only way to avoid some failing matches taking a + When a pattern contains an unlimited repeat inside a subpattern that + can itself be repeated an unlimited number of times, the use of an + atomic group is the only way to avoid some failing matches taking a very long time indeed. The pattern (\D+|<\d+>)*[!?] - matches an unlimited number of substrings that either consist of non- - digits, or digits enclosed in <>, followed by either ! or ?. When it + matches an unlimited number of substrings that either consist of non- + digits, or digits enclosed in <>, followed by either ! or ?. When it matches, it runs quickly. However, if it is applied to aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - it takes a long time before reporting failure. This is because the - string can be divided between the internal \D+ repeat and the external - * repeat in a large number of ways, and all have to be tried. (The - example uses [!?] rather than a single character at the end, because - both PCRE and Perl have an optimization that allows for fast failure - when a single character is used. They remember the last single charac- - ter that is required for a match, and fail early if it is not present - in the string.) If the pattern is changed so that it uses an atomic + it takes a long time before reporting failure. This is because the + string can be divided between the internal \D+ repeat and the external + * repeat in a large number of ways, and all have to be tried. (The + example uses [!?] rather than a single character at the end, because + both PCRE and Perl have an optimization that allows for fast failure + when a single character is used. They remember the last single charac- + ter that is required for a match, and fail early if it is not present + in the string.) If the pattern is changed so that it uses an atomic group, like this: ((?>\D+)|<\d+>)*[!?] @@ -4402,37 +4575,37 @@ Outside a character class, a backslash followed by a digit greater than 0 (and possibly further digits) is a back reference to a capturing sub- - pattern earlier (that is, to its left) in the pattern, provided there + pattern earlier (that is, to its left) in the pattern, provided there have been that many previous capturing left parentheses. However, if the decimal number following the backslash is less than 10, - it is always taken as a back reference, and causes an error only if - there are not that many capturing left parentheses in the entire pat- - tern. In other words, the parentheses that are referenced need not be - to the left of the reference for numbers less than 10. A "forward back - reference" of this type can make sense when a repetition is involved - and the subpattern to the right has participated in an earlier itera- + it is always taken as a back reference, and causes an error only if + there are not that many capturing left parentheses in the entire pat- + tern. In other words, the parentheses that are referenced need not be + to the left of the reference for numbers less than 10. A "forward back + reference" of this type can make sense when a repetition is involved + and the subpattern to the right has participated in an earlier itera- tion. - It is not possible to have a numerical "forward back reference" to a - subpattern whose number is 10 or more using this syntax because a - sequence such as \50 is interpreted as a character defined in octal. + It is not possible to have a numerical "forward back reference" to a + subpattern whose number is 10 or more using this syntax because a + sequence such as \50 is interpreted as a character defined in octal. See the subsection entitled "Non-printing characters" above for further - details of the handling of digits following a backslash. There is no - such problem when named parentheses are used. A back reference to any + details of the handling of digits following a backslash. There is no + such problem when named parentheses are used. A back reference to any subpattern is possible using named parentheses (see below). - Another way of avoiding the ambiguity inherent in the use of digits + Another way of avoiding the ambiguity inherent in the use of digits following a backslash is to use the \g escape sequence, which is a fea- - ture introduced in Perl 5.10. This escape must be followed by an - unsigned number or a negative number, optionally enclosed in braces. + ture introduced in Perl 5.10. This escape must be followed by an + unsigned number or a negative number, optionally enclosed in braces. These examples are all identical: (ring), \1 (ring), \g1 (ring), \g{1} - An unsigned number specifies an absolute reference without the ambigu- + An unsigned number specifies an absolute reference without the ambigu- ity that is present in the older syntax. It is also useful when literal digits follow the reference. A negative number is a relative reference. Consider this example: @@ -4440,33 +4613,33 @@ (abc(def)ghi)\g{-1} The sequence \g{-1} is a reference to the most recently started captur- - ing subpattern before \g, that is, is it equivalent to \2. Similarly, + ing subpattern before \g, that is, is it equivalent to \2. Similarly, \g{-2} would be equivalent to \1. The use of relative references can be - helpful in long patterns, and also in patterns that are created by + helpful in long patterns, and also in patterns that are created by joining together fragments that contain references within themselves. - A back reference matches whatever actually matched the capturing sub- - pattern in the current subject string, rather than anything matching + A back reference matches whatever actually matched the capturing sub- + pattern in the current subject string, rather than anything matching the subpattern itself (see "Subpatterns as subroutines" below for a way of doing that). So the pattern (sens|respons)e and \1ibility - matches "sense and sensibility" and "response and responsibility", but - not "sense and responsibility". If caseful matching is in force at the - time of the back reference, the case of letters is relevant. For exam- + matches "sense and sensibility" and "response and responsibility", but + not "sense and responsibility". If caseful matching is in force at the + time of the back reference, the case of letters is relevant. For exam- ple, ((?i)rah)\s+\1 - matches "rah rah" and "RAH RAH", but not "RAH rah", even though the + matches "rah rah" and "RAH RAH", but not "RAH rah", even though the original capturing subpattern is matched caselessly. - There are several different ways of writing back references to named - subpatterns. The .NET syntax \k{name} and the Perl syntax \k<name> or - \k'name' are supported, as is the Python syntax (?P=name). Perl 5.10's + There are several different ways of writing back references to named + subpatterns. The .NET syntax \k{name} and the Perl syntax \k<name> or + \k'name' are supported, as is the Python syntax (?P=name). Perl 5.10's unified back reference syntax, in which \g can be used for both numeric - and named references, is also supported. We could rewrite the above + and named references, is also supported. We could rewrite the above example in any of the following ways: (?<p1>(?i)rah)\s+\k<p1> @@ -4474,40 +4647,47 @@ (?P<p1>(?i)rah)\s+(?P=p1) (?<p1>(?i)rah)\s+\g{p1} - A subpattern that is referenced by name may appear in the pattern + A subpattern that is referenced by name may appear in the pattern before or after the reference. - There may be more than one back reference to the same subpattern. If a - subpattern has not actually been used in a particular match, any back + There may be more than one back reference to the same subpattern. If a + subpattern has not actually been used in a particular match, any back references to it always fail by default. For example, the pattern (a|(bc))\2 - always fails if it starts to match "a" rather than "bc". However, if + always fails if it starts to match "a" rather than "bc". However, if the PCRE_JAVASCRIPT_COMPAT option is set at compile time, a back refer- ence to an unset value matches an empty string. - Because there may be many capturing parentheses in a pattern, all dig- - its following a backslash are taken as part of a potential back refer- - ence number. If the pattern continues with a digit character, some - delimiter must be used to terminate the back reference. If the + Because there may be many capturing parentheses in a pattern, all dig- + its following a backslash are taken as part of a potential back refer- + ence number. If the pattern continues with a digit character, some + delimiter must be used to terminate the back reference. If the PCRE_EXTENDED option is set, this can be whitespace. Otherwise, the \g{ syntax or an empty comment (see "Comments" below) can be used. - A back reference that occurs inside the parentheses to which it refers - fails when the subpattern is first used, so, for example, (a\1) never - matches. However, such references can be useful inside repeated sub- + Recursive back references + + A back reference that occurs inside the parentheses to which it refers + fails when the subpattern is first used, so, for example, (a\1) never + matches. However, such references can be useful inside repeated sub- patterns. For example, the pattern (a|b\1)+ matches any number of "a"s and also "aba", "ababbaa" etc. At each iter- - ation of the subpattern, the back reference matches the character - string corresponding to the previous iteration. In order for this to - work, the pattern must be such that the first iteration does not need - to match the back reference. This can be done using alternation, as in + ation of the subpattern, the back reference matches the character + string corresponding to the previous iteration. In order for this to + work, the pattern must be such that the first iteration does not need + to match the back reference. This can be done using alternation, as in the example above, or by a quantifier with a minimum of zero. + Back references of this type cause the group that they reference to be + treated as an atomic group. Once the whole group has been matched, a + subsequent matching failure cannot cause backtracking into the middle + of the group. + ASSERTIONS @@ -5128,14 +5308,26 @@ tested. 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 - the form (*VERB:ARG) but PCRE does not support the use of arguments, so - its general form is just (*VERB). Any number of these verbs may occur - in a pattern. There are two kinds: + ing parenthesis followed by an asterisk. They are generally of the form + (*VERB) or (*VERB:NAME). Some may take either form, with differing be- + haviour, depending on whether or not an argument is present. An name is + a sequence of letters, digits, and underscores. If the name is empty, + that is, if the closing parenthesis immediately follows the colon, the + effect is as if the colon were not there. Any number of these verbs may + occur in a pattern. + + PCRE contains some optimizations that are used to speed up matching by + running some checks at the start of each match attempt. For example, it + may know the minimum length of matching subject, or that a particular + character must be present. When one of these optimizations suppresses + the running of a match, any included backtracking verbs will not, of + course, be processed. You can suppress the start-of-match optimizations + by setting the PCRE_NO_START_OPTIMIZE option when calling pcre_exec(). Verbs that act immediately - The following verbs act as soon as they are encountered: + The following verbs act as soon as they are encountered. They may not + be followed by a name. (*ACCEPT) @@ -5164,70 +5356,174 @@ A match with the string "aaaa" always fails, but the callout is taken before each backtrack happens (in this example, 10 times). + Recording which path was taken + + There is one verb whose main purpose is to track how a match was + arrived at, though it also has a secondary use in conjunction with + advancing the match starting point (see (*SKIP) below). + + (*MARK:NAME) or (*:NAME) + + A name is always required with this verb. There may be as many + instances of (*MARK) as you like in a pattern, and their names do not + have to be unique. + + When a match succeeds, the name of the last-encountered (*MARK) is + passed back to the caller via the pcre_extra data structure, as + described in the section on pcre_extra in the pcreapi documentation. No + data is returned for a partial match. Here is an example of pcretest + output, where the /K modifier requests the retrieval and outputting of + (*MARK) data: + + /X(*MARK:A)Y|X(*MARK:B)Z/K + XY + 0: XY + MK: A + XZ + 0: XZ + MK: B + + The (*MARK) name is tagged with "MK:" in this output, and in this exam- + ple it indicates which of the two alternatives matched. This is a more + efficient way of obtaining this information than putting each alterna- + tive in its own capturing parentheses. + + A name may also be returned after a failed match if the final path + through the pattern involves (*MARK). However, unless (*MARK) used in + conjunction with (*COMMIT), this is unlikely to happen for an unan- + chored pattern because, as the starting point for matching is advanced, + the final check is often with an empty string, causing a failure before + (*MARK) is reached. For example: + + /X(*MARK:A)Y|X(*MARK:B)Z/K + XP + No match + + There are three potential starting points for this match (starting with + X, starting with P, and with an empty string). If the pattern is + anchored, the result is different: + + /^X(*MARK:A)Y|^X(*MARK:B)Z/K + XP + No match, mark = B + + PCRE's start-of-match optimizations can also interfere with this. For + example, if, as a result of a call to pcre_study(), it knows the mini- + mum subject length for a match, a shorter subject will not be scanned + at all. + + Note that similar anomalies (though different in detail) exist in Perl, + no doubt for the same reasons. The use of (*MARK) data after a failed + match of an unanchored pattern is not recommended, unless (*COMMIT) is + involved. + Verbs that act after backtracking The following verbs do nothing when they are encountered. Matching con- - tinues with what follows, but if there is no subsequent match, a fail- - ure is forced. The verbs differ in exactly what kind of failure - occurs. + tinues with what follows, but if there is no subsequent match, causing + a backtrack to the verb, a failure is forced. That is, backtracking + cannot pass to the left of the verb. However, when one of these verbs + appears inside an atomic group, its effect is confined to that group, + because once the group has been matched, there is never any backtrack- + ing into it. In this situation, backtracking can "jump back" to the + left of the entire atomic group. (Remember also, as stated above, that + this localization also applies in subroutine calls and assertions.) + + These verbs differ in exactly what kind of failure occurs when back- + tracking reaches them. (*COMMIT) - This verb causes the whole match to fail outright if the rest of the - pattern does not match. Even if the pattern is unanchored, no further - attempts to find a match by advancing the starting point take place. - Once (*COMMIT) has been passed, pcre_exec() is committed to finding a - match at the current starting point, or not at all. For example: + This verb, which may not be followed by a name, causes the whole match + to fail outright if the rest of the pattern does not match. Even if the + pattern is unanchored, no further attempts to find a match by advancing + the starting point take place. Once (*COMMIT) has been passed, + pcre_exec() is committed to finding a match at the current starting + point, or not at all. For example: a+(*COMMIT)b This matches "xxaab" but not "aacaab". It can be thought of as a kind - of dynamic anchor, or "I've started, so I must finish." - - (*PRUNE) + of dynamic anchor, or "I've started, so I must finish." The name of the + most recently passed (*MARK) in the path is passed back when (*COMMIT) + forces a match failure. + + Note that (*COMMIT) at the start of a pattern is not the same as an + anchor, unless PCRE's start-of-match optimizations are turned off, as + shown in this pcretest example: + + /(*COMMIT)abc/ + xyzabc + 0: abc + xyzabc\Y + No match - This verb causes the match to fail at the current position if the rest - of the pattern does not match. If the pattern is unanchored, the normal - "bumpalong" advance to the next starting character then happens. Back- - tracking can occur as usual to the left of (*PRUNE), or when matching - to the right of (*PRUNE), but if there is no match to the right, back- - tracking cannot cross (*PRUNE). In simple cases, the use of (*PRUNE) - is just an alternative to an atomic group or possessive quantifier, but - there are some uses of (*PRUNE) that cannot be expressed in any other - way. + PCRE knows that any match must start with "a", so the optimization + skips along the subject to "a" before running the first match attempt, + which succeeds. When the optimization is disabled by the \Y escape in + the second subject, the match starts at "x" and so the (*COMMIT) causes + it to fail without trying any other starting points. + + (*PRUNE) or (*PRUNE:NAME) + + This verb causes the match to fail at the current starting position in + the subject if the rest of the pattern does not match. If the pattern + is unanchored, the normal "bumpalong" advance to the next starting + character then happens. Backtracking can occur as usual to the left of + (*PRUNE), before it is reached, or when matching to the right of + (*PRUNE), but if there is no match to the right, backtracking cannot + cross (*PRUNE). In simple cases, the use of (*PRUNE) is just an alter- + native to an atomic group or possessive quantifier, but there are some + uses of (*PRUNE) that cannot be expressed in any other way. The behav- + iour of (*PRUNE:NAME) is the same as (*MARK:NAME)(*PRUNE) when the + match fails completely; the name is passed back if this is the final + attempt. (*PRUNE:NAME) does not pass back a name if the match suc- + ceeds. In an anchored pattern (*PRUNE) has the same effect as (*COM- + MIT). (*SKIP) - This verb is like (*PRUNE), except that if the pattern is unanchored, - the "bumpalong" advance is not to the next character, but to the posi- - tion in the subject where (*SKIP) was encountered. (*SKIP) signifies - that whatever text was matched leading up to it cannot be part of a - successful match. Consider: + This verb, when given without a name, is like (*PRUNE), except that if + the pattern is unanchored, the "bumpalong" advance is not to the next + character, but to the position in the subject where (*SKIP) was encoun- + tered. (*SKIP) signifies that whatever text was matched leading up to + it cannot be part of a successful match. Consider: a+(*SKIP)b - If the subject is "aaaac...", after the first match attempt fails - (starting at the first character in the string), the starting point + If the subject is "aaaac...", after the first match attempt fails + (starting at the first character in the string), the starting point skips on to start the next attempt at "c". Note that a possessive quan- - tifer does not have the same effect as this example; although it would - suppress backtracking during the first match attempt, the second - attempt would start at the second character instead of skipping on to + tifer does not have the same effect as this example; although it would + suppress backtracking during the first match attempt, the second + attempt would start at the second character instead of skipping on to "c". - (*THEN) + (*SKIP:NAME) + + When (*SKIP) has an associated name, its behaviour is modified. If the + following pattern fails to match, the previous path through the pattern + is searched for the most recent (*MARK) that has the same name. If one + is found, the "bumpalong" advance is to the subject position that cor- + responds to that (*MARK) instead of to where (*SKIP) was encountered. + If no (*MARK) with a matching name is found, normal "bumpalong" of one + character happens (the (*SKIP) is ignored). + + (*THEN) or (*THEN:NAME) This verb causes a skip to the next alternation if the rest of the pat- tern does not match. That is, it cancels pending backtracking, but only - within the current alternation. Its name comes from the observation + within the current alternation. Its name comes from the observation that it can be used for a pattern-based if-then-else block: ( COND1 (*THEN) FOO | COND2 (*THEN) BAR | COND3 (*THEN) BAZ ) ... - If the COND1 pattern matches, FOO is tried (and possibly further items - after the end of the group if FOO succeeds); on failure the matcher - skips to the second alternative and tries COND2, without backtracking - into COND1. If (*THEN) is used outside of any alternation, it acts - exactly like (*PRUNE). + If the COND1 pattern matches, FOO is tried (and possibly further items + after the end of the group if FOO succeeds); on failure the matcher + skips to the second alternative and tries COND2, without backtracking + into COND1. The behaviour of (*THEN:NAME) is exactly the same as + (*MARK:NAME)(*THEN) if the overall match fails. If (*THEN) is not + directly inside an alternation, it acts like (*PRUNE). SEE ALSO @@ -5244,8 +5540,8 @@ REVISION - Last updated: 18 October 2009 - Copyright (c) 1997-2009 University of Cambridge. + Last updated: 18 May 2010 + Copyright (c) 1997-2010 University of Cambridge. ------------------------------------------------------------------------------ @@ -5292,6 +5588,7 @@ \D a character that is not a decimal digit \h a horizontal whitespace character \H a character that is not a horizontal whitespace character + \N a character that is not a newline \p{xx} a character with the xx property \P{xx} a character without the xx property \R a newline sequence @@ -5303,10 +5600,12 @@ \W a "non-word" character \X an extended Unicode sequence - In PCRE, \d, \D, \s, \S, \w, and \W recognize only ASCII characters. + In PCRE, by default, \d, \D, \s, \S, \w, and \W recognize only ASCII + characters, even in UTF-8 mode. However, this can be changed by setting + the PCRE_UCP option. -GENERAL CATEGORY PROPERTY CODES FOR \p and \P +GENERAL CATEGORY PROPERTIES FOR \p and \P C Other Cc Control @@ -5354,18 +5653,29 @@ Zs Space separator +PCRE SPECIAL CATEGORY PROPERTIES FOR \p and \P + + Xan Alphanumeric: union of properties L and N + Xps POSIX space: property Z or tab, NL, VT, FF, CR + Xsp Perl space: property Z or tab, NL, FF, CR + Xwd Perl word: property Xan or underscore + + SCRIPT NAMES FOR \p AND \P - Arabic, Armenian, Balinese, Bengali, Bopomofo, Braille, Buginese, - Buhid, Canadian_Aboriginal, Carian, Cham, Cherokee, Common, Coptic, Cu- - neiform, Cypriot, Cyrillic, Deseret, Devanagari, Ethiopic, Georgian, - Glagolitic, Gothic, Greek, Gujarati, Gurmukhi, Han, Hangul, Hanunoo, - Hebrew, Hiragana, Inherited, Kannada, Katakana, Kayah_Li, Kharoshthi, - Khmer, Lao, Latin, Lepcha, Limbu, Linear_B, Lycian, Lydian, Malayalam, - Mongolian, Myanmar, New_Tai_Lue, Nko, Ogham, Old_Italic, Old_Persian, - Ol_Chiki, Oriya, Osmanya, Phags_Pa, Phoenician, Rejang, Runic, Saurash- - tra, Shavian, Sinhala, Sudanese, Syloti_Nagri, Syriac, Tagalog, Tag- - banwa, Tai_Le, Tamil, Telugu, Thaana, Thai, Tibetan, Tifinagh, + Arabic, Armenian, Avestan, Balinese, Bamum, Bengali, Bopomofo, Braille, + Buginese, Buhid, Canadian_Aboriginal, Carian, Cham, Cherokee, Common, + Coptic, Cuneiform, Cypriot, Cyrillic, Deseret, Devanagari, Egyp- + tian_Hieroglyphs, Ethiopic, Georgian, Glagolitic, Gothic, Greek, + Gujarati, Gurmukhi, Han, Hangul, Hanunoo, Hebrew, Hiragana, Impe- + rial_Aramaic, Inherited, Inscriptional_Pahlavi, Inscriptional_Parthian, + Javanese, Kaithi, Kannada, Katakana, Kayah_Li, Kharoshthi, Khmer, Lao, + Latin, Lepcha, Limbu, Linear_B, Lisu, Lycian, Lydian, Malayalam, + Meetei_Mayek, Mongolian, Myanmar, New_Tai_Lue, Nko, Ogham, Old_Italic, + Old_Persian, Old_South_Arabian, Old_Turkic, Ol_Chiki, Oriya, Osmanya, + Phags_Pa, Phoenician, Rejang, Runic, Samaritan, Saurashtra, Shavian, + Sinhala, Sundanese, Syloti_Nagri, Syriac, Tagalog, Tagbanwa, Tai_Le, + Tai_Tham, Tai_Viet, Tamil, Telugu, Thaana, Thai, Tibetan, Tifinagh, Ugaritic, Vai, Yi. @@ -5392,8 +5702,9 @@ word same as \w xdigit hexadecimal digit - In PCRE, POSIX character set names recognize only ASCII characters. You - can use \Q...\E inside a character class. + In PCRE, POSIX character set names recognize only ASCII characters by + default, but some of them use Unicode properties if PCRE_UCP is set. + You can use \Q...\E inside a character class. QUANTIFIERS @@ -5418,7 +5729,7 @@ ANCHORS AND SIMPLE ASSERTIONS - \b word boundary (only ASCII letters recognized) + \b word boundary \B not a word boundary ^ start of subject also after internal newline in multiline mode @@ -5473,10 +5784,11 @@ (?x) extended (ignore white space) (?-...) unset option(s) - The following is recognized only at the start of a pattern or after one - of the newline-setting options with similar syntax: + The following are recognized only at the start of a pattern or after + one of the newline-setting options with similar syntax: - (*UTF8) set UTF-8 mode + (*UTF8) set UTF-8 mode (PCRE_UTF8) + (*UCP) set PCRE_UCP (use Unicode properties for \d etc) LOOKAHEAD AND LOOKBEHIND ASSERTIONS @@ -5559,7 +5871,7 @@ NEWLINE CONVENTIONS These are recognized only at the very start of the pattern or after a - (*BSR_...) or (*UTF8) option. + (*BSR_...) or (*UTF8) or (*UCP) option. (*CR) carriage return only (*LF) linefeed only @@ -5571,7 +5883,7 @@ WHAT \R MATCHES These are recognized only at the very start of the pattern or after a - (*...) option that sets the newline convention or UTF-8 mode. + (*...) option that sets the newline convention or UTF-8 or UCP mode. (*BSR_ANYCRLF) CR, LF, or CRLF (*BSR_UNICODE) any Unicode newline sequence @@ -5597,8 +5909,8 @@ REVISION - Last updated: 11 April 2009 - Copyright (c) 1997-2009 University of Cambridge. + Last updated: 12 May 2010 + Copyright (c) 1997-2010 University of Cambridge. ------------------------------------------------------------------------------ @@ -6122,14 +6434,14 @@ can affect both of them. -MEMORY USAGE +COMPILED PATTERN MEMORY USAGE Patterns are compiled by PCRE into a reasonably efficient byte code, so that most simple patterns do not use much memory. However, there is one - case where memory usage can be unexpectedly large. When a parenthesized - subpattern has a quantifier with a minimum greater than 1 and/or a lim- - ited maximum, the whole subpattern is repeated in the compiled code. - For example, the pattern + case where the memory usage of a compiled pattern can be unexpectedly + large. If a parenthesized subpattern has a quantifier with a minimum + greater than 1 and/or a limited maximum, the whole subpattern is + repeated in the compiled code. For example, the pattern (abc|def){2,4} @@ -6171,73 +6483,91 @@ otherwise handle. +STACK USAGE AT RUN TIME + + When pcre_exec() is used for matching, certain kinds of pattern can + cause it to use large amounts of the process stack. In some environ- + ments the default process stack is quite small, and if it runs out the + result is often SIGSEGV. This issue is probably the most frequently + raised problem with PCRE. Rewriting your pattern can often help. The + pcrestack documentation discusses this issue in detail. + + PROCESSING TIME - Certain items in regular expression patterns are processed more effi- + Certain items in regular expression patterns are processed more effi- ciently than others. It is more efficient to use a character class like - [aeiou] than a set of single-character alternatives such as - (a|e|i|o|u). In general, the simplest construction that provides the + [aeiou] than a set of single-character alternatives such as + (a|e|i|o|u). In general, the simplest construction that provides the required behaviour is usually the most efficient. Jeffrey Friedl's book - contains a lot of useful general discussion about optimizing regular - expressions for efficient performance. This document contains a few + contains a lot of useful general discussion about optimizing regular + expressions for efficient performance. This document contains a few observations about PCRE. - Using Unicode character properties (the \p, \P, and \X escapes) is - slow, because PCRE has to scan a structure that contains data for over - fifteen thousand characters whenever it needs a character's property. - If you can find an alternative pattern that does not use character + Using Unicode character properties (the \p, \P, and \X escapes) is + slow, because PCRE has to scan a structure that contains data for over + fifteen thousand characters whenever it needs a character's property. + If you can find an alternative pattern that does not use character properties, it will probably be faster. - When a pattern begins with .* not in parentheses, or in parentheses + By default, the escape sequences \b, \d, \s, and \w, and the POSIX + character classes such as [:alpha:] do not use Unicode properties, + partly for backwards compatibility, and partly for performance reasons. + However, you can set PCRE_UCP if you want Unicode character properties + to be used. This can double the matching time for items such as \d, + when matched with pcre_exec(); the performance loss is less with + pcre_dfa_exec(), and in both cases there is not much difference for \b. + + When a pattern begins with .* not in parentheses, or in parentheses that are not the subject of a backreference, and the PCRE_DOTALL option - is set, the pattern is implicitly anchored by PCRE, since it can match - only at the start of a subject string. However, if PCRE_DOTALL is not - set, PCRE cannot make this optimization, because the . metacharacter - does not then match a newline, and if the subject string contains new- - lines, the pattern may match from the character immediately following + is set, the pattern is implicitly anchored by PCRE, since it can match + only at the start of a subject string. However, if PCRE_DOTALL is not + set, PCRE cannot make this optimization, because the . metacharacter + does not then match a newline, and if the subject string contains new- + lines, the pattern may match from the character immediately following one of them instead of from the very start. For example, the pattern .*second - matches the subject "first\nand second" (where \n stands for a newline - character), with the match starting at the seventh character. In order + matches the subject "first\nand second" (where \n stands for a newline + character), with the match starting at the seventh character. In order to do this, PCRE has to retry the match starting after every newline in the subject. - If you are using such a pattern with subject strings that do not con- + If you are using such a pattern with subject strings that do not con- tain newlines, the best performance is obtained by setting PCRE_DOTALL, - or starting the pattern with ^.* or ^.*? to indicate explicit anchor- - ing. That saves PCRE from having to scan along the subject looking for + or starting the pattern with ^.* or ^.*? to indicate explicit anchor- + ing. That saves PCRE from having to scan along the subject looking for a newline to restart at. - Beware of patterns that contain nested indefinite repeats. These can - take a long time to run when applied to a string that does not match. + Beware of patterns that contain nested indefinite repeats. These can + take a long time to run when applied to a string that does not match. Consider the pattern fragment ^(a+)* - This can match "aaaa" in 16 different ways, and this number increases - very rapidly as the string gets longer. (The * repeat can match 0, 1, - 2, 3, or 4 times, and for each of those cases other than 0 or 4, the + - repeats can match different numbers of times.) When the remainder of + This can match "aaaa" in 16 different ways, and this number increases + very rapidly as the string gets longer. (The * repeat can match 0, 1, + 2, 3, or 4 times, and for each of those cases other than 0 or 4, the + + repeats can match different numbers of times.) When the remainder of the pattern is such that the entire match is going to fail, PCRE has in - principle to try every possible variation, and this can take an + principle to try every possible variation, and this can take an extremely long time, even for relatively short strings. An optimization catches some of the more simple cases such as (a+)*b - where a literal character follows. Before embarking on the standard - matching procedure, PCRE checks that there is a "b" later in the sub- - ject string, and if there is not, it fails the match immediately. How- - ever, when there is no following literal this optimization cannot be + where a literal character follows. Before embarking on the standard + matching procedure, PCRE checks that there is a "b" later in the sub- + ject string, and if there is not, it fails the match immediately. How- + ever, when there is no following literal this optimization cannot be used. You can see the difference by comparing the behaviour of (a+)*\d - with the pattern above. The former gives a failure almost instantly - when applied to a whole line of "a" characters, whereas the latter + with the pattern above. The former gives a failure almost instantly + when applied to a whole line of "a" characters, whereas the latter takes an appreciable time with strings longer than about 20 characters. In many cases, the solution to this kind of performance issue is to use @@ -6253,8 +6583,8 @@ REVISION - Last updated: 06 March 2007 - Copyright (c) 1997-2007 University of Cambridge. + Last updated: 16 May 2010 + Copyright (c) 1997-2010 University of Cambridge. ------------------------------------------------------------------------------ @@ -6359,33 +6689,40 @@ ing, the nmatch and pmatch arguments are ignored, and no captured strings are returned. + REG_UCP + + The PCRE_UCP option is set when the regular expression is passed for + compilation to the native function. This causes PCRE to use Unicode + properties when matchine \d, \w, etc., instead of just recognizing + ASCII values. Note that REG_UTF8 is not part of the POSIX standard. + REG_UNGREEDY - The PCRE_UNGREEDY option is set when the regular expression is passed - for compilation to the native function. Note that REG_UNGREEDY is not + The PCRE_UNGREEDY option is set when the regular expression is passed + for compilation to the native function. Note that REG_UNGREEDY is not part of the POSIX standard. REG_UTF8 - The PCRE_UTF8 option is set when the regular expression is passed for - compilation to the native function. This causes the pattern itself and - all data strings used for matching it to be treated as UTF-8 strings. + The PCRE_UTF8 option is set when the regular expression is passed for + compilation to the native function. This causes the pattern itself and + all data strings used for matching it to be treated as UTF-8 strings. Note that REG_UTF8 is not part of the POSIX standard. - In the absence of these flags, no options are passed to the native - function. This means the the regex is compiled with PCRE default - semantics. In particular, the way it handles newline characters in the - subject string is the Perl way, not the POSIX way. Note that setting - PCRE_MULTILINE has only some of the effects specified for REG_NEWLINE. - It does not affect the way newlines are matched by . (they are not) or + In the absence of these flags, no options are passed to the native + function. This means the the regex is compiled with PCRE default + semantics. In particular, the way it handles newline characters in the + subject string is the Perl way, not the POSIX way. Note that setting + PCRE_MULTILINE has only some of the effects specified for REG_NEWLINE. + It does not affect the way newlines are matched by . (they are not) or by a negative class such as [^a] (they are). - The yield of regcomp() is zero on success, and non-zero otherwise. The + The yield of regcomp() is zero on success, and non-zero otherwise. The preg structure is filled in on success, and one member of the structure - is public: re_nsub contains the number of capturing subpatterns in the + is public: re_nsub contains the number of capturing subpatterns in the regular expression. Various error codes are defined in the header file. - NOTE: If the yield of regcomp() is non-zero, you must not attempt to + NOTE: If the yield of regcomp() is non-zero, you must not attempt to use the contents of the preg structure. If, for example, you pass it to regexec(), the result is undefined and your program is likely to crash. @@ -6393,9 +6730,9 @@ MATCHING NEWLINE CHARACTERS This area is not simple, because POSIX and Perl take different views of - things. It is not possible to get PCRE to obey POSIX semantics, but - then PCRE was never intended to be a POSIX engine. The following table - lists the different possibilities for matching newline characters in + things. It is not possible to get PCRE to obey POSIX semantics, but + then PCRE was never intended to be a POSIX engine. The following table + lists the different possibilities for matching newline characters in PCRE: Default Change with @@ -6417,19 +6754,19 @@ ^ matches \n in middle no REG_NEWLINE PCRE's behaviour is the same as Perl's, except that there is no equiva- - lent for PCRE_DOLLAR_ENDONLY in Perl. In both PCRE and Perl, there is + lent for PCRE_DOLLAR_ENDONLY in Perl. In both PCRE and Perl, there is no way to stop newline from matching [^a]. - The default POSIX newline handling can be obtained by setting - PCRE_DOTALL and PCRE_DOLLAR_ENDONLY, but there is no way to make PCRE + The default POSIX newline handling can be obtained by setting + PCRE_DOTALL and PCRE_DOLLAR_ENDONLY, but there is no way to make PCRE behave exactly as for the REG_NEWLINE action. MATCHING A PATTERN - The function regexec() is called to match a compiled pattern preg - 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 + The function regexec() is called to match a compiled pattern preg + 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 @@ -6451,17 +6788,17 @@ 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 + 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 + 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. If the value of nmatch is zero, or if the value pmatch is NULL, no data @@ -6469,34 +6806,34 @@ Otherwise,the portion of the string that was matched, and also any cap- tured substrings, are returned via the pmatch argument, which points to - an array of nmatch structures of type regmatch_t, containing the mem- - bers rm_so and rm_eo. These contain the offset to the first character - of each substring and the offset to the first character after the end - of each substring, respectively. The 0th element of the vector relates - to the entire portion of string that was matched; subsequent elements - relate to the capturing subpatterns of the regular expression. Unused + an array of nmatch structures of type regmatch_t, containing the mem- + bers rm_so and rm_eo. These contain the offset to the first character + of each substring and the offset to the first character after the end + of each substring, respectively. The 0th element of the vector relates + to the entire portion of string that was matched; subsequent elements + relate to the capturing subpatterns of the regular expression. Unused entries in the array have both structure members set to -1. - A successful match yields a zero return; various error codes are - defined in the header file, of which REG_NOMATCH is the "expected" + A successful match yields a zero return; various error codes are + defined in the header file, of which REG_NOMATCH is the "expected" failure code. ERROR MESSAGES The regerror() function maps a non-zero errorcode from either regcomp() - or regexec() to a printable message. If preg is not NULL, the error + or regexec() to a printable message. If preg is not NULL, the error should have arisen from the use of that structure. A message terminated - by a binary zero is placed in errbuf. The length of the message, - including the zero, is limited to errbuf_size. The yield of the func- + by a binary zero is placed in errbuf. The length of the message, + including the zero, is limited to errbuf_size. The yield of the func- tion is the size of buffer needed to hold the whole message. MEMORY USAGE - Compiling a regular expression causes memory to be allocated and asso- - ciated with the preg structure. The function regfree() frees all such - memory, after which preg may no longer be used as a compiled expres- + Compiling a regular expression causes memory to be allocated and asso- + ciated with the preg structure. The function regfree() frees all such + memory, after which preg may no longer be used as a compiled expres- sion. @@ -6509,8 +6846,8 @@ REVISION - Last updated: 02 September 2009 - Copyright (c) 1997-2009 University of Cambridge. + Last updated: 16 May 2010 + Copyright (c) 1997-2010 University of Cambridge. ------------------------------------------------------------------------------ @@ -6896,8 +7233,14 @@ gcc -o pcredemo -I/usr/local/include pcredemo.c \ -L/usr/local/lib -lpcre - Once you have compiled the demonstration program, you can run simple - tests like this: + In a Windows environment, if you want to statically link the program + against a non-dll pcre.a file, you must uncomment the line that defines + PCRE_STATIC before including pcre.h, because otherwise the pcre_mal- + loc() and pcre_free() exported functions will be declared + __declspec(dllimport), with unwanted results. + + Once you have compiled and linked the demonstration program, you can + run simple tests like this: ./pcredemo 'cat|dog' 'the cat sat on the mat' ./pcredemo -g 'cat|dog' 'the dog sat on the cat' @@ -6931,8 +7274,8 @@ REVISION - Last updated: 30 September 2009 - Copyright (c) 1997-2009 University of Cambridge. + Last updated: 26 May 2010 + Copyright (c) 1997-2010 University of Cambridge. ------------------------------------------------------------------------------ PCRESTACK(3) PCRESTACK(3) @@ -6958,87 +7301,100 @@ restarted instead. The pcre_dfa_exec() function operates in an entirely different way, and - hardly uses recursion at all. The limit on its complexity is the amount - of workspace it is given. The comments that follow do NOT apply to - pcre_dfa_exec(); they are relevant only for pcre_exec(). - - You can set limits on the number of times that match() is called, both - in total and recursively. If the limit is exceeded, an error occurs. - For details, see the section on extra data for pcre_exec() in the - pcreapi documentation. - - Each time that match() is actually called recursively, it uses memory - from the process stack. For certain kinds of pattern and data, very - large amounts of stack may be needed, despite the recognition of "tail - recursion". You can often reduce the amount of recursion, and there- - fore the amount of stack used, by modifying the pattern that is being + uses recursion only when there is a regular expression recursion or + subroutine call in the pattern. This includes the processing of asser- + tion and "once-only" subpatterns, which are handled like subroutine + calls. Normally, these are never very deep, and the limit on the com- + plexity of pcre_dfa_exec() is controlled by the amount of workspace it + is given. However, it is possible to write patterns with runaway infi- + nite recursions; such patterns will cause pcre_dfa_exec() to run out of + stack. At present, there is no protection against this. + + The comments that follow do NOT apply to pcre_dfa_exec(); they are rel- + evant only for pcre_exec(). + + Reducing pcre_exec()'s stack usage + + Each time that match() is actually called recursively, it uses memory + from the process stack. For certain kinds of pattern and data, very + large amounts of stack may be needed, despite the recognition of "tail + recursion". You can often reduce the amount of recursion, and there- + fore the amount of stack used, by modifying the pattern that is being matched. Consider, for example, this pattern: ([^<]|<(?!inet))+ - It matches from wherever it starts until it encounters "<inet" or the - end of the data, and is the kind of pattern that might be used when + It matches from wherever it starts until it encounters "<inet" or the + end of the data, and is the kind of pattern that might be used when processing an XML file. Each iteration of the outer parentheses matches - either one character that is not "<" or a "<" that is not followed by - "inet". However, each time a parenthesis is processed, a recursion + either one character that is not "<" or a "<" that is not followed by + "inet". However, each time a parenthesis is processed, a recursion occurs, so this formulation uses a stack frame for each matched charac- - ter. For a long string, a lot of stack is required. Consider now this + ter. For a long string, a lot of stack is required. Consider now this rewritten pattern, which matches exactly the same strings: ([^<]++|<(?!inet))+ - This uses very much less stack, because runs of characters that do not - contain "<" are "swallowed" in one item inside the parentheses. Recur- - sion happens only when a "<" character that is not followed by "inet" - is encountered (and we assume this is relatively rare). A possessive - quantifier is used to stop any backtracking into the runs of non-"<" + This uses very much less stack, because runs of characters that do not + contain "<" are "swallowed" in one item inside the parentheses. Recur- + sion happens only when a "<" character that is not followed by "inet" + is encountered (and we assume this is relatively rare). A possessive + quantifier is used to stop any backtracking into the runs of non-"<" characters, but that is not related to stack usage. - This example shows that one way of avoiding stack problems when match- + This example shows that one way of avoiding stack problems when match- 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 + Compiling PCRE to use heap instead of stack for pcre_exec() + + 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 when pcre_exec() is running. This makes it run a lot more + slowly, however. Details of how to do this are given in the pcrebuild + documentation. When built in this way, instead of using the stack, PCRE + obtains and frees memory by calling the functions that are pointed to + by the pcre_stack_malloc and pcre_stack_free variables. By default, + these point to malloc() and free(), but you can replace the pointers to + cause PCRE to use your own functions. Since the block sizes are always + the same, and are always freed in reverse order, it may be possible to + implement customized memory handlers that are more efficient than the + standard functions. - 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 - to do this are given in the pcrebuild documentation. When built in this - way, instead of using the stack, PCRE obtains and frees memory by call- - ing the functions that are pointed to by the pcre_stack_malloc and - pcre_stack_free variables. By default, these point to malloc() and - free(), but you can replace the pointers to cause PCRE to use your own - functions. Since the block sizes are always the same, and are always - 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. + Limiting pcre_exec()'s stack usage + + You can set limits on the number of times that match() is called, both + in total and recursively. If a limit is exceeded, pcre_exec() returns + an error code. Setting suitable limits should prevent it from running + out of stack. The default values of the limits are very large, and + unlikely ever to operate. They can be changed when PCRE is built, and + they can also be set when pcre_exec() is called. For details of these + interfaces, see the pcrebuild documentation and the section on extra + data for pcre_exec() in the 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. + hand, can support around 128000 recursions. + + In Unix-like environments, the pcretest test program has a command line + option (-S) that can be used to increase the size of its stack. As long + as the stack is large enough, another option (-M) can be used to find + the smallest limits that allow a particular pattern to match a given + subject string. This is done by calling pcre_exec() repeatedly with + different limits. 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 + 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 common. You can find your default limit by running the command: ulimit -s - Unfortunately, the effect of running out of stack is often SIGSEGV, - though sometimes a more explicit error message is given. You can nor- + Unfortunately, the effect of running out of stack is often SIGSEGV, + though sometimes a more explicit error message is given. You can nor- mally increase the limit on stack size by code such as this: struct rlimit rlim; @@ -7046,15 +7402,15 @@ rlim.rlim_cur = 100*1024*1024; setrlimit(RLIMIT_STACK, &rlim); - This reads the current limits (soft and hard) using getrlimit(), then - attempts to increase the soft limit to 100Mb using setrlimit(). You + This reads the current limits (soft and hard) using getrlimit(), then + attempts to increase the soft limit to 100Mb using setrlimit(). You must do this before calling pcre_exec(). Changing stack size in Mac OS X 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: + discussion about stack sizes in Mac OS X at this web site: http://developer.apple.com/qa/qa2005/qa1419.html. @@ -7067,8 +7423,8 @@ REVISION - Last updated: 09 July 2008 - Copyright (c) 1997-2008 University of Cambridge. + Last updated: 03 January 2010 + Copyright (c) 1997-2010 University of Cambridge. ------------------------------------------------------------------------------ @@ . patch -p0 <<'@@ .' Index: pcre/doc/pcre_compile.3 ============================================================================ $ cvs diff -u -r1.1.1.2 -r1.1.1.2.2.1 pcre_compile.3 --- pcre/doc/pcre_compile.3 5 Dec 2009 13:54:12 -0000 1.1.1.2 +++ pcre/doc/pcre_compile.3 23 Aug 2010 13:08:56 -0000 1.1.1.2.2.1 @@ -55,11 +55,12 @@ PCRE_NO_UTF8_CHECK Do not check the pattern for UTF-8 validity (only relevant if PCRE_UTF8 is set) + PCRE_UCP Use Unicode properties for \ed, \ew, etc. PCRE_UNGREEDY Invert greediness of quantifiers PCRE_UTF8 Run in UTF-8 mode .sp PCRE must be built with UTF-8 support in order to use PCRE_UTF8 and -PCRE_NO_UTF8_CHECK. +PCRE_NO_UTF8_CHECK, and with UCP support if PCRE_UCP is used. .P The yield of the function is a pointer to a private data structure that contains the compiled pattern, or NULL if an error was detected. Note that @@ . patch -p0 <<'@@ .' Index: pcre/doc/pcre_compile2.3 ============================================================================ $ cvs diff -u -r1.1.1.2 -r1.1.1.2.2.1 pcre_compile2.3 --- pcre/doc/pcre_compile2.3 5 Dec 2009 13:54:14 -0000 1.1.1.2 +++ pcre/doc/pcre_compile2.3 23 Aug 2010 13:08:56 -0000 1.1.1.2.2.1 @@ -59,11 +59,12 @@ PCRE_NO_UTF8_CHECK Do not check the pattern for UTF-8 validity (only relevant if PCRE_UTF8 is set) + PCRE_UCP Use Unicode properties for \ed, \ew, etc. PCRE_UNGREEDY Invert greediness of quantifiers PCRE_UTF8 Run in UTF-8 mode .sp PCRE must be built with UTF-8 support in order to use PCRE_UTF8 and -PCRE_NO_UTF8_CHECK. +PCRE_NO_UTF8_CHECK, and with UCP support if PCRE_UCP is used. .P The yield of the function is a pointer to a private data structure that contains the compiled pattern, or NULL if an error was detected. Note that @@ . patch -p0 <<'@@ .' Index: pcre/doc/pcreapi.3 ============================================================================ $ cvs diff -u -r1.1.1.3 -r1.1.1.3.2.1 pcreapi.3 --- pcre/doc/pcreapi.3 5 Dec 2009 13:54:10 -0000 1.1.1.3 +++ pcre/doc/pcreapi.3 23 Aug 2010 13:08:56 -0000 1.1.1.3.2.1 @@ -132,6 +132,12 @@ and PCRE_MINOR to contain the major and minor release numbers for the library. Applications can use these to include support for different releases of PCRE. .P +In a Windows environment, if you want to statically link an application program +against a non-dll \fBpcre.a\fP file, you must define PCRE_STATIC before +including \fBpcre.h\fP or \fBpcrecpp.h\fP, because otherwise the +\fBpcre_malloc()\fP and \fBpcre_free()\fP exported functions will be declared +\fB__declspec(dllimport)\fP, with unwanted results. +.P The functions \fBpcre_compile()\fP, \fBpcre_compile2()\fP, \fBpcre_study()\fP, and \fBpcre_exec()\fP are used for compiling and matching regular expressions in a Perl-compatible manner. A sample program that demonstrates the simplest @@ -553,8 +559,9 @@ special meaning causes an error, thus reserving these combinations for future expansion. By default, as in Perl, a backslash followed by a letter with no special meaning is treated as a literal. (Perl can, however, be persuaded to -give a warning for this.) There are at present no other features controlled by -this option. It can also be set by a (?X) option setting within a pattern. +give an error for this, by running it with the -w option.) There are at present +no other features controlled by this option. It can also be set by a (?X) +option setting within a pattern. .sp PCRE_FIRSTLINE .sp @@ -635,6 +642,24 @@ they acquire numbers in the usual way). There is no equivalent of this option in Perl. .sp + PCRE_UCP +.sp +This option changes the way PCRE processes \eb, \ed, \es, \ew, and some of the +POSIX character classes. By default, only ASCII characters are recognized, but +if PCRE_UCP is set, Unicode properties are used instead to classify characters. +More details are given in the section on +.\" HTML <a href="pcre.html#genericchartypes"> +.\" </a> +generic character types +.\" +in the +.\" HREF +\fBpcrepattern\fP +.\" +page. If you set PCRE_UCP, matching one of the items it affects takes much +longer. The option is available only if PCRE has been compiled with Unicode +property support. +.sp PCRE_UNGREEDY .sp This option inverts the "greediness" of the quantifiers so that they are not @@ -740,19 +765,24 @@ 50 [this code is not in use] 51 octal value is greater than \e377 (not in UTF-8 mode) 52 internal error: overran compiling workspace - 53 internal error: previously-checked referenced subpattern not found + 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 \eg 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 + 59 an argument is not allowed for (*ACCEPT), (*FAIL), or (*COMMIT) 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 + 65 different names for subpatterns of the same number are + not allowed + 66 (*MARK) must have an argument + 67 this version of PCRE is not compiled with PCRE_UCP support .sp 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. @@ -818,6 +848,16 @@ single fixed starting character. A bitmap of possible starting bytes is created. This speeds up finding a position in the subject at which to start matching. +.P +The two optimizations just described can be disabled by setting the +PCRE_NO_START_OPTIMIZE option when calling \fBpcre_exec()\fP or +\fBpcre_dfa_exec()\fP. You might want to do this if your pattern contains +callouts, or make use of (*MARK), and you make use of these in cases where +matching fails. See the discussion of PCRE_NO_START_OPTIMIZE +.\" HTML <a href="#execoptions"> +.\" </a> +below. +.\" . . .\" HTML <a name="localesupport"></a> @@ -827,11 +867,13 @@ 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 \ew or \ed, but -can be tested with \ep if PCRE is built with Unicode character property -support. The use of locales with Unicode 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. +less than 128. By default, higher-valued codes never match escapes such as \ew +or \ed, but they can be tested with \ep if PCRE is built with Unicode character +property support. Alternatively, the PCRE_UCP option can be set at compile +time; this causes \ew and friends to use Unicode property support instead of +built-in tables. The use of locales with Unicode 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. .P PCRE contains an internal set of tables that are used when the final argument of \fBpcre_compile()\fP is NULL. These are sufficient for many applications. @@ -1210,6 +1252,7 @@ unsigned long int \fImatch_limit_recursion\fP; void *\fIcallout_data\fP; const unsigned char *\fItables\fP; + unsigned char **\fImark\fP; .sp The \fIflags\fP field is a bitmap that specifies which of the other fields are set. The flag bits are: @@ -1219,6 +1262,7 @@ PCRE_EXTRA_MATCH_LIMIT_RECURSION PCRE_EXTRA_CALLOUT_DATA PCRE_EXTRA_TABLES + PCRE_EXTRA_MARK .sp Other flag bits should be set to zero. The \fIstudy_data\fP field is set in the \fBpcre_extra\fP block that is returned by \fBpcre_study()\fP, together with @@ -1281,6 +1325,26 @@ \fBpcreprecompile\fP .\" documentation for a discussion of saving compiled patterns for later use. +.P +If PCRE_EXTRA_MARK is set in the \fIflags\fP field, the \fImark\fP field must +be set to point to a \fBchar *\fP variable. If the pattern contains any +backtracking control verbs such as (*MARK:NAME), and the execution ends up with +a name to pass back, a pointer to the name string (zero terminated) is placed +in the variable pointed to by the \fImark\fP field. The names are within the +compiled pattern; if you wish to retain such a name you must copy it before +freeing the memory of a compiled pattern. If there is no name to pass back, the +variable pointed to by the \fImark\fP field set to NULL. For details of the +backtracking control verbs, see the section entitled +.\" HTML <a href="pcrepattern#backtrackcontrol"> +.\" </a> +"Backtracking control" +.\" +in the +.\" HREF +\fBpcrepattern\fP +.\" +documentation. +. . .\" HTML <a name="execoptions"></a> .SS "Option bits for \fBpcre_exec()\fP" @@ -1391,12 +1455,46 @@ PCRE_NO_START_OPTIMIZE .sp There are a number of optimizations that \fBpcre_exec()\fP uses at the start of -a match, in order to speed up the process. For example, if it is known that a -match must start with a specific character, it searches the subject for that -character, and fails immediately if it cannot find it, without actually running -the main matching function. When callouts are in use, these optimizations can -cause them to be skipped. This option disables the "start-up" optimizations, -causing performance to suffer, but ensuring that the callouts do occur. +a match, in order to speed up the process. For example, if it is known that an +unanchored match must start with a specific character, it searches the subject +for that character, and fails immediately if it cannot find it, without +actually running the main matching function. This means that a special item +such as (*COMMIT) at the start of a pattern is not considered until after a +suitable starting point for the match has been found. When callouts or (*MARK) +items are in use, these "start-up" optimizations can cause them to be skipped +if the pattern is never actually used. The start-up optimizations are in effect +a pre-scan of the subject that takes place before the pattern is run. +.P +The PCRE_NO_START_OPTIMIZE option disables the start-up optimizations, possibly +causing performance to suffer, but ensuring that in cases where the result is +"no match", the callouts do occur, and that items such as (*COMMIT) and (*MARK) +are considered at every possible starting position in the subject string. +Setting PCRE_NO_START_OPTIMIZE can change the outcome of a matching operation. +Consider the pattern +.sp + (*COMMIT)ABC +.sp +When this is compiled, PCRE records the fact that a match must start with the +character "A". Suppose the subject string is "DEFABC". The start-up +optimization scans along the subject, finds "A" and runs the first match +attempt from there. The (*COMMIT) item means that the pattern must match the +current starting position, which in this case, it does. However, if the same +match is run with PCRE_NO_START_OPTIMIZE set, the initial scan along the +subject string does not happen. The first match attempt is run starting from +"D" and when this fails, (*COMMIT) prevents any further matches being tried, so +the overall result is "no match". If the pattern is studied, more start-up +optimizations may be used. For example, a minimum length for the subject may be +recorded. Consider the pattern +.sp + (*MARK:A)(X|Y) +.sp +The minimum length for a match is one character. If the subject is "ABC", there +will be attempts to match "ABC", "BC", "C", and then finally an empty string. +If the pattern is studied, the final attempt does not take place, because PCRE +knows that the subject is too short, and so the (*MARK) is never encountered. +In this case, studying the pattern does not affect the overall match result, +which is still "no match", but it does affect the auxiliary information that is +returned. .sp PCRE_NO_UTF8_CHECK .sp @@ -1591,6 +1689,10 @@ gets a block of memory at the start of matching to use for this purpose. If the call via \fBpcre_malloc()\fP fails, this error is given. The memory is automatically freed at the end of matching. +.P +This error is also given if \fBpcre_stack_malloc()\fP fails in +\fBpcre_exec()\fP. This can happen only when PCRE has been compiled with +\fB--disable-stack-for-recursion\fP. .sp PCRE_ERROR_NOSUBSTRING (-7) .sp @@ -1939,9 +2041,10 @@ The unused bits of the \fIoptions\fP argument for \fBpcre_dfa_exec()\fP must be zero. The only bits that may be set are PCRE_ANCHORED, PCRE_NEWLINE_\fIxxx\fP, PCRE_NOTBOL, PCRE_NOTEOL, PCRE_NOTEMPTY, PCRE_NOTEMPTY_ATSTART, -PCRE_NO_UTF8_CHECK, PCRE_PARTIAL_HARD, PCRE_PARTIAL_SOFT, PCRE_DFA_SHORTEST, -and PCRE_DFA_RESTART. All but the last four of these are exactly the same as -for \fBpcre_exec()\fP, so their description is not repeated here. +PCRE_NO_UTF8_CHECK, PCRE_BSR_ANYCRLF, PCRE_BSR_UNICODE, PCRE_NO_START_OPTIMIZE, +PCRE_PARTIAL_HARD, PCRE_PARTIAL_SOFT, PCRE_DFA_SHORTEST, and PCRE_DFA_RESTART. +All but the last four of these are exactly the same as for \fBpcre_exec()\fP, +so their description is not repeated here. .sp PCRE_PARTIAL_HARD PCRE_PARTIAL_SOFT @@ -2075,6 +2178,6 @@ .rs .sp .nf -Last updated: 03 October 2009 -Copyright (c) 1997-2009 University of Cambridge. +Last updated: 21 June 2010 +Copyright (c) 1997-2010 University of Cambridge. .fi @@ . patch -p0 <<'@@ .' Index: pcre/doc/pcrecompat.3 ============================================================================ $ cvs diff -u -r1.1.1.2 -r1.1.1.2.2.1 pcrecompat.3 --- pcre/doc/pcrecompat.3 5 Dec 2009 13:54:10 -0000 1.1.1.2 +++ pcre/doc/pcrecompat.3 23 Aug 2010 13:08:56 -0000 1.1.1.2.2.1 @@ -6,7 +6,7 @@ .sp This document describes the differences in the ways that PCRE and Perl handle regular expressions. The differences described here are with respect to Perl -5.10. +5.10/5.11. .P 1. PCRE has only a subset of Perl's UTF-8 and Unicode support. Details of what it does have are given in the @@ -93,11 +93,7 @@ strings when part of a pattern is repeated. For example, matching "aba" against the pattern /^(a(b)?)+$/ in Perl leaves $2 unset, but in PCRE it is set to "b". .P -11. PCRE does support Perl 5.10's backtracking verbs (*ACCEPT), (*FAIL), (*F), -(*COMMIT), (*PRUNE), (*SKIP), and (*THEN), but only in the forms without an -argument. PCRE does not support (*MARK). -.P -12. PCRE's handling of duplicate subpattern numbers and duplicate subpattern +11. PCRE's handling of duplicate subpattern numbers and duplicate subpattern names is not as general as Perl's. This is a consequence of the fact the PCRE works internally just with numbers, using an external table to translate between numbers and names. In particular, a pattern such as (?|(?<a>A)|(?<b)B), @@ -107,7 +103,7 @@ names map to capturing subpattern number 1. To avoid this confusing situation, an error is given at compile time. .P -13. PCRE provides some extensions to the Perl regular expression facilities. +12. PCRE provides some extensions to the Perl regular expression facilities. Perl 5.10 includes new features that are not in earlier versions of Perl, some of which (such as named parentheses) have been in PCRE for some time. This list is with respect to Perl 5.10: @@ -164,6 +160,6 @@ .rs .sp .nf -Last updated: 04 October 2009 -Copyright (c) 1997-2009 University of Cambridge. +Last updated: 12 May 2010 +Copyright (c) 1997-2010 University of Cambridge. .fi @@ . patch -p0 <<'@@ .' Index: pcre/doc/pcregrep.1 ============================================================================ $ cvs diff -u -r1.1.1.3 -r1.1.1.3.2.1 pcregrep.1 --- pcre/doc/pcregrep.1 5 Dec 2009 13:54:14 -0000 1.1.1.3 +++ pcre/doc/pcregrep.1 23 Aug 2010 13:08:56 -0000 1.1.1.3.2.1 @@ -141,7 +141,7 @@ connected to a terminal. More resources are used when colouring is enabled, because \fBpcregrep\fP has to search for all possible matches in a line, not just one, in order to colour them all. - +.sp The colour that is used can be specified by setting the environment variable PCREGREP_COLOUR or PCREGREP_COLOR. The value of this variable should be a string of two numbers, separated by a semicolon. They are copied directly into @@ -282,6 +282,16 @@ are being output. If not supplied, "(standard input)" is used. There is no short form for this option. .TP +\fB--line-buffered\fP +When this option is given, input is read and processed line by line, and the +output is flushed after each write. By default, input is read in large chunks, +unless \fBpcregrep\fP can determine that it is reading from a terminal (which +is currently possible only in Unix environments). Output to terminal is +normally automatically flushed by the operating system. This option can be +useful when the input or output is attached to a pipe and you do not want +\fBpcregrep\fP to buffer up large amounts of data. However, its use will affect +performance, and the \fB-M\fP (multiline) option ceases to work. +.TP \fB--line-offsets\fP Instead of showing lines or parts of lines that match, show each match as a line number, the offset from the start of the line, and a length. The line @@ -307,7 +317,8 @@ \fBpcregrep\fP ensures that at least 8K characters or the rest of the document (whichever is the shorter) are available for forward matching, and similarly the previous 8K characters (or all the previous characters, if fewer than 8K) -are guaranteed to be available for lookbehind assertions. +are guaranteed to be available for lookbehind assertions. This option does not +work when input is read line by line (see \fP--line-buffered\fP.) .TP \fB-N\fP \fInewline-type\fP, \fB--newline=\fP\fInewline-type\fP The PCRE library supports five different conventions for indicating @@ -485,6 +496,6 @@ .rs .sp .nf -Last updated: 13 September 2009 -Copyright (c) 1997-2009 University of Cambridge. +Last updated: 21 May 2010 +Copyright (c) 1997-2010 University of Cambridge. .fi @@ . patch -p0 <<'@@ .' Index: pcre/doc/pcregrep.txt ============================================================================ $ cvs diff -u -r1.1.1.3 -r1.1.1.3.2.1 pcregrep.txt --- pcre/doc/pcregrep.txt 5 Dec 2009 13:54:10 -0000 1.1.1.3 +++ pcre/doc/pcregrep.txt 23 Aug 2010 13:08:56 -0000 1.1.1.3.2.1 @@ -317,38 +317,51 @@ when file names are being output. If not supplied, "(standard input)" is used. There is no short form for this option. + --line-buffered + When this option is given, input is read and processed line + by line, and the output is flushed after each write. By + default, input is read in large chunks, unless pcregrep can + determine that it is reading from a terminal (which is cur- + rently possible only in Unix environments). Output to termi- + nal is normally automatically flushed by the operating sys- + tem. This option can be useful when the input or output is + attached to a pipe and you do not want pcregrep to buffer up + large amounts of data. However, its use will affect perfor- + mance, and the -M (multiline) option ceases to work. + --line-offsets - Instead of showing lines or parts of lines that match, show + Instead of showing lines or parts of lines that match, show each match as a line number, the offset from the start of the - line, and a length. The line number is terminated by a colon - (as usual; see the -n option), and the offset and length are - separated by a comma. In this mode, no context is shown. - That is, the -A, -B, and -C options are ignored. If there is - more than one match in a line, each of them is shown sepa- + line, and a length. The line number is terminated by a colon + (as usual; see the -n option), and the offset and length are + separated by a comma. In this mode, no context is shown. + That is, the -A, -B, and -C options are ignored. If there is + more than one match in a line, each of them is shown sepa- rately. This option is mutually exclusive with --file-offsets and --only-matching. --locale=locale-name - This option specifies a locale to be used for pattern match- - ing. It overrides the value in the LC_ALL or LC_CTYPE envi- - ronment variables. If no locale is specified, the PCRE - library's default (usually the "C" locale) is used. There is + This option specifies a locale to be used for pattern match- + ing. It overrides the value in the LC_ALL or LC_CTYPE envi- + ronment variables. If no locale is specified, the PCRE + library's default (usually the "C" locale) is used. There is no short form for this option. -M, --multiline - Allow patterns to match more than one line. When this option + Allow patterns to match more than one line. When this option is given, patterns may usefully contain literal newline char- - acters and internal occurrences of ^ and $ characters. The - output for any one match may consist of more than one line. - When this option is set, the PCRE library is called in "mul- - tiline" mode. There is a limit to the number of lines that - can be matched, imposed by the way that pcregrep buffers the - input file as it scans it. However, pcregrep ensures that at + acters and internal occurrences of ^ and $ characters. The + output for any one match may consist of more than one line. + When this option is set, the PCRE library is called in "mul- + tiline" mode. There is a limit to the number of lines that + can be matched, imposed by the way that pcregrep buffers the + input file as it scans it. However, pcregrep ensures that at least 8K characters or the rest of the document (whichever is - the shorter) are available for forward matching, and simi- + the shorter) are available for forward matching, and simi- larly the previous 8K characters (or all the previous charac- - ters, if fewer than 8K) are guaranteed to be available for - lookbehind assertions. + ters, if fewer than 8K) are guaranteed to be available for + lookbehind assertions. This option does not work when input + is read line by line (see --line-buffered.) -N newline-type, --newline=newline-type The PCRE library supports five different conventions for @@ -523,5 +536,5 @@ REVISION - Last updated: 13 September 2009 - Copyright (c) 1997-2009 University of Cambridge. + Last updated: 21 May 2010 + Copyright (c) 1997-2010 University of Cambridge. @@ . patch -p0 <<'@@ .' Index: pcre/doc/pcrepattern.3 ============================================================================ $ cvs diff -u -r1.1.1.3 -r1.1.1.3.2.1 pcrepattern.3 --- pcre/doc/pcrepattern.3 5 Dec 2009 13:54:13 -0000 1.1.1.3 +++ pcre/doc/pcrepattern.3 23 Aug 2010 13:08:56 -0000 1.1.1.3.2.1 @@ -42,6 +42,16 @@ .\" page. .P +Another special sequence that may appear at the start of a pattern or in +combination with (*UTF8) is: +.sp + (*UCP) +.sp +This has the same effect as setting the PCRE_UCP option: it causes sequences +such as \ed and \ew to use Unicode properties to determine character types, +instead of recognizing only characters with codes less than 128 via a lookup +table. +.P The remainder of this document discusses the patterns that are supported by PCRE when its main matching function, \fBpcre_exec()\fP, is used. From release 6.0, PCRE offers a second matching function, @@ -95,9 +105,11 @@ they must be in upper case. If more than one of them is present, the last one is used. .P -The newline convention does not affect what the \eR escape sequence matches. By -default, this is any Unicode newline sequence, for Perl compatibility. However, -this can be changed; see the description of \eR in the section entitled +The newline convention affects the interpretation of the dot metacharacter when +PCRE_DOTALL is not set, and also the behaviour of \eN. However, it does not +affect what the \eR escape sequence matches. By default, this is any Unicode +newline sequence, for Perl compatibility. However, this can be changed; see the +description of \eR in the section entitled .\" HTML <a href="#newlineseq"> .\" </a> "Newline sequences" @@ -217,7 +229,7 @@ \en linefeed (hex 0A) \er carriage return (hex 0D) \et tab (hex 09) - \eddd character with octal code ddd, or backreference + \eddd character with octal code ddd, or back reference \exhh character with hex code hh \ex{hhh..} character with hex code hhh.. .sp @@ -295,14 +307,11 @@ .P All the sequences that define a single character value can be used both inside and outside character classes. In addition, inside a character class, the -sequence \eb is interpreted as the backspace character (hex 08), and the -sequences \eR and \eX are interpreted as the characters "R" and "X", -respectively. Outside a character class, these sequences have different -meanings -.\" HTML <a href="#uniextseq"> -.\" </a> -(see below). -.\" +sequence \eb is interpreted as the backspace character (hex 08). The sequences +\eB, \eN, \eR, and \eX are not special inside a character class. Like any other +unrecognized escape sequences, they are treated as the literal characters "B", +"N", "R", and "X" by default, but cause an error if the PCRE_EXTRA option is +set. Outside a character class, these sequences have different meanings. . . .SS "Absolute and relative back references" @@ -341,11 +350,11 @@ call. . . +.\" HTML <a name="genericchartypes"></a> .SS "Generic character types" .rs .sp -Another use of backslash is for specifying generic character types. The -following are always recognized: +Another use of backslash is for specifying generic character types: .sp \ed any decimal digit \eD any character that is not a decimal digit @@ -358,12 +367,19 @@ \ew any "word" character \eW any "non-word" character .sp -Each pair of escape sequences partitions the complete set of characters into -two disjoint sets. Any given character matches one, and only one, of each pair. +There is also the single sequence \eN, which matches a non-newline character. +This is the same as +.\" HTML <a href="#fullstopdot"> +.\" </a> +the "." metacharacter +.\" +when PCRE_DOTALL is not set. .P -These character type sequences can appear both inside and outside character +Each pair of lower and upper case escape sequences partitions the complete set +of characters into two disjoint sets. Any given character matches one, and only +one, of each pair. The sequences can appear both inside and outside character 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 +matching point is at the end of the subject string, all of them fail, because there is no character to match. .P For compatibility with Perl, \es does not match the VT character (code 11). @@ -372,16 +388,44 @@ included in a Perl script, \es may match the VT character. In PCRE, it never does. .P -In UTF-8 mode, characters with values greater than 128 never match \ed, \es, or -\ew, and always match \eD, \eS, and \eW. This is true even when Unicode -character property support is available. These sequences retain their original -meanings from before UTF-8 support was available, mainly for efficiency -reasons. Note that this also affects \eb, because it is defined in terms of \ew -and \eW. +A "word" character is an underscore or any character that is a letter or digit. +By default, the definition of letters and digits is controlled by PCRE's +low-valued character tables, and may vary if locale-specific matching is taking +place (see +.\" HTML <a href="pcreapi.html#localesupport"> +.\" </a> +"Locale support" +.\" +in the +.\" HREF +\fBpcreapi\fP +.\" +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 then matched by \ew. The use of locales with +Unicode is discouraged. +.P +By default, in UTF-8 mode, characters with values greater than 128 never match +\ed, \es, or \ew, and always match \eD, \eS, and \eW. These sequences retain +their original meanings from before UTF-8 support was available, mainly for +efficiency reasons. However, if PCRE is compiled with Unicode property support, +and the PCRE_UCP option is set, the behaviour is changed so that Unicode +properties are used to determine character types, as follows: +.sp + \ed any character that \ep{Nd} matches (decimal digit) + \es any character that \ep{Z} matches, plus HT, LF, FF, CR + \ew any character that \ep{L} or \ep{N} matches, plus underscore +.sp +The upper case escapes match the inverse sets of characters. Note that \ed +matches only decimal digits, whereas \ew matches any Unicode digit, as well as +any Unicode letter, and underscore. Note also that PCRE_UCP affects \eb, and +\eB because they are defined in terms of \ew and \eW. Matching these sequences +is noticeably slower when PCRE_UCP is set. .P The sequences \eh, \eH, \ev, and \eV are Perl 5.10 features. In contrast to the -other sequences, these do match certain high-valued codepoints in UTF-8 mode. -The horizontal space characters are: +other sequences, which match only ASCII characters by default, these always +match certain high-valued codepoints in UTF-8 mode, whether or not PCRE_UCP is +set. The horizontal space characters are: .sp U+0009 Horizontal tab U+0020 Space @@ -412,23 +456,6 @@ U+0085 Next line U+2028 Line separator U+2029 Paragraph separator -.P -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 controlled by PCRE's -low-valued character tables, and may vary if locale-specific matching is taking -place (see -.\" HTML <a href="pcreapi.html#localesupport"> -.\" </a> -"Locale support" -.\" -in the -.\" HREF -\fBpcreapi\fP -.\" -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 \ew. The use of locales with Unicode -is discouraged. . . .\" HTML <a name="newlineseq"></a> @@ -474,11 +501,13 @@ 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 can start with: +convention; for example, a pattern can start with: .sp (*ANY)(*BSR_ANYCRLF) .sp -Inside a character class, \eR matches the letter "R". +They can also be combined with the (*UTF8) or (*UCP) special sequences. Inside +a character class, \eR is treated as an unrecognized escape sequence, and so +matches the letter "R" by default, but causes an error if PCRE_EXTRA is set. . . .\" HTML <a name="uniextseq"></a> @@ -496,10 +525,16 @@ \eX an extended Unicode sequence .sp The property names represented by \fIxx\fP above are limited to the Unicode -script names, the general category properties, and "Any", which matches any -character (including newline). Other properties such as "InMusicalSymbols" are -not currently supported by PCRE. Note that \eP{Any} does not match any -characters, so always causes a match failure. +script names, the general category properties, "Any", which matches any +character (including newline), and some special PCRE properties (described +in the +.\" HTML <a href="#extraprops"> +.\" </a> +next section). +.\" +Other Perl properties such as "InMusicalSymbols" are not currently supported by +PCRE. Note that \eP{Any} does not match any characters, so always causes a +match failure. .P 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. For @@ -513,13 +548,17 @@ .P Arabic, Armenian, +Avestan, Balinese, +Bamum, Bengali, Bopomofo, Braille, Buginese, Buhid, Canadian_Aboriginal, +Carian, +Cham, Cherokee, Common, Coptic, @@ -528,6 +567,7 @@ Cyrillic, Deseret, Devanagari, +Egyptian_Hieroglyphs, Ethiopic, Georgian, Glagolitic, @@ -540,16 +580,27 @@ Hanunoo, Hebrew, Hiragana, +Imperial_Aramaic, Inherited, +Inscriptional_Pahlavi, +Inscriptional_Parthian, +Javanese, +Kaithi, Kannada, Katakana, +Kayah_Li, Kharoshthi, Khmer, Lao, Latin, +Lepcha, Limbu, Linear_B, +Lisu, +Lycian, +Lydian, Malayalam, +Meetei_Mayek, Mongolian, Myanmar, New_Tai_Lue, @@ -557,18 +608,27 @@ Ogham, Old_Italic, Old_Persian, +Old_South_Arabian, +Old_Turkic, +Ol_Chiki, Oriya, Osmanya, Phags_Pa, Phoenician, +Rejang, Runic, +Samaritan, +Saurashtra, Shavian, Sinhala, +Sundanese, Syloti_Nagri, Syriac, Tagalog, Tagbanwa, Tai_Le, +Tai_Tham, +Tai_Viet, Tamil, Telugu, Thaana, @@ -576,12 +636,13 @@ Tibetan, Tifinagh, Ugaritic, +Vai, Yi. .P -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 property name. For -example, \ep{^Lu} is the same as \eP{Lu}. +Each character has exactly one Unicode 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 property +name. For example, \ep{^Lu} is the same as \eP{Lu}. .P If only one letter is specified with \ep or \eP, it includes all the general category properties that start with that letter. In this case, in the absence @@ -680,7 +741,31 @@ 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 \ed and \ew do not use Unicode -properties in PCRE. +properties in PCRE by default, though you can make them do so by setting the +PCRE_UCP option for \fBpcre_compile()\fP or by starting the pattern with +(*UCP). +. +. +.\" HTML <a name="extraprops"></a> +.SS PCRE's additional properties +.rs +.sp +As well as the standard Unicode properties described in the previous +section, PCRE supports four more that make it possible to convert traditional +escape sequences such as \ew and \es and POSIX character classes to use Unicode +properties. PCRE uses these non-standard, non-Perl properties internally when +PCRE_UCP is set. They are: +.sp + Xan Any alphanumeric character + Xps Any POSIX space character + Xsp Any Perl space character + Xwd Any Perl "word" character +.sp +Xan matches characters that have either the L (letter) or the N (number) +property. Xps matches the characters tab, linefeed, vertical tab, formfeed, or +carriage return, and any other character that has the Z (separator) property. +Xsp is the same as Xps, except that vertical tab is excluded. Xwd matches the +same characters as Xan, plus underscore. . . .\" HTML <a name="resetmatchstart"></a> @@ -711,6 +796,10 @@ (foo)\eKbar .sp matches "foobar", the first substring is still set to "foo". +.P +Perl documents that the use of \eK within assertions is "not well defined". In +PCRE, \eK is acted upon when it occurs inside positive assertions, but is +ignored in negative assertions. . . .\" HTML <a name="smallassertions"></a> @@ -735,16 +824,21 @@ \ez matches only at the end of the subject \eG matches at the first matching position in the subject .sp -These assertions may not appear in character classes (but note that \eb has a -different meaning, namely the backspace character, inside a character class). +Inside a character class, \eb has a different meaning; it matches the backspace +character. If any other of these assertions appears in a character class, by +default it matches the corresponding literal character (for example, \eB +matches the letter B). However, if the PCRE_EXTRA option is set, an "invalid +escape sequence" error is generated instead. .P A word boundary is a position in the subject string where the current character and the previous character do not both match \ew or \eW (i.e. one matches \ew and the other matches \eW), or the start or end of the string if the -first or last character matches \ew, respectively. Neither PCRE nor Perl has a -separte "start of word" or "end of word" metasequence. However, whatever -follows \eb normally determines which it is. For example, the fragment -\eba matches "a" at the start of a word. +first or last character matches \ew, respectively. In UTF-8 mode, the meanings +of \ew and \eW can be changed by setting the PCRE_UCP option. When this is +done, it also affects \eb and \eB. Neither PCRE nor Perl has a separate "start +of word" or "end of word" metasequence. However, whatever follows \eb normally +determines which it is. For example, the fragment \eba matches "a" at the start +of a word. .P The \eA, \eZ, and \ez assertions differ from the traditional circumflex and dollar (described in the next section) in that they only ever match at the very @@ -828,7 +922,8 @@ \eA it is always anchored, whether or not PCRE_MULTILINE is set. . . -.SH "FULL STOP (PERIOD, DOT)" +.\" HTML <a name="fullstopdot"></a> +.SH "FULL STOP (PERIOD, DOT) AND \eN" .rs .sp Outside a character class, a dot in the pattern matches any one character in @@ -850,6 +945,10 @@ The handling of dot is entirely independent of the handling of circumflex and dollar, the only relationship being that they both involve newlines. Dot has no special meaning in a character class. +.P +The escape sequence \eN always behaves as a dot does when PCRE_DOTALL is not +set. In other words, it matches any one character except one that signifies the +end of a line. . . .SH "MATCHING A SINGLE BYTE" @@ -944,12 +1043,12 @@ characters with values greater than 128 only when it is compiled with Unicode property support. .P -The character types \ed, \eD, \ep, \eP, \es, \eS, \ew, and \eW may also appear -in a character class, and add the characters that they match to the class. For -example, [\edABCDEF] matches any hexadecimal digit. A circumflex 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 [^\eW_] matches any letter or digit, but not underscore. +The character types \ed, \eD, \eh, \eH, \ep, \eP, \es, \eS, \ev, \eV, \ew, and +\eW may also appear in a character class, and add the characters that they +match to the class. For example, [\edABCDEF] matches any hexadecimal digit. A +circumflex 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 [^\eW_] matches any letter or digit, but not underscore. .P The only metacharacters that are recognized in character classes are backslash, hyphen (only where it can be interpreted as specifying a range), circumflex @@ -969,7 +1068,7 @@ [01[:alpha:]%] .sp matches "0", "1", any alphabetic character, or "%". The supported class names -are +are: .sp alnum letters and digits alpha letters @@ -980,7 +1079,7 @@ graph printing characters, excluding space lower lower case letters print printing characters, including space - punct printing characters, excluding letters and digits + punct printing characters, excluding letters and digits and space space white space (not quite the same as \es) upper upper case letters word "word" characters (same as \ew) @@ -1001,8 +1100,24 @@ syntax [.ch.] and [=ch=] where "ch" is a "collating element", but these are not supported, and an error is given if they are encountered. .P -In UTF-8 mode, characters with values greater than 128 do not match any of -the POSIX character classes. +By default, in UTF-8 mode, characters with values greater than 128 do not match +any of the POSIX character classes. However, if the PCRE_UCP option is passed +to \fBpcre_compile()\fP, some of the classes are changed so that Unicode +character properties are used. This is achieved by replacing the POSIX classes +by other sequences, as follows: +.sp + [:alnum:] becomes \ep{Xan} + [:alpha:] becomes \ep{L} + [:blank:] becomes \eh + [:digit:] becomes \ep{Nd} + [:lower:] becomes \ep{Ll} + [:space:] becomes \ep{Xps} + [:upper:] becomes \ep{Lu} + [:word:] becomes \ep{Xwd} +.sp +Negated versions, such as [:^alpha:] use \eP instead of \ep. The other POSIX +classes are unchanged, and match only characters with code points less than +128. . . .SH "VERTICAL BAR" @@ -1081,8 +1196,9 @@ .\" </a> "Newline sequences" .\" -above. There is also the (*UTF8) leading sequence that can be used to set UTF-8 -mode; this is equivalent to setting the PCRE_UTF8 option. +above. There are also the (*UTF8) and (*UCP) leading sequences that can be used +to set UTF-8 and Unicode property modes; they are equivalent to setting the +PCRE_UTF8 and the PCRE_UCP options, respectively. . . .\" HTML <a name="subpattern"></a> @@ -1163,9 +1279,9 @@ / ( a ) (?| x ( y ) z | (p (q) r) | (t) u (v) ) ( z ) /x # 1 2 2 3 2 3 4 .sp -A backreference to a numbered subpattern uses the most recent value that is set -for that number by any subpattern. The following pattern matches "abcabc" or -"defdef": +A back reference to a numbered subpattern uses the most recent value that is +set for that number by any subpattern. The following pattern matches "abcabc" +or "defdef": .sp /(?|(abc)|(def))\e1/ .sp @@ -1204,7 +1320,7 @@ parentheses from other parts of the pattern, such as .\" HTML <a href="#backreferences"> .\" </a> -backreferences, +back references, .\" .\" HTML <a href="#recursion"> .\" </a> @@ -1246,7 +1362,7 @@ 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. .P -If you make a backreference to a non-unique named subpattern from elsewhere in +If you make a back reference to a non-unique named subpattern from elsewhere in the pattern, the one that corresponds to the first occurrence of the name is used. In the absence of duplicate numbers (see the previous section) this is the one with the lowest number. If you use a named reference in a condition @@ -1399,7 +1515,7 @@ alternatively using ^ to indicate anchoring explicitly. .P However, there is one situation where the optimization cannot be used. When .* -is inside capturing parentheses that are the subject of a backreference +is inside capturing parentheses that are the subject of a back reference elsewhere in the pattern, a match at the start may fail where a later one succeeds. Consider, for example: .sp @@ -1628,7 +1744,10 @@ "Comments" .\" below) can be used. -.P +. +.SS "Recursive back references" +.rs +.sp A back reference that occurs inside the parentheses to which it refers fails when the subpattern is first used, so, for example, (a\e1) never matches. However, such references can be useful inside repeated subpatterns. For @@ -1642,6 +1761,15 @@ that the first iteration does not need to match the back reference. This can be done using alternation, as in the example above, or by a quantifier with a minimum of zero. +.P +Back references of this type cause the group that they reference to be treated +as an +.\" HTML <a href="#atomicgroup"> +.\" </a> +atomic group. +.\" +Once the whole group has been matched, a subsequent matching failure cannot +cause backtracking into the middle of the group. . . .\" HTML <a name="bigassertions"></a> @@ -2276,6 +2404,7 @@ documentation. . . +.\" HTML <a name="backtrackcontrol"></a> .SH "BACKTRACKING CONTROL" .rs .sp @@ -2297,15 +2426,27 @@ processed as anchored at the point where they are tested. .P The new verbs make use of what was previously invalid syntax: an opening -parenthesis followed by an asterisk. In Perl, they are generally of the form -(*VERB:ARG) but PCRE does not support the use of arguments, so its general -form is just (*VERB). Any number of these verbs may occur in a pattern. There -are two kinds: +parenthesis followed by an asterisk. They are generally of the form +(*VERB) or (*VERB:NAME). Some may take either form, with differing behaviour, +depending on whether or not an argument is present. An name is a sequence of +letters, digits, and underscores. If the name is empty, that is, if the closing +parenthesis immediately follows the colon, the effect is as if the colon were +not there. Any number of these verbs may occur in a pattern. +.P +PCRE contains some optimizations that are used to speed up matching by running +some checks at the start of each match attempt. For example, it may know the +minimum length of matching subject, or that a particular character must be +present. When one of these optimizations suppresses the running of a match, any +included backtracking verbs will not, of course, be processed. You can suppress +the start-of-match optimizations by setting the PCRE_NO_START_OPTIMIZE option +when calling \fBpcre_exec()\fP. +. . .SS "Verbs that act immediately" .rs .sp -The following verbs act as soon as they are encountered: +The following verbs act as soon as they are encountered. They may not be +followed by a name. .sp (*ACCEPT) .sp @@ -2332,43 +2473,141 @@ A match with the string "aaaa" always fails, but the callout is taken before each backtrack happens (in this example, 10 times). . +. +.SS "Recording which path was taken" +.rs +.sp +There is one verb whose main purpose is to track how a match was arrived at, +though it also has a secondary use in conjunction with advancing the match +starting point (see (*SKIP) below). +.sp + (*MARK:NAME) or (*:NAME) +.sp +A name is always required with this verb. There may be as many instances of +(*MARK) as you like in a pattern, and their names do not have to be unique. +.P +When a match succeeds, the name of the last-encountered (*MARK) is passed back +to the caller via the \fIpcre_extra\fP data structure, as described in the +.\" HTML <a href="pcreapi.html#extradata"> +.\" </a> +section on \fIpcre_extra\fP +.\" +in the +.\" HREF +\fBpcreapi\fP +.\" +documentation. No data is returned for a partial match. Here is an example of +\fBpcretest\fP output, where the /K modifier requests the retrieval and +outputting of (*MARK) data: +.sp + /X(*MARK:A)Y|X(*MARK:B)Z/K + XY + 0: XY + MK: A + XZ + 0: XZ + MK: B +.sp +The (*MARK) name is tagged with "MK:" in this output, and in this example it +indicates which of the two alternatives matched. This is a more efficient way +of obtaining this information than putting each alternative in its own +capturing parentheses. +.P +A name may also be returned after a failed match if the final path through the +pattern involves (*MARK). However, unless (*MARK) used in conjunction with +(*COMMIT), this is unlikely to happen for an unanchored pattern because, as the +starting point for matching is advanced, the final check is often with an empty +string, causing a failure before (*MARK) is reached. For example: +.sp + /X(*MARK:A)Y|X(*MARK:B)Z/K + XP + No match +.sp +There are three potential starting points for this match (starting with X, +starting with P, and with an empty string). If the pattern is anchored, the +result is different: +.sp + /^X(*MARK:A)Y|^X(*MARK:B)Z/K + XP + No match, mark = B +.sp +PCRE's start-of-match optimizations can also interfere with this. For example, +if, as a result of a call to \fBpcre_study()\fP, it knows the minimum +subject length for a match, a shorter subject will not be scanned at all. +.P +Note that similar anomalies (though different in detail) exist in Perl, no +doubt for the same reasons. The use of (*MARK) data after a failed match of an +unanchored pattern is not recommended, unless (*COMMIT) is involved. +. +. .SS "Verbs that act after backtracking" .rs .sp The following verbs do nothing when they are encountered. Matching continues -with what follows, but if there is no subsequent match, a failure is forced. -The verbs differ in exactly what kind of failure occurs. +with what follows, but if there is no subsequent match, causing a backtrack to +the verb, a failure is forced. That is, backtracking cannot pass to the left of +the verb. However, when one of these verbs appears inside an atomic group, its +effect is confined to that group, because once the group has been matched, +there is never any backtracking into it. In this situation, backtracking can +"jump back" to the left of the entire atomic group. (Remember also, as stated +above, that this localization also applies in subroutine calls and assertions.) +.P +These verbs differ in exactly what kind of failure occurs when backtracking +reaches them. .sp (*COMMIT) .sp -This verb causes the whole match to fail outright if the rest of the pattern -does not match. Even if the pattern is unanchored, no further attempts to find -a match by advancing the starting point take place. Once (*COMMIT) has been -passed, \fBpcre_exec()\fP is committed to finding a match at the current -starting point, or not at all. For example: +This verb, which may not be followed by a name, causes the whole match to fail +outright if the rest of the pattern does not match. Even if the pattern is +unanchored, no further attempts to find a match by advancing the starting point +take place. Once (*COMMIT) has been passed, \fBpcre_exec()\fP is committed to +finding a match at the current starting point, or not at all. For example: .sp a+(*COMMIT)b .sp This matches "xxaab" but not "aacaab". It can be thought of as a kind of -dynamic anchor, or "I've started, so I must finish." -.sp - (*PRUNE) -.sp -This verb causes the match to fail at the current position if the rest of the -pattern does not match. If the pattern is unanchored, the normal "bumpalong" -advance to the next starting character then happens. Backtracking can occur as -usual to the left of (*PRUNE), or when matching to the right of (*PRUNE), but -if there is no match to the right, backtracking cannot cross (*PRUNE). -In simple cases, the use of (*PRUNE) is just an alternative to an atomic -group or possessive quantifier, but there are some uses of (*PRUNE) that cannot -be expressed in any other way. +dynamic anchor, or "I've started, so I must finish." The name of the most +recently passed (*MARK) in the path is passed back when (*COMMIT) forces a +match failure. +.P +Note that (*COMMIT) at the start of a pattern is not the same as an anchor, +unless PCRE's start-of-match optimizations are turned off, as shown in this +\fBpcretest\fP example: +.sp + /(*COMMIT)abc/ + xyzabc + 0: abc + xyzabc\eY + No match +.sp +PCRE knows that any match must start with "a", so the optimization skips along +the subject to "a" before running the first match attempt, which succeeds. When +the optimization is disabled by the \eY escape in the second subject, the match +starts at "x" and so the (*COMMIT) causes it to fail without trying any other +starting points. +.sp + (*PRUNE) or (*PRUNE:NAME) +.sp +This verb causes the match to fail at the current starting position in the +subject if the rest of the pattern does not match. If the pattern is +unanchored, the normal "bumpalong" advance to the next starting character then +happens. Backtracking can occur as usual to the left of (*PRUNE), before it is +reached, or when matching to the right of (*PRUNE), but if there is no match to +the right, backtracking cannot cross (*PRUNE). In simple cases, the use of +(*PRUNE) is just an alternative to an atomic group or possessive quantifier, +but there are some uses of (*PRUNE) that cannot be expressed in any other way. +The behaviour of (*PRUNE:NAME) is the same as (*MARK:NAME)(*PRUNE) when the +match fails completely; the name is passed back if this is the final attempt. +(*PRUNE:NAME) does not pass back a name if the match succeeds. In an anchored +pattern (*PRUNE) has the same effect as (*COMMIT). .sp (*SKIP) .sp -This verb is like (*PRUNE), except that if the pattern is unanchored, the -"bumpalong" advance is not to the next character, but to the position in the -subject where (*SKIP) was encountered. (*SKIP) signifies that whatever text -was matched leading up to it cannot be part of a successful match. Consider: +This verb, when given without a name, is like (*PRUNE), except that if the +pattern is unanchored, the "bumpalong" advance is not to the next character, +but to the position in the subject where (*SKIP) was encountered. (*SKIP) +signifies that whatever text was matched leading up to it cannot be part of a +successful match. Consider: .sp a+(*SKIP)b .sp @@ -2379,7 +2618,17 @@ first match attempt, the second attempt would start at the second character instead of skipping on to "c". .sp - (*THEN) + (*SKIP:NAME) +.sp +When (*SKIP) has an associated name, its behaviour is modified. If the +following pattern fails to match, the previous path through the pattern is +searched for the most recent (*MARK) that has the same name. If one is found, +the "bumpalong" advance is to the subject position that corresponds to that +(*MARK) instead of to where (*SKIP) was encountered. If no (*MARK) with a +matching name is found, normal "bumpalong" of one character happens (the +(*SKIP) is ignored). +.sp + (*THEN) or (*THEN:NAME) .sp This verb causes a skip to the next alternation if the rest of the pattern does not match. That is, it cancels pending backtracking, but only within the @@ -2390,8 +2639,10 @@ .sp If the COND1 pattern matches, FOO is tried (and possibly further items after the end of the group if FOO succeeds); on failure the matcher skips to the -second alternative and tries COND2, without backtracking into COND1. If (*THEN) -is used outside of any alternation, it acts exactly like (*PRUNE). +second alternative and tries COND2, without backtracking into COND1. The +behaviour of (*THEN:NAME) is exactly the same as (*MARK:NAME)(*THEN) if the +overall match fails. If (*THEN) is not directly inside an alternation, it acts +like (*PRUNE). . . .SH "SEE ALSO" @@ -2415,6 +2666,6 @@ .rs .sp .nf -Last updated: 18 October 2009 -Copyright (c) 1997-2009 University of Cambridge. +Last updated: 18 May 2010 +Copyright (c) 1997-2010 University of Cambridge. .fi @@ . patch -p0 <<'@@ .' Index: pcre/doc/pcreperform.3 ============================================================================ $ cvs diff -u -r1.1.1.1 -r1.1.1.1.4.1 pcreperform.3 --- pcre/doc/pcreperform.3 14 Jan 2009 20:19:55 -0000 1.1.1.1 +++ pcre/doc/pcreperform.3 23 Aug 2010 13:08:56 -0000 1.1.1.1.4.1 @@ -8,14 +8,15 @@ time. The way you express your pattern as a regular expression can affect both of them. . -.SH "MEMORY USAGE" +.SH "COMPILED PATTERN MEMORY USAGE" .rs .sp Patterns are compiled by PCRE into a reasonably efficient byte code, so that most simple patterns do not use much memory. However, there is one case where -memory usage can be unexpectedly large. When a parenthesized subpattern has a -quantifier with a minimum greater than 1 and/or a limited maximum, the whole -subpattern is repeated in the compiled code. For example, the pattern +the memory usage of a compiled pattern can be unexpectedly large. If a +parenthesized subpattern has a quantifier with a minimum greater than 1 and/or +a limited maximum, the whole subpattern is repeated in the compiled code. For +example, the pattern .sp (abc|def){2,4} .sp @@ -63,6 +64,21 @@ speed is acceptable, this kind of rewriting will allow you to process patterns that PCRE cannot otherwise handle. . +. +.SH "STACK USAGE AT RUN TIME" +.rs +.sp +When \fBpcre_exec()\fP is used for matching, certain kinds of pattern can cause +it to use large amounts of the process stack. In some environments the default +process stack is quite small, and if it runs out the result is often SIGSEGV. +This issue is probably the most frequently raised problem with PCRE. Rewriting +your pattern can often help. The +.\" HREF +\fBpcrestack\fP +.\" +documentation discusses this issue in detail. +. +. .SH "PROCESSING TIME" .rs .sp @@ -80,6 +96,14 @@ an alternative pattern that does not use character properties, it will probably be faster. .P +By default, the escape sequences \eb, \ed, \es, and \ew, and the POSIX +character classes such as [:alpha:] do not use Unicode properties, partly for +backwards compatibility, and partly for performance reasons. However, you can +set PCRE_UCP if you want Unicode character properties to be used. This can +double the matching time for items such as \ed, when matched with +\fBpcre_exec()\fP; the performance loss is less with \fBpcre_dfa_exec()\fP, and +in both cases there is not much difference for \eb. +.P When a pattern begins with .* not in parentheses, or in parentheses that are not the subject of a backreference, and the PCRE_DOTALL option is set, the pattern is implicitly anchored by PCRE, since it can match only at the start of @@ -148,6 +172,6 @@ .rs .sp .nf -Last updated: 06 March 2007 -Copyright (c) 1997-2007 University of Cambridge. +Last updated: 16 May 2010 +Copyright (c) 1997-2010 University of Cambridge. .fi @@ . patch -p0 <<'@@ .' Index: pcre/doc/pcreposix.3 ============================================================================ $ cvs diff -u -r1.1.1.3 -r1.1.1.3.2.1 pcreposix.3 --- pcre/doc/pcreposix.3 5 Dec 2009 13:54:14 -0000 1.1.1.3 +++ pcre/doc/pcreposix.3 23 Aug 2010 13:08:56 -0000 1.1.1.3.2.1 @@ -63,7 +63,8 @@ \fIregmatch_t\fP for returning captured substrings. It also defines some constants whose names start with "REG_"; these are used for setting options and identifying error codes. -.P +. +. .SH "COMPILING A PATTERN" .rs .sp @@ -101,6 +102,13 @@ \fInmatch\fP and \fIpmatch\fP arguments are ignored, and no captured strings are returned. .sp + REG_UCP +.sp +The PCRE_UCP option is set when the regular expression is passed for +compilation to the native function. This causes PCRE to use Unicode properties +when matchine \ed, \ew, etc., instead of just recognizing ASCII values. Note +that REG_UTF8 is not part of the POSIX standard. +.sp REG_UNGREEDY .sp The PCRE_UNGREEDY option is set when the regular expression is passed for @@ -256,6 +264,6 @@ .rs .sp .nf -Last updated: 02 September 2009 -Copyright (c) 1997-2009 University of Cambridge. +Last updated: 16 May 2010 +Copyright (c) 1997-2010 University of Cambridge. .fi @@ . patch -p0 <<'@@ .' Index: pcre/doc/pcresample.3 ============================================================================ $ cvs diff -u -r1.1.1.2 -r1.1.1.2.2.1 pcresample.3 --- pcre/doc/pcresample.3 5 Dec 2009 13:54:14 -0000 1.1.1.2 +++ pcre/doc/pcresample.3 23 Aug 2010 13:08:56 -0000 1.1.1.2.2.1 @@ -39,8 +39,14 @@ gcc -o pcredemo -I/usr/local/include pcredemo.c \e -L/usr/local/lib -lpcre .sp -Once you have compiled the demonstration program, you can run simple tests like -this: +In a Windows environment, if you want to statically link the program against a +non-dll \fBpcre.a\fP file, you must uncomment the line that defines PCRE_STATIC +before including \fBpcre.h\fP, because otherwise the \fBpcre_malloc()\fP and +\fBpcre_free()\fP exported functions will be declared +\fB__declspec(dllimport)\fP, with unwanted results. +.P +Once you have compiled and linked the demonstration program, you can run simple +tests like this: .sp ./pcredemo 'cat|dog' 'the cat sat on the mat' ./pcredemo -g 'cat|dog' 'the dog sat on the cat' @@ -87,6 +93,6 @@ .rs .sp .nf -Last updated: 30 September 2009 -Copyright (c) 1997-2009 University of Cambridge. +Last updated: 26 May 2010 +Copyright (c) 1997-2010 University of Cambridge. .fi @@ . patch -p0 <<'@@ .' Index: pcre/doc/pcrestack.3 ============================================================================ $ cvs diff -u -r1.1.1.1 -r1.1.1.1.4.1 pcrestack.3 --- pcre/doc/pcrestack.3 14 Jan 2009 20:20:03 -0000 1.1.1.1 +++ pcre/doc/pcrestack.3 23 Aug 2010 13:08:56 -0000 1.1.1.1.4.1 @@ -17,23 +17,22 @@ current call (a "tail recursion"), the function is just restarted instead. .P The \fBpcre_dfa_exec()\fP function operates in an entirely different way, and -hardly uses recursion at all. The limit on its complexity is the amount of -workspace it is given. The comments that follow do NOT apply to -\fBpcre_dfa_exec()\fP; they are relevant only for \fBpcre_exec()\fP. -.P -You can set limits on the number of times that \fBmatch()\fP is called, both in -total and recursively. If the limit is exceeded, an error occurs. For details, -see the -.\" HTML <a href="pcreapi.html#extradata"> -.\" </a> -section on extra data for \fBpcre_exec()\fP -.\" -in the -.\" HREF -\fBpcreapi\fP -.\" -documentation. +uses recursion only when there is a regular expression recursion or subroutine +call in the pattern. This includes the processing of assertion and "once-only" +subpatterns, which are handled like subroutine calls. Normally, these are never +very deep, and the limit on the complexity of \fBpcre_dfa_exec()\fP is +controlled by the amount of workspace it is given. However, it is possible to +write patterns with runaway infinite recursions; such patterns will cause +\fBpcre_dfa_exec()\fP to run out of stack. At present, there is no protection +against this. .P +The comments that follow do NOT apply to \fBpcre_dfa_exec()\fP; they are +relevant only for \fBpcre_exec()\fP. +. +. +.SS "Reducing \fBpcre_exec()\fP's stack usage" +.rs +.sp Each time that \fBmatch()\fP is actually called recursively, it uses memory from the process stack. For certain kinds of pattern and data, very large amounts of stack may be needed, despite the recognition of "tail recursion". @@ -65,13 +64,14 @@ subject strings is to write repeated parenthesized subpatterns to match more than one character whenever possible. . -.SS "Compiling PCRE to use heap instead of stack" +. +.SS "Compiling PCRE to use heap instead of stack for \fBpcre_exec()\fP" .rs .sp 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 to do this are given in -the +PCRE to use heap memory instead of stack for remembering back-up points when +\fBpcre_exec()\fP is running. This makes it run a lot more slowly, however. +Details of how to do this are given in the .\" HREF \fBpcrebuild\fP .\" @@ -83,18 +83,25 @@ same, and are always freed in reverse order, it may be possible to implement customized memory handlers that are more efficient than the standard functions. . -.SS "Limiting PCRE's stack usage" +. +.SS "Limiting \fBpcre_exec()\fP's stack usage" .rs .sp -PCRE has an internal counter that can be used to limit the depth of recursion, -and thus cause \fBpcre_exec()\fP 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 +You can set limits on the number of times that \fBmatch()\fP is called, both in +total and recursively. If a limit is exceeded, \fBpcre_exec()\fP returns an +error code. Setting suitable limits should prevent it from running out of +stack. The default values of the limits are very large, and unlikely ever to +operate. They can be changed when PCRE is built, and they can also be set when \fBpcre_exec()\fP is called. For details of these interfaces, see the .\" HREF \fBpcrebuild\fP .\" -and +documentation and the +.\" HTML <a href="pcreapi.html#extradata"> +.\" </a> +section on extra data for \fBpcre_exec()\fP +.\" +in the .\" HREF \fBpcreapi\fP .\" @@ -103,8 +110,15 @@ 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 \fBpcretest\fP test program has a command -line option (\fB-S\fP) that can be used to increase the size of its stack. +support around 128000 recursions. +.P +In Unix-like environments, the \fBpcretest\fP test program has a command line +option (\fB-S\fP) that can be used to increase the size of its stack. As long +as the stack is large enough, another option (\fB-M\fP) can be used to find the +smallest limits that allow a particular pattern to match a given subject +string. This is done by calling \fBpcre_exec()\fP repeatedly with different +limits. +. . .SS "Changing stack size in Unix-like systems" .rs @@ -129,6 +143,7 @@ attempts to increase the soft limit to 100Mb using \fBsetrlimit()\fP. You must do this before calling \fBpcre_exec()\fP. . +. .SS "Changing stack size in Mac OS X" .rs .sp @@ -155,6 +170,6 @@ .rs .sp .nf -Last updated: 09 July 2008 -Copyright (c) 1997-2008 University of Cambridge. +Last updated: 03 January 2010 +Copyright (c) 1997-2010 University of Cambridge. .fi @@ . patch -p0 <<'@@ .' Index: pcre/doc/pcresyntax.3 ============================================================================ $ cvs diff -u -r1.1.1.2 -r1.1.1.2.2.1 pcresyntax.3 --- pcre/doc/pcresyntax.3 18 Aug 2009 21:26:11 -0000 1.1.1.2 +++ pcre/doc/pcresyntax.3 23 Aug 2010 13:08:56 -0000 1.1.1.2.2.1 @@ -45,6 +45,7 @@ \eD a character that is not a decimal digit \eh a horizontal whitespace character \eH a character that is not a horizontal whitespace character + \eN a character that is not a newline \ep{\fIxx\fP} a character with the \fIxx\fP property \eP{\fIxx\fP} a character without the \fIxx\fP property \eR a newline sequence @@ -56,10 +57,12 @@ \eW a "non-word" character \eX an extended Unicode sequence .sp -In PCRE, \ed, \eD, \es, \eS, \ew, and \eW recognize only ASCII characters. +In PCRE, by default, \ed, \eD, \es, \eS, \ew, and \eW recognize only ASCII +characters, even in UTF-8 mode. However, this can be changed by setting the +PCRE_UCP option. . . -.SH "GENERAL CATEGORY PROPERTY CODES FOR \ep and \eP" +.SH "GENERAL CATEGORY PROPERTIES FOR \ep and \eP" .rs .sp C Other @@ -108,12 +111,23 @@ Zs Space separator . . +.SH "PCRE SPECIAL CATEGORY PROPERTIES FOR \ep and \eP" +.rs +.sp + Xan Alphanumeric: union of properties L and N + Xps POSIX space: property Z or tab, NL, VT, FF, CR + Xsp Perl space: property Z or tab, NL, FF, CR + Xwd Perl word: property Xan or underscore +. +. .SH "SCRIPT NAMES FOR \ep AND \eP" .rs .sp Arabic, Armenian, +Avestan, Balinese, +Bamum, Bengali, Bopomofo, Braille, @@ -130,6 +144,7 @@ Cyrillic, Deseret, Devanagari, +Egyptian_Hieroglyphs, Ethiopic, Georgian, Glagolitic, @@ -142,7 +157,12 @@ Hanunoo, Hebrew, Hiragana, +Imperial_Aramaic, Inherited, +Inscriptional_Pahlavi, +Inscriptional_Parthian, +Javanese, +Kaithi, Kannada, Katakana, Kayah_Li, @@ -153,9 +173,11 @@ Lepcha, Limbu, Linear_B, +Lisu, Lycian, Lydian, Malayalam, +Meetei_Mayek, Mongolian, Myanmar, New_Tai_Lue, @@ -163,6 +185,8 @@ Ogham, Old_Italic, Old_Persian, +Old_South_Arabian, +Old_Turkic, Ol_Chiki, Oriya, Osmanya, @@ -170,15 +194,18 @@ Phoenician, Rejang, Runic, +Samaritan, Saurashtra, Shavian, Sinhala, -Sudanese, +Sundanese, Syloti_Nagri, Syriac, Tagalog, Tagbanwa, Tai_Le, +Tai_Tham, +Tai_Viet, Tamil, Telugu, Thaana, @@ -214,7 +241,8 @@ word same as \ew xdigit hexadecimal digit .sp -In PCRE, POSIX character set names recognize only ASCII characters. You can use +In PCRE, POSIX character set names recognize only ASCII characters by default, +but some of them use Unicode properties if PCRE_UCP is set. You can use \eQ...\eE inside a character class. . . @@ -242,7 +270,7 @@ .SH "ANCHORS AND SIMPLE ASSERTIONS" .rs .sp - \eb word boundary (only ASCII letters recognized) + \eb word boundary \eB not a word boundary ^ start of subject also after internal newline in multiline mode @@ -305,10 +333,11 @@ (?x) extended (ignore white space) (?-...) unset option(s) .sp -The following is recognized only at the start of a pattern or after one of the +The following are recognized only at the start of a pattern or after one of the newline-setting options with similar syntax: .sp - (*UTF8) set UTF-8 mode + (*UTF8) set UTF-8 mode (PCRE_UTF8) + (*UCP) set PCRE_UCP (use Unicode properties for \ed etc) . . .SH "LOOKAHEAD AND LOOKBEHIND ASSERTIONS" @@ -397,7 +426,7 @@ .rs .sp These are recognized only at the very start of the pattern or after a -(*BSR_...) or (*UTF8) option. +(*BSR_...) or (*UTF8) or (*UCP) option. .sp (*CR) carriage return only (*LF) linefeed only @@ -410,7 +439,7 @@ .rs .sp These are recognized only at the very start of the pattern or after a -(*...) option that sets the newline convention or UTF-8 mode. +(*...) option that sets the newline convention or UTF-8 or UCP mode. .sp (*BSR_ANYCRLF) CR, LF, or CRLF (*BSR_UNICODE) any Unicode newline sequence @@ -444,6 +473,6 @@ .rs .sp .nf -Last updated: 11 April 2009 -Copyright (c) 1997-2009 University of Cambridge. +Last updated: 12 May 2010 +Copyright (c) 1997-2010 University of Cambridge. .fi @@ . patch -p0 <<'@@ .' Index: pcre/doc/pcretest.1 ============================================================================ $ cvs diff -u -r1.1.1.3 -r1.1.1.3.2.1 pcretest.1 --- pcre/doc/pcretest.1 5 Dec 2009 13:54:14 -0000 1.1.1.3 +++ pcre/doc/pcretest.1 23 Aug 2010 13:08:56 -0000 1.1.1.3.2.1 @@ -165,9 +165,11 @@ .sp /caseless/i .sp -The following table shows additional modifiers for setting PCRE options that do -not correspond to anything in Perl: +The following table shows additional modifiers for setting PCRE compile-time +options that do not correspond to anything in Perl: .sp + \fB/8\fP PCRE_UTF8 + \fB/?\fP PCRE_NO_UTF8_CHECK \fB/A\fP PCRE_ANCHORED \fB/C\fP PCRE_AUTO_CALLOUT \fB/E\fP PCRE_DOLLAR_ENDONLY @@ -175,6 +177,7 @@ \fB/J\fP PCRE_DUPNAMES \fB/N\fP PCRE_NO_AUTO_CAPTURE \fB/U\fP PCRE_UNGREEDY + \fB/W\fP PCRE_UCP \fB/X\fP PCRE_EXTRA \fB/<JS>\fP PCRE_JAVASCRIPT_COMPAT \fB/<cr>\fP PCRE_NEWLINE_CR @@ -185,13 +188,16 @@ \fB/<bsr_anycrlf>\fP PCRE_BSR_ANYCRLF \fB/<bsr_unicode>\fP PCRE_BSR_UNICODE .sp -Those specifying line ending sequences are literal strings as shown, but the -letters can be in either case. This example sets multiline matching with CRLF -as the line ending sequence: +The modifiers that are enclosed in angle brackets are literal strings as shown, +including the angle brackets, but the letters can be in either case. This +example sets multiline matching with CRLF as the line ending sequence: .sp /^abc/m<crlf> .sp -Details of the meanings of these PCRE options are given in the +As well as turning on the PCRE_UTF8 option, the \fB/8\fP modifier also causes +any non-printing characters in output strings to be printed using the +\ex{hh...} notation if they are valid UTF-8 sequences. Full details of the PCRE +options are given in the .\" HREF \fBpcreapi\fP .\" @@ -236,22 +242,6 @@ use in the automatic test scripts; it ensures that the same output is generated for different internal link sizes. .P -The \fB/L\fP modifier must be followed directly by the name of a locale, for -example, -.sp - /pattern/Lfr_FR -.sp -For this reason, it must be the last modifier. The given locale is set, -\fBpcre_maketables()\fP is called to build a set of character tables for the -locale, and this is then passed to \fBpcre_compile()\fP when compiling the -regular expression. Without an \fB/L\fP modifier, NULL is passed as the tables -pointer; that is, \fB/L\fP applies only to the expression on which it appears. -.P -The \fB/I\fP modifier requests that \fBpcretest\fP output information about the -compiled pattern (whether it is anchored, has a fixed first character, and -so on). It does this by calling \fBpcre_fullinfo()\fP after compiling a -pattern. If the pattern is studied, the results of that are also output. -.P The \fB/D\fP modifier is a PCRE debugging feature, and is equivalent to \fB/BI\fP, that is, both the \fB/B\fP and the \fB/I\fP modifiers. .P @@ -263,28 +253,70 @@ \fB/P\fP pattern modifier is specified. See also the section about saving and reloading compiled patterns below. .P -The \fB/S\fP modifier causes \fBpcre_study()\fP to be called after the -expression has been compiled, and the results used when the expression is -matched. +The \fB/I\fP modifier requests that \fBpcretest\fP output information about the +compiled pattern (whether it is anchored, has a fixed first character, and +so on). It does this by calling \fBpcre_fullinfo()\fP after compiling a +pattern. If the pattern is studied, the results of that are also output. +.P +The \fB/K\fP modifier requests \fBpcretest\fP to show names from backtracking +control verbs that are returned from calls to \fBpcre_exec()\fP. It causes +\fBpcretest\fP to create a \fBpcre_extra\fP block if one has not already been +created by a call to \fBpcre_study()\fP, and to set the PCRE_EXTRA_MARK flag +and the \fBmark\fP field within it, every time that \fBpcre_exec()\fP is +called. If the variable that the \fBmark\fP field points to is non-NULL for a +match, non-match, or partial match, \fBpcretest\fP prints the string to which +it points. For a match, this is shown on a line by itself, tagged with "MK:". +For a non-match it is added to the message. +.P +The \fB/L\fP modifier must be followed directly by the name of a locale, for +example, +.sp + /pattern/Lfr_FR +.sp +For this reason, it must be the last modifier. The given locale is set, +\fBpcre_maketables()\fP is called to build a set of character tables for the +locale, and this is then passed to \fBpcre_compile()\fP when compiling the +regular expression. Without an \fB/L\fP (or \fB/T\fP) modifier, NULL is passed +as the tables pointer; that is, \fB/L\fP applies only to the expression on +which it appears. .P The \fB/M\fP modifier causes the size of memory block used to hold the compiled pattern to be output. .P +The \fB/S\fP modifier causes \fBpcre_study()\fP to be called after the +expression has been compiled, and the results used when the expression is +matched. +.P +The \fB/T\fP modifier must be followed by a single digit. It causes a specific +set of built-in character tables to be passed to \fBpcre_compile()\fP. It is +used in the standard PCRE tests to check behaviour with different character +tables. The digit specifies the tables as follows: +.sp + 0 the default ASCII tables, as distributed in + pcre_chartables.c.dist + 1 a set of tables defining ISO 8859 characters +.sp +In table 1, some characters whose codes are greater than 128 are identified as +letters, digits, spaces, etc. +. +. +.SS "Using the POSIX wrapper API" +.rs +.sp The \fB/P\fP modifier causes \fBpcretest\fP to call PCRE via the POSIX wrapper -API rather than its native API. When this is done, all other modifiers except -\fB/i\fP, \fB/m\fP, and \fB/+\fP are ignored. REG_ICASE is set if \fB/i\fP is -present, and REG_NEWLINE is set if \fB/m\fP is present. The wrapper functions -force PCRE_DOLLAR_ENDONLY always, and PCRE_DOTALL unless REG_NEWLINE is set. -.P -The \fB/8\fP modifier causes \fBpcretest\fP to call PCRE with the PCRE_UTF8 -option set. This turns on support for UTF-8 character handling in PCRE, -provided that it was compiled with this support enabled. This modifier also -causes any non-printing characters in output strings to be printed using the -\ex{hh...} notation if they are valid UTF-8 sequences. -.P -If the \fB/?\fP modifier is used with \fB/8\fP, it causes \fBpcretest\fP to -call \fBpcre_compile()\fP with the PCRE_NO_UTF8_CHECK option, to suppress the -checking of the string for UTF-8 validity. +API rather than its native API. When \fB/P\fP is set, the following modifiers +set options for the \fBregcomp()\fP function: +.sp + /i REG_ICASE + /m REG_NEWLINE + /N REG_NOSUB + /s REG_DOTALL ) + /U REG_UNGREEDY ) These options are not part of + /W REG_UCP ) the POSIX standard + /8 REG_UTF8 ) +.sp +The \fB/+\fP modifier works as described above. All other modifiers are +ignored. . . .SH "DATA LINES" @@ -424,9 +456,9 @@ the call of \fBpcre_exec()\fP for the line in which it appears. .P If the \fB/P\fP modifier was present on the pattern, causing the POSIX wrapper -API to be used, the only option-setting sequences that have any effect are \eB -and \eZ, causing REG_NOTBOL and REG_NOTEOL, respectively, to be passed to -\fBregexec()\fP. +API to be used, the only option-setting sequences that have any effect are \eB, +\eN, and \eZ, causing REG_NOTBOL, REG_NOTEMPTY, and REG_NOTEOL, respectively, +to be passed to \fBregexec()\fP. .P The use of \ex{hh...} to represent UTF-8 characters is not dependent on the use of the \fB/8\fP modifier on the pattern. It is recognized always. There may be @@ -731,6 +763,6 @@ .rs .sp .nf -Last updated: 26 September 2009 -Copyright (c) 1997-2009 University of Cambridge. +Last updated: 14 June 2010 +Copyright (c) 1997-2010 University of Cambridge. .fi @@ . patch -p0 <<'@@ .' Index: pcre/doc/pcretest.txt ============================================================================ $ cvs diff -u -r1.1.1.3 -r1.1.1.3.2.1 pcretest.txt --- pcre/doc/pcretest.txt 5 Dec 2009 13:54:09 -0000 1.1.1.3 +++ pcre/doc/pcretest.txt 23 Aug 2010 13:08:56 -0000 1.1.1.3.2.1 @@ -154,9 +154,11 @@ /caseless/i - The following table shows additional modifiers for setting PCRE options - that do not correspond to anything in Perl: + The following table shows additional modifiers for setting PCRE com- + pile-time options that do not correspond to anything in Perl: + /8 PCRE_UTF8 + /? PCRE_NO_UTF8_CHECK /A PCRE_ANCHORED /C PCRE_AUTO_CALLOUT /E PCRE_DOLLAR_ENDONLY @@ -164,6 +166,7 @@ /J PCRE_DUPNAMES /N PCRE_NO_AUTO_CAPTURE /U PCRE_UNGREEDY + /W PCRE_UCP /X PCRE_EXTRA /<JS> PCRE_JAVASCRIPT_COMPAT /<cr> PCRE_NEWLINE_CR @@ -174,62 +177,64 @@ /<bsr_anycrlf> PCRE_BSR_ANYCRLF /<bsr_unicode> PCRE_BSR_UNICODE - Those specifying line ending sequences are literal strings as shown, - but the letters can be in either case. This example sets multiline - matching with CRLF as the line ending sequence: + The modifiers that are enclosed in angle brackets are literal strings + as shown, including the angle brackets, but the letters can be in + either case. This example sets multiline matching with CRLF as the line + ending sequence: /^abc/m<crlf> - Details of the meanings of these PCRE options are given in the pcreapi - documentation. + As well as turning on the PCRE_UTF8 option, the /8 modifier also causes + any non-printing characters in output strings to be printed using the + \x{hh...} notation if they are valid UTF-8 sequences. Full details of + the PCRE options are given in the pcreapi documentation. Finding all matches in a string - Searching for all possible matches within each subject string can be - requested by the /g or /G modifier. After finding a match, PCRE is + Searching for all possible matches within each subject string can be + requested by the /g or /G modifier. After finding a match, PCRE is called again to search the remainder of the subject string. The differ- ence between /g and /G is that the former uses the startoffset argument - to pcre_exec() to start searching at a new point within the entire - string (which is in effect what Perl does), whereas the latter passes - over a shortened substring. This makes a difference to the matching + to pcre_exec() to start searching at a new point within the entire + string (which is in effect what Perl does), whereas the latter passes + over a shortened substring. This makes a difference to the matching process if the pattern begins with a lookbehind assertion (including \b or \B). - If any call to pcre_exec() in a /g or /G sequence matches an empty - string, the next call is done with the PCRE_NOTEMPTY_ATSTART and - PCRE_ANCHORED flags set in order to search for another, non-empty, - match at the same point. If this second match fails, the start offset - is advanced by one character, and the normal match is retried. This - imitates the way Perl handles such cases when using the /g modifier or + If any call to pcre_exec() in a /g or /G sequence matches an empty + string, the next call is done with the PCRE_NOTEMPTY_ATSTART and + PCRE_ANCHORED flags set in order to search for another, non-empty, + match at the same point. If this second match fails, the start offset + is advanced by one character, and the normal match is retried. This + imitates the way Perl handles such cases when using the /g modifier or the split() function. Other modifiers There are yet more modifiers for controlling the way pcretest operates. - The /+ modifier requests that as well as outputting the substring that - matched the entire pattern, pcretest should in addition output the - remainder of the subject string. This is useful for tests where the + The /+ modifier requests that as well as outputting the substring that + matched the entire pattern, pcretest should in addition output the + remainder of the subject string. This is useful for tests where the subject contains multiple copies of the same substring. - The /B modifier is a debugging feature. It requests that pcretest out- - put a representation of the compiled byte code after compilation. Nor- - mally this information contains length and offset values; however, if - /Z is also present, this data is replaced by spaces. This is a special + The /B modifier is a debugging feature. It requests that pcretest out- + put a representation of the compiled byte code after compilation. Nor- + mally this information contains length and offset values; however, if + /Z is also present, this data is replaced by spaces. This is a special feature for use in the automatic test scripts; it ensures that the same output is generated for different internal link sizes. - The /L modifier must be followed directly by the name of a locale, for - example, - - /pattern/Lfr_FR + The /D modifier is a PCRE debugging feature, and is equivalent to /BI, + that is, both the /B and the /I modifiers. - For this reason, it must be the last modifier. The given locale is set, - pcre_maketables() is called to build a set of character tables for the - locale, and this is then passed to pcre_compile() when compiling the - regular expression. Without an /L modifier, NULL is passed as the - tables pointer; that is, /L applies only to the expression on which it - appears. + The /F modifier causes pcretest to flip the byte order of the fields in + the compiled pattern that contain 2-byte and 4-byte numbers. This + facility is for testing the feature in PCRE that allows it to execute + patterns that were compiled on a host with a different endianness. This + feature is not available when the POSIX interface to PCRE is being + used, that is, when the /P pattern modifier is specified. See also the + section about saving and reloading compiled patterns below. The /I modifier requests that pcretest output information about the compiled pattern (whether it is anchored, has a fixed first character, @@ -237,38 +242,62 @@ pattern. If the pattern is studied, the results of that are also out- put. - The /D modifier is a PCRE debugging feature, and is equivalent to /BI, - that is, both the /B and the /I modifiers. + The /K modifier requests pcretest to show names from backtracking con- + trol verbs that are returned from calls to pcre_exec(). It causes + pcretest to create a pcre_extra block if one has not already been cre- + ated by a call to pcre_study(), and to set the PCRE_EXTRA_MARK flag and + the mark field within it, every time that pcre_exec() is called. If the + variable that the mark field points to is non-NULL for a match, non- + match, or partial match, pcretest prints the string to which it points. + For a match, this is shown on a line by itself, tagged with "MK:". For + a non-match it is added to the message. - The /F modifier causes pcretest to flip the byte order of the fields in - the compiled pattern that contain 2-byte and 4-byte numbers. This - facility is for testing the feature in PCRE that allows it to execute - patterns that were compiled on a host with a different endianness. This - feature is not available when the POSIX interface to PCRE is being - used, that is, when the /P pattern modifier is specified. See also the - section about saving and reloading compiled patterns below. + The /L modifier must be followed directly by the name of a locale, for + example, - The /S modifier causes pcre_study() to be called after the expression - has been compiled, and the results used when the expression is matched. + /pattern/Lfr_FR + + For this reason, it must be the last modifier. The given locale is set, + pcre_maketables() is called to build a set of character tables for the + locale, and this is then passed to pcre_compile() when compiling the + regular expression. Without an /L (or /T) modifier, NULL is passed as + the tables pointer; that is, /L applies only to the expression on which + it appears. The /M modifier causes the size of memory block used to hold the com- piled pattern to be output. - The /P modifier causes pcretest to call PCRE via the POSIX wrapper API - rather than its native API. When this is done, all other modifiers - except /i, /m, and /+ are ignored. REG_ICASE is set if /i is present, - and REG_NEWLINE is set if /m is present. The wrapper functions force - PCRE_DOLLAR_ENDONLY always, and PCRE_DOTALL unless REG_NEWLINE is set. - - The /8 modifier causes pcretest to call PCRE with the PCRE_UTF8 option - set. This turns on support for UTF-8 character handling in PCRE, pro- - vided that it was compiled with this support enabled. This modifier - also causes any non-printing characters in output strings to be printed - using the \x{hh...} notation if they are valid UTF-8 sequences. - - If the /? modifier is used with /8, it causes pcretest to call - pcre_compile() with the PCRE_NO_UTF8_CHECK option, to suppress the - checking of the string for UTF-8 validity. + The /S modifier causes pcre_study() to be called after the expression + has been compiled, and the results used when the expression is matched. + + The /T modifier must be followed by a single digit. It causes a spe- + cific set of built-in character tables to be passed to pcre_compile(). + It is used in the standard PCRE tests to check behaviour with different + character tables. The digit specifies the tables as follows: + + 0 the default ASCII tables, as distributed in + pcre_chartables.c.dist + 1 a set of tables defining ISO 8859 characters + + In table 1, some characters whose codes are greater than 128 are iden- + tified as letters, digits, spaces, etc. + + Using the POSIX wrapper API + + The /P modifier causes pcretest to call PCRE via the POSIX wrapper API + rather than its native API. When /P is set, the following modifiers set + options for the regcomp() function: + + /i REG_ICASE + /m REG_NEWLINE + /N REG_NOSUB + /s REG_DOTALL ) + /U REG_UNGREEDY ) These options are not part of + /W REG_UCP ) the POSIX standard + /8 REG_UTF8 ) + + The /+ modifier works as described above. All other modifiers are + ignored. DATA LINES @@ -382,8 +411,8 @@ If the /P modifier was present on the pattern, causing the POSIX wrap- per API to be used, the only option-setting sequences that have any - effect are \B and \Z, causing REG_NOTBOL and REG_NOTEOL, respectively, - to be passed to regexec(). + effect are \B, \N, and \Z, causing REG_NOTBOL, REG_NOTEMPTY, and + REG_NOTEOL, respectively, to be passed to regexec(). The use of \x{hh...} to represent UTF-8 characters is not dependent on the use of the /8 modifier on the pattern. It is recognized always. @@ -663,5 +692,5 @@ REVISION - Last updated: 26 September 2009 - Copyright (c) 1997-2009 University of Cambridge. + Last updated: 14 June 2010 + Copyright (c) 1997-2010 University of Cambridge. @@ . patch -p0 <<'@@ .' Index: pcre/missing ============================================================================ $ cvs diff -u -r1.1.1.1 -r1.1.1.1.4.1 missing --- pcre/missing 14 Jan 2009 20:19:38 -0000 1.1.1.1 +++ pcre/missing 23 Aug 2010 13:08:53 -0000 1.1.1.1.4.1 @@ -1,10 +1,10 @@ #! /bin/sh # Common stub for a few missing GNU programs while installing. -scriptversion=2006-05-10.23 +scriptversion=2009-04-28.21; # UTC -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 -# Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, +# 2008, 2009 Free Software Foundation, Inc. # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. # This program is free software; you can redistribute it and/or modify @@ -89,6 +89,9 @@ tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] +Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and +\`g' are ignored when checking the name. + Send bug reports to <bug-automake@gnu.org>." exit $? ;; @@ -106,15 +109,22 @@ esac +# normalize program name to check for. +program=`echo "$1" | sed ' + s/^gnu-//; t + s/^gnu//; t + s/^g//; t'` + # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect -# the program). +# the program). This is about non-GNU programs, so use $1 not +# $program. case $1 in - lex|yacc) + lex*|yacc*) # Not GNU programs, they don't have --version. ;; - tar) + tar*) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 @@ -138,7 +148,7 @@ # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. -case $1 in +case $program in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if @@ -148,7 +158,7 @@ touch aclocal.m4 ;; - autoconf) + autoconf*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the @@ -157,7 +167,7 @@ touch configure ;; - autoheader) + autoheader*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want @@ -187,7 +197,7 @@ while read f; do touch "$f"; done ;; - autom4te) + autom4te*) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the @@ -210,7 +220,7 @@ fi ;; - bison|yacc) + bison*|yacc*) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package @@ -240,7 +250,7 @@ fi ;; - lex|flex) + lex*|flex*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package @@ -263,7 +273,7 @@ fi ;; - help2man) + help2man*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the @@ -277,11 +287,11 @@ else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" - exit 1 + exit $? fi ;; - makeinfo) + makeinfo*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file @@ -310,7 +320,7 @@ touch $file ;; - tar) + tar*) shift # We have already tried tar in the generic part. @@ -363,5 +373,6 @@ # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" # End: @@ . patch -p0 <<'@@ .' Index: pcre/pcre-config.in ============================================================================ $ cvs diff -u -r1.1.1.2 -r1.1.1.2.2.1 pcre-config.in --- pcre/pcre-config.in 5 Dec 2009 13:54:04 -0000 1.1.1.2 +++ pcre/pcre-config.in 23 Aug 2010 13:08:53 -0000 1.1.1.2.2.1 @@ -4,8 +4,11 @@ exec_prefix=@exec_prefix@ exec_prefix_set=no -usage="\ -Usage: pcre-config [--prefix] [--exec-prefix] [--version] [--libs] [--libs-posix] [--cflags] [--cflags-posix]" +if test @enable_cpp@ = yes ; then + usage="Usage: pcre-config [--prefix] [--exec-prefix] [--version] [--libs] [--libs-posix] [--libs-cpp] [--cflags] [--cflags-posix]" +else + usage="Usage: pcre-config [--prefix] [--exec-prefix] [--version] [--libs] [--libs-posix] [--cflags] [--cflags-posix]" +fi if test $# -eq 0; then echo "${usage}" 1>&2 @@ -60,6 +63,13 @@ --libs) echo -L@libdir@$libR -lpcre ;; + --libs-cpp) + if test @enable_cpp@ = yes ; then + echo -L@libdir@$libR -lpcrecpp -lpcre + else + echo "${usage}" 1>&2 + fi + ;; *) echo "${usage}" 1>&2 exit 1 @@ . patch -p0 <<'@@ .' Index: pcre/pcre.h.generic ============================================================================ $ cvs diff -u -r1.1.1.3 -r1.1.1.3.2.1 pcre.h.generic --- pcre/pcre.h.generic 5 Dec 2009 13:53:58 -0000 1.1.1.3 +++ pcre/pcre.h.generic 23 Aug 2010 13:08:53 -0000 1.1.1.3.2.1 @@ -5,7 +5,7 @@ /* This is the public header file for the PCRE library, to be #included by applications that call the PCRE functions. - Copyright (c) 1997-2009 University of Cambridge + Copyright (c) 1997-2010 University of Cambridge ----------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without @@ -42,9 +42,9 @@ /* The current PCRE version information. */ #define PCRE_MAJOR 8 -#define PCRE_MINOR 00 +#define PCRE_MINOR 10 #define PCRE_PRERELEASE -#define PCRE_DATE 2009-10-19 +#define PCRE_DATE 2010-06-25 /* 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 @@ -131,6 +131,7 @@ #define PCRE_NO_START_OPTIMISE 0x04000000 #define PCRE_PARTIAL_HARD 0x08000000 #define PCRE_NOTEMPTY_ATSTART 0x10000000 +#define PCRE_UCP 0x20000000 /* Exec-time and get/set-time error codes */ @@ -200,6 +201,7 @@ #define PCRE_EXTRA_CALLOUT_DATA 0x0004 #define PCRE_EXTRA_TABLES 0x0008 #define PCRE_EXTRA_MATCH_LIMIT_RECURSION 0x0010 +#define PCRE_EXTRA_MARK 0x0020 /* Types */ @@ -225,6 +227,7 @@ void *callout_data; /* Data passed back in callouts */ const unsigned char *tables; /* Pointer to character tables */ unsigned long int match_limit_recursion; /* Max recursive calls to match() */ + unsigned char **mark; /* For passing back a mark pointer */ } pcre_extra; /* The structure for passing out data via the pcre_callout_function. We use a @@ . patch -p0 <<'@@ .' Index: pcre/pcre.h.in ============================================================================ $ cvs diff -u -r1.1.1.3 -r1.1.1.3.2.1 pcre.h.in --- pcre/pcre.h.in 5 Dec 2009 13:54:03 -0000 1.1.1.3 +++ pcre/pcre.h.in 23 Aug 2010 13:08:53 -0000 1.1.1.3.2.1 @@ -5,7 +5,7 @@ /* This is the public header file for the PCRE library, to be #included by applications that call the PCRE functions. - Copyright (c) 1997-2009 University of Cambridge + Copyright (c) 1997-2010 University of Cambridge ----------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without @@ -131,6 +131,7 @@ #define PCRE_NO_START_OPTIMISE 0x04000000 #define PCRE_PARTIAL_HARD 0x08000000 #define PCRE_NOTEMPTY_ATSTART 0x10000000 +#define PCRE_UCP 0x20000000 /* Exec-time and get/set-time error codes */ @@ -200,6 +201,7 @@ #define PCRE_EXTRA_CALLOUT_DATA 0x0004 #define PCRE_EXTRA_TABLES 0x0008 #define PCRE_EXTRA_MATCH_LIMIT_RECURSION 0x0010 +#define PCRE_EXTRA_MARK 0x0020 /* Types */ @@ -225,6 +227,7 @@ void *callout_data; /* Data passed back in callouts */ const unsigned char *tables; /* Pointer to character tables */ unsigned long int match_limit_recursion; /* Max recursive calls to match() */ + unsigned char **mark; /* For passing back a mark pointer */ } pcre_extra; /* The structure for passing out data via the pcre_callout_function. We use a @@ . patch -p0 <<'@@ .' Index: pcre/pcre_chartables.c.dist ============================================================================ $ cvs diff -u -r1.1.1.1 -r1.1.1.1.4.1 pcre_chartables.c.dist --- pcre/pcre_chartables.c.dist 14 Jan 2009 20:19:52 -0000 1.1.1.1 +++ pcre/pcre_chartables.c.dist 23 Aug 2010 13:08:53 -0000 1.1.1.1.4.1 @@ -14,7 +14,7 @@ current locale. If PCRE is configured with --enable-rebuild-chartables, this happens automatically. -The following #includes are present because without the gcc 4.x may remove the +The following #includes are present because without them gcc 4.x may remove the array definition from the final binary if PCRE is built into a static library and dead code stripping is activated. This leads to link errors. Pulling in the header ensures that the array gets flagged as "someone outside this compilation @@ . patch -p0 <<'@@ .' Index: pcre/pcre_compile.c ============================================================================ $ cvs diff -u -r1.1.1.3 -r1.1.1.3.2.1 pcre_compile.c --- pcre/pcre_compile.c 5 Dec 2009 13:54:04 -0000 1.1.1.3 +++ pcre/pcre_compile.c 23 Aug 2010 13:08:53 -0000 1.1.1.3.2.1 @@ -6,7 +6,7 @@ and semantics are as close as possible to those of the Perl 5 language. Written by Philip Hazel - Copyright (c) 1997-2009 University of Cambridge + Copyright (c) 1997-2010 University of Cambridge ----------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without @@ -53,10 +53,11 @@ #include "pcre_internal.h" -/* When DEBUG is defined, we need the pcre_printint() function, which is also -used by pcretest. DEBUG is not defined when building a production library. */ +/* When PCRE_DEBUG is defined, we need the pcre_printint() function, which is +also used by pcretest. PCRE_DEBUG is not defined when building a production +library. */ -#ifdef DEBUG +#ifdef PCRE_DEBUG #include "pcre_printint.src" #endif @@ -91,6 +92,11 @@ #define COMPILE_WORK_SIZE (4096) +/* The overrun tests check for a slightly smaller size so that they detect the +overrun before it actually does run off the end of the data block. */ + +#define WORK_SIZE_CHECK (COMPILE_WORK_SIZE - 100) + /* Table for handling escaped characters in the range '0'-'z'. Positive returns are simple data values; negative values are for special things like \d and so @@ -118,7 +124,7 @@ -ESC_H, 0, 0, -ESC_K, 0, 0, - 0, 0, + -ESC_N, 0, -ESC_P, -ESC_Q, -ESC_R, -ESC_S, 0, 0, @@ -165,7 +171,7 @@ /* B8 */ 0, 0, 0, 0, 0, ']', '=', '-', /* C0 */ '{',-ESC_A, -ESC_B, -ESC_C, -ESC_D,-ESC_E, 0, -ESC_G, /* C8 */-ESC_H, 0, 0, 0, 0, 0, 0, 0, -/* D0 */ '}', 0, -ESC_K, 0, 0, 0, 0, -ESC_P, +/* D0 */ '}', 0, -ESC_K, 0, 0,-ESC_N, 0, -ESC_P, /* D8 */-ESC_Q,-ESC_R, 0, 0, 0, 0, 0, 0, /* E0 */ '\\', 0, -ESC_S, 0, 0,-ESC_V, -ESC_W, -ESC_X, /* E8 */ 0,-ESC_Z, 0, 0, 0, 0, 0, 0, @@ -182,11 +188,14 @@ platforms. */ typedef struct verbitem { - int len; - int op; + int len; /* Length of verb name */ + int op; /* Op when no arg, or -1 if arg mandatory */ + int op_arg; /* Op when arg present, or -1 if not allowed */ } verbitem; static const char verbnames[] = + "\0" /* Empty name is a shorthand for MARK */ + STRING_MARK0 STRING_ACCEPT0 STRING_COMMIT0 STRING_F0 @@ -196,13 +205,15 @@ STRING_THEN; static const verbitem verbs[] = { - { 6, OP_ACCEPT }, - { 6, OP_COMMIT }, - { 1, OP_FAIL }, - { 4, OP_FAIL }, - { 5, OP_PRUNE }, - { 4, OP_SKIP }, - { 4, OP_THEN } + { 0, -1, OP_MARK }, + { 4, -1, OP_MARK }, + { 6, OP_ACCEPT, -1 }, + { 6, OP_COMMIT, -1 }, + { 1, OP_FAIL, -1 }, + { 4, OP_FAIL, -1 }, + { 5, OP_PRUNE, OP_PRUNE_ARG }, + { 4, OP_SKIP, OP_SKIP_ARG }, + { 4, OP_THEN, OP_THEN_ARG } }; static const int verbcount = sizeof(verbs)/sizeof(verbitem); @@ -250,6 +261,53 @@ cbit_xdigit,-1, 0 /* xdigit */ }; +/* Table of substitutes for \d etc when PCRE_UCP is set. The POSIX class +substitutes must be in the order of the names, defined above, and there are +both positive and negative cases. NULL means no substitute. */ + +#ifdef SUPPORT_UCP +static const uschar *substitutes[] = { + (uschar *)"\\P{Nd}", /* \D */ + (uschar *)"\\p{Nd}", /* \d */ + (uschar *)"\\P{Xsp}", /* \S */ /* NOTE: Xsp is Perl space */ + (uschar *)"\\p{Xsp}", /* \s */ + (uschar *)"\\P{Xwd}", /* \W */ + (uschar *)"\\p{Xwd}" /* \w */ +}; + +static const uschar *posix_substitutes[] = { + (uschar *)"\\p{L}", /* alpha */ + (uschar *)"\\p{Ll}", /* lower */ + (uschar *)"\\p{Lu}", /* upper */ + (uschar *)"\\p{Xan}", /* alnum */ + NULL, /* ascii */ + (uschar *)"\\h", /* blank */ + NULL, /* cntrl */ + (uschar *)"\\p{Nd}", /* digit */ + NULL, /* graph */ + NULL, /* print */ + NULL, /* punct */ + (uschar *)"\\p{Xps}", /* space */ /* NOTE: Xps is POSIX space */ + (uschar *)"\\p{Xwd}", /* word */ + NULL, /* xdigit */ + /* Negated cases */ + (uschar *)"\\P{L}", /* ^alpha */ + (uschar *)"\\P{Ll}", /* ^lower */ + (uschar *)"\\P{Lu}", /* ^upper */ + (uschar *)"\\P{Xan}", /* ^alnum */ + NULL, /* ^ascii */ + (uschar *)"\\H", /* ^blank */ + NULL, /* ^cntrl */ + (uschar *)"\\P{Nd}", /* ^digit */ + NULL, /* ^graph */ + NULL, /* ^print */ + NULL, /* ^punct */ + (uschar *)"\\P{Xps}", /* ^space */ /* NOTE: Xps is POSIX space */ + (uschar *)"\\P{Xwd}", /* ^word */ + NULL /* ^xdigit */ +}; +#define POSIX_SUBSIZE (sizeof(posix_substitutes)/sizeof(uschar *)) +#endif #define STRING(a) # a #define XSTRING(s) STRING(s) @@ -262,7 +320,11 @@ it is now one long string. We cannot use a table of offsets, because the lengths of inserts such as XSTRING(MAX_NAME_SIZE) are not known. Instead, we simply count through to the one we want - this isn't a performance issue -because these strings are used only when there is a compilation error. */ +because these strings are used only when there is a compilation error. + +Each substring ends with \0 to insert a null character. This includes the final +substring, so that the whole string ends with \0\0, which can be detected when +counting through. */ static const char error_texts[] = "no error\0" @@ -309,7 +371,7 @@ /* 35 */ "invalid condition (?(0)\0" "\\C not allowed in lookbehind assertion\0" - "PCRE does not support \\L, \\l, \\N, \\U, or \\u\0" + "PCRE does not support \\L, \\l, \\N{name}, \\U, or \\u\0" "number after (?C is > 255\0" "closing ) for (?C expected\0" /* 40 */ @@ -335,7 +397,7 @@ "inconsistent NEWLINE options\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" + "an argument is not allowed for (*ACCEPT), (*FAIL), or (*COMMIT)\0" /* 60 */ "(*VERB) not recognized\0" "number is too big\0" @@ -343,8 +405,10 @@ "digit expected after (?+\0" "] is an invalid data character in JavaScript compatibility mode\0" /* 65 */ - "different names for subpatterns of the same number are not allowed"; - + "different names for subpatterns of the same number are not allowed\0" + "(*MARK) must have an argument\0" + "this version of PCRE is not compiled with PCRE_UCP support\0" + ; /* Table to identify digits and hex digits. This is used when compiling patterns. Note that the tables in chartables are dependent on the locale, and @@ -502,7 +566,11 @@ find_error_text(int n) { const char *s = error_texts; -for (; n > 0; n--) while (*s++ != 0) {}; +for (; n > 0; n--) + { + while (*s++ != 0) {}; + if (*s == 0) return "Error text not found (please report)"; + } return s; } @@ -573,7 +641,6 @@ case CHAR_l: case CHAR_L: - case CHAR_N: case CHAR_u: case CHAR_U: *errorcodeptr = ERR37; @@ -811,6 +878,19 @@ } } +/* Perl supports \N{name} for character names, as well as plain \N for "not +newline". PCRE does not support \N{name}. */ + +if (c == -ESC_N && ptr[1] == CHAR_LEFT_CURLY_BRACKET) + *errorcodeptr = ERR37; + +/* If PCRE_UCP is set, we change the values for \d etc. */ + +if ((options & PCRE_UCP) != 0 && c <= -ESC_D && c >= -ESC_w) + c -= (ESC_DU - ESC_D); + +/* Set the pointer to the final character before returning. */ + *ptrptr = ptr; return c; } @@ -1049,25 +1129,39 @@ if (ptr[0] == CHAR_LEFT_PARENTHESIS) { - if (ptr[1] == CHAR_QUESTION_MARK && - ptr[2] == CHAR_VERTICAL_LINE) + /* Handle specials such as (*SKIP) or (*UTF8) etc. */ + + if (ptr[1] == CHAR_ASTERISK) ptr += 2; + + /* Handle a normal, unnamed capturing parenthesis. */ + + else if (ptr[1] != CHAR_QUESTION_MARK) + { + *count += 1; + if (name == NULL && *count == lorn) return *count; + ptr++; + } + + /* All cases now have (? at the start. Remember when we are in a group + where the parenthesis numbers are duplicated. */ + + else if (ptr[2] == CHAR_VERTICAL_LINE) { ptr += 3; dup_parens = TRUE; } - /* Handle a normal, unnamed capturing parenthesis */ + /* Handle comments; all characters are allowed until a ket is reached. */ - else if (ptr[1] != CHAR_QUESTION_MARK && ptr[1] != CHAR_ASTERISK) + else if (ptr[2] == CHAR_NUMBER_SIGN) { - *count += 1; - if (name == NULL && *count == lorn) return *count; - ptr++; + for (ptr += 3; *ptr != 0; ptr++) if (*ptr == CHAR_RIGHT_PARENTHESIS) break; + goto FAIL_EXIT; } /* Handle a condition. If it is an assertion, just carry on so that it is processed as normal. If not, skip to the closing parenthesis of the - condition (there can't be any nested parens. */ + condition (there can't be any nested parens). */ else if (ptr[2] == CHAR_LEFT_PARENTHESIS) { @@ -1079,7 +1173,7 @@ } } - /* We have either (? or (* and not a condition */ + /* Start with (? but not a condition. */ else { @@ -1201,8 +1295,7 @@ else if (*ptr == CHAR_RIGHT_PARENTHESIS) { if (dup_parens && *count < hwm_count) *count = hwm_count; - *ptrptr = ptr; - return -1; + goto FAIL_EXIT; } else if (*ptr == CHAR_VERTICAL_LINE && dup_parens) @@ -1442,6 +1535,7 @@ case OP_CALLOUT: case OP_SOD: case OP_SOM: + case OP_SET_SOM: case OP_EOD: case OP_EODN: case OP_CIRC: @@ -1601,7 +1695,8 @@ /* Otherwise, we can get the item's length from the table, except that for repeated character types, we have to test for \p and \P, which have an extra - two bytes of parameters. */ + two bytes of parameters, and for MARK/PRUNE/SKIP/THEN with an argument, we + must add in its length. */ else { @@ -1625,6 +1720,13 @@ case OP_TYPEPOSUPTO: if (code[3] == OP_PROP || code[3] == OP_NOTPROP) code += 2; break; + + case OP_MARK: + case OP_PRUNE_ARG: + case OP_SKIP_ARG: + case OP_THEN_ARG: + code += code[1]; + break; } /* Add in the fixed length from the table */ @@ -1696,7 +1798,8 @@ /* Otherwise, we can get the item's length from the table, except that for repeated character types, we have to test for \p and \P, which have an extra - two bytes of parameters. */ + two bytes of parameters, and for MARK/PRUNE/SKIP/THEN with an argument, we + must add in its length. */ else { @@ -1720,6 +1823,13 @@ case OP_TYPEEXACT: if (code[3] == OP_PROP || code[3] == OP_NOTPROP) code += 2; break; + + case OP_MARK: + case OP_PRUNE_ARG: + case OP_SKIP_ARG: + case OP_THEN_ARG: + code += code[1]; + break; } /* Add in the fixed length from the table */ @@ -1776,12 +1886,14 @@ code points to start of search endcode points to where to stop utf8 TRUE if in UTF8 mode + cd contains pointers to tables etc. Returns: TRUE if what is matched could be empty */ static BOOL -could_be_empty_branch(const uschar *code, const uschar *endcode, BOOL utf8) +could_be_empty_branch(const uschar *code, const uschar *endcode, BOOL utf8, + compile_data *cd) { register int c; for (code = first_significant_code(code + _pcre_OP_lengths[*code], NULL, 0, TRUE); @@ -1812,6 +1924,28 @@ continue; } + /* For a recursion/subroutine call, if its end has been reached, which + implies a subroutine call, we can scan it. */ + + if (c == OP_RECURSE) + { + BOOL empty_branch = FALSE; + const uschar *scode = cd->start_code + GET(code, 1); + if (GET(scode, 1) == 0) return TRUE; /* Unclosed */ + do + { + if (could_be_empty_branch(scode, endcode, utf8, cd)) + { + empty_branch = TRUE; + break; + } + scode += GET(scode, 1); + } + while (*scode == OP_ALT); + if (!empty_branch) return FALSE; /* All branches are non-empty */ + continue; + } + /* For other groups, scan the branches. */ if (c == OP_BRA || c == OP_CBRA || c == OP_ONCE || c == OP_COND) @@ -1830,7 +1964,7 @@ empty_branch = FALSE; do { - if (!empty_branch && could_be_empty_branch(code, endcode, utf8)) + if (!empty_branch && could_be_empty_branch(code, endcode, utf8, cd)) empty_branch = TRUE; code += GET(code, 1); } @@ -1964,6 +2098,21 @@ if (utf8 && code[3] >= 0xc0) code += _pcre_utf8_table4[code[3] & 0x3f]; break; #endif + + /* MARK, and PRUNE/SKIP/THEN with an argument must skip over the argument + string. */ + + case OP_MARK: + case OP_PRUNE_ARG: + case OP_SKIP_ARG: + case OP_THEN_ARG: + code += code[1]; + break; + + /* None of the remaining opcodes are required to match a character. */ + + default: + break; } } @@ -1986,17 +2135,19 @@ endcode points to where to stop (current RECURSE item) bcptr points to the chain of current (unclosed) branch starts utf8 TRUE if in UTF-8 mode + cd pointers to tables etc Returns: TRUE if what is matched could be empty */ static BOOL could_be_empty(const uschar *code, const uschar *endcode, branch_chain *bcptr, - BOOL utf8) + BOOL utf8, compile_data *cd) { -while (bcptr != NULL && bcptr->current >= code) +while (bcptr != NULL && bcptr->current_branch >= code) { - if (!could_be_empty_branch(bcptr->current, endcode, utf8)) return FALSE; + if (!could_be_empty_branch(bcptr->current_branch, endcode, utf8, cd)) + return FALSE; bcptr = bcptr->outer; } return TRUE; @@ -2178,8 +2329,8 @@ { *code++ = OP_CALLOUT; *code++ = 255; -PUT(code, 0, ptr - cd->start_pattern); /* Pattern offset */ -PUT(code, LINK_SIZE, 0); /* Default length */ +PUT(code, 0, (int)(ptr - cd->start_pattern)); /* Pattern offset */ +PUT(code, LINK_SIZE, 0); /* Default length */ return code + 2*LINK_SIZE; } @@ -2204,7 +2355,7 @@ static void complete_callout(uschar *previous_callout, const uschar *ptr, compile_data *cd) { -int length = ptr - cd->start_pattern - GET(previous_callout, 2); +int length = (int)(ptr - cd->start_pattern - GET(previous_callout, 2)); PUT(previous_callout, 2 + LINK_SIZE, length); } @@ -2254,6 +2405,69 @@ return TRUE; } + + + +/************************************************* +* Check a character and a property * +*************************************************/ + +/* This function is called by check_auto_possessive() when a property item +is adjacent to a fixed character. + +Arguments: + c the character + ptype the property type + pdata the data for the type + negated TRUE if it's a negated property (\P or \p{^) + +Returns: TRUE if auto-possessifying is OK +*/ + +static BOOL +check_char_prop(int c, int ptype, int pdata, BOOL negated) +{ +const ucd_record *prop = GET_UCD(c); +switch(ptype) + { + case PT_LAMP: + return (prop->chartype == ucp_Lu || + prop->chartype == ucp_Ll || + prop->chartype == ucp_Lt) == negated; + + case PT_GC: + return (pdata == _pcre_ucp_gentype[prop->chartype]) == negated; + + case PT_PC: + return (pdata == prop->chartype) == negated; + + case PT_SC: + return (pdata == prop->script) == negated; + + /* These are specials */ + + case PT_ALNUM: + return (_pcre_ucp_gentype[prop->chartype] == ucp_L || + _pcre_ucp_gentype[prop->chartype] == ucp_N) == negated; + + case PT_SPACE: /* Perl space */ + return (_pcre_ucp_gentype[prop->chartype] == ucp_Z || + c == CHAR_HT || c == CHAR_NL || c == CHAR_FF || c == CHAR_CR) + == negated; + + case PT_PXSPACE: /* POSIX space */ + return (_pcre_ucp_gentype[prop->chartype] == ucp_Z || + c == CHAR_HT || c == CHAR_NL || c == CHAR_VT || + c == CHAR_FF || c == CHAR_CR) + == negated; + + case PT_WORD: + return (_pcre_ucp_gentype[prop->chartype] == ucp_L || + _pcre_ucp_gentype[prop->chartype] == ucp_N || + c == CHAR_UNDERSCORE) == negated; + } +return FALSE; +} #endif /* SUPPORT_UCP */ @@ -2267,10 +2481,8 @@ sense to automatically possessify the repeated item. Arguments: - op_code the repeated op code - this data for this item, depends on the opcode + previous pointer to the repeated opcode utf8 TRUE in UTF-8 mode - utf8_char used for utf8 character bytes, NULL if not relevant ptr next character in pattern options options bits cd contains pointers to tables etc. @@ -2279,10 +2491,11 @@ */ static BOOL -check_auto_possessive(int op_code, int item, BOOL utf8, uschar *utf8_char, - const uschar *ptr, int options, compile_data *cd) +check_auto_possessive(const uschar *previous, BOOL utf8, const uschar *ptr, + int options, compile_data *cd) { -int next; +int c, next; +int op_code = *previous++; /* Skip whitespace and comments in extended mode */ @@ -2343,23 +2556,18 @@ strncmp((char *)ptr, STR_LEFT_CURLY_BRACKET STR_0 STR_COMMA, 3) == 0) return FALSE; -/* Now compare the next item with the previous opcode. If the previous is a -positive single character match, "item" either contains the character or, if -"item" is greater than 127 in utf8 mode, the character's bytes are in -utf8_char. */ - - -/* Handle cases when the next item is a character. */ +/* Now compare the next item with the previous opcode. First, handle cases when +the next item is a character. */ if (next >= 0) switch(op_code) { case OP_CHAR: #ifdef SUPPORT_UTF8 - if (utf8 && item > 127) { GETCHAR(item, utf8_char); } + GETCHARTEST(c, previous); #else - (void)(utf8_char); /* Keep compiler happy by referencing function argument */ + c = *previous; #endif - return item != next; + return c != next; /* For CHARNC (caseless character) we must check the other case. If we have Unicode property support, we can use it to test the other case of @@ -2367,9 +2575,11 @@ case OP_CHARNC: #ifdef SUPPORT_UTF8 - if (utf8 && item > 127) { GETCHAR(item, utf8_char); } + GETCHARTEST(c, previous); +#else + c = *previous; #endif - if (item == next) return FALSE; + if (c == next) return FALSE; #ifdef SUPPORT_UTF8 if (utf8) { @@ -2380,16 +2590,16 @@ #else othercase = NOTACHAR; #endif - return (unsigned int)item != othercase; + return (unsigned int)c != othercase; } else #endif /* SUPPORT_UTF8 */ - return (item != cd->fcc[next]); /* Non-UTF-8 mode */ + return (c != cd->fcc[next]); /* Non-UTF-8 mode */ - /* For OP_NOT, "item" must be a single-byte character. */ + /* For OP_NOT, its data is always a single-byte character. */ case OP_NOT: - if (item == next) return TRUE; + if ((c = *previous) == next) return TRUE; if ((options & PCRE_CASELESS) == 0) return FALSE; #ifdef SUPPORT_UTF8 if (utf8) @@ -2401,11 +2611,14 @@ #else othercase = NOTACHAR; #endif - return (unsigned int)item == othercase; + return (unsigned int)c == othercase; } else #endif /* SUPPORT_UTF8 */ - return (item == cd->fcc[next]); /* Non-UTF-8 mode */ + return (c == cd->fcc[next]); /* Non-UTF-8 mode */ + + /* Note that OP_DIGIT etc. are generated only when PCRE_UCP is *not* set. + When it is set, \d etc. are converted into OP_(NOT_)PROP codes. */ case OP_DIGIT: return next > 127 || (cd->ctypes[next] & ctype_digit) == 0; @@ -2448,11 +2661,12 @@ case 0x202f: case 0x205f: case 0x3000: - return op_code != OP_HSPACE; + return op_code == OP_NOT_HSPACE; default: - return op_code == OP_HSPACE; + return op_code != OP_NOT_HSPACE; } + case OP_ANYNL: case OP_VSPACE: case OP_NOT_VSPACE: switch(next) @@ -2464,48 +2678,62 @@ case 0x85: case 0x2028: case 0x2029: - return op_code != OP_VSPACE; + return op_code == OP_NOT_VSPACE; default: - return op_code == OP_VSPACE; + return op_code != OP_NOT_VSPACE; } +#ifdef SUPPORT_UCP + case OP_PROP: + return check_char_prop(next, previous[0], previous[1], FALSE); + + case OP_NOTPROP: + return check_char_prop(next, previous[0], previous[1], TRUE); +#endif + default: return FALSE; } -/* Handle the case when the next item is \d, \s, etc. */ +/* Handle the case when the next item is \d, \s, etc. Note that when PCRE_UCP +is set, \d turns into ESC_du rather than ESC_d, etc., so ESC_d etc. are +generated only when PCRE_UCP is *not* set, that is, when only ASCII +characteristics are recognized. Similarly, the opcodes OP_DIGIT etc. are +replaced by OP_PROP codes when PCRE_UCP is set. */ switch(op_code) { case OP_CHAR: case OP_CHARNC: #ifdef SUPPORT_UTF8 - if (utf8 && item > 127) { GETCHAR(item, utf8_char); } + GETCHARTEST(c, previous); +#else + c = *previous; #endif switch(-next) { case ESC_d: - return item > 127 || (cd->ctypes[item] & ctype_digit) == 0; + return c > 127 || (cd->ctypes[c] & ctype_digit) == 0; case ESC_D: - return item <= 127 && (cd->ctypes[item] & ctype_digit) != 0; + return c <= 127 && (cd->ctypes[c] & ctype_digit) != 0; case ESC_s: - return item > 127 || (cd->ctypes[item] & ctype_space) == 0; + return c > 127 || (cd->ctypes[c] & ctype_space) == 0; case ESC_S: - return item <= 127 && (cd->ctypes[item] & ctype_space) != 0; + return c <= 127 && (cd->ctypes[c] & ctype_space) != 0; case ESC_w: - return item > 127 || (cd->ctypes[item] & ctype_word) == 0; + return c > 127 || (cd->ctypes[c] & ctype_word) == 0; case ESC_W: - return item <= 127 && (cd->ctypes[item] & ctype_word) != 0; + return c <= 127 && (cd->ctypes[c] & ctype_word) != 0; case ESC_h: case ESC_H: - switch(item) + switch(c) { case 0x09: case 0x20: @@ -2533,7 +2761,7 @@ case ESC_v: case ESC_V: - switch(item) + switch(c) { case 0x0a: case 0x0b: @@ -2547,38 +2775,92 @@ return -next == ESC_v; } + /* When PCRE_UCP is set, these values get generated for \d etc. Find + their substitutions and process them. The result will always be either + -ESC_p or -ESC_P. Then fall through to process those values. */ + +#ifdef SUPPORT_UCP + case ESC_du: + case ESC_DU: + case ESC_wu: + case ESC_WU: + case ESC_su: + case ESC_SU: + { + int temperrorcode = 0; + ptr = substitutes[-next - ESC_DU]; + next = check_escape(&ptr, &temperrorcode, 0, options, FALSE); + if (temperrorcode != 0) return FALSE; + ptr++; /* For compatibility */ + } + /* Fall through */ + + case ESC_p: + case ESC_P: + { + int ptype, pdata, errorcodeptr; + BOOL negated; + + ptr--; /* Make ptr point at the p or P */ + ptype = get_ucp(&ptr, &negated, &pdata, &errorcodeptr); + if (ptype < 0) return FALSE; + ptr++; /* Point past the final curly ket */ + + /* If the property item is optional, we have to give up. (When generated + from \d etc by PCRE_UCP, this test will have been applied much earlier, + to the original \d etc. At this point, ptr will point to a zero byte. */ + + if (*ptr == CHAR_ASTERISK || *ptr == CHAR_QUESTION_MARK || + strncmp((char *)ptr, STR_LEFT_CURLY_BRACKET STR_0 STR_COMMA, 3) == 0) + return FALSE; + + /* Do the property check. */ + + return check_char_prop(c, ptype, pdata, (next == -ESC_P) != negated); + } +#endif + default: return FALSE; } + /* In principle, support for Unicode properties should be integrated here as + well. It means re-organizing the above code so as to get hold of the property + values before switching on the op-code. However, I wonder how many patterns + combine ASCII \d etc with Unicode properties? (Note that if PCRE_UCP is set, + these op-codes are never generated.) */ + case OP_DIGIT: return next == -ESC_D || next == -ESC_s || next == -ESC_W || - next == -ESC_h || next == -ESC_v; + next == -ESC_h || next == -ESC_v || next == -ESC_R; case OP_NOT_DIGIT: return next == -ESC_d; case OP_WHITESPACE: - return next == -ESC_S || next == -ESC_d || next == -ESC_w; + return next == -ESC_S || next == -ESC_d || next == -ESC_w || next == -ESC_R; case OP_NOT_WHITESPACE: return next == -ESC_s || next == -ESC_h || next == -ESC_v; case OP_HSPACE: - return next == -ESC_S || next == -ESC_H || next == -ESC_d || next == -ESC_w; + return next == -ESC_S || next == -ESC_H || next == -ESC_d || + next == -ESC_w || next == -ESC_v || next == -ESC_R; case OP_NOT_HSPACE: return next == -ESC_h; /* Can't have \S in here because VT matches \S (Perl anomaly) */ + case OP_ANYNL: case OP_VSPACE: return next == -ESC_V || next == -ESC_d || next == -ESC_w; case OP_NOT_VSPACE: - return next == -ESC_v; + return next == -ESC_v || next == -ESC_R; case OP_WORDCHAR: - return next == -ESC_W || next == -ESC_s || next == -ESC_h || next == -ESC_v; + return next == -ESC_W || next == -ESC_s || next == -ESC_h || + next == -ESC_v || next == -ESC_R; case OP_NOT_WORDCHAR: return next == -ESC_w || next == -ESC_d; @@ -2642,6 +2924,7 @@ BOOL groupsetfirstbyte = FALSE; const uschar *ptr = *ptrptr; const uschar *tempptr; +const uschar *nestptr = NULL; uschar *previous = NULL; uschar *previous_callout = NULL; uschar *save_hwm = NULL; @@ -2658,7 +2941,7 @@ uschar *utf8_char = NULL; #endif -#ifdef DEBUG +#ifdef PCRE_DEBUG if (lengthptr != NULL) DPRINTF((">> start branch\n")); #endif @@ -2712,15 +2995,25 @@ c = *ptr; + /* If we are at the end of a nested substitution, revert to the outer level + string. Nesting only happens one level deep. */ + + if (c == 0 && nestptr != NULL) + { + ptr = nestptr; + nestptr = NULL; + c = *ptr; + } + /* If we are in the pre-compile phase, accumulate the length used for the previous cycle of this loop. */ if (lengthptr != NULL) { -#ifdef DEBUG +#ifdef PCRE_DEBUG if (code > cd->hwm) cd->hwm = code; /* High water info */ #endif - if (code > cd->start_workspace + COMPILE_WORK_SIZE) /* Check for overrun */ + if (code > cd->start_workspace + WORK_SIZE_CHECK) /* Check for overrun */ { *errorcodeptr = ERR52; goto FAILED; @@ -2742,7 +3035,7 @@ goto FAILED; } - *lengthptr += code - last_code; + *lengthptr += (int)(code - last_code); DPRINTF(("length=%d added %d c=%c\n", *lengthptr, code - last_code, c)); /* If "previous" is set and it is not at the start of the work space, move @@ -2769,7 +3062,7 @@ /* In the real compile phase, just check the workspace used by the forward reference list. */ - else if (cd->hwm > cd->start_workspace + COMPILE_WORK_SIZE) + else if (cd->hwm > cd->start_workspace + WORK_SIZE_CHECK) { *errorcodeptr = ERR52; goto FAILED; @@ -2860,7 +3153,7 @@ *errorcodeptr = ERR20; goto FAILED; } - *lengthptr += code - last_code; /* To include callout length */ + *lengthptr += (int)(code - last_code); /* To include callout length */ DPRINTF((">> end branch\n")); } return TRUE; @@ -3065,7 +3358,7 @@ ptr++; } - posix_class = check_posix_name(ptr, tempptr - ptr); + posix_class = check_posix_name(ptr, (int)(tempptr - ptr)); if (posix_class < 0) { *errorcodeptr = ERR30; @@ -3079,10 +3372,25 @@ if ((options & PCRE_CASELESS) != 0 && posix_class <= 2) posix_class = 0; - /* We build the bit map for the POSIX class in a chunk of local store - because we may be adding and subtracting from it, and we don't want to - subtract bits that may be in the main map already. At the end we or the - result into the bit map that is being built. */ + /* When PCRE_UCP is set, some of the POSIX classes are converted to + different escape sequences that use Unicode properties. */ + +#ifdef SUPPORT_UCP + if ((options & PCRE_UCP) != 0) + { + int pc = posix_class + ((local_negate)? POSIX_SUBSIZE/2 : 0); + if (posix_substitutes[pc] != NULL) + { + nestptr = tempptr + 1; + ptr = posix_substitutes[pc] - 1; + continue; + } + } +#endif + /* In the non-UCP case, we build the bit map for the POSIX class in a + chunk of local store because we may be adding and subtracting from it, + and we don't want to subtract bits that may be in the main map already. + At the end we or the result into the bit map that is being built. */ posix_class *= 3; @@ -3126,19 +3434,18 @@ /* Backslash may introduce a single character, or it may introduce one of the specials, which just set a flag. The sequence \b is a special - case. Inside a class (and only there) it is treated as backspace. - Elsewhere it marks a word boundary. Other escapes have preset maps ready - to 'or' into the one we are building. We assume they have more than one - character in them, so set class_charcount bigger than one. */ + case. Inside a class (and only there) it is treated as backspace. We + assume that other escapes have more than one character in them, so set + class_charcount bigger than one. Unrecognized escapes fall through and + are either treated as literal characters (by default), or are faulted if + PCRE_EXTRA is set. */ if (c == CHAR_BACKSLASH) { c = check_escape(&ptr, errorcodeptr, cd->bracount, options, TRUE); if (*errorcodeptr != 0) goto FAILED; - if (-c == ESC_b) c = CHAR_BS; /* \b is backspace in a class */ - else if (-c == ESC_X) c = CHAR_X; /* \X is literal X in a class */ - else if (-c == ESC_R) c = CHAR_R; /* \R is literal R in a class */ + if (-c == ESC_b) c = CHAR_BS; /* \b is backspace in a class */ else if (-c == ESC_Q) /* Handle start of quoted string */ { if (ptr[1] == CHAR_BACKSLASH && ptr[2] == CHAR_E) @@ -3155,10 +3462,20 @@ register const uschar *cbits = cd->cbits; class_charcount += 2; /* Greater than 1 is what matters */ - /* Save time by not doing this in the pre-compile phase. */ - - if (lengthptr == NULL) switch (-c) + switch (-c) { +#ifdef SUPPORT_UCP + case ESC_du: /* These are the values given for \d etc */ + case ESC_DU: /* when PCRE_UCP is set. We replace the */ + case ESC_wu: /* escape sequence with an appropriate \p */ + case ESC_WU: /* or \P to test Unicode properties instead */ + case ESC_su: /* of the default ASCII testing. */ + case ESC_SU: + nestptr = ptr; + ptr = substitutes[-c - ESC_DU] - 1; /* Just before substitute */ + class_charcount -= 2; /* Undo! */ + continue; +#endif case ESC_d: for (c = 0; c < 32; c++) classbits[c] |= cbits[c+cbit_digit]; continue; @@ -3188,20 +3505,7 @@ classbits[1] |= 0x08; /* Perl 5.004 onwards omits VT from \s */ continue; - default: /* Not recognized; fall through */ - break; /* Need "default" setting to stop compiler warning. */ - } - - /* In the pre-compile phase, just do the recognition. */ - - else if (c == -ESC_d || c == -ESC_D || c == -ESC_w || - c == -ESC_W || c == -ESC_s || c == -ESC_S) continue; - - /* We need to deal with \H, \h, \V, and \v in both phases because - they use extra memory. */ - - if (-c == ESC_h) - { + case ESC_h: SETBIT(classbits, 0x09); /* VT */ SETBIT(classbits, 0x20); /* SPACE */ SETBIT(classbits, 0xa0); /* NSBP */ @@ -3225,10 +3529,8 @@ } #endif continue; - } - if (-c == ESC_H) - { + case ESC_H: for (c = 0; c < 32; c++) { int x = 0xff; @@ -3270,10 +3572,8 @@ } #endif continue; - } - if (-c == ESC_v) - { + case ESC_v: SETBIT(classbits, 0x0a); /* LF */ SETBIT(classbits, 0x0b); /* VT */ SETBIT(classbits, 0x0c); /* FF */ @@ -3289,10 +3589,8 @@ } #endif continue; - } - if (-c == ESC_V) - { + case ESC_V: for (c = 0; c < 32; c++) { int x = 0xff; @@ -3322,38 +3620,38 @@ } #endif continue; - } - - /* We need to deal with \P and \p in both phases. */ #ifdef SUPPORT_UCP - if (-c == ESC_p || -c == ESC_P) - { - BOOL negated; - int pdata; - int ptype = get_ucp(&ptr, &negated, &pdata, errorcodeptr); - if (ptype < 0) goto FAILED; - class_utf8 = TRUE; - *class_utf8data++ = ((-c == ESC_p) != negated)? - XCL_PROP : XCL_NOTPROP; - *class_utf8data++ = ptype; - *class_utf8data++ = pdata; - class_charcount -= 2; /* Not a < 256 character */ - continue; - } + case ESC_p: + case ESC_P: + { + BOOL negated; + int pdata; + int ptype = get_ucp(&ptr, &negated, &pdata, errorcodeptr); + if (ptype < 0) goto FAILED; + class_utf8 = TRUE; + *class_utf8data++ = ((-c == ESC_p) != negated)? + XCL_PROP : XCL_NOTPROP; + *class_utf8data++ = ptype; + *class_utf8data++ = pdata; + class_charcount -= 2; /* Not a < 256 character */ + continue; + } #endif - /* Unrecognized escapes are faulted if PCRE is running in its - strict mode. By default, for compatibility with Perl, they are - treated as literals. */ + /* Unrecognized escapes are faulted if PCRE is running in its + strict mode. By default, for compatibility with Perl, they are + treated as literals. */ - if ((options & PCRE_EXTRA) != 0) - { - *errorcodeptr = ERR7; - goto FAILED; + default: + if ((options & PCRE_EXTRA) != 0) + { + *errorcodeptr = ERR7; + goto FAILED; + } + class_charcount -= 2; /* Undo the default count from above */ + c = *ptr; /* Get the final character and fall through */ + break; } - - class_charcount -= 2; /* Undo the default count from above */ - c = *ptr; /* Get the final character and fall through */ } /* Fall through if we have a single character (c >= 0). This may be @@ -3423,14 +3721,11 @@ d = check_escape(&ptr, errorcodeptr, cd->bracount, options, TRUE); if (*errorcodeptr != 0) goto FAILED; - /* \b is backspace; \X is literal X; \R is literal R; any other - special means the '-' was literal */ + /* \b is backspace; any other special means the '-' was literal */ if (d < 0) { - if (d == -ESC_b) d = CHAR_BS; - else if (d == -ESC_X) d = CHAR_X; - else if (d == -ESC_R) d = CHAR_R; else + if (d == -ESC_b) d = CHAR_BS; else { ptr = oldptr; goto LONE_SINGLE_CHARACTER; /* A few lines below */ @@ -3596,35 +3891,23 @@ } } - /* Loop until ']' reached. This "while" is the end of the "do" above. */ + /* Loop until ']' reached. This "while" is the end of the "do" far above. + If we are at the end of an internal nested string, revert to the outer + string. */ + + while (((c = *(++ptr)) != 0 || + (nestptr != NULL && + (ptr = nestptr, nestptr = NULL, c = *(++ptr)) != 0)) && + (c != CHAR_RIGHT_SQUARE_BRACKET || inescq)); - while ((c = *(++ptr)) != 0 && (c != CHAR_RIGHT_SQUARE_BRACKET || inescq)); + /* Check for missing terminating ']' */ - if (c == 0) /* Missing terminating ']' */ + if (c == 0) { *errorcodeptr = ERR6; goto FAILED; } - -/* This code has been disabled because it would mean that \s counts as -an explicit \r or \n reference, and that's not really what is wanted. Now -we set the flag only if there is a literal "\r" or "\n" in the class. */ - -#if 0 - /* Remember whether \r or \n are in this class */ - - if (negate_class) - { - if ((classbits[1] & 0x24) != 0x24) cd->external_flags |= PCRE_HASCRORLF; - } - else - { - if ((classbits[1] & 0x24) != 0) cd->external_flags |= PCRE_HASCRORLF; - } -#endif - - /* If class_charcount is 1, we saw precisely one character whose value is less than 256. As long as there were no characters >= 128 and there was no use of \p or \P, in other words, no use of any XCLASS features, we can @@ -3688,13 +3971,14 @@ /* If there are characters with values > 255, we have to compile an extended class, with its own opcode, unless there was a negated special - such as \S in the class, because in that case all characters > 255 are in - the class, so any that were explicitly given as well can be ignored. If - (when there are explicit characters > 255 that must be listed) there are no - characters < 256, we can omit the bitmap in the actual compiled code. */ + such as \S in the class, and PCRE_UCP is not set, because in that case all + characters > 255 are in the class, so any that were explicitly given as + well can be ignored. If (when there are explicit characters > 255 that must + be listed) there are no characters < 256, we can omit the bitmap in the + actual compiled code. */ #ifdef SUPPORT_UTF8 - if (class_utf8 && !should_flip_negation) + if (class_utf8 && (!should_flip_negation || (options & PCRE_UCP) != 0)) { *class_utf8data++ = XCL_END; /* Marks the end of extra data */ *code++ = OP_XCLASS; @@ -3720,10 +4004,11 @@ } #endif - /* If there are no characters > 255, set the opcode to OP_CLASS or - OP_NCLASS, depending on whether the whole class was negated and whether - there were negative specials such as \S in the class. Then copy the 32-byte - map into the code vector, negating it if necessary. */ + /* If there are no characters > 255, or they are all to be included or + excluded, set the opcode to OP_CLASS or OP_NCLASS, depending on whether the + whole class was negated and whether there were negative specials such as \S + (non-UCP) in the class. Then copy the 32-byte map into the code vector, + negating it if necessary. */ *code++ = (negate_class == should_flip_negation) ? OP_CLASS : OP_NCLASS; if (negate_class) @@ -3847,8 +4132,7 @@ if (!possessive_quantifier && repeat_max < 0 && - check_auto_possessive(*previous, c, utf8, utf8_char, ptr + 1, - options, cd)) + check_auto_possessive(previous, utf8, ptr + 1, options, cd)) { repeat_type = 0; /* Force greedy */ possessive_quantifier = TRUE; @@ -3869,7 +4153,7 @@ c = previous[1]; if (!possessive_quantifier && repeat_max < 0 && - check_auto_possessive(OP_NOT, c, utf8, NULL, ptr + 1, options, cd)) + check_auto_possessive(previous, utf8, ptr + 1, options, cd)) { repeat_type = 0; /* Force greedy */ possessive_quantifier = TRUE; @@ -3893,7 +4177,7 @@ if (!possessive_quantifier && repeat_max < 0 && - check_auto_possessive(c, 0, utf8, NULL, ptr + 1, options, cd)) + check_auto_possessive(previous, utf8, ptr + 1, options, cd)) { repeat_type = 0; /* Force greedy */ possessive_quantifier = TRUE; @@ -4103,7 +4387,7 @@ { register int i; int ketoffset = 0; - int len = code - previous; + int len = (int)(code - previous); uschar *bralink = NULL; /* Repeating a DEFINE group is pointless */ @@ -4124,7 +4408,7 @@ { register uschar *ket = previous; do ket += GET(ket, 1); while (*ket != OP_KET); - ketoffset = code - ket; + ketoffset = (int)(code - ket); } /* The case of a zero minimum is special because of the need to stick @@ -4192,7 +4476,7 @@ /* We chain together the bracket offset fields that have to be filled in later when the ends of the brackets are reached. */ - offset = (bralink == NULL)? 0 : previous - bralink; + offset = (bralink == NULL)? 0 : (int)(previous - bralink); bralink = previous; PUTINC(previous, 0, offset); } @@ -4213,13 +4497,15 @@ { /* In the pre-compile phase, we don't actually do the replication. We just adjust the length as if we had. Do some paranoid checks for - potential integer overflow. */ + potential integer overflow. The INT64_OR_DOUBLE type is a 64-bit + integer type when available, otherwise double. */ if (lengthptr != NULL) { int delta = (repeat_min - 1)*length_prevgroup; - if ((double)(repeat_min - 1)*(double)length_prevgroup > - (double)INT_MAX || + if ((INT64_OR_DOUBLE)(repeat_min - 1)* + (INT64_OR_DOUBLE)length_prevgroup > + (INT64_OR_DOUBLE)INT_MAX || OFLOW_MAX - *lengthptr < delta) { *errorcodeptr = ERR20; @@ -4265,15 +4551,16 @@ just adjust the length as if we had. For each repetition we must add 1 to the length for BRAZERO and for all but the last repetition we must add 2 + 2*LINKSIZE to allow for the nesting that occurs. Do some - paranoid checks to avoid integer overflow. */ + paranoid checks to avoid integer overflow. The INT64_OR_DOUBLE type is + a 64-bit integer type when available, otherwise double. */ if (lengthptr != NULL && repeat_max > 0) { int delta = repeat_max * (length_prevgroup + 1 + 2 + 2*LINK_SIZE) - 2 - 2*LINK_SIZE; /* Last one doesn't nest */ - if ((double)repeat_max * - (double)(length_prevgroup + 1 + 2 + 2*LINK_SIZE) - > (double)INT_MAX || + if ((INT64_OR_DOUBLE)repeat_max * + (INT64_OR_DOUBLE)(length_prevgroup + 1 + 2 + 2*LINK_SIZE) + > (INT64_OR_DOUBLE)INT_MAX || OFLOW_MAX - *lengthptr < delta) { *errorcodeptr = ERR20; @@ -4298,7 +4585,7 @@ { int offset; *code++ = OP_BRA; - offset = (bralink == NULL)? 0 : code - bralink; + offset = (bralink == NULL)? 0 : (int)(code - bralink); bralink = code; PUTINC(code, 0, offset); } @@ -4319,7 +4606,7 @@ while (bralink != NULL) { int oldlinkoffset; - int offset = code - bralink + 1; + int offset = (int)(code - bralink + 1); uschar *bra = code - offset; oldlinkoffset = GET(bra, 1); bralink = (oldlinkoffset == 0)? NULL : bralink - oldlinkoffset; @@ -4350,7 +4637,7 @@ uschar *scode = bracode; do { - if (could_be_empty_branch(scode, ketcode, utf8)) + if (could_be_empty_branch(scode, ketcode, utf8, cd)) { *bracode += OP_SBRA - OP_BRA; break; @@ -4407,7 +4694,7 @@ #endif } - len = code - tempcode; + len = (int)(code - tempcode); if (len > 0) switch (*tempcode) { case OP_STAR: *tempcode = OP_POSSTAR; break; @@ -4425,7 +4712,12 @@ case OP_NOTQUERY: *tempcode = OP_NOTPOSQUERY; break; case OP_NOTUPTO: *tempcode = OP_NOTPOSUPTO; break; + /* Because we are moving code along, we must ensure that any + pending recursive references are updated. */ + default: + *code = OP_END; + adjust_recurse(tempcode, 1 + LINK_SIZE, utf8, cd, save_hwm); memmove(tempcode + 1+LINK_SIZE, tempcode, len); code += 1 + LINK_SIZE; len += 1 + LINK_SIZE; @@ -4461,24 +4753,34 @@ /* First deal with various "verbs" that can be introduced by '*'. */ - if (*(++ptr) == CHAR_ASTERISK && (cd->ctypes[ptr[1]] & ctype_letter) != 0) + if (*(++ptr) == CHAR_ASTERISK && + ((cd->ctypes[ptr[1]] & ctype_letter) != 0 || ptr[1] == ':')) { int i, namelen; + int arglen = 0; const char *vn = verbnames; - const uschar *name = ++ptr; + const uschar *name = ptr + 1; + const uschar *arg = NULL; previous = NULL; while ((cd->ctypes[*++ptr] & ctype_letter) != 0) {}; + namelen = (int)(ptr - name); + if (*ptr == CHAR_COLON) { - *errorcodeptr = ERR59; /* Not supported */ - goto FAILED; + arg = ++ptr; + while ((cd->ctypes[*ptr] & (ctype_letter|ctype_digit)) != 0 + || *ptr == '_') ptr++; + arglen = (int)(ptr - arg); } + if (*ptr != CHAR_RIGHT_PARENTHESIS) { *errorcodeptr = ERR60; goto FAILED; } - namelen = ptr - name; + + /* Scan the table of verb names */ + for (i = 0; i < verbcount; i++) { if (namelen == verbs[i].len && @@ -4496,13 +4798,41 @@ PUT2INC(code, 0, oc->number); } } - *code++ = verbs[i].op; - break; + + /* Handle the cases with/without an argument */ + + if (arglen == 0) + { + if (verbs[i].op < 0) /* Argument is mandatory */ + { + *errorcodeptr = ERR66; + goto FAILED; + } + *code++ = verbs[i].op; + } + + else + { + if (verbs[i].op_arg < 0) /* Argument is forbidden */ + { + *errorcodeptr = ERR59; + goto FAILED; + } + *code++ = verbs[i].op_arg; + *code++ = arglen; + memcpy(code, arg, arglen); + code += arglen; + *code++ = 0; + } + + break; /* Found verb, exit loop */ } + vn += verbs[i].len + 1; } - if (i < verbcount) continue; - *errorcodeptr = ERR60; + + if (i < verbcount) continue; /* Successfully handled a verb */ + *errorcodeptr = ERR60; /* Verb not recognized */ goto FAILED; } @@ -4621,7 +4951,7 @@ recno * 10 + *ptr - CHAR_0 : -1; ptr++; } - namelen = ptr - name; + namelen = (int)(ptr - name); if ((terminator > 0 && *ptr++ != terminator) || *ptr++ != CHAR_RIGHT_PARENTHESIS) @@ -4817,8 +5147,8 @@ goto FAILED; } *code++ = n; - PUT(code, 0, ptr - cd->start_pattern + 1); /* Pattern offset */ - PUT(code, LINK_SIZE, 0); /* Default length */ + PUT(code, 0, (int)(ptr - cd->start_pattern + 1)); /* Pattern offset */ + PUT(code, LINK_SIZE, 0); /* Default length */ code += 2 * LINK_SIZE; } previous = NULL; @@ -4851,7 +5181,7 @@ name = ++ptr; while ((cd->ctypes[*ptr] & ctype_word) != 0) ptr++; - namelen = ptr - name; + namelen = (int)(ptr - name); /* In the pre-compile phase, just do a syntax check. */ @@ -4981,7 +5311,7 @@ NAMED_REF_OR_RECURSE: name = ++ptr; while ((cd->ctypes[*ptr] & ctype_word) != 0) ptr++; - namelen = ptr - name; + namelen = (int)(ptr - name); /* In the pre-compile phase, do a syntax check and set a dummy reference number. */ @@ -5144,8 +5474,13 @@ *errorcodeptr = ERR15; goto FAILED; } + + /* Fudge the value of "called" so that when it is inserted as an + offset below, what it actually inserted is the reference number + of the group. */ + called = cd->start_code + recno; - PUTINC(cd->hwm, 0, code + 2 + LINK_SIZE - cd->start_code); + PUTINC(cd->hwm, 0, (int)(code + 2 + LINK_SIZE - cd->start_code)); } /* If not a forward reference, and the subpattern is still open, @@ -5153,7 +5488,7 @@ recursion that could loop for ever, and diagnose that case. */ else if (GET(called, 1) == 0 && - could_be_empty(called, code, bcptr, utf8)) + could_be_empty(called, code, bcptr, utf8, cd)) { *errorcodeptr = ERR40; goto FAILED; @@ -5169,7 +5504,7 @@ code += 1 + LINK_SIZE; *code = OP_RECURSE; - PUT(code, 1, called - cd->start_code); + PUT(code, 1, (int)(called - cd->start_code)); code += 1 + LINK_SIZE; *code = OP_KET; @@ -5248,7 +5583,7 @@ { cd->external_options = newoptions; } - else + else { if ((options & PCRE_IMS) != (newoptions & PCRE_IMS)) { @@ -5280,8 +5615,8 @@ } /* End of switch for character following (? */ } /* End of (? handling */ - /* Opening parenthesis not followed by '?'. If PCRE_NO_AUTO_CAPTURE is set, - all unadorned brackets become non-capturing and behave like (?:...) + /* Opening parenthesis not followed by '*' or '?'. If PCRE_NO_AUTO_CAPTURE + is set, all unadorned brackets become non-capturing and behave like (?:...) brackets. */ else if ((options & PCRE_NO_AUTO_CAPTURE) != 0) @@ -5473,11 +5808,12 @@ /* ===================================================================*/ /* Handle metasequences introduced by \. For ones like \d, the ESC_ values - are arranged to be the negation of the corresponding OP_values. For the - back references, the values are ESC_REF plus the reference number. Only - back references and those types that consume a character may be repeated. - We can test for values between ESC_b and ESC_Z for the latter; this may - have to change if any new ones are ever created. */ + are arranged to be the negation of the corresponding OP_values in the + default case when PCRE_UCP is not set. For the back references, the values + are ESC_REF plus the reference number. Only back references and those types + that consume a character may be repeated. We can test for values between + ESC_b and ESC_Z for the latter; this may have to change if any new ones are + ever created. */ case CHAR_BACKSLASH: tempptr = ptr; @@ -5585,6 +5921,7 @@ if (-c >= ESC_REF) { + open_capitem *oc; recno = -c - ESC_REF; HANDLE_REFERENCE: /* Come here from named backref handling */ @@ -5594,6 +5931,19 @@ PUT2INC(code, 0, recno); cd->backref_map |= (recno < 32)? (1 << recno) : 1; if (recno > cd->top_backref) cd->top_backref = recno; + + /* Check to see if this back reference is recursive, that it, it + is inside the group that it references. A flag is set so that the + group can be made atomic. */ + + for (oc = cd->open_caps; oc != NULL; oc = oc->next) + { + if (oc->number == recno) + { + oc->flag = TRUE; + break; + } + } } /* So are Unicode property matches, if supported. */ @@ -5623,12 +5973,24 @@ #endif /* For the rest (including \X when Unicode properties are supported), we - can obtain the OP value by negating the escape value. */ + can obtain the OP value by negating the escape value in the default + situation when PCRE_UCP is not set. When it *is* set, we substitute + Unicode property tests. */ else { - previous = (-c > ESC_b && -c < ESC_Z)? code : NULL; - *code++ = -c; +#ifdef SUPPORT_UCP + if (-c >= ESC_DU && -c <= ESC_wu) + { + nestptr = ptr + 1; /* Where to resume */ + ptr = substitutes[-c - ESC_DU] - 1; /* Just before substitute */ + } + else +#endif + { + previous = (-c > ESC_b && -c < ESC_Z)? code : NULL; + *code++ = -c; + } } continue; } @@ -5783,10 +6145,11 @@ int length; int orig_bracount; int max_bracount; +int old_external_options = cd->external_options; branch_chain bc; bc.outer = bcptr; -bc.current = code; +bc.current_branch = code; firstbyte = reqbyte = REQ_UNSET; @@ -5805,13 +6168,15 @@ pre-compile phase to find out whether anything has yet been compiled or not. */ /* If this is a capturing subpattern, add to the chain of open capturing items -so that we can detect them if (*ACCEPT) is encountered. */ +so that we can detect them if (*ACCEPT) is encountered. This is also used to +detect groups that contain recursive back references to themselves. */ if (*code == OP_CBRA) { capnumber = GET2(code, 1 + LINK_SIZE); capitem.number = capnumber; capitem.next = cd->open_caps; + capitem.flag = FALSE; cd->open_caps = &capitem; } @@ -5859,6 +6224,15 @@ return FALSE; } + /* If the external options have changed during this branch, it means that we + are at the top level, and a leading option setting has been encountered. We + need to re-set the original option values to take account of this so that, + during the pre-compile phase, we know to allow for a re-set at the start of + subsequent branches. */ + + if (old_external_options != cd->external_options) + oldims = cd->external_options & PCRE_IMS; + /* Keep the highest bracket count in case (?| was used and some branch has fewer than the rest. */ @@ -5948,7 +6322,7 @@ { if (lengthptr == NULL) { - int branch_length = code - last_branch; + int branch_length = (int)(code - last_branch); do { int prev_length = GET(last_branch, 1); @@ -5959,17 +6333,34 @@ while (branch_length > 0); } - /* If it was a capturing subpattern, remove it from the chain. */ - - if (capnumber > 0) cd->open_caps = cd->open_caps->next; - /* Fill in the ket */ *code = OP_KET; - PUT(code, 1, code - start_bracket); + PUT(code, 1, (int)(code - start_bracket)); code += 1 + LINK_SIZE; - /* Resetting option if needed */ + /* If it was a capturing subpattern, check to see if it contained any + recursive back references. If so, we must wrap it in atomic brackets. + In any event, remove the block from the chain. */ + + if (capnumber > 0) + { + if (cd->open_caps->flag) + { + memmove(start_bracket + 1 + LINK_SIZE, start_bracket, + code - start_bracket); + *start_bracket = OP_ONCE; + code += 1 + LINK_SIZE; + PUT(start_bracket, 1, (int)(code - start_bracket)); + *code = OP_KET; + PUT(code, 1, (int)(code - start_bracket)); + code += 1 + LINK_SIZE; + length += 2 + 2*LINK_SIZE; + } + cd->open_caps = cd->open_caps->next; + } + + /* Reset options if needed. */ if ((options & PCRE_IMS) != oldims && *ptr == CHAR_RIGHT_PARENTHESIS) { @@ -6017,8 +6408,8 @@ else { *code = OP_ALT; - PUT(code, 1, code - last_branch); - bc.current = last_branch = code; + PUT(code, 1, (int)(code - last_branch)); + bc.current_branch = last_branch = code; code += 1 + LINK_SIZE; } @@ -6336,7 +6727,7 @@ int firstbyte, reqbyte, newline; int errorcode = 0; int skipatstart = 0; -BOOL utf8 = (options & PCRE_UTF8) != 0; +BOOL utf8; size_t size; uschar *code; const uschar *codestart; @@ -6406,6 +6797,8 @@ if (strncmp((char *)(ptr+skipatstart+2), STRING_UTF8_RIGHTPAR, 5) == 0) { skipatstart += 7; options |= PCRE_UTF8; continue; } + else if (strncmp((char *)(ptr+skipatstart+2), STRING_UCP_RIGHTPAR, 4) == 0) + { skipatstart += 6; options |= PCRE_UCP; continue; } if (strncmp((char *)(ptr+skipatstart+2), STRING_CR_RIGHTPAR, 3) == 0) { skipatstart += 5; newnl = PCRE_NEWLINE_CR; } @@ -6430,11 +6823,13 @@ else break; } +utf8 = (options & PCRE_UTF8) != 0; + /* Can't support UTF8 unless PCRE has been compiled to include the code. */ #ifdef SUPPORT_UTF8 if (utf8 && (options & PCRE_NO_UTF8_CHECK) == 0 && - (*erroroffset = _pcre_valid_utf8((uschar *)pattern, -1)) >= 0) + (*erroroffset = _pcre_valid_utf8((USPTR)pattern, -1)) >= 0) { errorcode = ERR44; goto PCRE_EARLY_ERROR_RETURN2; @@ -6447,6 +6842,16 @@ } #endif +/* Can't support UCP unless PCRE has been compiled to include the code. */ + +#ifndef SUPPORT_UCP +if ((options & PCRE_UCP) != 0) + { + errorcode = ERR67; + goto PCRE_EARLY_ERROR_RETURN; + } +#endif + /* Check validity of \R options. */ switch (options & (PCRE_BSR_ANYCRLF|PCRE_BSR_UNICODE)) @@ -6575,7 +6980,7 @@ pointers. */ re->magic_number = MAGIC_NUMBER; -re->size = size; +re->size = (int)size; re->options = cd->external_options; re->flags = cd->external_flags; re->dummy1 = 0; @@ -6631,7 +7036,7 @@ *code++ = OP_END; -#ifndef DEBUG +#ifndef PCRE_DEBUG if (code - codestart > length) errorcode = ERR23; #endif @@ -6646,7 +7051,7 @@ recno = GET(codestart, offset); groupptr = _pcre_find_bracket(codestart, utf8, recno); if (groupptr == NULL) errorcode = ERR53; - else PUT(((uschar *)codestart), offset, groupptr - codestart); + else PUT(((uschar *)codestart), offset, (int)(groupptr - codestart)); } /* Give an error if there's back reference to a non-existent capturing @@ -6701,7 +7106,7 @@ { (pcre_free)(re); PCRE_EARLY_ERROR_RETURN: - *erroroffset = ptr - (const uschar *)pattern; + *erroroffset = (int)(ptr - (const uschar *)pattern); PCRE_EARLY_ERROR_RETURN2: *errorptr = find_error_text(errorcode); if (errorcodeptr != NULL) *errorcodeptr = errorcode; @@ -6755,8 +7160,7 @@ /* Print out the compiled data if debugging is enabled. This is never the case when building a production library. */ -#ifdef DEBUG - +#ifdef PCRE_DEBUG printf("Length = %d top_bracket = %d top_backref = %d\n", length, re->top_bracket, re->top_backref); @@ -6793,7 +7197,7 @@ if (errorcodeptr != NULL) *errorcodeptr = ERR23; return NULL; } -#endif /* DEBUG */ +#endif /* PCRE_DEBUG */ return (pcre *)re; } @@ . patch -p0 <<'@@ .' Index: pcre/pcre_dfa_exec.c ============================================================================ $ cvs diff -u -r1.1.1.3 -r1.1.1.3.2.1 pcre_dfa_exec.c --- pcre/pcre_dfa_exec.c 5 Dec 2009 13:53:54 -0000 1.1.1.3 +++ pcre/pcre_dfa_exec.c 23 Aug 2010 13:08:53 -0000 1.1.1.3.2.1 @@ -7,7 +7,7 @@ below for why this module is different). Written by Philip Hazel - Copyright (c) 1997-2009 University of Cambridge + Copyright (c) 1997-2010 University of Cambridge ----------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without @@ -106,7 +106,7 @@ /* This table identifies those opcodes that are followed immediately by a -character that is to be tested in some way. This makes is possible to +character that is to be tested in some way. This makes it possible to centralize the loading of these characters. In the case of Type * etc, the "character" is the opcode for \D, \d, \S, \s, \W, or \w, which will always be a small value. Non-zero values in the table are the offsets from the opcode where @@ -118,8 +118,9 @@ 0, 0, 0, 0, 0, /* \A, \G, \K, \B, \b */ 0, 0, 0, 0, 0, 0, /* \D, \d, \S, \s, \W, \w */ 0, 0, 0, /* Any, AllAny, Anybyte */ - 0, 0, 0, /* NOTPROP, PROP, EXTUNI */ + 0, 0, /* \P, \p */ 0, 0, 0, 0, 0, /* \R, \H, \h, \V, \v */ + 0, /* \X */ 0, 0, 0, 0, 0, /* \Z, \z, Opt, ^, $ */ 1, /* Char */ 1, /* Charnc */ @@ -156,12 +157,13 @@ 0, /* Reverse */ 0, 0, 0, 0, /* ONCE, BRA, CBRA, COND */ 0, 0, 0, /* SBRA, SCBRA, SCOND */ - 0, /* CREF */ - 0, /* RREF */ + 0, 0, /* CREF, NCREF */ + 0, 0, /* RREF, NRREF */ 0, /* DEF */ 0, 0, /* BRAZERO, BRAMINZERO */ - 0, 0, 0, 0, /* PRUNE, SKIP, THEN, COMMIT */ - 0, 0, 0, 0 /* FAIL, ACCEPT, CLOSE, SKIPZERO */ + 0, 0, 0, /* MARK, PRUNE, PRUNE_ARG, */ + 0, 0, 0, 0, /* SKIP, SKIP_ARG, THEN, THEN_ARG, */ + 0, 0, 0, 0, 0 /* COMMIT, FAIL, ACCEPT, CLOSE, SKIPZERO */ }; /* This table identifies those opcodes that inspect a character. It is used to @@ -174,8 +176,9 @@ 0, 0, 0, 1, 1, /* \A, \G, \K, \B, \b */ 1, 1, 1, 1, 1, 1, /* \D, \d, \S, \s, \W, \w */ 1, 1, 1, /* Any, AllAny, Anybyte */ - 1, 1, 1, /* NOTPROP, PROP, EXTUNI */ + 1, 1, /* \P, \p */ 1, 1, 1, 1, 1, /* \R, \H, \h, \V, \v */ + 1, /* \X */ 0, 0, 0, 0, 0, /* \Z, \z, Opt, ^, $ */ 1, /* Char */ 1, /* Charnc */ @@ -212,12 +215,13 @@ 0, /* Reverse */ 0, 0, 0, 0, /* ONCE, BRA, CBRA, COND */ 0, 0, 0, /* SBRA, SCBRA, SCOND */ - 0, /* CREF */ - 0, /* RREF */ + 0, 0, /* CREF, NCREF */ + 0, 0, /* RREF, NRREF */ 0, /* DEF */ 0, 0, /* BRAZERO, BRAMINZERO */ - 0, 0, 0, 0, /* PRUNE, SKIP, THEN, COMMIT */ - 0, 0, 0, 0 /* FAIL, ACCEPT, CLOSE, SKIPZERO */ + 0, 0, 0, /* MARK, PRUNE, PRUNE_ARG, */ + 0, 0, 0, 0, /* SKIP, SKIP_ARG, THEN, THEN_ARG, */ + 0, 0, 0, 0, 0 /* COMMIT, FAIL, ACCEPT, CLOSE, SKIPZERO */ }; /* These 2 tables allow for compact code for testing for \D, \d, \S, \s, \W, @@ -255,7 +259,7 @@ #define INTS_PER_STATEBLOCK (sizeof(stateblock)/sizeof(int)) -#ifdef DEBUG +#ifdef PCRE_DEBUG /************************************************* * Print character string * *************************************************/ @@ -471,7 +475,7 @@ { gone_back = (current_subject - max_back < start_subject)? - current_subject - start_subject : max_back; + (int)(current_subject - start_subject) : max_back; current_subject -= gone_back; } @@ -488,7 +492,7 @@ int back = GET(end_code, 2+LINK_SIZE); if (back <= gone_back) { - int bstate = end_code - start_code + 2 + 2*LINK_SIZE; + int bstate = (int)(end_code - start_code + 2 + 2*LINK_SIZE); ADD_NEW_DATA(-bstate, 0, gone_back - back); } end_code += GET(end_code, 1); @@ -524,7 +528,7 @@ ((*this_start_code == OP_CBRA || *this_start_code == OP_SCBRA)? 2:0); do { - ADD_NEW(end_code - start_code + length, 0); + ADD_NEW((int)(end_code - start_code + length), 0); end_code += GET(end_code, 1); length = 1 + LINK_SIZE; } @@ -559,7 +563,7 @@ workspace[0] ^= 1; /* Remember for the restarting feature */ workspace[1] = active_count; -#ifdef DEBUG +#ifdef PCRE_DEBUG printf("%.*sNext character: rest of subject = \"", rlevel*2-2, SP); pchars((uschar *)ptr, strlen((char *)ptr), stdout); printf("\"\n"); @@ -605,7 +609,7 @@ int state_offset = current_state->offset; int count, codevalue, rrc; -#ifdef DEBUG +#ifdef PCRE_DEBUG printf ("%.*sProcessing state %d c=", rlevel*2-2, SP, state_offset); if (clen == 0) printf("EOL\n"); else if (c > 32 && c < 127) printf("'%c'\n", c); @@ -706,6 +710,18 @@ switch (codevalue) { +/* ========================================================================== */ + /* These cases are never obeyed. This is a fudge that causes a compile- + time error if the vectors coptable or poptable, which are indexed by + opcode, are not the correct length. It seems to be the only way to do + such a check at compile time, as the sizeof() operator does not work + in the C preprocessor. */ + + case OP_TABLE_LENGTH: + case OP_TABLE_LENGTH + + ((sizeof(coptable) == OP_TABLE_LENGTH) && + (sizeof(poptable) == OP_TABLE_LENGTH)): + break; /* ========================================================================== */ /* Reached a closing bracket. If not at the end of the pattern, carry @@ -739,8 +755,8 @@ if (count > 0) memmove(offsets + 2, offsets, count * sizeof(int)); if (offsetcount >= 2) { - offsets[0] = current_subject - start_subject; - offsets[1] = ptr - start_subject; + offsets[0] = (int)(current_subject - start_subject); + offsets[1] = (int)(ptr - start_subject); DPRINTF(("%.*sSet matched string = \"%.*s\"\n", rlevel*2-2, SP, offsets[1] - offsets[0], current_subject)); } @@ -762,7 +778,7 @@ /*-----------------------------------------------------------------*/ case OP_ALT: do { code += GET(code, 1); } while (*code == OP_ALT); - ADD_ACTIVE(code - start_code, 0); + ADD_ACTIVE((int)(code - start_code), 0); break; /*-----------------------------------------------------------------*/ @@ -770,7 +786,7 @@ case OP_SBRA: do { - ADD_ACTIVE(code - start_code + 1 + LINK_SIZE, 0); + ADD_ACTIVE((int)(code - start_code + 1 + LINK_SIZE), 0); code += GET(code, 1); } while (*code == OP_ALT); @@ -779,11 +795,11 @@ /*-----------------------------------------------------------------*/ case OP_CBRA: case OP_SCBRA: - ADD_ACTIVE(code - start_code + 3 + LINK_SIZE, 0); + ADD_ACTIVE((int)(code - start_code + 3 + LINK_SIZE), 0); code += GET(code, 1); while (*code == OP_ALT) { - ADD_ACTIVE(code - start_code + 1 + LINK_SIZE, 0); + ADD_ACTIVE((int)(code - start_code + 1 + LINK_SIZE), 0); code += GET(code, 1); } break; @@ -794,14 +810,14 @@ ADD_ACTIVE(state_offset + 1, 0); code += 1 + GET(code, 2); while (*code == OP_ALT) code += GET(code, 1); - ADD_ACTIVE(code - start_code + 1 + LINK_SIZE, 0); + ADD_ACTIVE((int)(code - start_code + 1 + LINK_SIZE), 0); break; /*-----------------------------------------------------------------*/ case OP_SKIPZERO: code += 1 + GET(code, 2); while (*code == OP_ALT) code += GET(code, 1); - ADD_ACTIVE(code - start_code + 1 + LINK_SIZE, 0); + ADD_ACTIVE((int)(code - start_code + 1 + LINK_SIZE), 0); break; /*-----------------------------------------------------------------*/ @@ -906,13 +922,37 @@ if (utf8) BACKCHAR(temp); #endif GETCHARTEST(d, temp); +#ifdef SUPPORT_UCP + if ((md->poptions & PCRE_UCP) != 0) + { + if (d == '_') left_word = TRUE; else + { + int cat = UCD_CATEGORY(d); + left_word = (cat == ucp_L || cat == ucp_N); + } + } + else +#endif left_word = d < 256 && (ctypes[d] & ctype_word) != 0; } - else left_word = 0; + else left_word = FALSE; if (clen > 0) + { +#ifdef SUPPORT_UCP + if ((md->poptions & PCRE_UCP) != 0) + { + if (c == '_') right_word = TRUE; else + { + int cat = UCD_CATEGORY(c); + right_word = (cat == ucp_L || cat == ucp_N); + } + } + else +#endif right_word = c < 256 && (ctypes[c] & ctype_word) != 0; - else right_word = 0; + } + else right_word = FALSE; if ((left_word == right_word) == (codevalue == OP_NOT_WORD_BOUNDARY)) { ADD_ACTIVE(state_offset + 1, 0); } @@ -939,7 +979,8 @@ break; case PT_LAMP: - OK = prop->chartype == ucp_Lu || prop->chartype == ucp_Ll || prop->chartype == ucp_Lt; + OK = prop->chartype == ucp_Lu || prop->chartype == ucp_Ll || + prop->chartype == ucp_Lt; break; case PT_GC: @@ -954,6 +995,30 @@ OK = prop->script == code[2]; break; + /* These are specials for combination cases. */ + + case PT_ALNUM: + OK = _pcre_ucp_gentype[prop->chartype] == ucp_L || + _pcre_ucp_gentype[prop->chartype] == ucp_N; + break; + + case PT_SPACE: /* Perl space */ + OK = _pcre_ucp_gentype[prop->chartype] == ucp_Z || + c == CHAR_HT || c == CHAR_NL || c == CHAR_FF || c == CHAR_CR; + break; + + case PT_PXSPACE: /* POSIX space */ + OK = _pcre_ucp_gentype[prop->chartype] == ucp_Z || + c == CHAR_HT || c == CHAR_NL || c == CHAR_VT || + c == CHAR_FF || c == CHAR_CR; + break; + + case PT_WORD: + OK = _pcre_ucp_gentype[prop->chartype] == ucp_L || + _pcre_ucp_gentype[prop->chartype] == ucp_N || + c == CHAR_UNDERSCORE; + break; + /* Should never occur, but keep compilers from grumbling. */ default: @@ -1108,7 +1173,8 @@ break; case PT_LAMP: - OK = prop->chartype == ucp_Lu || prop->chartype == ucp_Ll || prop->chartype == ucp_Lt; + OK = prop->chartype == ucp_Lu || prop->chartype == ucp_Ll || + prop->chartype == ucp_Lt; break; case PT_GC: @@ -1123,6 +1189,30 @@ OK = prop->script == code[3]; break; + /* These are specials for combination cases. */ + + case PT_ALNUM: + OK = _pcre_ucp_gentype[prop->chartype] == ucp_L || + _pcre_ucp_gentype[prop->chartype] == ucp_N; + break; + + case PT_SPACE: /* Perl space */ + OK = _pcre_ucp_gentype[prop->chartype] == ucp_Z || + c == CHAR_HT || c == CHAR_NL || c == CHAR_FF || c == CHAR_CR; + break; + + case PT_PXSPACE: /* POSIX space */ + OK = _pcre_ucp_gentype[prop->chartype] == ucp_Z || + c == CHAR_HT || c == CHAR_NL || c == CHAR_VT || + c == CHAR_FF || c == CHAR_CR; + break; + + case PT_WORD: + OK = _pcre_ucp_gentype[prop->chartype] == ucp_L || + _pcre_ucp_gentype[prop->chartype] == ucp_N || + c == CHAR_UNDERSCORE; + break; + /* Should never occur, but keep compilers from grumbling. */ default: @@ -1330,7 +1420,8 @@ break; case PT_LAMP: - OK = prop->chartype == ucp_Lu || prop->chartype == ucp_Ll || prop->chartype == ucp_Lt; + OK = prop->chartype == ucp_Lu || prop->chartype == ucp_Ll || + prop->chartype == ucp_Lt; break; case PT_GC: @@ -1345,6 +1436,30 @@ OK = prop->script == code[3]; break; + /* These are specials for combination cases. */ + + case PT_ALNUM: + OK = _pcre_ucp_gentype[prop->chartype] == ucp_L || + _pcre_ucp_gentype[prop->chartype] == ucp_N; + break; + + case PT_SPACE: /* Perl space */ + OK = _pcre_ucp_gentype[prop->chartype] == ucp_Z || + c == CHAR_HT || c == CHAR_NL || c == CHAR_FF || c == CHAR_CR; + break; + + case PT_PXSPACE: /* POSIX space */ + OK = _pcre_ucp_gentype[prop->chartype] == ucp_Z || + c == CHAR_HT || c == CHAR_NL || c == CHAR_VT || + c == CHAR_FF || c == CHAR_CR; + break; + + case PT_WORD: + OK = _pcre_ucp_gentype[prop->chartype] == ucp_L || + _pcre_ucp_gentype[prop->chartype] == ucp_N || + c == CHAR_UNDERSCORE; + break; + /* Should never occur, but keep compilers from grumbling. */ default: @@ -1577,7 +1692,8 @@ break; case PT_LAMP: - OK = prop->chartype == ucp_Lu || prop->chartype == ucp_Ll || prop->chartype == ucp_Lt; + OK = prop->chartype == ucp_Lu || prop->chartype == ucp_Ll || + prop->chartype == ucp_Lt; break; case PT_GC: @@ -1592,6 +1708,30 @@ OK = prop->script == code[5]; break; + /* These are specials for combination cases. */ + + case PT_ALNUM: + OK = _pcre_ucp_gentype[prop->chartype] == ucp_L || + _pcre_ucp_gentype[prop->chartype] == ucp_N; + break; + + case PT_SPACE: /* Perl space */ + OK = _pcre_ucp_gentype[prop->chartype] == ucp_Z || + c == CHAR_HT || c == CHAR_NL || c == CHAR_FF || c == CHAR_CR; + break; + + case PT_PXSPACE: /* POSIX space */ + OK = _pcre_ucp_gentype[prop->chartype] == ucp_Z || + c == CHAR_HT || c == CHAR_NL || c == CHAR_VT || + c == CHAR_FF || c == CHAR_CR; + break; + + case PT_WORD: + OK = _pcre_ucp_gentype[prop->chartype] == ucp_L || + _pcre_ucp_gentype[prop->chartype] == ucp_N || + c == CHAR_UNDERSCORE; + break; + /* Should never occur, but keep compilers from grumbling. */ default: @@ -2219,7 +2359,7 @@ points to the byte after the end of the class. If there is a quantifier, this is where it will be. */ - next_state_offset = ecode - start_code; + next_state_offset = (int)(ecode - start_code); switch (*ecode) { @@ -2290,7 +2430,7 @@ md, /* static match data */ code, /* this subexpression's code */ ptr, /* where we currently are */ - ptr - start_subject, /* start offset */ + (int)(ptr - start_subject), /* start offset */ local_offsets, /* offset vector */ sizeof(local_offsets)/sizeof(int), /* size of same */ local_workspace, /* workspace vector */ @@ -2299,8 +2439,9 @@ rlevel, /* function recursion level */ recursing); /* pass on regex recursion */ + if (rc == PCRE_ERROR_DFA_UITEM) return rc; if ((rc >= 0) == (codevalue == OP_ASSERT || codevalue == OP_ASSERTBACK)) - { ADD_ACTIVE(endasscode + LINK_SIZE + 1 - start_code, 0); } + { ADD_ACTIVE((int)(endasscode + LINK_SIZE + 1 - start_code), 0); } } break; @@ -2327,9 +2468,9 @@ cb.callout_number = code[LINK_SIZE+2]; cb.offset_vector = offsets; cb.subject = (PCRE_SPTR)start_subject; - cb.subject_length = end_subject - start_subject; - cb.start_match = current_subject - start_subject; - cb.current_position = ptr - start_subject; + cb.subject_length = (int)(end_subject - start_subject); + cb.start_match = (int)(current_subject - start_subject); + cb.current_position = (int)(ptr - start_subject); cb.pattern_position = GET(code, LINK_SIZE + 3); cb.next_item_length = GET(code, 3 + 2*LINK_SIZE); cb.capture_top = 1; @@ -2380,7 +2521,7 @@ md, /* fixed match data */ asscode, /* this subexpression's code */ ptr, /* where we currently are */ - ptr - start_subject, /* start offset */ + (int)(ptr - start_subject), /* start offset */ local_offsets, /* offset vector */ sizeof(local_offsets)/sizeof(int), /* size of same */ local_workspace, /* workspace vector */ @@ -2389,9 +2530,10 @@ rlevel, /* function recursion level */ recursing); /* pass on regex recursion */ + if (rc == PCRE_ERROR_DFA_UITEM) return rc; if ((rc >= 0) == (condcode == OP_ASSERT || condcode == OP_ASSERTBACK)) - { ADD_ACTIVE(endasscode + LINK_SIZE + 1 - start_code, 0); } + { ADD_ACTIVE((int)(endasscode + LINK_SIZE + 1 - start_code), 0); } else { ADD_ACTIVE(state_offset + codelink + LINK_SIZE + 1, 0); } } @@ -2412,7 +2554,7 @@ md, /* fixed match data */ start_code + GET(code, 1), /* this subexpression's code */ ptr, /* where we currently are */ - ptr - start_subject, /* start offset */ + (int)(ptr - start_subject), /* start offset */ local_offsets, /* offset vector */ sizeof(local_offsets)/sizeof(int), /* size of same */ local_workspace, /* workspace vector */ @@ -2464,7 +2606,7 @@ md, /* fixed match data */ code, /* this subexpression's code */ ptr, /* where we currently are */ - ptr - start_subject, /* start offset */ + (int)(ptr - start_subject), /* start offset */ local_offsets, /* offset vector */ sizeof(local_offsets)/sizeof(int), /* size of same */ local_workspace, /* workspace vector */ @@ -2481,7 +2623,8 @@ do { end_subpattern += GET(end_subpattern, 1); } while (*end_subpattern == OP_ALT); - next_state_offset = end_subpattern - start_code + LINK_SIZE + 1; + next_state_offset = + (int)(end_subpattern - start_code + LINK_SIZE + 1); /* If the end of this subpattern is KETRMAX or KETRMIN, we must arrange for the repeat state also to be added to the relevant list. @@ -2489,7 +2632,7 @@ repeat_state_offset = (*end_subpattern == OP_KETRMAX || *end_subpattern == OP_KETRMIN)? - end_subpattern - start_code - GET(end_subpattern, 1) : -1; + (int)(end_subpattern - start_code - GET(end_subpattern, 1)) : -1; /* If we have matched an empty string, add the next state at the current character pointer. This is important so that the duplicate @@ -2553,9 +2696,9 @@ cb.callout_number = code[1]; cb.offset_vector = offsets; cb.subject = (PCRE_SPTR)start_subject; - cb.subject_length = end_subject - start_subject; - cb.start_match = current_subject - start_subject; - cb.current_position = ptr - start_subject; + cb.subject_length = (int)(end_subject - start_subject); + cb.start_match = (int)(current_subject - start_subject); + cb.current_position = (int)(ptr - start_subject); cb.pattern_position = GET(code, 2); cb.next_item_length = GET(code, 2 + LINK_SIZE); cb.capture_top = 1; @@ -2606,8 +2749,8 @@ { if (offsetcount >= 2) { - offsets[0] = md->start_used_ptr - start_subject; - offsets[1] = end_subject - start_subject; + offsets[0] = (int)(md->start_used_ptr - start_subject); + offsets[1] = (int)(end_subject - start_subject); } match_count = PCRE_ERROR_PARTIAL; } @@ -2966,8 +3109,16 @@ while (current_subject < end_subject) { register unsigned int c = *current_subject; - if ((start_bits[c/8] & (1 << (c&7))) == 0) current_subject++; - else break; + if ((start_bits[c/8] & (1 << (c&7))) == 0) + { + current_subject++; +#ifdef SUPPORT_UTF8 + if (utf8) + while(current_subject < end_subject && + (*current_subject & 0xc0) == 0x80) current_subject++; +#endif + } + else break; } } } @@ -2989,7 +3140,7 @@ bytes to avoid spending too much time in this optimization. */ if (study != NULL && (study->flags & PCRE_STUDY_MINLEN) != 0 && - end_subject - current_subject < study->minlength) + (pcre_uint32)(end_subject - current_subject) < study->minlength) return PCRE_ERROR_NOMATCH; /* If req_byte is set, we know that that character must appear in the @@ . patch -p0 <<'@@ .' Index: pcre/pcre_exec.c ============================================================================ $ cvs diff -u -r1.1.1.3 -r1.1.1.3.2.1 pcre_exec.c --- pcre/pcre_exec.c 5 Dec 2009 13:53:53 -0000 1.1.1.3 +++ pcre/pcre_exec.c 23 Aug 2010 13:08:53 -0000 1.1.1.3.2.1 @@ -6,7 +6,7 @@ and semantics are as close as possible to those of the Perl 5 language. Written by Philip Hazel - Copyright (c) 1997-2009 University of Cambridge + Copyright (c) 1997-2010 University of Cambridge ----------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without @@ -71,10 +71,20 @@ /* Special internal returns from the match() function. Make them sufficiently negative to avoid the external error codes. */ -#define MATCH_COMMIT (-999) -#define MATCH_PRUNE (-998) -#define MATCH_SKIP (-997) -#define MATCH_THEN (-996) +#define MATCH_ACCEPT (-999) +#define MATCH_COMMIT (-998) +#define MATCH_PRUNE (-997) +#define MATCH_SKIP (-996) +#define MATCH_SKIP_ARG (-995) +#define MATCH_THEN (-994) + +/* This is a convenience macro for code that occurs many times. */ + +#define MRRETURN(ra) \ + { \ + md->mark = markptr; \ + RRETURN(ra); \ + } /* Maximum number of ints of offset to save on the stack for recursive calls. If the offset vector is bigger, malloc is used. This should be a multiple of 3, @@ -89,7 +99,7 @@ -#ifdef DEBUG +#ifdef PCRE_DEBUG /************************************************* * Debugging function to print chars * *************************************************/ @@ -141,7 +151,7 @@ { USPTR p = md->start_subject + md->offset_vector[offset]; -#ifdef DEBUG +#ifdef PCRE_DEBUG if (eptr >= md->end_subject) printf("matching subject <null>"); else @@ -245,20 +255,21 @@ RM21, RM22, RM23, RM24, RM25, RM26, RM27, RM28, RM29, RM30, RM31, RM32, RM33, RM34, RM35, RM36, RM37, RM38, RM39, RM40, RM41, RM42, RM43, RM44, RM45, RM46, RM47, RM48, RM49, RM50, - RM51, RM52, RM53, RM54 }; + RM51, RM52, RM53, RM54, RM55, RM56, RM57, RM58, RM59, RM60, + RM61, RM62 }; /* These versions of the macros use the stack, as normal. There are debugging versions and production versions. Note that the "rw" argument of RMATCH isn't -actuall used in this definition. */ +actually used in this definition. */ #ifndef NO_RECURSE #define REGISTER register -#ifdef DEBUG +#ifdef PCRE_DEBUG #define RMATCH(ra,rb,rc,rd,re,rf,rg,rw) \ { \ printf("match() called in line %d\n", __LINE__); \ - rrc = match(ra,rb,mstart,rc,rd,re,rf,rg,rdepth+1); \ + rrc = match(ra,rb,mstart,markptr,rc,rd,re,rf,rg,rdepth+1); \ printf("to line %d\n", __LINE__); \ } #define RRETURN(ra) \ @@ -268,7 +279,7 @@ } #else #define RMATCH(ra,rb,rc,rd,re,rf,rg,rw) \ - rrc = match(ra,rb,mstart,rc,rd,re,rf,rg,rdepth+1) + rrc = match(ra,rb,mstart,markptr,rc,rd,re,rf,rg,rdepth+1) #define RRETURN(ra) return ra #endif @@ -284,10 +295,12 @@ #define RMATCH(ra,rb,rc,rd,re,rf,rg,rw)\ {\ heapframe *newframe = (pcre_stack_malloc)(sizeof(heapframe));\ + if (newframe == NULL) RRETURN(PCRE_ERROR_NOMEMORY);\ frame->Xwhere = rw; \ newframe->Xeptr = ra;\ newframe->Xecode = rb;\ newframe->Xmstart = mstart;\ + newframe->Xmarkptr = markptr;\ newframe->Xoffset_top = rc;\ newframe->Xims = re;\ newframe->Xeptrb = rf;\ @@ -303,9 +316,9 @@ #define RRETURN(ra)\ {\ - heapframe *newframe = frame;\ - frame = newframe->Xprevframe;\ - (pcre_stack_free)(newframe);\ + heapframe *oldframe = frame;\ + frame = oldframe->Xprevframe;\ + (pcre_stack_free)(oldframe);\ if (frame != NULL)\ {\ rrc = ra;\ @@ -325,6 +338,7 @@ USPTR Xeptr; const uschar *Xecode; USPTR Xmstart; + USPTR Xmarkptr; int Xoffset_top; long int Xims; eptrblock *Xeptrb; @@ -411,14 +425,14 @@ if (md->partial != 0 && eptr >= md->end_subject && eptr > mstart)\ {\ md->hitend = TRUE;\ - if (md->partial > 1) RRETURN(PCRE_ERROR_PARTIAL);\ + if (md->partial > 1) MRRETURN(PCRE_ERROR_PARTIAL);\ } #define SCHECK_PARTIAL()\ if (md->partial != 0 && eptr > mstart)\ {\ md->hitend = TRUE;\ - if (md->partial > 1) RRETURN(PCRE_ERROR_PARTIAL);\ + if (md->partial > 1) MRRETURN(PCRE_ERROR_PARTIAL);\ } @@ -432,6 +446,7 @@ ecode pointer to current position in compiled code mstart pointer to the current match start position (can be modified by encountering \K) + markptr pointer to the most recent MARK name, or NULL offset_top current top pointer md pointer to "static" info for the match ims current /i, /m, and /s options @@ -445,14 +460,15 @@ Returns: MATCH_MATCH if matched ) these values are >= 0 MATCH_NOMATCH if failed to match ) + a negative MATCH_xxx value for PRUNE, SKIP, etc a negative PCRE_ERROR_xxx value if aborted by an error condition (e.g. stopped by repeated call or recursion limit) */ static int match(REGISTER USPTR eptr, REGISTER const uschar *ecode, USPTR mstart, - int offset_top, match_data *md, unsigned long int ims, eptrblock *eptrb, - int flags, unsigned int rdepth) + const uschar *markptr, int offset_top, match_data *md, unsigned long int ims, + eptrblock *eptrb, int flags, unsigned int rdepth) { /* These variables do not need to be preserved over recursion in this function, so they can be ordinary variables in all cases. Mark some of them with @@ -473,6 +489,7 @@ #ifdef NO_RECURSE heapframe *frame = (pcre_stack_malloc)(sizeof(heapframe)); +if (frame == NULL) RRETURN(PCRE_ERROR_NOMEMORY); frame->Xprevframe = NULL; /* Marks the top level */ /* Copy in the original argument variables */ @@ -480,6 +497,7 @@ frame->Xeptr = eptr; frame->Xecode = ecode; frame->Xmstart = mstart; +frame->Xmarkptr = markptr; frame->Xoffset_top = offset_top; frame->Xims = ims; frame->Xeptrb = eptrb; @@ -495,6 +513,7 @@ #define eptr frame->Xeptr #define ecode frame->Xecode #define mstart frame->Xmstart +#define markptr frame->Xmarkptr #define offset_top frame->Xoffset_top #define ims frame->Xims #define eptrb frame->Xeptrb @@ -622,7 +641,7 @@ /* OK, now we can get on with the real code of the function. Recursive calls are specified by the macro RMATCH and RRETURN is used to return. When NO_RECURSE is *not* defined, these just turn into a recursive call to match() -and a "return", respectively (possibly with some debugging if DEBUG is +and a "return", respectively (possibly with some debugging if PCRE_DEBUG is defined). However, RMATCH isn't like a function call because it's quite a complicated macro. It has to be used in one particular way. This shouldn't, however, impact performance when true recursion is being used. */ @@ -666,32 +685,81 @@ switch(op) { + case OP_MARK: + markptr = ecode + 2; + RMATCH(eptr, ecode + _pcre_OP_lengths[*ecode] + ecode[1], offset_top, md, + ims, eptrb, flags, RM55); + + /* A return of MATCH_SKIP_ARG means that matching failed at SKIP with an + argument, and we must check whether that argument matches this MARK's + argument. It is passed back in md->start_match_ptr (an overloading of that + variable). If it does match, we reset that variable to the current subject + position and return MATCH_SKIP. Otherwise, pass back the return code + unaltered. */ + + if (rrc == MATCH_SKIP_ARG && + strcmp((char *)markptr, (char *)(md->start_match_ptr)) == 0) + { + md->start_match_ptr = eptr; + RRETURN(MATCH_SKIP); + } + + if (md->mark == NULL) md->mark = markptr; + RRETURN(rrc); + case OP_FAIL: - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); + + case OP_COMMIT: + RMATCH(eptr, ecode + _pcre_OP_lengths[*ecode], offset_top, md, + ims, eptrb, flags, RM52); + if (rrc != MATCH_NOMATCH) RRETURN(rrc); + MRRETURN(MATCH_COMMIT); case OP_PRUNE: RMATCH(eptr, ecode + _pcre_OP_lengths[*ecode], offset_top, md, ims, eptrb, flags, RM51); if (rrc != MATCH_NOMATCH) RRETURN(rrc); - RRETURN(MATCH_PRUNE); + MRRETURN(MATCH_PRUNE); - case OP_COMMIT: - RMATCH(eptr, ecode + _pcre_OP_lengths[*ecode], offset_top, md, - ims, eptrb, flags, RM52); + case OP_PRUNE_ARG: + RMATCH(eptr, ecode + _pcre_OP_lengths[*ecode] + ecode[1], offset_top, md, + ims, eptrb, flags, RM56); if (rrc != MATCH_NOMATCH) RRETURN(rrc); - RRETURN(MATCH_COMMIT); + md->mark = ecode + 2; + RRETURN(MATCH_PRUNE); case OP_SKIP: RMATCH(eptr, ecode + _pcre_OP_lengths[*ecode], offset_top, md, ims, eptrb, flags, RM53); if (rrc != MATCH_NOMATCH) RRETURN(rrc); md->start_match_ptr = eptr; /* Pass back current position */ - RRETURN(MATCH_SKIP); + MRRETURN(MATCH_SKIP); + + case OP_SKIP_ARG: + RMATCH(eptr, ecode + _pcre_OP_lengths[*ecode] + ecode[1], offset_top, md, + ims, eptrb, flags, RM57); + if (rrc != MATCH_NOMATCH) RRETURN(rrc); + + /* Pass back the current skip name by overloading md->start_match_ptr and + returning the special MATCH_SKIP_ARG return code. This will either be + caught by a matching MARK, or get to the top, where it is treated the same + as PRUNE. */ + + md->start_match_ptr = ecode + 2; + RRETURN(MATCH_SKIP_ARG); case OP_THEN: RMATCH(eptr, ecode + _pcre_OP_lengths[*ecode], offset_top, md, ims, eptrb, flags, RM54); if (rrc != MATCH_NOMATCH) RRETURN(rrc); + MRRETURN(MATCH_THEN); + + case OP_THEN_ARG: + RMATCH(eptr, ecode + _pcre_OP_lengths[*ecode] + ecode[1], offset_top, md, + ims, eptrb, flags, RM58); + if (rrc != MATCH_NOMATCH) RRETURN(rrc); + md->mark = ecode + 2; RRETURN(MATCH_THEN); /* Handle a capturing bracket. If there is space in the offset vector, save @@ -713,7 +781,7 @@ number = GET2(ecode, 1+LINK_SIZE); offset = number << 1; -#ifdef DEBUG +#ifdef PCRE_DEBUG printf("start bracket %d\n", number); printf("subject="); pchars(eptr, 16, TRUE, md); @@ -728,7 +796,8 @@ save_capture_last = md->capture_last; DPRINTF(("saving %d %d %d\n", save_offset1, save_offset2, save_offset3)); - md->offset_vector[md->offset_end - number] = eptr - md->start_subject; + md->offset_vector[md->offset_end - number] = + (int)(eptr - md->start_subject); flags = (op == OP_SCBRA)? match_cbegroup : 0; do @@ -747,6 +816,7 @@ md->offset_vector[offset+1] = save_offset2; md->offset_vector[md->offset_end - number] = save_offset3; + if (rrc != MATCH_THEN) md->mark = markptr; RRETURN(MATCH_NOMATCH); } @@ -786,6 +856,7 @@ RMATCH(eptr, ecode + _pcre_OP_lengths[*ecode], offset_top, md, ims, eptrb, flags, RM48); + if (rrc == MATCH_NOMATCH) md->mark = markptr; RRETURN(rrc); } @@ -821,15 +892,15 @@ cb.callout_number = ecode[LINK_SIZE+2]; cb.offset_vector = md->offset_vector; cb.subject = (PCRE_SPTR)md->start_subject; - cb.subject_length = md->end_subject - md->start_subject; - cb.start_match = mstart - md->start_subject; - cb.current_position = eptr - md->start_subject; + cb.subject_length = (int)(md->end_subject - md->start_subject); + cb.start_match = (int)(mstart - md->start_subject); + cb.current_position = (int)(eptr - md->start_subject); cb.pattern_position = GET(ecode, LINK_SIZE + 3); cb.next_item_length = GET(ecode, 3 + 2*LINK_SIZE); cb.capture_top = offset_top/2; cb.capture_last = md->capture_last; cb.callout_data = md->callout_data; - if ((rrc = (*pcre_callout)(&cb)) > 0) RRETURN(MATCH_NOMATCH); + if ((rrc = (*pcre_callout)(&cb)) > 0) MRRETURN(MATCH_NOMATCH); if (rrc < 0) RRETURN(rrc); } ecode += _pcre_OP_lengths[OP_CALLOUT]; @@ -1039,7 +1110,7 @@ number = GET2(ecode, 1); offset = number << 1; -#ifdef DEBUG +#ifdef PCRE_DEBUG printf("end bracket %d at *ACCEPT", number); printf("\n"); #endif @@ -1049,7 +1120,7 @@ { md->offset_vector[offset] = md->offset_vector[md->offset_end - number]; - md->offset_vector[offset+1] = eptr - md->start_subject; + md->offset_vector[offset+1] = (int)(eptr - md->start_subject); if (offset_top <= offset) offset_top = offset + 2; } ecode += 3; @@ -1070,7 +1141,6 @@ memmove(md->offset_vector, rec->offset_save, rec->saved_max * sizeof(int)); offset_top = rec->save_offset_top; - mstart = rec->save_start; ims = original_ims; ecode = rec->after_call; break; @@ -1085,14 +1155,19 @@ (md->notempty || (md->notempty_atstart && mstart == md->start_subject + md->start_offset))) - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); /* Otherwise, we have a match. */ md->end_match_ptr = eptr; /* Record where we ended */ md->end_offset_top = offset_top; /* and how many extracts were taken */ md->start_match_ptr = mstart; /* and the start (\K can modify) */ - RRETURN(MATCH_MATCH); + + /* For some reason, the macros don't work properly if an expression is + given as the argument to MRRETURN when the heap is in use. */ + + rrc = (op == OP_END)? MATCH_MATCH : MATCH_ACCEPT; + MRRETURN(rrc); /* Change option settings */ @@ -1114,12 +1189,16 @@ { RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, ims, NULL, 0, RM4); - if (rrc == MATCH_MATCH) break; + if (rrc == MATCH_MATCH || rrc == MATCH_ACCEPT) + { + mstart = md->start_match_ptr; /* In case \K reset it */ + break; + } if (rrc != MATCH_NOMATCH && rrc != MATCH_THEN) RRETURN(rrc); ecode += GET(ecode, 1); } while (*ecode == OP_ALT); - if (*ecode == OP_KET) RRETURN(MATCH_NOMATCH); + if (*ecode == OP_KET) MRRETURN(MATCH_NOMATCH); /* If checking an assertion for a condition, return MATCH_MATCH. */ @@ -1133,7 +1212,9 @@ offset_top = md->end_offset_top; continue; - /* Negative assertion: all branches must fail to match */ + /* Negative assertion: all branches must fail to match. Encountering SKIP, + PRUNE, or COMMIT means we must assume failure without checking subsequent + branches. */ case OP_ASSERT_NOT: case OP_ASSERTBACK_NOT: @@ -1141,7 +1222,12 @@ { RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, ims, NULL, 0, RM5); - if (rrc == MATCH_MATCH) RRETURN(MATCH_NOMATCH); + if (rrc == MATCH_MATCH || rrc == MATCH_ACCEPT) MRRETURN(MATCH_NOMATCH); + if (rrc == MATCH_SKIP || rrc == MATCH_PRUNE || rrc == MATCH_COMMIT) + { + do ecode += GET(ecode,1); while (*ecode == OP_ALT); + break; + } if (rrc != MATCH_NOMATCH && rrc != MATCH_THEN) RRETURN(rrc); ecode += GET(ecode,1); } @@ -1165,7 +1251,7 @@ while (i-- > 0) { eptr--; - if (eptr < md->start_subject) RRETURN(MATCH_NOMATCH); + if (eptr < md->start_subject) MRRETURN(MATCH_NOMATCH); BACKCHAR(eptr); } } @@ -1176,7 +1262,7 @@ { eptr -= GET(ecode, 1); - if (eptr < md->start_subject) RRETURN(MATCH_NOMATCH); + if (eptr < md->start_subject) MRRETURN(MATCH_NOMATCH); } /* Save the earliest consulted character, then skip to next op code */ @@ -1197,15 +1283,15 @@ cb.callout_number = ecode[1]; cb.offset_vector = md->offset_vector; cb.subject = (PCRE_SPTR)md->start_subject; - cb.subject_length = md->end_subject - md->start_subject; - cb.start_match = mstart - md->start_subject; - cb.current_position = eptr - md->start_subject; + cb.subject_length = (int)(md->end_subject - md->start_subject); + cb.start_match = (int)(mstart - md->start_subject); + cb.current_position = (int)(eptr - md->start_subject); cb.pattern_position = GET(ecode, 2); cb.next_item_length = GET(ecode, 2 + LINK_SIZE); cb.capture_top = offset_top/2; cb.capture_last = md->capture_last; cb.callout_data = md->callout_data; - if ((rrc = (*pcre_callout)(&cb)) > 0) RRETURN(MATCH_NOMATCH); + if ((rrc = (*pcre_callout)(&cb)) > 0) MRRETURN(MATCH_NOMATCH); if (rrc < 0) RRETURN(rrc); } ecode += 2 + 2*LINK_SIZE; @@ -1260,9 +1346,7 @@ memcpy(new_recursive.offset_save, md->offset_vector, new_recursive.saved_max * sizeof(int)); - new_recursive.save_start = mstart; new_recursive.save_offset_top = offset_top; - mstart = eptr; /* OK, now we can do the recursion. For each top-level alternative we restore the offset and recursion data. */ @@ -1273,13 +1357,13 @@ { RMATCH(eptr, callpat + _pcre_OP_lengths[*callpat], offset_top, md, ims, eptrb, flags, RM6); - if (rrc == MATCH_MATCH) + if (rrc == MATCH_MATCH || rrc == MATCH_ACCEPT) { DPRINTF(("Recursion matched\n")); md->recursive = new_recursive.prevrec; if (new_recursive.offset_save != stacksave) (pcre_free)(new_recursive.offset_save); - RRETURN(MATCH_MATCH); + MRRETURN(MATCH_MATCH); } else if (rrc != MATCH_NOMATCH && rrc != MATCH_THEN) { @@ -1300,7 +1384,7 @@ md->recursive = new_recursive.prevrec; if (new_recursive.offset_save != stacksave) (pcre_free)(new_recursive.offset_save); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } /* Control never reaches here */ @@ -1309,7 +1393,8 @@ a move back into the brackets. Friedl calls these "atomic" subpatterns. Check the alternative branches in turn - the matching won't pass the KET for this kind of subpattern. If any one branch matches, we carry on as at - the end of a normal bracket, leaving the subject pointer. */ + the end of a normal bracket, leaving the subject pointer, but resetting + the start-of-match value in case it was changed by \K. */ case OP_ONCE: prev = ecode; @@ -1318,7 +1403,11 @@ do { RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, ims, eptrb, 0, RM7); - if (rrc == MATCH_MATCH) break; + if (rrc == MATCH_MATCH) /* Note: _not_ MATCH_ACCEPT */ + { + mstart = md->start_match_ptr; + break; + } if (rrc != MATCH_NOMATCH && rrc != MATCH_THEN) RRETURN(rrc); ecode += GET(ecode,1); } @@ -1437,9 +1526,10 @@ } else saved_eptr = NULL; - /* If we are at the end of an assertion group, stop matching and return - MATCH_MATCH, but record the current high water mark for use by positive - assertions. Do this also for the "once" (atomic) groups. */ + /* If we are at the end of an assertion group or an atomic group, stop + matching and return MATCH_MATCH, but record the current high water mark for + use by positive assertions. We also need to record the match start in case + it was changed by \K. */ if (*prev == OP_ASSERT || *prev == OP_ASSERT_NOT || *prev == OP_ASSERTBACK || *prev == OP_ASSERTBACK_NOT || @@ -1447,7 +1537,8 @@ { md->end_match_ptr = eptr; /* For ONCE */ md->end_offset_top = offset_top; - RRETURN(MATCH_MATCH); + md->start_match_ptr = mstart; + MRRETURN(MATCH_MATCH); } /* For capturing groups we have to check the group number back at the start @@ -1461,7 +1552,7 @@ number = GET2(prev, 1+LINK_SIZE); offset = number << 1; -#ifdef DEBUG +#ifdef PCRE_DEBUG printf("end bracket %d", number); printf("\n"); #endif @@ -1471,7 +1562,7 @@ { md->offset_vector[offset] = md->offset_vector[md->offset_end - number]; - md->offset_vector[offset+1] = eptr - md->start_subject; + md->offset_vector[offset+1] = (int)(eptr - md->start_subject); if (offset_top <= offset) offset_top = offset + 2; } @@ -1483,7 +1574,6 @@ recursion_info *rec = md->recursive; DPRINTF(("Recursion (%d) succeeded - continuing\n", number)); md->recursive = rec->prevrec; - mstart = rec->save_start; memcpy(md->offset_vector, rec->offset_save, rec->saved_max * sizeof(int)); offset_top = rec->save_offset_top; @@ -1543,12 +1633,12 @@ /* Start of subject unless notbol, or after internal newline if multiline */ case OP_CIRC: - if (md->notbol && eptr == md->start_subject) RRETURN(MATCH_NOMATCH); + if (md->notbol && eptr == md->start_subject) MRRETURN(MATCH_NOMATCH); if ((ims & PCRE_MULTILINE) != 0) { if (eptr != md->start_subject && (eptr == md->end_subject || !WAS_NEWLINE(eptr))) - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); ecode++; break; } @@ -1557,14 +1647,14 @@ /* Start of subject assertion */ case OP_SOD: - if (eptr != md->start_subject) RRETURN(MATCH_NOMATCH); + if (eptr != md->start_subject) MRRETURN(MATCH_NOMATCH); ecode++; break; /* Start of match assertion */ case OP_SOM: - if (eptr != md->start_subject + md->start_offset) RRETURN(MATCH_NOMATCH); + if (eptr != md->start_subject + md->start_offset) MRRETURN(MATCH_NOMATCH); ecode++; break; @@ -1582,20 +1672,20 @@ if ((ims & PCRE_MULTILINE) != 0) { if (eptr < md->end_subject) - { if (!IS_NEWLINE(eptr)) RRETURN(MATCH_NOMATCH); } + { if (!IS_NEWLINE(eptr)) MRRETURN(MATCH_NOMATCH); } else - { if (md->noteol) RRETURN(MATCH_NOMATCH); } + { if (md->noteol) MRRETURN(MATCH_NOMATCH); } ecode++; break; } else { - if (md->noteol) RRETURN(MATCH_NOMATCH); + if (md->noteol) MRRETURN(MATCH_NOMATCH); if (!md->endonly) { if (eptr != md->end_subject && (!IS_NEWLINE(eptr) || eptr != md->end_subject - md->nllen)) - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); ecode++; break; } @@ -1605,7 +1695,7 @@ /* End of subject assertion (\z) */ case OP_EOD: - if (eptr < md->end_subject) RRETURN(MATCH_NOMATCH); + if (eptr < md->end_subject) MRRETURN(MATCH_NOMATCH); ecode++; break; @@ -1614,7 +1704,7 @@ case OP_EODN: if (eptr != md->end_subject && (!IS_NEWLINE(eptr) || eptr != md->end_subject - md->nllen)) - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); ecode++; break; @@ -1632,14 +1722,30 @@ #ifdef SUPPORT_UTF8 if (utf8) { + /* Get status of previous character */ + if (eptr == md->start_subject) prev_is_word = FALSE; else { USPTR lastptr = eptr - 1; while((*lastptr & 0xc0) == 0x80) lastptr--; if (lastptr < md->start_used_ptr) md->start_used_ptr = lastptr; GETCHAR(c, lastptr); +#ifdef SUPPORT_UCP + if (md->use_ucp) + { + if (c == '_') prev_is_word = TRUE; else + { + int cat = UCD_CATEGORY(c); + prev_is_word = (cat == ucp_L || cat == ucp_N); + } + } + else +#endif prev_is_word = c < 256 && (md->ctypes[c] & ctype_word) != 0; } + + /* Get status of next character */ + if (eptr >= md->end_subject) { SCHECK_PARTIAL(); @@ -1648,47 +1754,89 @@ else { GETCHAR(c, eptr); +#ifdef SUPPORT_UCP + if (md->use_ucp) + { + if (c == '_') cur_is_word = TRUE; else + { + int cat = UCD_CATEGORY(c); + cur_is_word = (cat == ucp_L || cat == ucp_N); + } + } + else +#endif cur_is_word = c < 256 && (md->ctypes[c] & ctype_word) != 0; } } else #endif - /* Not in UTF-8 mode */ + /* Not in UTF-8 mode, but we may still have PCRE_UCP set, and for + consistency with the behaviour of \w we do use it in this case. */ { + /* Get status of previous character */ + if (eptr == md->start_subject) prev_is_word = FALSE; else { if (eptr <= md->start_used_ptr) md->start_used_ptr = eptr - 1; +#ifdef SUPPORT_UCP + if (md->use_ucp) + { + c = eptr[-1]; + if (c == '_') prev_is_word = TRUE; else + { + int cat = UCD_CATEGORY(c); + prev_is_word = (cat == ucp_L || cat == ucp_N); + } + } + else +#endif prev_is_word = ((md->ctypes[eptr[-1]] & ctype_word) != 0); } + + /* Get status of next character */ + if (eptr >= md->end_subject) { SCHECK_PARTIAL(); cur_is_word = FALSE; } - else cur_is_word = ((md->ctypes[*eptr] & ctype_word) != 0); + else +#ifdef SUPPORT_UCP + if (md->use_ucp) + { + c = *eptr; + if (c == '_') cur_is_word = TRUE; else + { + int cat = UCD_CATEGORY(c); + cur_is_word = (cat == ucp_L || cat == ucp_N); + } + } + else +#endif + cur_is_word = ((md->ctypes[*eptr] & ctype_word) != 0); } /* Now see if the situation is what we want */ if ((*ecode++ == OP_WORD_BOUNDARY)? cur_is_word == prev_is_word : cur_is_word != prev_is_word) - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } break; /* Match a single character type; inline for speed */ case OP_ANY: - if (IS_NEWLINE(eptr)) RRETURN(MATCH_NOMATCH); + if (IS_NEWLINE(eptr)) MRRETURN(MATCH_NOMATCH); /* Fall through */ case OP_ALLANY: if (eptr++ >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } if (utf8) while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++; ecode++; @@ -1701,7 +1849,7 @@ if (eptr++ >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } ecode++; break; @@ -1710,7 +1858,7 @@ if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } GETCHARINCTEST(c, eptr); if ( @@ -1719,7 +1867,7 @@ #endif (md->ctypes[c] & ctype_digit) != 0 ) - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); ecode++; break; @@ -1727,7 +1875,7 @@ if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } GETCHARINCTEST(c, eptr); if ( @@ -1736,7 +1884,7 @@ #endif (md->ctypes[c] & ctype_digit) == 0 ) - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); ecode++; break; @@ -1744,7 +1892,7 @@ if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } GETCHARINCTEST(c, eptr); if ( @@ -1753,7 +1901,7 @@ #endif (md->ctypes[c] & ctype_space) != 0 ) - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); ecode++; break; @@ -1761,7 +1909,7 @@ if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } GETCHARINCTEST(c, eptr); if ( @@ -1770,7 +1918,7 @@ #endif (md->ctypes[c] & ctype_space) == 0 ) - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); ecode++; break; @@ -1778,7 +1926,7 @@ if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } GETCHARINCTEST(c, eptr); if ( @@ -1787,7 +1935,7 @@ #endif (md->ctypes[c] & ctype_word) != 0 ) - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); ecode++; break; @@ -1795,7 +1943,7 @@ if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } GETCHARINCTEST(c, eptr); if ( @@ -1804,7 +1952,7 @@ #endif (md->ctypes[c] & ctype_word) == 0 ) - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); ecode++; break; @@ -1812,12 +1960,12 @@ if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } GETCHARINCTEST(c, eptr); switch(c) { - default: RRETURN(MATCH_NOMATCH); + default: MRRETURN(MATCH_NOMATCH); case 0x000d: if (eptr < md->end_subject && *eptr == 0x0a) eptr++; break; @@ -1830,7 +1978,7 @@ case 0x0085: case 0x2028: case 0x2029: - if (md->bsr_anycrlf) RRETURN(MATCH_NOMATCH); + if (md->bsr_anycrlf) MRRETURN(MATCH_NOMATCH); break; } ecode++; @@ -1840,7 +1988,7 @@ if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } GETCHARINCTEST(c, eptr); switch(c) @@ -1865,7 +2013,7 @@ case 0x202f: /* NARROW NO-BREAK SPACE */ case 0x205f: /* MEDIUM MATHEMATICAL SPACE */ case 0x3000: /* IDEOGRAPHIC SPACE */ - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } ecode++; break; @@ -1874,12 +2022,12 @@ if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } GETCHARINCTEST(c, eptr); switch(c) { - default: RRETURN(MATCH_NOMATCH); + default: MRRETURN(MATCH_NOMATCH); case 0x09: /* HT */ case 0x20: /* SPACE */ case 0xa0: /* NBSP */ @@ -1908,7 +2056,7 @@ if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } GETCHARINCTEST(c, eptr); switch(c) @@ -1921,7 +2069,7 @@ case 0x85: /* NEL */ case 0x2028: /* LINE SEPARATOR */ case 0x2029: /* PARAGRAPH SEPARATOR */ - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } ecode++; break; @@ -1930,12 +2078,12 @@ if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } GETCHARINCTEST(c, eptr); switch(c) { - default: RRETURN(MATCH_NOMATCH); + default: MRRETURN(MATCH_NOMATCH); case 0x0a: /* LF */ case 0x0b: /* VT */ case 0x0c: /* FF */ @@ -1957,7 +2105,7 @@ if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } GETCHARINCTEST(c, eptr); { @@ -1966,31 +2114,63 @@ switch(ecode[1]) { case PT_ANY: - if (op == OP_NOTPROP) RRETURN(MATCH_NOMATCH); + if (op == OP_NOTPROP) MRRETURN(MATCH_NOMATCH); break; case PT_LAMP: if ((prop->chartype == ucp_Lu || prop->chartype == ucp_Ll || prop->chartype == ucp_Lt) == (op == OP_NOTPROP)) - RRETURN(MATCH_NOMATCH); - break; + MRRETURN(MATCH_NOMATCH); + break; case PT_GC: if ((ecode[2] != _pcre_ucp_gentype[prop->chartype]) == (op == OP_PROP)) - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); break; case PT_PC: if ((ecode[2] != prop->chartype) == (op == OP_PROP)) - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); break; case PT_SC: if ((ecode[2] != prop->script) == (op == OP_PROP)) - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); break; + /* These are specials */ + + case PT_ALNUM: + if ((_pcre_ucp_gentype[prop->chartype] == ucp_L || + _pcre_ucp_gentype[prop->chartype] == ucp_N) == (op == OP_NOTPROP)) + MRRETURN(MATCH_NOMATCH); + break; + + case PT_SPACE: /* Perl space */ + if ((_pcre_ucp_gentype[prop->chartype] == ucp_Z || + c == CHAR_HT || c == CHAR_NL || c == CHAR_FF || c == CHAR_CR) + == (op == OP_NOTPROP)) + MRRETURN(MATCH_NOMATCH); + break; + + case PT_PXSPACE: /* POSIX space */ + if ((_pcre_ucp_gentype[prop->chartype] == ucp_Z || + c == CHAR_HT || c == CHAR_NL || c == CHAR_VT || + c == CHAR_FF || c == CHAR_CR) + == (op == OP_NOTPROP)) + MRRETURN(MATCH_NOMATCH); + break; + + case PT_WORD: + if ((_pcre_ucp_gentype[prop->chartype] == ucp_L || + _pcre_ucp_gentype[prop->chartype] == ucp_N || + c == CHAR_UNDERSCORE) == (op == OP_NOTPROP)) + MRRETURN(MATCH_NOMATCH); + break; + + /* This should never occur */ + default: RRETURN(PCRE_ERROR_INTERNAL); } @@ -2006,12 +2186,12 @@ if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } GETCHARINCTEST(c, eptr); { int category = UCD_CATEGORY(c); - if (category == ucp_M) RRETURN(MATCH_NOMATCH); + if (category == ucp_M) MRRETURN(MATCH_NOMATCH); while (eptr < md->end_subject) { int len = 1; @@ -2056,7 +2236,7 @@ referenced subpattern. */ if (offset >= offset_top || md->offset_vector[offset] < 0) - length = (md->jscript_compat)? 0 : md->end_subject - eptr + 1; + length = (md->jscript_compat)? 0 : (int)(md->end_subject - eptr + 1); else length = md->offset_vector[offset+1] - md->offset_vector[offset]; @@ -2090,7 +2270,7 @@ if (!match_ref(offset, eptr, length, md, ims)) { CHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } eptr += length; continue; /* With the main loop */ @@ -2110,7 +2290,7 @@ if (!match_ref(offset, eptr, length, md, ims)) { CHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } eptr += length; } @@ -2128,11 +2308,11 @@ { RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM14); if (rrc != MATCH_NOMATCH) RRETURN(rrc); - if (fi >= max) RRETURN(MATCH_NOMATCH); + if (fi >= max) MRRETURN(MATCH_NOMATCH); if (!match_ref(offset, eptr, length, md, ims)) { CHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } eptr += length; } @@ -2159,7 +2339,7 @@ if (rrc != MATCH_NOMATCH) RRETURN(rrc); eptr -= length; } - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } } /* Control never gets here */ @@ -2221,16 +2401,16 @@ if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } GETCHARINC(c, eptr); if (c > 255) { - if (op == OP_CLASS) RRETURN(MATCH_NOMATCH); + if (op == OP_CLASS) MRRETURN(MATCH_NOMATCH); } else { - if ((data[c/8] & (1 << (c&7))) == 0) RRETURN(MATCH_NOMATCH); + if ((data[c/8] & (1 << (c&7))) == 0) MRRETURN(MATCH_NOMATCH); } } } @@ -2243,10 +2423,10 @@ if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } c = *eptr++; - if ((data[c/8] & (1 << (c&7))) == 0) RRETURN(MATCH_NOMATCH); + if ((data[c/8] & (1 << (c&7))) == 0) MRRETURN(MATCH_NOMATCH); } } @@ -2268,20 +2448,20 @@ { RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM16); if (rrc != MATCH_NOMATCH) RRETURN(rrc); - if (fi >= max) RRETURN(MATCH_NOMATCH); + if (fi >= max) MRRETURN(MATCH_NOMATCH); if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } GETCHARINC(c, eptr); if (c > 255) { - if (op == OP_CLASS) RRETURN(MATCH_NOMATCH); + if (op == OP_CLASS) MRRETURN(MATCH_NOMATCH); } else { - if ((data[c/8] & (1 << (c&7))) == 0) RRETURN(MATCH_NOMATCH); + if ((data[c/8] & (1 << (c&7))) == 0) MRRETURN(MATCH_NOMATCH); } } } @@ -2293,14 +2473,14 @@ { RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM17); if (rrc != MATCH_NOMATCH) RRETURN(rrc); - if (fi >= max) RRETURN(MATCH_NOMATCH); + if (fi >= max) MRRETURN(MATCH_NOMATCH); if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } c = *eptr++; - if ((data[c/8] & (1 << (c&7))) == 0) RRETURN(MATCH_NOMATCH); + if ((data[c/8] & (1 << (c&7))) == 0) MRRETURN(MATCH_NOMATCH); } } /* Control never gets here */ @@ -2366,7 +2546,7 @@ } } - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } } /* Control never gets here */ @@ -2418,10 +2598,10 @@ if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } GETCHARINCTEST(c, eptr); - if (!_pcre_xclass(c, data)) RRETURN(MATCH_NOMATCH); + if (!_pcre_xclass(c, data)) MRRETURN(MATCH_NOMATCH); } /* If max == min we can continue with the main loop without the @@ -2438,14 +2618,14 @@ { RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM20); if (rrc != MATCH_NOMATCH) RRETURN(rrc); - if (fi >= max) RRETURN(MATCH_NOMATCH); + if (fi >= max) MRRETURN(MATCH_NOMATCH); if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } GETCHARINCTEST(c, eptr); - if (!_pcre_xclass(c, data)) RRETURN(MATCH_NOMATCH); + if (!_pcre_xclass(c, data)) MRRETURN(MATCH_NOMATCH); } /* Control never gets here */ } @@ -2474,7 +2654,7 @@ if (eptr-- == pp) break; /* Stop if tried at original pos */ if (utf8) BACKCHAR(eptr); } - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } /* Control never gets here */ @@ -2493,9 +2673,9 @@ if (length > md->end_subject - eptr) { CHECK_PARTIAL(); /* Not SCHECK_PARTIAL() */ - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } - while (length-- > 0) if (*ecode++ != *eptr++) RRETURN(MATCH_NOMATCH); + while (length-- > 0) if (*ecode++ != *eptr++) MRRETURN(MATCH_NOMATCH); } else #endif @@ -2505,9 +2685,9 @@ if (md->end_subject - eptr < 1) { SCHECK_PARTIAL(); /* This one can use SCHECK_PARTIAL() */ - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } - if (ecode[1] != *eptr++) RRETURN(MATCH_NOMATCH); + if (ecode[1] != *eptr++) MRRETURN(MATCH_NOMATCH); ecode += 2; } break; @@ -2525,7 +2705,7 @@ if (length > md->end_subject - eptr) { CHECK_PARTIAL(); /* Not SCHECK_PARTIAL() */ - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } /* If the pattern character's value is < 128, we have only one byte, and @@ -2533,7 +2713,7 @@ if (fc < 128) { - if (md->lcc[*ecode++] != md->lcc[*eptr++]) RRETURN(MATCH_NOMATCH); + if (md->lcc[*ecode++] != md->lcc[*eptr++]) MRRETURN(MATCH_NOMATCH); } /* Otherwise we must pick up the subject character */ @@ -2552,7 +2732,7 @@ #ifdef SUPPORT_UCP if (dc != UCD_OTHERCASE(fc)) #endif - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } } } @@ -2564,9 +2744,9 @@ if (md->end_subject - eptr < 1) { SCHECK_PARTIAL(); /* This one can use SCHECK_PARTIAL() */ - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } - if (md->lcc[ecode[1]] != md->lcc[*eptr++]) RRETURN(MATCH_NOMATCH); + if (md->lcc[ecode[1]] != md->lcc[*eptr++]) MRRETURN(MATCH_NOMATCH); ecode += 2; } break; @@ -2660,7 +2840,7 @@ else { CHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } } @@ -2672,7 +2852,7 @@ { RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM22); if (rrc != MATCH_NOMATCH) RRETURN(rrc); - if (fi >= max) RRETURN(MATCH_NOMATCH); + if (fi >= max) MRRETURN(MATCH_NOMATCH); if (eptr <= md->end_subject - length && memcmp(eptr, charptr, length) == 0) eptr += length; #ifdef SUPPORT_UCP @@ -2683,7 +2863,7 @@ else { CHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } } /* Control never gets here */ @@ -2714,7 +2894,7 @@ { RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM23); if (rrc != MATCH_NOMATCH) RRETURN(rrc); - if (eptr == pp) { RRETURN(MATCH_NOMATCH); } + if (eptr == pp) { MRRETURN(MATCH_NOMATCH); } #ifdef SUPPORT_UCP eptr--; BACKCHAR(eptr); @@ -2757,9 +2937,9 @@ if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } - if (fc != md->lcc[*eptr++]) RRETURN(MATCH_NOMATCH); + if (fc != md->lcc[*eptr++]) MRRETURN(MATCH_NOMATCH); } if (min == max) continue; if (minimize) @@ -2768,13 +2948,13 @@ { RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM24); if (rrc != MATCH_NOMATCH) RRETURN(rrc); - if (fi >= max) RRETURN(MATCH_NOMATCH); + if (fi >= max) MRRETURN(MATCH_NOMATCH); if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } - if (fc != md->lcc[*eptr++]) RRETURN(MATCH_NOMATCH); + if (fc != md->lcc[*eptr++]) MRRETURN(MATCH_NOMATCH); } /* Control never gets here */ } @@ -2800,7 +2980,7 @@ eptr--; if (rrc != MATCH_NOMATCH) RRETURN(rrc); } - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } /* Control never gets here */ } @@ -2814,9 +2994,9 @@ if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } - if (fc != *eptr++) RRETURN(MATCH_NOMATCH); + if (fc != *eptr++) MRRETURN(MATCH_NOMATCH); } if (min == max) continue; @@ -2827,13 +3007,13 @@ { RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM26); if (rrc != MATCH_NOMATCH) RRETURN(rrc); - if (fi >= max) RRETURN(MATCH_NOMATCH); + if (fi >= max) MRRETURN(MATCH_NOMATCH); if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } - if (fc != *eptr++) RRETURN(MATCH_NOMATCH); + if (fc != *eptr++) MRRETURN(MATCH_NOMATCH); } /* Control never gets here */ } @@ -2858,7 +3038,7 @@ eptr--; if (rrc != MATCH_NOMATCH) RRETURN(rrc); } - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } } /* Control never gets here */ @@ -2870,7 +3050,7 @@ if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } ecode++; GETCHARINCTEST(c, eptr); @@ -2880,11 +3060,11 @@ if (c < 256) #endif c = md->lcc[c]; - if (md->lcc[*ecode++] == c) RRETURN(MATCH_NOMATCH); + if (md->lcc[*ecode++] == c) MRRETURN(MATCH_NOMATCH); } else { - if (*ecode++ == c) RRETURN(MATCH_NOMATCH); + if (*ecode++ == c) MRRETURN(MATCH_NOMATCH); } break; @@ -2978,11 +3158,11 @@ if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } GETCHARINC(d, eptr); if (d < 256) d = md->lcc[d]; - if (fc == d) RRETURN(MATCH_NOMATCH); + if (fc == d) MRRETURN(MATCH_NOMATCH); } } else @@ -2995,9 +3175,9 @@ if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } - if (fc == md->lcc[*eptr++]) RRETURN(MATCH_NOMATCH); + if (fc == md->lcc[*eptr++]) MRRETURN(MATCH_NOMATCH); } } @@ -3014,15 +3194,15 @@ { RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM28); if (rrc != MATCH_NOMATCH) RRETURN(rrc); - if (fi >= max) RRETURN(MATCH_NOMATCH); + if (fi >= max) MRRETURN(MATCH_NOMATCH); if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } GETCHARINC(d, eptr); if (d < 256) d = md->lcc[d]; - if (fc == d) RRETURN(MATCH_NOMATCH); + if (fc == d) MRRETURN(MATCH_NOMATCH); } } else @@ -3033,13 +3213,13 @@ { RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM29); if (rrc != MATCH_NOMATCH) RRETURN(rrc); - if (fi >= max) RRETURN(MATCH_NOMATCH); + if (fi >= max) MRRETURN(MATCH_NOMATCH); if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } - if (fc == md->lcc[*eptr++]) RRETURN(MATCH_NOMATCH); + if (fc == md->lcc[*eptr++]) MRRETURN(MATCH_NOMATCH); } } /* Control never gets here */ @@ -3101,7 +3281,7 @@ } } - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } /* Control never gets here */ } @@ -3120,10 +3300,10 @@ if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } GETCHARINC(d, eptr); - if (fc == d) RRETURN(MATCH_NOMATCH); + if (fc == d) MRRETURN(MATCH_NOMATCH); } } else @@ -3135,9 +3315,9 @@ if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } - if (fc == *eptr++) RRETURN(MATCH_NOMATCH); + if (fc == *eptr++) MRRETURN(MATCH_NOMATCH); } } @@ -3154,14 +3334,14 @@ { RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM32); if (rrc != MATCH_NOMATCH) RRETURN(rrc); - if (fi >= max) RRETURN(MATCH_NOMATCH); + if (fi >= max) MRRETURN(MATCH_NOMATCH); if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } GETCHARINC(d, eptr); - if (fc == d) RRETURN(MATCH_NOMATCH); + if (fc == d) MRRETURN(MATCH_NOMATCH); } } else @@ -3172,13 +3352,13 @@ { RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM33); if (rrc != MATCH_NOMATCH) RRETURN(rrc); - if (fi >= max) RRETURN(MATCH_NOMATCH); + if (fi >= max) MRRETURN(MATCH_NOMATCH); if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } - if (fc == *eptr++) RRETURN(MATCH_NOMATCH); + if (fc == *eptr++) MRRETURN(MATCH_NOMATCH); } } /* Control never gets here */ @@ -3239,7 +3419,7 @@ } } - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } } /* Control never gets here */ @@ -3333,13 +3513,13 @@ switch(prop_type) { case PT_ANY: - if (prop_fail_result) RRETURN(MATCH_NOMATCH); + if (prop_fail_result) MRRETURN(MATCH_NOMATCH); for (i = 1; i <= min; i++) { if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } GETCHARINCTEST(c, eptr); } @@ -3351,14 +3531,14 @@ if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } GETCHARINCTEST(c, eptr); prop_chartype = UCD_CHARTYPE(c); if ((prop_chartype == ucp_Lu || prop_chartype == ucp_Ll || prop_chartype == ucp_Lt) == prop_fail_result) - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } break; @@ -3368,12 +3548,12 @@ if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } GETCHARINCTEST(c, eptr); prop_category = UCD_CATEGORY(c); if ((prop_category == prop_value) == prop_fail_result) - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } break; @@ -3383,12 +3563,12 @@ if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } GETCHARINCTEST(c, eptr); prop_chartype = UCD_CHARTYPE(c); if ((prop_chartype == prop_value) == prop_fail_result) - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } break; @@ -3398,15 +3578,84 @@ if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } GETCHARINCTEST(c, eptr); prop_script = UCD_SCRIPT(c); if ((prop_script == prop_value) == prop_fail_result) - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); + } + break; + + case PT_ALNUM: + for (i = 1; i <= min; i++) + { + if (eptr >= md->end_subject) + { + SCHECK_PARTIAL(); + MRRETURN(MATCH_NOMATCH); + } + GETCHARINCTEST(c, eptr); + prop_category = UCD_CATEGORY(c); + if ((prop_category == ucp_L || prop_category == ucp_N) + == prop_fail_result) + MRRETURN(MATCH_NOMATCH); + } + break; + + case PT_SPACE: /* Perl space */ + for (i = 1; i <= min; i++) + { + if (eptr >= md->end_subject) + { + SCHECK_PARTIAL(); + MRRETURN(MATCH_NOMATCH); + } + GETCHARINCTEST(c, eptr); + prop_category = UCD_CATEGORY(c); + if ((prop_category == ucp_Z || c == CHAR_HT || c == CHAR_NL || + c == CHAR_FF || c == CHAR_CR) + == prop_fail_result) + MRRETURN(MATCH_NOMATCH); } break; + case PT_PXSPACE: /* POSIX space */ + for (i = 1; i <= min; i++) + { + if (eptr >= md->end_subject) + { + SCHECK_PARTIAL(); + MRRETURN(MATCH_NOMATCH); + } + GETCHARINCTEST(c, eptr); + prop_category = UCD_CATEGORY(c); + if ((prop_category == ucp_Z || c == CHAR_HT || c == CHAR_NL || + c == CHAR_VT || c == CHAR_FF || c == CHAR_CR) + == prop_fail_result) + MRRETURN(MATCH_NOMATCH); + } + break; + + case PT_WORD: + for (i = 1; i <= min; i++) + { + if (eptr >= md->end_subject) + { + SCHECK_PARTIAL(); + MRRETURN(MATCH_NOMATCH); + } + GETCHARINCTEST(c, eptr); + prop_category = UCD_CATEGORY(c); + if ((prop_category == ucp_L || prop_category == ucp_N || + c == CHAR_UNDERSCORE) + == prop_fail_result) + MRRETURN(MATCH_NOMATCH); + } + break; + + /* This should not occur */ + default: RRETURN(PCRE_ERROR_INTERNAL); } @@ -3422,11 +3671,11 @@ if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } GETCHARINCTEST(c, eptr); prop_category = UCD_CATEGORY(c); - if (prop_category == ucp_M) RRETURN(MATCH_NOMATCH); + if (prop_category == ucp_M) MRRETURN(MATCH_NOMATCH); while (eptr < md->end_subject) { int len = 1; @@ -3453,9 +3702,9 @@ if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } - if (IS_NEWLINE(eptr)) RRETURN(MATCH_NOMATCH); + if (IS_NEWLINE(eptr)) MRRETURN(MATCH_NOMATCH); eptr++; while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++; } @@ -3467,7 +3716,7 @@ if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } eptr++; while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++; @@ -3475,7 +3724,7 @@ break; case OP_ANYBYTE: - if (eptr > md->end_subject - min) RRETURN(MATCH_NOMATCH); + if (eptr > md->end_subject - min) MRRETURN(MATCH_NOMATCH); eptr += min; break; @@ -3485,12 +3734,12 @@ if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } GETCHARINC(c, eptr); switch(c) { - default: RRETURN(MATCH_NOMATCH); + default: MRRETURN(MATCH_NOMATCH); case 0x000d: if (eptr < md->end_subject && *eptr == 0x0a) eptr++; break; @@ -3503,7 +3752,7 @@ case 0x0085: case 0x2028: case 0x2029: - if (md->bsr_anycrlf) RRETURN(MATCH_NOMATCH); + if (md->bsr_anycrlf) MRRETURN(MATCH_NOMATCH); break; } } @@ -3515,7 +3764,7 @@ if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } GETCHARINC(c, eptr); switch(c) @@ -3540,7 +3789,7 @@ case 0x202f: /* NARROW NO-BREAK SPACE */ case 0x205f: /* MEDIUM MATHEMATICAL SPACE */ case 0x3000: /* IDEOGRAPHIC SPACE */ - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } } break; @@ -3551,12 +3800,12 @@ if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } GETCHARINC(c, eptr); switch(c) { - default: RRETURN(MATCH_NOMATCH); + default: MRRETURN(MATCH_NOMATCH); case 0x09: /* HT */ case 0x20: /* SPACE */ case 0xa0: /* NBSP */ @@ -3587,7 +3836,7 @@ if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } GETCHARINC(c, eptr); switch(c) @@ -3600,7 +3849,7 @@ case 0x85: /* NEL */ case 0x2028: /* LINE SEPARATOR */ case 0x2029: /* PARAGRAPH SEPARATOR */ - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } } break; @@ -3611,12 +3860,12 @@ if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } GETCHARINC(c, eptr); switch(c) { - default: RRETURN(MATCH_NOMATCH); + default: MRRETURN(MATCH_NOMATCH); case 0x0a: /* LF */ case 0x0b: /* VT */ case 0x0c: /* FF */ @@ -3635,11 +3884,11 @@ if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } GETCHARINC(c, eptr); if (c < 128 && (md->ctypes[c] & ctype_digit) != 0) - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } break; @@ -3649,10 +3898,10 @@ if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } if (*eptr >= 128 || (md->ctypes[*eptr++] & ctype_digit) == 0) - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); /* No need to skip more bytes - we know it's a 1-byte character */ } break; @@ -3663,10 +3912,10 @@ if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } if (*eptr < 128 && (md->ctypes[*eptr] & ctype_space) != 0) - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); while (++eptr < md->end_subject && (*eptr & 0xc0) == 0x80); } break; @@ -3677,10 +3926,10 @@ if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } if (*eptr >= 128 || (md->ctypes[*eptr++] & ctype_space) == 0) - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); /* No need to skip more bytes - we know it's a 1-byte character */ } break; @@ -3688,9 +3937,13 @@ case OP_NOT_WORDCHAR: for (i = 1; i <= min; i++) { - if (eptr >= md->end_subject || - (*eptr < 128 && (md->ctypes[*eptr] & ctype_word) != 0)) - RRETURN(MATCH_NOMATCH); + if (eptr >= md->end_subject) + { + SCHECK_PARTIAL(); + MRRETURN(MATCH_NOMATCH); + } + if (*eptr < 128 && (md->ctypes[*eptr] & ctype_word) != 0) + MRRETURN(MATCH_NOMATCH); while (++eptr < md->end_subject && (*eptr & 0xc0) == 0x80); } break; @@ -3701,10 +3954,10 @@ if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } if (*eptr >= 128 || (md->ctypes[*eptr++] & ctype_word) == 0) - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); /* No need to skip more bytes - we know it's a 1-byte character */ } break; @@ -3727,9 +3980,9 @@ if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } - if (IS_NEWLINE(eptr)) RRETURN(MATCH_NOMATCH); + if (IS_NEWLINE(eptr)) MRRETURN(MATCH_NOMATCH); eptr++; } break; @@ -3738,7 +3991,7 @@ if (eptr > md->end_subject - min) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } eptr += min; break; @@ -3747,7 +4000,7 @@ if (eptr > md->end_subject - min) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } eptr += min; break; @@ -3758,11 +4011,11 @@ if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } switch(*eptr++) { - default: RRETURN(MATCH_NOMATCH); + default: MRRETURN(MATCH_NOMATCH); case 0x000d: if (eptr < md->end_subject && *eptr == 0x0a) eptr++; break; @@ -3772,7 +4025,7 @@ case 0x000b: case 0x000c: case 0x0085: - if (md->bsr_anycrlf) RRETURN(MATCH_NOMATCH); + if (md->bsr_anycrlf) MRRETURN(MATCH_NOMATCH); break; } } @@ -3784,7 +4037,7 @@ if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } switch(*eptr++) { @@ -3792,7 +4045,7 @@ case 0x09: /* HT */ case 0x20: /* SPACE */ case 0xa0: /* NBSP */ - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } } break; @@ -3803,11 +4056,11 @@ if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } switch(*eptr++) { - default: RRETURN(MATCH_NOMATCH); + default: MRRETURN(MATCH_NOMATCH); case 0x09: /* HT */ case 0x20: /* SPACE */ case 0xa0: /* NBSP */ @@ -3822,7 +4075,7 @@ if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } switch(*eptr++) { @@ -3832,7 +4085,7 @@ case 0x0c: /* FF */ case 0x0d: /* CR */ case 0x85: /* NEL */ - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } } break; @@ -3843,11 +4096,11 @@ if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } switch(*eptr++) { - default: RRETURN(MATCH_NOMATCH); + default: MRRETURN(MATCH_NOMATCH); case 0x0a: /* LF */ case 0x0b: /* VT */ case 0x0c: /* FF */ @@ -3864,9 +4117,9 @@ if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } - if ((md->ctypes[*eptr++] & ctype_digit) != 0) RRETURN(MATCH_NOMATCH); + if ((md->ctypes[*eptr++] & ctype_digit) != 0) MRRETURN(MATCH_NOMATCH); } break; @@ -3876,9 +4129,9 @@ if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } - if ((md->ctypes[*eptr++] & ctype_digit) == 0) RRETURN(MATCH_NOMATCH); + if ((md->ctypes[*eptr++] & ctype_digit) == 0) MRRETURN(MATCH_NOMATCH); } break; @@ -3888,9 +4141,9 @@ if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } - if ((md->ctypes[*eptr++] & ctype_space) != 0) RRETURN(MATCH_NOMATCH); + if ((md->ctypes[*eptr++] & ctype_space) != 0) MRRETURN(MATCH_NOMATCH); } break; @@ -3900,9 +4153,9 @@ if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } - if ((md->ctypes[*eptr++] & ctype_space) == 0) RRETURN(MATCH_NOMATCH); + if ((md->ctypes[*eptr++] & ctype_space) == 0) MRRETURN(MATCH_NOMATCH); } break; @@ -3912,10 +4165,10 @@ if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } if ((md->ctypes[*eptr++] & ctype_word) != 0) - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } break; @@ -3925,10 +4178,10 @@ if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } if ((md->ctypes[*eptr++] & ctype_word) == 0) - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } break; @@ -3957,14 +4210,14 @@ { RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM36); if (rrc != MATCH_NOMATCH) RRETURN(rrc); - if (fi >= max) RRETURN(MATCH_NOMATCH); + if (fi >= max) MRRETURN(MATCH_NOMATCH); if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } - GETCHARINC(c, eptr); - if (prop_fail_result) RRETURN(MATCH_NOMATCH); + GETCHARINCTEST(c, eptr); + if (prop_fail_result) MRRETURN(MATCH_NOMATCH); } /* Control never gets here */ @@ -3973,18 +4226,18 @@ { RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM37); if (rrc != MATCH_NOMATCH) RRETURN(rrc); - if (fi >= max) RRETURN(MATCH_NOMATCH); + if (fi >= max) MRRETURN(MATCH_NOMATCH); if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } - GETCHARINC(c, eptr); + GETCHARINCTEST(c, eptr); prop_chartype = UCD_CHARTYPE(c); if ((prop_chartype == ucp_Lu || prop_chartype == ucp_Ll || prop_chartype == ucp_Lt) == prop_fail_result) - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } /* Control never gets here */ @@ -3993,16 +4246,16 @@ { RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM38); if (rrc != MATCH_NOMATCH) RRETURN(rrc); - if (fi >= max) RRETURN(MATCH_NOMATCH); + if (fi >= max) MRRETURN(MATCH_NOMATCH); if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } - GETCHARINC(c, eptr); + GETCHARINCTEST(c, eptr); prop_category = UCD_CATEGORY(c); if ((prop_category == prop_value) == prop_fail_result) - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } /* Control never gets here */ @@ -4011,16 +4264,16 @@ { RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM39); if (rrc != MATCH_NOMATCH) RRETURN(rrc); - if (fi >= max) RRETURN(MATCH_NOMATCH); + if (fi >= max) MRRETURN(MATCH_NOMATCH); if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } - GETCHARINC(c, eptr); + GETCHARINCTEST(c, eptr); prop_chartype = UCD_CHARTYPE(c); if ((prop_chartype == prop_value) == prop_fail_result) - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } /* Control never gets here */ @@ -4029,19 +4282,101 @@ { RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM40); if (rrc != MATCH_NOMATCH) RRETURN(rrc); - if (fi >= max) RRETURN(MATCH_NOMATCH); + if (fi >= max) MRRETURN(MATCH_NOMATCH); if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } - GETCHARINC(c, eptr); + GETCHARINCTEST(c, eptr); prop_script = UCD_SCRIPT(c); if ((prop_script == prop_value) == prop_fail_result) - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); + } + /* Control never gets here */ + + case PT_ALNUM: + for (fi = min;; fi++) + { + RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM59); + if (rrc != MATCH_NOMATCH) RRETURN(rrc); + if (fi >= max) MRRETURN(MATCH_NOMATCH); + if (eptr >= md->end_subject) + { + SCHECK_PARTIAL(); + MRRETURN(MATCH_NOMATCH); + } + GETCHARINCTEST(c, eptr); + prop_category = UCD_CATEGORY(c); + if ((prop_category == ucp_L || prop_category == ucp_N) + == prop_fail_result) + MRRETURN(MATCH_NOMATCH); + } + /* Control never gets here */ + + case PT_SPACE: /* Perl space */ + for (fi = min;; fi++) + { + RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM60); + if (rrc != MATCH_NOMATCH) RRETURN(rrc); + if (fi >= max) MRRETURN(MATCH_NOMATCH); + if (eptr >= md->end_subject) + { + SCHECK_PARTIAL(); + MRRETURN(MATCH_NOMATCH); + } + GETCHARINCTEST(c, eptr); + prop_category = UCD_CATEGORY(c); + if ((prop_category == ucp_Z || c == CHAR_HT || c == CHAR_NL || + c == CHAR_FF || c == CHAR_CR) + == prop_fail_result) + MRRETURN(MATCH_NOMATCH); + } + /* Control never gets here */ + + case PT_PXSPACE: /* POSIX space */ + for (fi = min;; fi++) + { + RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM61); + if (rrc != MATCH_NOMATCH) RRETURN(rrc); + if (fi >= max) MRRETURN(MATCH_NOMATCH); + if (eptr >= md->end_subject) + { + SCHECK_PARTIAL(); + MRRETURN(MATCH_NOMATCH); + } + GETCHARINCTEST(c, eptr); + prop_category = UCD_CATEGORY(c); + if ((prop_category == ucp_Z || c == CHAR_HT || c == CHAR_NL || + c == CHAR_VT || c == CHAR_FF || c == CHAR_CR) + == prop_fail_result) + MRRETURN(MATCH_NOMATCH); + } + /* Control never gets here */ + + case PT_WORD: + for (fi = min;; fi++) + { + RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM62); + if (rrc != MATCH_NOMATCH) RRETURN(rrc); + if (fi >= max) MRRETURN(MATCH_NOMATCH); + if (eptr >= md->end_subject) + { + SCHECK_PARTIAL(); + MRRETURN(MATCH_NOMATCH); + } + GETCHARINCTEST(c, eptr); + prop_category = UCD_CATEGORY(c); + if ((prop_category == ucp_L || + prop_category == ucp_N || + c == CHAR_UNDERSCORE) + == prop_fail_result) + MRRETURN(MATCH_NOMATCH); } /* Control never gets here */ + /* This should never occur */ + default: RRETURN(PCRE_ERROR_INTERNAL); } @@ -4056,15 +4391,15 @@ { RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM41); if (rrc != MATCH_NOMATCH) RRETURN(rrc); - if (fi >= max) RRETURN(MATCH_NOMATCH); + if (fi >= max) MRRETURN(MATCH_NOMATCH); if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } GETCHARINCTEST(c, eptr); prop_category = UCD_CATEGORY(c); - if (prop_category == ucp_M) RRETURN(MATCH_NOMATCH); + if (prop_category == ucp_M) MRRETURN(MATCH_NOMATCH); while (eptr < md->end_subject) { int len = 1; @@ -4088,14 +4423,14 @@ { RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM42); if (rrc != MATCH_NOMATCH) RRETURN(rrc); - if (fi >= max) RRETURN(MATCH_NOMATCH); + if (fi >= max) MRRETURN(MATCH_NOMATCH); if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } if (ctype == OP_ANY && IS_NEWLINE(eptr)) - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); GETCHARINC(c, eptr); switch(ctype) { @@ -4107,7 +4442,7 @@ case OP_ANYNL: switch(c) { - default: RRETURN(MATCH_NOMATCH); + default: MRRETURN(MATCH_NOMATCH); case 0x000d: if (eptr < md->end_subject && *eptr == 0x0a) eptr++; break; @@ -4119,7 +4454,7 @@ case 0x0085: case 0x2028: case 0x2029: - if (md->bsr_anycrlf) RRETURN(MATCH_NOMATCH); + if (md->bsr_anycrlf) MRRETURN(MATCH_NOMATCH); break; } break; @@ -4147,14 +4482,14 @@ case 0x202f: /* NARROW NO-BREAK SPACE */ case 0x205f: /* MEDIUM MATHEMATICAL SPACE */ case 0x3000: /* IDEOGRAPHIC SPACE */ - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } break; case OP_HSPACE: switch(c) { - default: RRETURN(MATCH_NOMATCH); + default: MRRETURN(MATCH_NOMATCH); case 0x09: /* HT */ case 0x20: /* SPACE */ case 0xa0: /* NBSP */ @@ -4189,14 +4524,14 @@ case 0x85: /* NEL */ case 0x2028: /* LINE SEPARATOR */ case 0x2029: /* PARAGRAPH SEPARATOR */ - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } break; case OP_VSPACE: switch(c) { - default: RRETURN(MATCH_NOMATCH); + default: MRRETURN(MATCH_NOMATCH); case 0x0a: /* LF */ case 0x0b: /* VT */ case 0x0c: /* FF */ @@ -4210,32 +4545,32 @@ case OP_NOT_DIGIT: if (c < 256 && (md->ctypes[c] & ctype_digit) != 0) - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); break; case OP_DIGIT: if (c >= 256 || (md->ctypes[c] & ctype_digit) == 0) - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); break; case OP_NOT_WHITESPACE: if (c < 256 && (md->ctypes[c] & ctype_space) != 0) - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); break; case OP_WHITESPACE: if (c >= 256 || (md->ctypes[c] & ctype_space) == 0) - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); break; case OP_NOT_WORDCHAR: if (c < 256 && (md->ctypes[c] & ctype_word) != 0) - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); break; case OP_WORDCHAR: if (c >= 256 || (md->ctypes[c] & ctype_word) == 0) - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); break; default: @@ -4251,14 +4586,14 @@ { RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM43); if (rrc != MATCH_NOMATCH) RRETURN(rrc); - if (fi >= max) RRETURN(MATCH_NOMATCH); + if (fi >= max) MRRETURN(MATCH_NOMATCH); if (eptr >= md->end_subject) { SCHECK_PARTIAL(); - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } if (ctype == OP_ANY && IS_NEWLINE(eptr)) - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); c = *eptr++; switch(ctype) { @@ -4270,7 +4605,7 @@ case OP_ANYNL: switch(c) { - default: RRETURN(MATCH_NOMATCH); + default: MRRETURN(MATCH_NOMATCH); case 0x000d: if (eptr < md->end_subject && *eptr == 0x0a) eptr++; break; @@ -4281,7 +4616,7 @@ case 0x000b: case 0x000c: case 0x0085: - if (md->bsr_anycrlf) RRETURN(MATCH_NOMATCH); + if (md->bsr_anycrlf) MRRETURN(MATCH_NOMATCH); break; } break; @@ -4293,14 +4628,14 @@ case 0x09: /* HT */ case 0x20: /* SPACE */ case 0xa0: /* NBSP */ - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } break; case OP_HSPACE: switch(c) { - default: RRETURN(MATCH_NOMATCH); + default: MRRETURN(MATCH_NOMATCH); case 0x09: /* HT */ case 0x20: /* SPACE */ case 0xa0: /* NBSP */ @@ -4317,14 +4652,14 @@ case 0x0c: /* FF */ case 0x0d: /* CR */ case 0x85: /* NEL */ - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } break; case OP_VSPACE: switch(c) { - default: RRETURN(MATCH_NOMATCH); + default: MRRETURN(MATCH_NOMATCH); case 0x0a: /* LF */ case 0x0b: /* VT */ case 0x0c: /* FF */ @@ -4335,27 +4670,27 @@ break; case OP_NOT_DIGIT: - if ((md->ctypes[c] & ctype_digit) != 0) RRETURN(MATCH_NOMATCH); + if ((md->ctypes[c] & ctype_digit) != 0) MRRETURN(MATCH_NOMATCH); break; case OP_DIGIT: - if ((md->ctypes[c] & ctype_digit) == 0) RRETURN(MATCH_NOMATCH); + if ((md->ctypes[c] & ctype_digit) == 0) MRRETURN(MATCH_NOMATCH); break; case OP_NOT_WHITESPACE: - if ((md->ctypes[c] & ctype_space) != 0) RRETURN(MATCH_NOMATCH); + if ((md->ctypes[c] & ctype_space) != 0) MRRETURN(MATCH_NOMATCH); break; case OP_WHITESPACE: - if ((md->ctypes[c] & ctype_space) == 0) RRETURN(MATCH_NOMATCH); + if ((md->ctypes[c] & ctype_space) == 0) MRRETURN(MATCH_NOMATCH); break; case OP_NOT_WORDCHAR: - if ((md->ctypes[c] & ctype_word) != 0) RRETURN(MATCH_NOMATCH); + if ((md->ctypes[c] & ctype_word) != 0) MRRETURN(MATCH_NOMATCH); break; case OP_WORDCHAR: - if ((md->ctypes[c] & ctype_word) == 0) RRETURN(MATCH_NOMATCH); + if ((md->ctypes[c] & ctype_word) == 0) MRRETURN(MATCH_NOMATCH); break; default: @@ -4388,7 +4723,7 @@ SCHECK_PARTIAL(); break; } - GETCHARLEN(c, eptr, len); + GETCHARLENTEST(c, eptr, len); if (prop_fail_result) break; eptr+= len; } @@ -4403,7 +4738,7 @@ SCHECK_PARTIAL(); break; } - GETCHARLEN(c, eptr, len); + GETCHARLENTEST(c, eptr, len); prop_chartype = UCD_CHARTYPE(c); if ((prop_chartype == ucp_Lu || prop_chartype == ucp_Ll || @@ -4422,7 +4757,7 @@ SCHECK_PARTIAL(); break; } - GETCHARLEN(c, eptr, len); + GETCHARLENTEST(c, eptr, len); prop_category = UCD_CATEGORY(c); if ((prop_category == prop_value) == prop_fail_result) break; @@ -4439,7 +4774,7 @@ SCHECK_PARTIAL(); break; } - GETCHARLEN(c, eptr, len); + GETCHARLENTEST(c, eptr, len); prop_chartype = UCD_CHARTYPE(c); if ((prop_chartype == prop_value) == prop_fail_result) break; @@ -4456,13 +4791,90 @@ SCHECK_PARTIAL(); break; } - GETCHARLEN(c, eptr, len); + GETCHARLENTEST(c, eptr, len); prop_script = UCD_SCRIPT(c); if ((prop_script == prop_value) == prop_fail_result) break; eptr+= len; } break; + + case PT_ALNUM: + for (i = min; i < max; i++) + { + int len = 1; + if (eptr >= md->end_subject) + { + SCHECK_PARTIAL(); + break; + } + GETCHARLENTEST(c, eptr, len); + prop_category = UCD_CATEGORY(c); + if ((prop_category == ucp_L || prop_category == ucp_N) + == prop_fail_result) + break; + eptr+= len; + } + break; + + case PT_SPACE: /* Perl space */ + for (i = min; i < max; i++) + { + int len = 1; + if (eptr >= md->end_subject) + { + SCHECK_PARTIAL(); + break; + } + GETCHARLENTEST(c, eptr, len); + prop_category = UCD_CATEGORY(c); + if ((prop_category == ucp_Z || c == CHAR_HT || c == CHAR_NL || + c == CHAR_FF || c == CHAR_CR) + == prop_fail_result) + break; + eptr+= len; + } + break; + + case PT_PXSPACE: /* POSIX space */ + for (i = min; i < max; i++) + { + int len = 1; + if (eptr >= md->end_subject) + { + SCHECK_PARTIAL(); + break; + } + GETCHARLENTEST(c, eptr, len); + prop_category = UCD_CATEGORY(c); + if ((prop_category == ucp_Z || c == CHAR_HT || c == CHAR_NL || + c == CHAR_VT || c == CHAR_FF || c == CHAR_CR) + == prop_fail_result) + break; + eptr+= len; + } + break; + + case PT_WORD: + for (i = min; i < max; i++) + { + int len = 1; + if (eptr >= md->end_subject) + { + SCHECK_PARTIAL(); + break; + } + GETCHARLENTEST(c, eptr, len); + prop_category = UCD_CATEGORY(c); + if ((prop_category == ucp_L || prop_category == ucp_N || + c == CHAR_UNDERSCORE) == prop_fail_result) + break; + eptr+= len; + } + break; + + default: + RRETURN(PCRE_ERROR_INTERNAL); } /* eptr is now past the end of the maximum run */ @@ -5015,7 +5427,7 @@ /* Get here if we can't make it match with any permitted repetitions */ - RRETURN(MATCH_NOMATCH); + MRRETURN(MATCH_NOMATCH); } /* Control never gets here */ @@ -5048,12 +5460,13 @@ LBL( 9) LBL(10) LBL(11) LBL(12) LBL(13) LBL(14) LBL(15) LBL(17) LBL(19) LBL(24) LBL(25) LBL(26) LBL(27) LBL(29) LBL(31) LBL(33) LBL(35) LBL(43) LBL(47) LBL(48) LBL(49) LBL(50) LBL(51) LBL(52) - LBL(53) LBL(54) + LBL(53) LBL(54) LBL(55) LBL(56) LBL(57) LBL(58) #ifdef SUPPORT_UTF8 LBL(16) LBL(18) LBL(20) LBL(21) LBL(22) LBL(23) LBL(28) LBL(30) LBL(32) LBL(34) LBL(42) LBL(46) #ifdef SUPPORT_UCP LBL(36) LBL(37) LBL(38) LBL(39) LBL(40) LBL(41) LBL(44) LBL(45) + LBL(59) LBL(60) LBL(61) LBL(62) #endif /* SUPPORT_UCP */ #endif /* SUPPORT_UTF8 */ default: @@ -5257,6 +5670,7 @@ md->endonly = (re->options & PCRE_DOLLAR_ENDONLY) != 0; utf8 = md->utf8 = (re->options & PCRE_UTF8) != 0; +md->use_ucp = (re->options & PCRE_UCP) != 0; md->jscript_compat = (re->options & PCRE_JAVASCRIPT_COMPAT) != 0; md->notbol = (options & PCRE_NOTBOL) != 0; @@ -5266,6 +5680,7 @@ md->partial = ((options & PCRE_PARTIAL_HARD) != 0)? 2 : ((options & PCRE_PARTIAL_SOFT) != 0)? 1 : 0; md->hitend = FALSE; +md->mark = NULL; /* In case never set */ md->recursive = NULL; /* No recursion at top level */ @@ -5544,8 +5959,16 @@ while (start_match < end_subject) { register unsigned int c = *start_match; - if ((start_bits[c/8] & (1 << (c&7))) == 0) start_match++; - else break; + if ((start_bits[c/8] & (1 << (c&7))) == 0) + { + start_match++; +#ifdef SUPPORT_UTF8 + if (utf8) + while(start_match < end_subject && (*start_match & 0xc0) == 0x80) + start_match++; +#endif + } + else break; } } } /* Starting optimizations */ @@ -5565,7 +5988,7 @@ bytes to avoid spending too much time in this optimization. */ if (study != NULL && (study->flags & PCRE_STUDY_MINLEN) != 0 && - end_subject - start_match < study->minlength) + (pcre_uint32)(end_subject - start_match) < study->minlength) { rc = MATCH_NOMATCH; break; @@ -5628,7 +6051,7 @@ } } -#ifdef DEBUG /* Sigh. Some compilers never learn. */ +#ifdef PCRE_DEBUG /* Sigh. Some compilers never learn. */ printf(">>>> Match against: "); pchars(start_match, end_subject - start_match, TRUE, md); printf("\n"); @@ -5640,11 +6063,29 @@ md->start_match_ptr = start_match; md->start_used_ptr = start_match; md->match_call_count = 0; - rc = match(start_match, md->start_code, start_match, 2, md, ims, NULL, 0, 0); + rc = match(start_match, md->start_code, start_match, NULL, 2, md, ims, NULL, + 0, 0); if (md->hitend && start_partial == NULL) start_partial = md->start_used_ptr; switch(rc) { + /* SKIP passes back the next starting point explicitly, but if it is the + same as the match we have just done, treat it as NOMATCH. */ + + case MATCH_SKIP: + if (md->start_match_ptr != start_match) + { + new_start_match = md->start_match_ptr; + break; + } + /* Fall through */ + + /* If MATCH_SKIP_ARG reaches this level it means that a MARK that matched + the SKIP's arg was not found. We also treat this as NOMATCH. */ + + case MATCH_SKIP_ARG: + /* Fall through */ + /* NOMATCH and PRUNE advance by one character. THEN at this level acts exactly like PRUNE. */ @@ -5659,12 +6100,6 @@ #endif break; - /* SKIP passes back the next starting point explicitly. */ - - case MATCH_SKIP: - new_start_match = md->start_match_ptr; - break; - /* COMMIT disables the bumpalong, but otherwise behaves as NOMATCH. */ case MATCH_COMMIT: @@ -5710,7 +6145,8 @@ md->nllen == 2)) start_match++; - } /* End of for(;;) "bumpalong" loop */ + md->mark = NULL; /* Reset for start of next match attempt */ + } /* End of for(;;) "bumpalong" loop */ /* ==========================================================================*/ @@ -5734,7 +6170,7 @@ ENDLOOP: -if (rc == MATCH_MATCH) +if (rc == MATCH_MATCH || rc == MATCH_ACCEPT) { if (using_temporary_offsets) { @@ -5760,12 +6196,12 @@ if (offsetcount < 2) rc = 0; else { - offsets[0] = md->start_match_ptr - md->start_subject; - offsets[1] = md->end_match_ptr - md->start_subject; + offsets[0] = (int)(md->start_match_ptr - md->start_subject); + offsets[1] = (int)(md->end_match_ptr - md->start_subject); } DPRINTF((">>>> returning %d\n", rc)); - return rc; + goto RETURN_MARK; } /* Control gets here if there has been an error, or if the overall match @@ -5777,26 +6213,43 @@ (pcre_free)(md->offset_vector); } +/* For anything other than nomatch or partial match, just return the code. */ + if (rc != MATCH_NOMATCH && rc != PCRE_ERROR_PARTIAL) { DPRINTF((">>>> error: returning %d\n", rc)); return rc; } -else if (start_partial != NULL) + +/* Handle partial matches - disable any mark data */ + +if (start_partial != NULL) { DPRINTF((">>>> returning PCRE_ERROR_PARTIAL\n")); + md->mark = NULL; if (offsetcount > 1) { - offsets[0] = start_partial - (USPTR)subject; - offsets[1] = end_subject - (USPTR)subject; + offsets[0] = (int)(start_partial - (USPTR)subject); + offsets[1] = (int)(end_subject - (USPTR)subject); } - return PCRE_ERROR_PARTIAL; + rc = PCRE_ERROR_PARTIAL; } + +/* This is the classic nomatch case */ + else { DPRINTF((">>>> returning PCRE_ERROR_NOMATCH\n")); - return PCRE_ERROR_NOMATCH; + rc = PCRE_ERROR_NOMATCH; } + +/* Return the MARK data if it has been requested. */ + +RETURN_MARK: + +if (extra_data != NULL && (extra_data->flags & PCRE_EXTRA_MARK) != 0) + *(extra_data->mark) = (unsigned char *)(md->mark); +return rc; } /* End of pcre_exec.c */ @@ . patch -p0 <<'@@ .' Index: pcre/pcre_globals.c ============================================================================ $ cvs diff -u -r1.1.1.1 -r1.1.1.1.4.1 pcre_globals.c --- pcre/pcre_globals.c 14 Jan 2009 20:19:07 -0000 1.1.1.1 +++ pcre/pcre_globals.c 23 Aug 2010 13:08:53 -0000 1.1.1.1.4.1 @@ -43,8 +43,14 @@ However, it calls memory allocation and freeing functions via the four indirections below, and it can optionally do callouts, using the fifth indirection. These values can be changed by the caller, but are shared between -all threads. However, when compiling for Virtual Pascal, things are done -differently, and global variables are not used (see pcre.in). */ +all threads. + +For MS Visual Studio and Symbian OS, there are problems in initializing these +variables to non-local functions. In these cases, therefore, an indirection via +a local function is used. + +Also, when compiling for Virtual Pascal, things are done differently, and +global variables are not used. */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -52,7 +58,22 @@ #include "pcre_internal.h" -#ifndef VPCOMPAT +#if defined _MSC_VER || defined __SYMBIAN32__ +static void* LocalPcreMalloc(size_t aSize) + { + return malloc(aSize); + } +static void LocalPcreFree(void* aPtr) + { + free(aPtr); + } +PCRE_EXP_DATA_DEFN void *(*pcre_malloc)(size_t) = LocalPcreMalloc; +PCRE_EXP_DATA_DEFN void (*pcre_free)(void *) = LocalPcreFree; +PCRE_EXP_DATA_DEFN void *(*pcre_stack_malloc)(size_t) = LocalPcreMalloc; +PCRE_EXP_DATA_DEFN void (*pcre_stack_free)(void *) = LocalPcreFree; +PCRE_EXP_DATA_DEFN int (*pcre_callout)(pcre_callout_block *) = NULL; + +#elif !defined VPCOMPAT PCRE_EXP_DATA_DEFN void *(*pcre_malloc)(size_t) = malloc; PCRE_EXP_DATA_DEFN void (*pcre_free)(void *) = free; PCRE_EXP_DATA_DEFN void *(*pcre_stack_malloc)(size_t) = malloc; @@ . patch -p0 <<'@@ .' Index: pcre/pcre_internal.h ============================================================================ $ cvs diff -u -r1.1.1.3 -r1.1.1.3.2.1 pcre_internal.h --- pcre/pcre_internal.h 5 Dec 2009 13:53:55 -0000 1.1.1.3 +++ pcre/pcre_internal.h 23 Aug 2010 13:08:53 -0000 1.1.1.3.2.1 @@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language. Written by Philip Hazel - Copyright (c) 1997-2009 University of Cambridge + Copyright (c) 1997-2010 University of Cambridge ----------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without @@ -45,10 +45,10 @@ #ifndef PCRE_INTERNAL_H #define PCRE_INTERNAL_H -/* Define DEBUG to get debugging output on stdout. */ +/* Define PCRE_DEBUG to get debugging output on stdout. */ #if 0 -#define DEBUG +#define PCRE_DEBUG #endif /* We do not support both EBCDIC and UTF-8 at the same time. The "configure" @@ -74,7 +74,7 @@ be absolutely sure we get our version. */ #undef DPRINTF -#ifdef DEBUG +#ifdef PCRE_DEBUG #define DPRINTF(p) printf p #else #define DPRINTF(p) /* Nothing */ @@ -86,8 +86,6 @@ #include <ctype.h> #include <limits.h> -#include <setjmp.h> -#include <stdarg.h> #include <stddef.h> #include <stdio.h> #include <stdlib.h> @@ -186,6 +184,26 @@ #error Cannot determine a type for 32-bit unsigned integers #endif +/* When checking for integer overflow in pcre_compile(), we need to handle +large integers. If a 64-bit integer type is available, we can use that. +Otherwise we have to cast to double, which of course requires floating point +arithmetic. Handle this by defining a macro for the appropriate type. If +stdint.h is available, include it; it may define INT64_MAX. Systems that do not +have stdint.h (e.g. Solaris) may have inttypes.h. The macro int64_t may be set +by "configure". */ + +#if HAVE_STDINT_H +#include <stdint.h> +#elif HAVE_INTTYPES_H +#include <inttypes.h> +#endif + +#if defined INT64_MAX || defined int64_t +#define INT64_OR_DOUBLE int64_t +#else +#define INT64_OR_DOUBLE double +#endif + /* All character handling must be done as unsigned characters. Otherwise there are problems with top-bit-set characters and functions such as isspace(). However, we leave the interface to the outside world as char *, because that @@ -457,7 +475,8 @@ } \ } -/* Get the next character, testing for UTF-8 mode, and advancing the pointer */ +/* Get the next character, testing for UTF-8 mode, and advancing the pointer. +This is called when we don't know if we are in UTF-8 mode. */ #define GETCHARINCTEST(c, eptr) \ c = *eptr++; \ @@ -494,7 +513,7 @@ /* Get the next UTF-8 character, testing for UTF-8 mode, not advancing the pointer, incrementing length if there are extra bytes. This is called when we -know we are in UTF-8 mode. */ +do not know if we are in UTF-8 mode. */ #define GETCHARLENTEST(c, eptr, len) \ c = *eptr; \ @@ -562,7 +581,7 @@ 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_JAVASCRIPT_COMPAT) + PCRE_JAVASCRIPT_COMPAT|PCRE_UCP) #define PUBLIC_EXEC_OPTIONS \ (PCRE_ANCHORED|PCRE_NOTBOL|PCRE_NOTEOL|PCRE_NOTEMPTY|PCRE_NOTEMPTY_ATSTART| \ @@ -857,6 +876,7 @@ #define STRING_COMMIT0 "COMMIT\0" #define STRING_F0 "F\0" #define STRING_FAIL0 "FAIL\0" +#define STRING_MARK0 "MARK\0" #define STRING_PRUNE0 "PRUNE\0" #define STRING_SKIP0 "SKIP\0" #define STRING_THEN "THEN" @@ -886,6 +906,7 @@ #define STRING_BSR_ANYCRLF_RIGHTPAR "BSR_ANYCRLF)" #define STRING_BSR_UNICODE_RIGHTPAR "BSR_UNICODE)" #define STRING_UTF8_RIGHTPAR "UTF8)" +#define STRING_UCP_RIGHTPAR "UCP)" #else /* SUPPORT_UTF8 */ @@ -1109,6 +1130,7 @@ #define STRING_COMMIT0 STR_C STR_O STR_M STR_M STR_I STR_T "\0" #define STRING_F0 STR_F "\0" #define STRING_FAIL0 STR_F STR_A STR_I STR_L "\0" +#define STRING_MARK0 STR_M STR_A STR_R STR_K "\0" #define STRING_PRUNE0 STR_P STR_R STR_U STR_N STR_E "\0" #define STRING_SKIP0 STR_S STR_K STR_I STR_P "\0" #define STRING_THEN STR_T STR_H STR_E STR_N @@ -1138,6 +1160,7 @@ #define STRING_BSR_ANYCRLF_RIGHTPAR STR_B STR_S STR_R STR_UNDERSCORE STR_A STR_N STR_Y STR_C STR_R STR_L STR_F STR_RIGHT_PARENTHESIS #define STRING_BSR_UNICODE_RIGHTPAR STR_B STR_S STR_R STR_UNDERSCORE STR_U STR_N STR_I STR_C STR_O STR_D STR_E STR_RIGHT_PARENTHESIS #define STRING_UTF8_RIGHTPAR STR_U STR_T STR_F STR_8 STR_RIGHT_PARENTHESIS +#define STRING_UCP_RIGHTPAR STR_U STR_C STR_P STR_RIGHT_PARENTHESIS #endif /* SUPPORT_UTF8 */ @@ -1170,9 +1193,13 @@ #define PT_ANY 0 /* Any property - matches all chars */ #define PT_LAMP 1 /* L& - the union of Lu, Ll, Lt */ -#define PT_GC 2 /* General characteristic (e.g. L) */ -#define PT_PC 3 /* Particular characteristic (e.g. Lu) */ +#define PT_GC 2 /* Specified general characteristic (e.g. L) */ +#define PT_PC 3 /* Specified particular characteristic (e.g. Lu) */ #define PT_SC 4 /* Script (e.g. Han) */ +#define PT_ALNUM 5 /* Alphanumeric - the union of L and N */ +#define PT_SPACE 6 /* Perl space - Z plus 9,10,12,13 */ +#define PT_PXSPACE 7 /* POSIX space - Z plus 9,10,11,12,13 */ +#define PT_WORD 8 /* Word - L plus N plus underscore */ /* Flag bits and data types for the extended class (OP_XCLASS) for classes that contain UTF-8 characters with values greater than 255. */ @@ -1189,9 +1216,15 @@ /* These are escaped items that aren't just an encoding of a particular data 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, and another for OP_ALLANY -(which is used for [^] in JavaScript compatibility mode). +definitions below, up to ESC_z. There's a dummy for OP_ALLANY because it +corresponds to "." in DOTALL mode rather than an escape sequence. It is also +used for [^] in JavaScript compatibility mode. In non-DOTALL mode, "." behaves +like \N. + +The special values ESC_DU, ESC_du, etc. are used instead of ESC_D, ESC_d, etc. +when PCRE_UCP is set, when replacement of \d etc by \p sequences is required. +They must be contiguous, and remain in order so that the replacements can be +looked up from a table. 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 @@ -1201,11 +1234,12 @@ */ 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_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_W, ESC_w, ESC_N, ESC_dum, 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_DU, ESC_du, ESC_SU, ESC_su, ESC_WU, ESC_wu, ESC_REF }; - /* Opcode table: Starting from 1 (i.e. after OP_END), the values up to OP_EOD must correspond in order to the list of escapes immediately above. @@ -1229,8 +1263,8 @@ OP_WHITESPACE, /* 9 \s */ OP_NOT_WORDCHAR, /* 10 \W */ OP_WORDCHAR, /* 11 \w */ - OP_ANY, /* 12 Match any character (subject to DOTALL) */ - OP_ALLANY, /* 13 Match any character (not subject to DOTALL) */ + OP_ANY, /* 12 Match any character except newline */ + OP_ALLANY, /* 13 Match any character */ 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) */ @@ -1360,25 +1394,35 @@ /* These are backtracking control verbs */ - OP_PRUNE, /* 107 */ - OP_SKIP, /* 108 */ - OP_THEN, /* 109 */ - OP_COMMIT, /* 110 */ + OP_MARK, /* 107 always has an argument */ + OP_PRUNE, /* 108 */ + OP_PRUNE_ARG, /* 109 same, but with argument */ + OP_SKIP, /* 110 */ + OP_SKIP_ARG, /* 111 same, but with argument */ + OP_THEN, /* 112 */ + OP_THEN_ARG, /* 113 same, but with argument */ + OP_COMMIT, /* 114 */ /* These are forced failure and success verbs */ - OP_FAIL, /* 111 */ - OP_ACCEPT, /* 112 */ - OP_CLOSE, /* 113 Used before OP_ACCEPT to close open captures */ + OP_FAIL, /* 115 */ + OP_ACCEPT, /* 116 */ + OP_CLOSE, /* 117 Used before OP_ACCEPT to close open captures */ /* This is used to skip a subpattern with a {0} quantifier */ - OP_SKIPZERO /* 114 */ + OP_SKIPZERO, /* 118 */ + + /* This is not an opcode, but is used to check that tables indexed by opcode + are the correct length, in order to catch updating errors - there have been + some in the past. */ + + OP_TABLE_LENGTH }; /* *** NOTE NOTE NOTE *** Whenever the list above is updated, the two macro definitions that follow must also be updated to match. There are also tables -called "coptable" cna "poptable" in pcre_dfa_exec.c that must be updated. */ +called "coptable" and "poptable" in pcre_dfa_exec.c that must be updated. */ /* This macro defines textual names for all the opcodes. These are used only @@ -1403,7 +1447,8 @@ "Once", "Bra", "CBra", "Cond", "SBra", "SCBra", "SCond", \ "Cond ref", "Cond nref", "Cond rec", "Cond nrec", "Cond def", \ "Brazero", "Braminzero", \ - "*PRUNE", "*SKIP", "*THEN", "*COMMIT", "*FAIL", "*ACCEPT", \ + "*MARK", "*PRUNE", "*PRUNE", "*SKIP", "*SKIP", \ + "*THEN", "*THEN", "*COMMIT", "*FAIL", "*ACCEPT", \ "Close", "Skip zero" @@ -1421,8 +1466,9 @@ 1, 1, 1, 1, 1, /* \A, \G, \K, \B, \b */ \ 1, 1, 1, 1, 1, 1, /* \D, \d, \S, \s, \W, \w */ \ 1, 1, 1, /* Any, AllAny, Anybyte */ \ - 3, 3, 1, /* NOTPROP, PROP, EXTUNI */ \ + 3, 3, /* \P, \p */ \ 1, 1, 1, 1, 1, /* \R, \H, \h, \V, \v */ \ + 1, /* \X */ \ 1, 1, 2, 1, 1, /* \Z, \z, Opt, ^, $ */ \ 2, /* Char - the minimum length */ \ 2, /* Charnc - the minimum length */ \ @@ -1468,8 +1514,9 @@ 3, 3, /* RREF, NRREF */ \ 1, /* DEF */ \ 1, 1, /* BRAZERO, BRAMINZERO */ \ - 1, 1, 1, 1, /* PRUNE, SKIP, THEN, COMMIT, */ \ - 1, 1, 3, 1 /* FAIL, ACCEPT, CLOSE, SKIPZERO */ + 3, 1, 3, /* MARK, PRUNE, PRUNE_ARG, */ \ + 1, 3, 1, 3, /* SKIP, SKIP_ARG, THEN, THEN_ARG, */ \ + 1, 1, 1, 3, 1 /* COMMIT, FAIL, ACCEPT, CLOSE, SKIPZERO */ /* A magic value for OP_RREF and OP_NRREF to indicate the "any recursion" @@ -1477,8 +1524,9 @@ #define RREF_ANY 0xffff -/* Error code numbers. They are given names so that they can more easily be -tracked. */ +/* Compile time error code numbers. They are given names so that they can more +easily be tracked. When a new number is added, the table called eint in +pcreposix.c must be updated. */ enum { ERR0, ERR1, ERR2, ERR3, ERR4, ERR5, ERR6, ERR7, ERR8, ERR9, ERR10, ERR11, ERR12, ERR13, ERR14, ERR15, ERR16, ERR17, ERR18, ERR19, @@ -1486,7 +1534,7 @@ 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, ERR64, ERR65 }; + ERR60, ERR61, ERR62, ERR63, ERR64, ERR65, ERR66, ERR67, ERRCOUNT }; /* 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 @@ -1536,11 +1584,13 @@ /* Structure for building a chain of open capturing subpatterns during compiling, so that instructions to close them can be compiled when (*ACCEPT) is -encountered. */ +encountered. This is also used to identify subpatterns that contain recursive +back references to themselves, so that they can be made atomic. */ typedef struct open_capitem { struct open_capitem *next; /* Chain link */ pcre_uint16 number; /* Capture number */ + pcre_uint16 flag; /* Set TRUE if recursive back ref */ } open_capitem; /* Structure for passing "static" information around between the functions @@ -1579,7 +1629,7 @@ typedef struct branch_chain { struct branch_chain *outer; - uschar *current; + uschar *current_branch; } branch_chain; /* Structure for items in a linked list that represents an explicit recursive @@ -1589,7 +1639,6 @@ struct recursion_info *prevrec; /* Previous recursion record (or NULL) */ int group_num; /* Number of group that was called */ const uschar *after_call; /* "Return value": points after the call in the expr */ - USPTR save_start; /* Old value of mstart */ int *offset_save; /* Pointer to start of saved offsets */ int saved_max; /* Number of saved offsets */ int save_offset_top; /* Current value of offset_top */ @@ -1628,6 +1677,7 @@ BOOL noteol; /* NOTEOL flag */ BOOL utf8; /* UTF8 flag */ BOOL jscript_compat; /* JAVASCRIPT_COMPAT flag */ + BOOL use_ucp; /* PCRE_UCP flag */ BOOL endonly; /* Dollar not before final \n */ BOOL notempty; /* Empty string match not wanted */ BOOL notempty_atstart; /* Empty string match at start not wanted */ @@ -1647,6 +1697,7 @@ int eptrn; /* Next free eptrblock */ recursion_info *recursive; /* Linked list of recursion data */ void *callout_data; /* To pass back to callouts */ + const uschar *mark; /* Mark pointer to pass back */ } match_data; /* A similar structure is used for the same purpose by the DFA matching @@ -1738,14 +1789,12 @@ sense, but are not part of the PCRE public API. */ extern const uschar *_pcre_find_bracket(const uschar *, BOOL, int); -extern BOOL _pcre_is_newline(const uschar *, int, const uschar *, - int *, BOOL); +extern BOOL _pcre_is_newline(USPTR, int, USPTR, int *, BOOL); 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_valid_utf8(const uschar *, int); -extern BOOL _pcre_was_newline(const uschar *, int, const uschar *, - int *, BOOL); +extern int _pcre_valid_utf8(USPTR, int); +extern BOOL _pcre_was_newline(USPTR, int, USPTR, int *, BOOL); extern BOOL _pcre_xclass(int, const uschar *); @@ . patch -p0 <<'@@ .' Index: pcre/pcre_printint.src ============================================================================ $ cvs diff -u -r1.1.1.3 -r1.1.1.3.2.1 pcre_printint.src --- pcre/pcre_printint.src 5 Dec 2009 13:54:00 -0000 1.1.1.3 +++ pcre/pcre_printint.src 23 Aug 2010 13:08:53 -0000 1.1.1.3.2.1 @@ -6,7 +6,7 @@ and semantics are as close as possible to those of the Perl 5 language. Written by Philip Hazel - Copyright (c) 1997-2009 University of Cambridge + Copyright (c) 1997-2010 University of Cambridge ----------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without @@ -43,7 +43,8 @@ local functions. This source file is used in two places: (1) It is #included by pcre_compile.c when it is compiled in debugging mode -(DEBUG defined in pcre_internal.h). It is not included in production compiles. +(PCRE_DEBUG defined in pcre_internal.h). It is not included in production +compiles. (2) It is always #included by pcretest.c, which can be asked to print out a compiled regex for debugging purposes. */ @@ -189,6 +190,25 @@ switch(*code) { +/* ========================================================================== */ + /* These cases are never obeyed. This is a fudge that causes a compile- + time error if the vectors OP_names or _pcre_OP_lengths, which are indexed + by opcode, are not the correct length. It seems to be the only way to do + such a check at compile time, as the sizeof() operator does not work in + the C preprocessor. We do this while compiling pcretest, because that + #includes pcre_tables.c, which holds _pcre_OP_lengths. We can't do this + when building pcre_compile.c with PCRE_DEBUG set, because it doesn't then + know the size of _pcre_OP_lengths. */ + +#ifdef COMPILING_PCRETEST + case OP_TABLE_LENGTH: + case OP_TABLE_LENGTH + + ((sizeof(OP_names)/sizeof(const char *) == OP_TABLE_LENGTH) && + (sizeof(_pcre_OP_lengths) == OP_TABLE_LENGTH)): + break; +#endif +/* ========================================================================== */ + case OP_END: fprintf(f, " %s\n", OP_names[*code]); fprintf(f, "------------------------------------------------------------------\n"); @@ -514,6 +534,14 @@ } break; + case OP_MARK: + case OP_PRUNE_ARG: + case OP_SKIP_ARG: + case OP_THEN_ARG: + fprintf(f, " %s %s", OP_names[*code], code + 2); + extra += code[1]; + break; + /* Anything else is just an item with no data*/ default: @@ . patch -p0 <<'@@ .' Index: pcre/pcre_scanner.cc ============================================================================ $ cvs diff -u -r1.1.1.1 -r1.1.1.1.4.1 pcre_scanner.cc --- pcre/pcre_scanner.cc 14 Jan 2009 20:19:47 -0000 1.1.1.1 +++ pcre/pcre_scanner.cc 23 Aug 2010 13:08:53 -0000 1.1.1.1.4.1 @@ -121,7 +121,7 @@ } int Scanner::Offset() const { - return input_.data() - data_.c_str(); + return (int)(input_.data() - data_.c_str()); } bool Scanner::LookingAt(const RE& re) const { @@ -153,7 +153,7 @@ comments_ = new vector<StringPiece>; } // already pointing one past end, so no need to +1 - int length = input_.data() - start_data; + int length = (int)(input_.data() - start_data); if (length > 0) { comments_->push_back(StringPiece(start_data, length)); } @@ . patch -p0 <<'@@ .' Index: pcre/pcre_scanner_unittest.cc ============================================================================ $ cvs diff -u -r1.1.1.1 -r1.1.1.1.4.1 pcre_scanner_unittest.cc --- pcre/pcre_scanner_unittest.cc 14 Jan 2009 20:18:54 -0000 1.1.1.1 +++ pcre/pcre_scanner_unittest.cc 23 Aug 2010 13:08:53 -0000 1.1.1.1.4.1 @@ -106,11 +106,11 @@ CHECK_EQ(comments[2].as_string(), " /* and here is gamma */\n"); comments.resize(0); - s.GetComments(0, strchr(input, '/') - input, &comments); + s.GetComments(0, (int)(strchr(input, '/') - input), &comments); CHECK_EQ(comments.size(), 0); comments.resize(0); - s.GetComments(strchr(input, '/') - input - 1, sizeof(input), + s.GetComments((int)(strchr(input, '/') - input - 1), sizeof(input), &comments); CHECK_EQ(comments.size(), 3); CHECK_EQ(comments[0].as_string(), " // this sets alpha\n"); @@ -118,8 +118,8 @@ CHECK_EQ(comments[2].as_string(), " /* and here is gamma */\n"); comments.resize(0); - s.GetComments(strchr(input, '/') - input - 1, - strchr(input + 1, '\n') - input + 1, &comments); + s.GetComments((int)(strchr(input, '/') - input - 1), + (int)(strchr(input + 1, '\n') - input + 1), &comments); CHECK_EQ(comments.size(), 1); CHECK_EQ(comments[0].as_string(), " // this sets alpha\n"); comments.resize(0); @@ . patch -p0 <<'@@ .' Index: pcre/pcre_study.c ============================================================================ $ cvs diff -u -r1.1.1.2 -r1.1.1.2.2.1 pcre_study.c --- pcre/pcre_study.c 5 Dec 2009 13:53:54 -0000 1.1.1.2 +++ pcre/pcre_study.c 23 Aug 2010 13:08:53 -0000 1.1.1.2.2.1 @@ -6,7 +6,7 @@ and semantics are as close as possible to those of the Perl 5 language. Written by Philip Hazel - Copyright (c) 1997-2009 University of Cambridge + Copyright (c) 1997-2010 University of Cambridge ----------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without @@ -48,6 +48,7 @@ #include "pcre_internal.h" +#define SET_BIT(c) start_bits[c/8] |= (1 << (c&7)) /* Returns from set_start_bits() */ @@ -96,13 +97,28 @@ switch (op) { + case OP_COND: + case OP_SCOND: + + /* If there is only one branch in a condition, the implied branch has zero + length, so we don't add anything. This covers the DEFINE "condition" + automatically. */ + + cs = cc + GET(cc, 1); + if (*cs != OP_ALT) + { + cc = cs + 1 + LINK_SIZE; + break; + } + + /* Otherwise we can fall through and treat it the same as any other + subpattern. */ + case OP_CBRA: case OP_SCBRA: case OP_BRA: case OP_SBRA: case OP_ONCE: - case OP_COND: - case OP_SCOND: d = find_minlength(cc, startcode, options); if (d < 0) return d; branchlength += d; @@ -398,6 +414,15 @@ #endif break; + /* Skip these, but we need to add in the name length. */ + + case OP_MARK: + case OP_PRUNE_ARG: + case OP_SKIP_ARG: + case OP_THEN_ARG: + cc += _pcre_OP_lengths[op] + cc[1]; + break; + /* For the record, these are the opcodes that are matched by "default": OP_ACCEPT, OP_CLOSE, OP_COMMIT, OP_FAIL, OP_PRUNE, OP_SET_SOM, OP_SKIP, OP_THEN. */ @@ -416,24 +441,121 @@ * Set a bit and maybe its alternate case * *************************************************/ -/* Given a character, set its bit in the table, and also the bit for the other -version of a letter if we are caseless. +/* Given a character, set its first byte's bit in the table, and also the +corresponding bit for the other version of a letter if we are caseless. In +UTF-8 mode, for characters greater than 127, we can only do the caseless thing +when Unicode property support is available. Arguments: start_bits points to the bit map - c is the character + p points to the character caseless the caseless flag cd the block with char table pointers + utf8 TRUE for UTF-8 mode + +Returns: pointer after the character +*/ + +static const uschar * +set_table_bit(uschar *start_bits, const uschar *p, BOOL caseless, + compile_data *cd, BOOL utf8) +{ +unsigned int c = *p; + +SET_BIT(c); + +#ifdef SUPPORT_UTF8 +if (utf8 && c > 127) + { + GETCHARINC(c, p); +#ifdef SUPPORT_UCP + if (caseless) + { + uschar buff[8]; + c = UCD_OTHERCASE(c); + (void)_pcre_ord2utf8(c, buff); + SET_BIT(buff[0]); + } +#endif + return p; + } +#endif + +/* Not UTF-8 mode, or character is less than 127. */ + +if (caseless && (cd->ctypes[c] & ctype_letter) != 0) SET_BIT(cd->fcc[c]); +return p + 1; +} + + + +/************************************************* +* Set bits for a positive character type * +*************************************************/ + +/* This function sets starting bits for a character type. In UTF-8 mode, we can +only do a direct setting for bytes less than 128, as otherwise there can be +confusion with bytes in the middle of UTF-8 characters. In a "traditional" +environment, the tables will only recognize ASCII characters anyway, but in at +least one Windows environment, some higher bytes bits were set in the tables. +So we deal with that case by considering the UTF-8 encoding. + +Arguments: + start_bits the starting bitmap + cbit type the type of character wanted + table_limit 32 for non-UTF-8; 16 for UTF-8 + cd the block with char table pointers + +Returns: nothing +*/ + +static void +set_type_bits(uschar *start_bits, int cbit_type, int table_limit, + compile_data *cd) +{ +register int c; +for (c = 0; c < table_limit; c++) start_bits[c] |= cd->cbits[c+cbit_type]; +if (table_limit == 32) return; +for (c = 128; c < 256; c++) + { + if ((cd->cbits[c/8] & (1 << (c&7))) != 0) + { + uschar buff[8]; + (void)_pcre_ord2utf8(c, buff); + SET_BIT(buff[0]); + } + } +} + + +/************************************************* +* Set bits for a negative character type * +*************************************************/ + +/* This function sets starting bits for a negative character type such as \D. +In UTF-8 mode, we can only do a direct setting for bytes less than 128, as +otherwise there can be confusion with bytes in the middle of UTF-8 characters. +Unlike in the positive case, where we can set appropriate starting bits for +specific high-valued UTF-8 characters, in this case we have to set the bits for +all high-valued characters. The lowest is 0xc2, but we overkill by starting at +0xc0 (192) for simplicity. + +Arguments: + start_bits the starting bitmap + cbit type the type of character wanted + table_limit 32 for non-UTF-8; 16 for UTF-8 + cd the block with char table pointers -Returns: nothing +Returns: nothing */ static void -set_bit(uschar *start_bits, unsigned int c, BOOL caseless, compile_data *cd) +set_nottype_bits(uschar *start_bits, int cbit_type, int table_limit, + compile_data *cd) { -start_bits[c/8] |= (1 << (c&7)); -if (caseless && (cd->ctypes[c] & ctype_letter) != 0) - start_bits[cd->fcc[c]/8] |= (1 << (cd->fcc[c]&7)); +register int c; +for (c = 0; c < table_limit; c++) start_bits[c] |= ~cd->cbits[c+cbit_type]; +if (table_limit != 32) for (c = 24; c < 32; c++) start_bits[c] = 0xff; } @@ -468,6 +590,7 @@ { register int c; int yield = SSB_DONE; +int table_limit = utf8? 16:32; #if 0 /* ========================================================================= */ @@ -591,12 +714,7 @@ case OP_QUERY: case OP_MINQUERY: case OP_POSQUERY: - set_bit(start_bits, tcode[1], caseless, cd); - tcode += 2; -#ifdef SUPPORT_UTF8 - if (utf8 && tcode[-1] >= 0xc0) - tcode += _pcre_utf8_table4[tcode[-1] & 0x3f]; -#endif + tcode = set_table_bit(start_bits, tcode + 1, caseless, cd, utf8); break; /* Single-char upto sets the bit and tries the next */ @@ -604,12 +722,7 @@ case OP_UPTO: case OP_MINUPTO: case OP_POSUPTO: - set_bit(start_bits, tcode[3], caseless, cd); - tcode += 4; -#ifdef SUPPORT_UTF8 - if (utf8 && tcode[-1] >= 0xc0) - tcode += _pcre_utf8_table4[tcode[-1] & 0x3f]; -#endif + tcode = set_table_bit(start_bits, tcode + 3, caseless, cd, utf8); break; /* At least one single char sets the bit and stops */ @@ -622,59 +735,86 @@ case OP_PLUS: case OP_MINPLUS: case OP_POSPLUS: - set_bit(start_bits, tcode[1], caseless, cd); + (void)set_table_bit(start_bits, tcode + 1, caseless, cd, utf8); + try_next = FALSE; + break; + + /* Special spacing and line-terminating items. These recognize specific + lists of characters. The difference between VSPACE and ANYNL is that the + latter can match the two-character CRLF sequence, but that is not + relevant for finding the first character, so their code here is + identical. */ + + case OP_HSPACE: + SET_BIT(0x09); + SET_BIT(0x20); + if (utf8) + { + SET_BIT(0xC2); /* For U+00A0 */ + SET_BIT(0xE1); /* For U+1680, U+180E */ + SET_BIT(0xE2); /* For U+2000 - U+200A, U+202F, U+205F */ + SET_BIT(0xE3); /* For U+3000 */ + } + else SET_BIT(0xA0); + try_next = FALSE; + break; + + case OP_ANYNL: + case OP_VSPACE: + SET_BIT(0x0A); + SET_BIT(0x0B); + SET_BIT(0x0C); + SET_BIT(0x0D); + if (utf8) + { + SET_BIT(0xC2); /* For U+0085 */ + SET_BIT(0xE2); /* For U+2028, U+2029 */ + } + else SET_BIT(0x85); try_next = FALSE; break; - /* Single character type sets the bits and stops */ + /* Single character types set the bits and stop. Note that if PCRE_UCP + is set, we do not see these op codes because \d etc are converted to + properties. Therefore, these apply in the case when only characters less + than 256 are recognized to match the types. */ case OP_NOT_DIGIT: - for (c = 0; c < 32; c++) - start_bits[c] |= ~cd->cbits[c+cbit_digit]; + set_nottype_bits(start_bits, cbit_digit, table_limit, cd); try_next = FALSE; break; case OP_DIGIT: - for (c = 0; c < 32; c++) - start_bits[c] |= cd->cbits[c+cbit_digit]; + set_type_bits(start_bits, cbit_digit, table_limit, cd); try_next = FALSE; break; /* The cbit_space table has vertical tab as whitespace; we have to - discard it. */ + ensure it is set as not whitespace. */ case OP_NOT_WHITESPACE: - for (c = 0; c < 32; c++) - { - int d = cd->cbits[c+cbit_space]; - if (c == 1) d &= ~0x08; - start_bits[c] |= ~d; - } + set_nottype_bits(start_bits, cbit_space, table_limit, cd); + start_bits[1] |= 0x08; try_next = FALSE; break; /* The cbit_space table has vertical tab as whitespace; we have to - discard it. */ + not set it from the table. */ case OP_WHITESPACE: - for (c = 0; c < 32; c++) - { - int d = cd->cbits[c+cbit_space]; - if (c == 1) d &= ~0x08; - start_bits[c] |= d; - } + c = start_bits[1]; /* Save in case it was already set */ + set_type_bits(start_bits, cbit_space, table_limit, cd); + start_bits[1] = (start_bits[1] & ~0x08) | c; try_next = FALSE; break; case OP_NOT_WORDCHAR: - for (c = 0; c < 32; c++) - start_bits[c] |= ~cd->cbits[c+cbit_word]; + set_nottype_bits(start_bits, cbit_word, table_limit, cd); try_next = FALSE; break; case OP_WORDCHAR: - for (c = 0; c < 32; c++) - start_bits[c] |= cd->cbits[c+cbit_word]; + set_type_bits(start_bits, cbit_word, table_limit, cd); try_next = FALSE; break; @@ -683,6 +823,7 @@ case OP_TYPEPLUS: case OP_TYPEMINPLUS: + case OP_TYPEPOSPLUS: tcode++; break; @@ -706,52 +847,69 @@ case OP_TYPEPOSQUERY: switch(tcode[1]) { + default: case OP_ANY: case OP_ALLANY: return SSB_FAIL; + case OP_HSPACE: + SET_BIT(0x09); + SET_BIT(0x20); + if (utf8) + { + SET_BIT(0xC2); /* For U+00A0 */ + SET_BIT(0xE1); /* For U+1680, U+180E */ + SET_BIT(0xE2); /* For U+2000 - U+200A, U+202F, U+205F */ + SET_BIT(0xE3); /* For U+3000 */ + } + else SET_BIT(0xA0); + break; + + case OP_ANYNL: + case OP_VSPACE: + SET_BIT(0x0A); + SET_BIT(0x0B); + SET_BIT(0x0C); + SET_BIT(0x0D); + if (utf8) + { + SET_BIT(0xC2); /* For U+0085 */ + SET_BIT(0xE2); /* For U+2028, U+2029 */ + } + else SET_BIT(0x85); + break; + case OP_NOT_DIGIT: - for (c = 0; c < 32; c++) - start_bits[c] |= ~cd->cbits[c+cbit_digit]; + set_nottype_bits(start_bits, cbit_digit, table_limit, cd); break; case OP_DIGIT: - for (c = 0; c < 32; c++) - start_bits[c] |= cd->cbits[c+cbit_digit]; + set_type_bits(start_bits, cbit_digit, table_limit, cd); break; /* The cbit_space table has vertical tab as whitespace; we have to - discard it. */ + ensure it gets set as not whitespace. */ case OP_NOT_WHITESPACE: - for (c = 0; c < 32; c++) - { - int d = cd->cbits[c+cbit_space]; - if (c == 1) d &= ~0x08; - start_bits[c] |= ~d; - } + set_nottype_bits(start_bits, cbit_space, table_limit, cd); + start_bits[1] |= 0x08; break; /* The cbit_space table has vertical tab as whitespace; we have to - discard it. */ + avoid setting it. */ case OP_WHITESPACE: - for (c = 0; c < 32; c++) - { - int d = cd->cbits[c+cbit_space]; - if (c == 1) d &= ~0x08; - start_bits[c] |= d; - } + c = start_bits[1]; /* Save in case it was already set */ + set_type_bits(start_bits, cbit_space, table_limit, cd); + start_bits[1] = (start_bits[1] & ~0x08) | c; break; case OP_NOT_WORDCHAR: - for (c = 0; c < 32; c++) - start_bits[c] |= ~cd->cbits[c+cbit_word]; + set_nottype_bits(start_bits, cbit_word, table_limit, cd); break; case OP_WORDCHAR: - for (c = 0; c < 32; c++) - start_bits[c] |= cd->cbits[c+cbit_word]; + set_type_bits(start_bits, cbit_word, table_limit, cd); break; } @@ . patch -p0 <<'@@ .' Index: pcre/pcre_tables.c ============================================================================ $ cvs diff -u -r1.1.1.2 -r1.1.1.2.2.1 pcre_tables.c --- pcre/pcre_tables.c 18 Aug 2009 21:25:58 -0000 1.1.1.2 +++ pcre/pcre_tables.c 23 Aug 2010 13:08:53 -0000 1.1.1.2.2.1 @@ -120,7 +120,9 @@ #define STRING_Any0 STR_A STR_n STR_y "\0" #define STRING_Arabic0 STR_A STR_r STR_a STR_b STR_i STR_c "\0" #define STRING_Armenian0 STR_A STR_r STR_m STR_e STR_n STR_i STR_a STR_n "\0" +#define STRING_Avestan0 STR_A STR_v STR_e STR_s STR_t STR_a STR_n "\0" #define STRING_Balinese0 STR_B STR_a STR_l STR_i STR_n STR_e STR_s STR_e "\0" +#define STRING_Bamum0 STR_B STR_a STR_m STR_u STR_m "\0" #define STRING_Bengali0 STR_B STR_e STR_n STR_g STR_a STR_l STR_i "\0" #define STRING_Bopomofo0 STR_B STR_o STR_p STR_o STR_m STR_o STR_f STR_o "\0" #define STRING_Braille0 STR_B STR_r STR_a STR_i STR_l STR_l STR_e "\0" @@ -143,6 +145,7 @@ #define STRING_Cyrillic0 STR_C STR_y STR_r STR_i STR_l STR_l STR_i STR_c "\0" #define STRING_Deseret0 STR_D STR_e STR_s STR_e STR_r STR_e STR_t "\0" #define STRING_Devanagari0 STR_D STR_e STR_v STR_a STR_n STR_a STR_g STR_a STR_r STR_i "\0" +#define STRING_Egyptian_Hieroglyphs0 STR_E STR_g STR_y STR_p STR_t STR_i STR_a STR_n STR_UNDERSCORE STR_H STR_i STR_e STR_r STR_o STR_g STR_l STR_y STR_p STR_h STR_s "\0" #define STRING_Ethiopic0 STR_E STR_t STR_h STR_i STR_o STR_p STR_i STR_c "\0" #define STRING_Georgian0 STR_G STR_e STR_o STR_r STR_g STR_i STR_a STR_n "\0" #define STRING_Glagolitic0 STR_G STR_l STR_a STR_g STR_o STR_l STR_i STR_t STR_i STR_c "\0" @@ -155,7 +158,12 @@ #define STRING_Hanunoo0 STR_H STR_a STR_n STR_u STR_n STR_o STR_o "\0" #define STRING_Hebrew0 STR_H STR_e STR_b STR_r STR_e STR_w "\0" #define STRING_Hiragana0 STR_H STR_i STR_r STR_a STR_g STR_a STR_n STR_a "\0" +#define STRING_Imperial_Aramaic0 STR_I STR_m STR_p STR_e STR_r STR_i STR_a STR_l STR_UNDERSCORE STR_A STR_r STR_a STR_m STR_a STR_i STR_c "\0" #define STRING_Inherited0 STR_I STR_n STR_h STR_e STR_r STR_i STR_t STR_e STR_d "\0" +#define STRING_Inscriptional_Pahlavi0 STR_I STR_n STR_s STR_c STR_r STR_i STR_p STR_t STR_i STR_o STR_n STR_a STR_l STR_UNDERSCORE STR_P STR_a STR_h STR_l STR_a STR_v STR_i "\0" +#define STRING_Inscriptional_Parthian0 STR_I STR_n STR_s STR_c STR_r STR_i STR_p STR_t STR_i STR_o STR_n STR_a STR_l STR_UNDERSCORE STR_P STR_a STR_r STR_t STR_h STR_i STR_a STR_n "\0" +#define STRING_Javanese0 STR_J STR_a STR_v STR_a STR_n STR_e STR_s STR_e "\0" +#define STRING_Kaithi0 STR_K STR_a STR_i STR_t STR_h STR_i "\0" #define STRING_Kannada0 STR_K STR_a STR_n STR_n STR_a STR_d STR_a "\0" #define STRING_Katakana0 STR_K STR_a STR_t STR_a STR_k STR_a STR_n STR_a "\0" #define STRING_Kayah_Li0 STR_K STR_a STR_y STR_a STR_h STR_UNDERSCORE STR_L STR_i "\0" @@ -168,6 +176,7 @@ #define STRING_Lepcha0 STR_L STR_e STR_p STR_c STR_h STR_a "\0" #define STRING_Limbu0 STR_L STR_i STR_m STR_b STR_u "\0" #define STRING_Linear_B0 STR_L STR_i STR_n STR_e STR_a STR_r STR_UNDERSCORE STR_B "\0" +#define STRING_Lisu0 STR_L STR_i STR_s STR_u "\0" #define STRING_Ll0 STR_L STR_l "\0" #define STRING_Lm0 STR_L STR_m "\0" #define STRING_Lo0 STR_L STR_o "\0" @@ -179,6 +188,7 @@ #define STRING_Malayalam0 STR_M STR_a STR_l STR_a STR_y STR_a STR_l STR_a STR_m "\0" #define STRING_Mc0 STR_M STR_c "\0" #define STRING_Me0 STR_M STR_e "\0" +#define STRING_Meetei_Mayek0 STR_M STR_e STR_e STR_t STR_e STR_i STR_UNDERSCORE STR_M STR_a STR_y STR_e STR_k "\0" #define STRING_Mn0 STR_M STR_n "\0" #define STRING_Mongolian0 STR_M STR_o STR_n STR_g STR_o STR_l STR_i STR_a STR_n "\0" #define STRING_Myanmar0 STR_M STR_y STR_a STR_n STR_m STR_a STR_r "\0" @@ -192,6 +202,8 @@ #define STRING_Ol_Chiki0 STR_O STR_l STR_UNDERSCORE STR_C STR_h STR_i STR_k STR_i "\0" #define STRING_Old_Italic0 STR_O STR_l STR_d STR_UNDERSCORE STR_I STR_t STR_a STR_l STR_i STR_c "\0" #define STRING_Old_Persian0 STR_O STR_l STR_d STR_UNDERSCORE STR_P STR_e STR_r STR_s STR_i STR_a STR_n "\0" +#define STRING_Old_South_Arabian0 STR_O STR_l STR_d STR_UNDERSCORE STR_S STR_o STR_u STR_t STR_h STR_UNDERSCORE STR_A STR_r STR_a STR_b STR_i STR_a STR_n "\0" +#define STRING_Old_Turkic0 STR_O STR_l STR_d STR_UNDERSCORE STR_T STR_u STR_r STR_k STR_i STR_c "\0" #define STRING_Oriya0 STR_O STR_r STR_i STR_y STR_a "\0" #define STRING_Osmanya0 STR_O STR_s STR_m STR_a STR_n STR_y STR_a "\0" #define STRING_P0 STR_P "\0" @@ -207,6 +219,7 @@ #define STRING_Rejang0 STR_R STR_e STR_j STR_a STR_n STR_g "\0" #define STRING_Runic0 STR_R STR_u STR_n STR_i STR_c "\0" #define STRING_S0 STR_S "\0" +#define STRING_Samaritan0 STR_S STR_a STR_m STR_a STR_r STR_i STR_t STR_a STR_n "\0" #define STRING_Saurashtra0 STR_S STR_a STR_u STR_r STR_a STR_s STR_h STR_t STR_r STR_a "\0" #define STRING_Sc0 STR_S STR_c "\0" #define STRING_Shavian0 STR_S STR_h STR_a STR_v STR_i STR_a STR_n "\0" @@ -220,6 +233,8 @@ #define STRING_Tagalog0 STR_T STR_a STR_g STR_a STR_l STR_o STR_g "\0" #define STRING_Tagbanwa0 STR_T STR_a STR_g STR_b STR_a STR_n STR_w STR_a "\0" #define STRING_Tai_Le0 STR_T STR_a STR_i STR_UNDERSCORE STR_L STR_e "\0" +#define STRING_Tai_Tham0 STR_T STR_a STR_i STR_UNDERSCORE STR_T STR_h STR_a STR_m "\0" +#define STRING_Tai_Viet0 STR_T STR_a STR_i STR_UNDERSCORE STR_V STR_i STR_e STR_t "\0" #define STRING_Tamil0 STR_T STR_a STR_m STR_i STR_l "\0" #define STRING_Telugu0 STR_T STR_e STR_l STR_u STR_g STR_u "\0" #define STRING_Thaana0 STR_T STR_h STR_a STR_a STR_n STR_a "\0" @@ -228,6 +243,10 @@ #define STRING_Tifinagh0 STR_T STR_i STR_f STR_i STR_n STR_a STR_g STR_h "\0" #define STRING_Ugaritic0 STR_U STR_g STR_a STR_r STR_i STR_t STR_i STR_c "\0" #define STRING_Vai0 STR_V STR_a STR_i "\0" +#define STRING_Xan0 STR_X STR_a STR_n "\0" +#define STRING_Xps0 STR_X STR_p STR_s "\0" +#define STRING_Xsp0 STR_X STR_s STR_p "\0" +#define STRING_Xwd0 STR_X STR_w STR_d "\0" #define STRING_Yi0 STR_Y STR_i "\0" #define STRING_Z0 STR_Z "\0" #define STRING_Zl0 STR_Z STR_l "\0" @@ -238,7 +257,9 @@ STRING_Any0 STRING_Arabic0 STRING_Armenian0 + STRING_Avestan0 STRING_Balinese0 + STRING_Bamum0 STRING_Bengali0 STRING_Bopomofo0 STRING_Braille0 @@ -261,6 +282,7 @@ STRING_Cyrillic0 STRING_Deseret0 STRING_Devanagari0 + STRING_Egyptian_Hieroglyphs0 STRING_Ethiopic0 STRING_Georgian0 STRING_Glagolitic0 @@ -273,7 +295,12 @@ STRING_Hanunoo0 STRING_Hebrew0 STRING_Hiragana0 + STRING_Imperial_Aramaic0 STRING_Inherited0 + STRING_Inscriptional_Pahlavi0 + STRING_Inscriptional_Parthian0 + STRING_Javanese0 + STRING_Kaithi0 STRING_Kannada0 STRING_Katakana0 STRING_Kayah_Li0 @@ -286,6 +313,7 @@ STRING_Lepcha0 STRING_Limbu0 STRING_Linear_B0 + STRING_Lisu0 STRING_Ll0 STRING_Lm0 STRING_Lo0 @@ -297,6 +325,7 @@ STRING_Malayalam0 STRING_Mc0 STRING_Me0 + STRING_Meetei_Mayek0 STRING_Mn0 STRING_Mongolian0 STRING_Myanmar0 @@ -310,6 +339,8 @@ STRING_Ol_Chiki0 STRING_Old_Italic0 STRING_Old_Persian0 + STRING_Old_South_Arabian0 + STRING_Old_Turkic0 STRING_Oriya0 STRING_Osmanya0 STRING_P0 @@ -325,6 +356,7 @@ STRING_Rejang0 STRING_Runic0 STRING_S0 + STRING_Samaritan0 STRING_Saurashtra0 STRING_Sc0 STRING_Shavian0 @@ -338,6 +370,8 @@ STRING_Tagalog0 STRING_Tagbanwa0 STRING_Tai_Le0 + STRING_Tai_Tham0 + STRING_Tai_Viet0 STRING_Tamil0 STRING_Telugu0 STRING_Thaana0 @@ -346,6 +380,10 @@ STRING_Tifinagh0 STRING_Ugaritic0 STRING_Vai0 + STRING_Xan0 + STRING_Xps0 + STRING_Xsp0 + STRING_Xwd0 STRING_Yi0 STRING_Z0 STRING_Zl0 @@ -356,119 +394,138 @@ { 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 } + { 20, PT_SC, ucp_Avestan }, + { 28, PT_SC, ucp_Balinese }, + { 37, PT_SC, ucp_Bamum }, + { 43, PT_SC, ucp_Bengali }, + { 51, PT_SC, ucp_Bopomofo }, + { 60, PT_SC, ucp_Braille }, + { 68, PT_SC, ucp_Buginese }, + { 77, PT_SC, ucp_Buhid }, + { 83, PT_GC, ucp_C }, + { 85, PT_SC, ucp_Canadian_Aboriginal }, + { 105, PT_SC, ucp_Carian }, + { 112, PT_PC, ucp_Cc }, + { 115, PT_PC, ucp_Cf }, + { 118, PT_SC, ucp_Cham }, + { 123, PT_SC, ucp_Cherokee }, + { 132, PT_PC, ucp_Cn }, + { 135, PT_PC, ucp_Co }, + { 138, PT_SC, ucp_Common }, + { 145, PT_SC, ucp_Coptic }, + { 152, PT_PC, ucp_Cs }, + { 155, PT_SC, ucp_Cuneiform }, + { 165, PT_SC, ucp_Cypriot }, + { 173, PT_SC, ucp_Cyrillic }, + { 182, PT_SC, ucp_Deseret }, + { 190, PT_SC, ucp_Devanagari }, + { 201, PT_SC, ucp_Egyptian_Hieroglyphs }, + { 222, PT_SC, ucp_Ethiopic }, + { 231, PT_SC, ucp_Georgian }, + { 240, PT_SC, ucp_Glagolitic }, + { 251, PT_SC, ucp_Gothic }, + { 258, PT_SC, ucp_Greek }, + { 264, PT_SC, ucp_Gujarati }, + { 273, PT_SC, ucp_Gurmukhi }, + { 282, PT_SC, ucp_Han }, + { 286, PT_SC, ucp_Hangul }, + { 293, PT_SC, ucp_Hanunoo }, + { 301, PT_SC, ucp_Hebrew }, + { 308, PT_SC, ucp_Hiragana }, + { 317, PT_SC, ucp_Imperial_Aramaic }, + { 334, PT_SC, ucp_Inherited }, + { 344, PT_SC, ucp_Inscriptional_Pahlavi }, + { 366, PT_SC, ucp_Inscriptional_Parthian }, + { 389, PT_SC, ucp_Javanese }, + { 398, PT_SC, ucp_Kaithi }, + { 405, PT_SC, ucp_Kannada }, + { 413, PT_SC, ucp_Katakana }, + { 422, PT_SC, ucp_Kayah_Li }, + { 431, PT_SC, ucp_Kharoshthi }, + { 442, PT_SC, ucp_Khmer }, + { 448, PT_GC, ucp_L }, + { 450, PT_LAMP, 0 }, + { 453, PT_SC, ucp_Lao }, + { 457, PT_SC, ucp_Latin }, + { 463, PT_SC, ucp_Lepcha }, + { 470, PT_SC, ucp_Limbu }, + { 476, PT_SC, ucp_Linear_B }, + { 485, PT_SC, ucp_Lisu }, + { 490, PT_PC, ucp_Ll }, + { 493, PT_PC, ucp_Lm }, + { 496, PT_PC, ucp_Lo }, + { 499, PT_PC, ucp_Lt }, + { 502, PT_PC, ucp_Lu }, + { 505, PT_SC, ucp_Lycian }, + { 512, PT_SC, ucp_Lydian }, + { 519, PT_GC, ucp_M }, + { 521, PT_SC, ucp_Malayalam }, + { 531, PT_PC, ucp_Mc }, + { 534, PT_PC, ucp_Me }, + { 537, PT_SC, ucp_Meetei_Mayek }, + { 550, PT_PC, ucp_Mn }, + { 553, PT_SC, ucp_Mongolian }, + { 563, PT_SC, ucp_Myanmar }, + { 571, PT_GC, ucp_N }, + { 573, PT_PC, ucp_Nd }, + { 576, PT_SC, ucp_New_Tai_Lue }, + { 588, PT_SC, ucp_Nko }, + { 592, PT_PC, ucp_Nl }, + { 595, PT_PC, ucp_No }, + { 598, PT_SC, ucp_Ogham }, + { 604, PT_SC, ucp_Ol_Chiki }, + { 613, PT_SC, ucp_Old_Italic }, + { 624, PT_SC, ucp_Old_Persian }, + { 636, PT_SC, ucp_Old_South_Arabian }, + { 654, PT_SC, ucp_Old_Turkic }, + { 665, PT_SC, ucp_Oriya }, + { 671, PT_SC, ucp_Osmanya }, + { 679, PT_GC, ucp_P }, + { 681, PT_PC, ucp_Pc }, + { 684, PT_PC, ucp_Pd }, + { 687, PT_PC, ucp_Pe }, + { 690, PT_PC, ucp_Pf }, + { 693, PT_SC, ucp_Phags_Pa }, + { 702, PT_SC, ucp_Phoenician }, + { 713, PT_PC, ucp_Pi }, + { 716, PT_PC, ucp_Po }, + { 719, PT_PC, ucp_Ps }, + { 722, PT_SC, ucp_Rejang }, + { 729, PT_SC, ucp_Runic }, + { 735, PT_GC, ucp_S }, + { 737, PT_SC, ucp_Samaritan }, + { 747, PT_SC, ucp_Saurashtra }, + { 758, PT_PC, ucp_Sc }, + { 761, PT_SC, ucp_Shavian }, + { 769, PT_SC, ucp_Sinhala }, + { 777, PT_PC, ucp_Sk }, + { 780, PT_PC, ucp_Sm }, + { 783, PT_PC, ucp_So }, + { 786, PT_SC, ucp_Sundanese }, + { 796, PT_SC, ucp_Syloti_Nagri }, + { 809, PT_SC, ucp_Syriac }, + { 816, PT_SC, ucp_Tagalog }, + { 824, PT_SC, ucp_Tagbanwa }, + { 833, PT_SC, ucp_Tai_Le }, + { 840, PT_SC, ucp_Tai_Tham }, + { 849, PT_SC, ucp_Tai_Viet }, + { 858, PT_SC, ucp_Tamil }, + { 864, PT_SC, ucp_Telugu }, + { 871, PT_SC, ucp_Thaana }, + { 878, PT_SC, ucp_Thai }, + { 883, PT_SC, ucp_Tibetan }, + { 891, PT_SC, ucp_Tifinagh }, + { 900, PT_SC, ucp_Ugaritic }, + { 909, PT_SC, ucp_Vai }, + { 913, PT_ALNUM, 0 }, + { 917, PT_PXSPACE, 0 }, + { 921, PT_SPACE, 0 }, + { 925, PT_WORD, 0 }, + { 929, PT_SC, ucp_Yi }, + { 932, PT_GC, ucp_Z }, + { 934, PT_PC, ucp_Zl }, + { 937, PT_PC, ucp_Zp }, + { 940, PT_PC, ucp_Zs } }; const int _pcre_utt_size = sizeof(_pcre_utt)/sizeof(ucp_type_table); @@ . patch -p0 <<'@@ .' Index: pcre/pcre_ucd.c ============================================================================ $ cvs diff -u -r1.1.1.2 -r1.1.1.2.2.1 pcre_ucd.c --- pcre/pcre_ucd.c 5 Dec 2009 13:54:03 -0000 1.1.1.2 +++ pcre/pcre_ucd.c 23 Aug 2010 13:08:53 -0000 1.1.1.2.2.1 @@ -6,7 +6,7 @@ /* Unicode character database. */ /* This file was autogenerated by the MultiStage2.py script. */ -/* Total size: 52808 bytes, block size: 128. */ +/* Total size: 56880 bytes, block size: 128. */ /* The tables herein are needed only when UCP support is built */ /* into PCRE. This module should not be referenced otherwise, so */ @@ -32,7 +32,7 @@ } ucd_record; */ -const ucd_record _pcre_ucd_records[] = { /* 3656 bytes, record size 8 */ +const ucd_record _pcre_ucd_records[] = { /* 4144 bytes, record size 8 */ { 9, 0, 0, }, /* 0 */ { 9, 29, 0, }, /* 1 */ { 9, 21, 0, }, /* 2 */ @@ -90,956 +90,1017 @@ { 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 */ + { 33, 5, 10815, }, /* 57 */ + { 33, 9, -195, }, /* 58 */ + { 33, 9, 69, }, /* 59 */ + { 33, 9, 71, }, /* 60 */ + { 33, 5, 10783, }, /* 61 */ + { 33, 5, 10780, }, /* 62 */ + { 33, 5, 10782, }, /* 63 */ + { 33, 5, -210, }, /* 64 */ + { 33, 5, -206, }, /* 65 */ + { 33, 5, -205, }, /* 66 */ + { 33, 5, -202, }, /* 67 */ + { 33, 5, -203, }, /* 68 */ + { 33, 5, -207, }, /* 69 */ + { 33, 5, -209, }, /* 70 */ + { 33, 5, -211, }, /* 71 */ + { 33, 5, 10743, }, /* 72 */ + { 33, 5, 10749, }, /* 73 */ + { 33, 5, -213, }, /* 74 */ + { 33, 5, -214, }, /* 75 */ + { 33, 5, 10727, }, /* 76 */ + { 33, 5, -218, }, /* 77 */ + { 33, 5, -69, }, /* 78 */ + { 33, 5, -217, }, /* 79 */ + { 33, 5, -71, }, /* 80 */ + { 33, 5, -219, }, /* 81 */ + { 33, 6, 0, }, /* 82 */ + { 9, 6, 0, }, /* 83 */ + { 27, 12, 0, }, /* 84 */ + { 27, 12, 84, }, /* 85 */ + { 19, 9, 1, }, /* 86 */ + { 19, 5, -1, }, /* 87 */ + { 19, 24, 0, }, /* 88 */ + { 9, 2, 0, }, /* 89 */ + { 19, 6, 0, }, /* 90 */ + { 19, 5, 130, }, /* 91 */ + { 19, 9, 38, }, /* 92 */ + { 19, 9, 37, }, /* 93 */ + { 19, 9, 64, }, /* 94 */ + { 19, 9, 63, }, /* 95 */ + { 19, 5, 0, }, /* 96 */ + { 19, 9, 32, }, /* 97 */ + { 19, 5, -38, }, /* 98 */ + { 19, 5, -37, }, /* 99 */ + { 19, 5, -32, }, /* 100 */ + { 19, 5, -31, }, /* 101 */ + { 19, 5, -64, }, /* 102 */ + { 19, 5, -63, }, /* 103 */ + { 19, 9, 8, }, /* 104 */ + { 19, 5, -62, }, /* 105 */ + { 19, 5, -57, }, /* 106 */ + { 19, 9, 0, }, /* 107 */ + { 19, 5, -47, }, /* 108 */ + { 19, 5, -54, }, /* 109 */ + { 19, 5, -8, }, /* 110 */ + { 10, 9, 1, }, /* 111 */ + { 10, 5, -1, }, /* 112 */ + { 19, 5, -86, }, /* 113 */ + { 19, 5, -80, }, /* 114 */ + { 19, 5, 7, }, /* 115 */ + { 19, 9, -60, }, /* 116 */ + { 19, 5, -96, }, /* 117 */ + { 19, 25, 0, }, /* 118 */ + { 19, 9, -7, }, /* 119 */ + { 19, 9, -130, }, /* 120 */ + { 12, 9, 80, }, /* 121 */ + { 12, 9, 32, }, /* 122 */ + { 12, 5, -32, }, /* 123 */ + { 12, 5, -80, }, /* 124 */ + { 12, 9, 1, }, /* 125 */ + { 12, 5, -1, }, /* 126 */ + { 12, 26, 0, }, /* 127 */ + { 12, 12, 0, }, /* 128 */ + { 12, 11, 0, }, /* 129 */ + { 12, 9, 15, }, /* 130 */ + { 12, 5, -15, }, /* 131 */ + { 1, 9, 48, }, /* 132 */ + { 1, 6, 0, }, /* 133 */ + { 1, 21, 0, }, /* 134 */ + { 1, 5, -48, }, /* 135 */ + { 1, 5, 0, }, /* 136 */ + { 1, 17, 0, }, /* 137 */ + { 25, 12, 0, }, /* 138 */ + { 25, 17, 0, }, /* 139 */ + { 25, 21, 0, }, /* 140 */ + { 25, 7, 0, }, /* 141 */ + { 0, 25, 0, }, /* 142 */ + { 0, 21, 0, }, /* 143 */ + { 0, 23, 0, }, /* 144 */ + { 0, 26, 0, }, /* 145 */ + { 0, 12, 0, }, /* 146 */ + { 0, 7, 0, }, /* 147 */ + { 0, 11, 0, }, /* 148 */ + { 0, 6, 0, }, /* 149 */ + { 0, 13, 0, }, /* 150 */ + { 49, 21, 0, }, /* 151 */ + { 49, 1, 0, }, /* 152 */ + { 49, 7, 0, }, /* 153 */ + { 49, 12, 0, }, /* 154 */ + { 55, 7, 0, }, /* 155 */ + { 55, 12, 0, }, /* 156 */ + { 63, 13, 0, }, /* 157 */ + { 63, 7, 0, }, /* 158 */ + { 63, 12, 0, }, /* 159 */ + { 63, 6, 0, }, /* 160 */ + { 63, 26, 0, }, /* 161 */ + { 63, 21, 0, }, /* 162 */ + { 89, 7, 0, }, /* 163 */ + { 89, 12, 0, }, /* 164 */ + { 89, 6, 0, }, /* 165 */ + { 89, 21, 0, }, /* 166 */ + { 14, 12, 0, }, /* 167 */ + { 14, 10, 0, }, /* 168 */ + { 14, 7, 0, }, /* 169 */ + { 14, 13, 0, }, /* 170 */ + { 14, 6, 0, }, /* 171 */ + { 2, 12, 0, }, /* 172 */ + { 2, 10, 0, }, /* 173 */ + { 2, 7, 0, }, /* 174 */ + { 2, 13, 0, }, /* 175 */ + { 2, 23, 0, }, /* 176 */ + { 2, 15, 0, }, /* 177 */ + { 2, 26, 0, }, /* 178 */ + { 21, 12, 0, }, /* 179 */ + { 21, 10, 0, }, /* 180 */ + { 21, 7, 0, }, /* 181 */ + { 21, 13, 0, }, /* 182 */ + { 20, 12, 0, }, /* 183 */ + { 20, 10, 0, }, /* 184 */ + { 20, 7, 0, }, /* 185 */ + { 20, 13, 0, }, /* 186 */ + { 20, 23, 0, }, /* 187 */ + { 43, 12, 0, }, /* 188 */ + { 43, 10, 0, }, /* 189 */ + { 43, 7, 0, }, /* 190 */ + { 43, 13, 0, }, /* 191 */ + { 43, 26, 0, }, /* 192 */ + { 53, 12, 0, }, /* 193 */ + { 53, 7, 0, }, /* 194 */ + { 53, 10, 0, }, /* 195 */ + { 53, 13, 0, }, /* 196 */ + { 53, 15, 0, }, /* 197 */ + { 53, 26, 0, }, /* 198 */ + { 53, 23, 0, }, /* 199 */ + { 54, 10, 0, }, /* 200 */ + { 54, 7, 0, }, /* 201 */ + { 54, 12, 0, }, /* 202 */ + { 54, 13, 0, }, /* 203 */ + { 54, 15, 0, }, /* 204 */ + { 54, 26, 0, }, /* 205 */ + { 28, 10, 0, }, /* 206 */ + { 28, 7, 0, }, /* 207 */ + { 28, 12, 0, }, /* 208 */ + { 28, 13, 0, }, /* 209 */ + { 36, 10, 0, }, /* 210 */ + { 36, 7, 0, }, /* 211 */ + { 36, 12, 0, }, /* 212 */ + { 36, 13, 0, }, /* 213 */ + { 36, 15, 0, }, /* 214 */ + { 36, 26, 0, }, /* 215 */ + { 47, 10, 0, }, /* 216 */ + { 47, 7, 0, }, /* 217 */ + { 47, 12, 0, }, /* 218 */ + { 47, 21, 0, }, /* 219 */ + { 56, 7, 0, }, /* 220 */ + { 56, 12, 0, }, /* 221 */ + { 56, 6, 0, }, /* 222 */ + { 56, 21, 0, }, /* 223 */ + { 56, 13, 0, }, /* 224 */ + { 32, 7, 0, }, /* 225 */ + { 32, 12, 0, }, /* 226 */ + { 32, 6, 0, }, /* 227 */ + { 32, 13, 0, }, /* 228 */ + { 57, 7, 0, }, /* 229 */ + { 57, 26, 0, }, /* 230 */ + { 57, 21, 0, }, /* 231 */ + { 57, 12, 0, }, /* 232 */ + { 57, 13, 0, }, /* 233 */ + { 57, 15, 0, }, /* 234 */ + { 57, 22, 0, }, /* 235 */ + { 57, 18, 0, }, /* 236 */ + { 57, 10, 0, }, /* 237 */ + { 38, 7, 0, }, /* 238 */ + { 38, 10, 0, }, /* 239 */ + { 38, 12, 0, }, /* 240 */ + { 38, 13, 0, }, /* 241 */ + { 38, 21, 0, }, /* 242 */ + { 38, 26, 0, }, /* 243 */ + { 16, 9, 7264, }, /* 244 */ + { 16, 7, 0, }, /* 245 */ + { 16, 6, 0, }, /* 246 */ + { 23, 7, 0, }, /* 247 */ + { 15, 7, 0, }, /* 248 */ + { 15, 12, 0, }, /* 249 */ + { 15, 26, 0, }, /* 250 */ + { 15, 21, 0, }, /* 251 */ + { 15, 15, 0, }, /* 252 */ + { 8, 7, 0, }, /* 253 */ + { 7, 17, 0, }, /* 254 */ + { 7, 7, 0, }, /* 255 */ + { 7, 21, 0, }, /* 256 */ + { 40, 29, 0, }, /* 257 */ + { 40, 7, 0, }, /* 258 */ + { 40, 22, 0, }, /* 259 */ + { 40, 18, 0, }, /* 260 */ + { 45, 7, 0, }, /* 261 */ + { 45, 14, 0, }, /* 262 */ + { 50, 7, 0, }, /* 263 */ + { 50, 12, 0, }, /* 264 */ + { 24, 7, 0, }, /* 265 */ + { 24, 12, 0, }, /* 266 */ + { 6, 7, 0, }, /* 267 */ + { 6, 12, 0, }, /* 268 */ + { 51, 7, 0, }, /* 269 */ + { 51, 12, 0, }, /* 270 */ + { 31, 7, 0, }, /* 271 */ + { 31, 1, 0, }, /* 272 */ + { 31, 10, 0, }, /* 273 */ + { 31, 12, 0, }, /* 274 */ + { 31, 21, 0, }, /* 275 */ + { 31, 6, 0, }, /* 276 */ + { 31, 23, 0, }, /* 277 */ + { 31, 13, 0, }, /* 278 */ + { 31, 15, 0, }, /* 279 */ + { 37, 21, 0, }, /* 280 */ + { 37, 17, 0, }, /* 281 */ + { 37, 12, 0, }, /* 282 */ + { 37, 29, 0, }, /* 283 */ + { 37, 13, 0, }, /* 284 */ + { 37, 7, 0, }, /* 285 */ + { 37, 6, 0, }, /* 286 */ + { 34, 7, 0, }, /* 287 */ + { 34, 12, 0, }, /* 288 */ + { 34, 10, 0, }, /* 289 */ + { 34, 26, 0, }, /* 290 */ + { 34, 21, 0, }, /* 291 */ + { 34, 13, 0, }, /* 292 */ + { 52, 7, 0, }, /* 293 */ + { 39, 7, 0, }, /* 294 */ + { 39, 10, 0, }, /* 295 */ + { 39, 13, 0, }, /* 296 */ + { 39, 21, 0, }, /* 297 */ + { 31, 26, 0, }, /* 298 */ + { 5, 7, 0, }, /* 299 */ + { 5, 12, 0, }, /* 300 */ + { 5, 10, 0, }, /* 301 */ + { 5, 21, 0, }, /* 302 */ + { 90, 7, 0, }, /* 303 */ + { 90, 10, 0, }, /* 304 */ + { 90, 12, 0, }, /* 305 */ + { 90, 13, 0, }, /* 306 */ + { 90, 21, 0, }, /* 307 */ + { 90, 6, 0, }, /* 308 */ + { 61, 12, 0, }, /* 309 */ + { 61, 10, 0, }, /* 310 */ + { 61, 7, 0, }, /* 311 */ + { 61, 13, 0, }, /* 312 */ + { 61, 21, 0, }, /* 313 */ + { 61, 26, 0, }, /* 314 */ + { 75, 12, 0, }, /* 315 */ + { 75, 10, 0, }, /* 316 */ + { 75, 7, 0, }, /* 317 */ + { 75, 13, 0, }, /* 318 */ + { 69, 7, 0, }, /* 319 */ + { 69, 10, 0, }, /* 320 */ + { 69, 12, 0, }, /* 321 */ + { 69, 21, 0, }, /* 322 */ + { 69, 13, 0, }, /* 323 */ + { 72, 13, 0, }, /* 324 */ + { 72, 7, 0, }, /* 325 */ + { 72, 6, 0, }, /* 326 */ + { 72, 21, 0, }, /* 327 */ + { 9, 10, 0, }, /* 328 */ + { 9, 7, 0, }, /* 329 */ + { 12, 5, 0, }, /* 330 */ + { 12, 6, 0, }, /* 331 */ + { 33, 5, 35332, }, /* 332 */ + { 33, 5, 3814, }, /* 333 */ + { 33, 5, -59, }, /* 334 */ + { 33, 9, -7615, }, /* 335 */ + { 19, 5, 8, }, /* 336 */ + { 19, 9, -8, }, /* 337 */ + { 19, 5, 74, }, /* 338 */ + { 19, 5, 86, }, /* 339 */ + { 19, 5, 100, }, /* 340 */ + { 19, 5, 128, }, /* 341 */ + { 19, 5, 112, }, /* 342 */ + { 19, 5, 126, }, /* 343 */ + { 19, 8, -8, }, /* 344 */ + { 19, 5, 9, }, /* 345 */ + { 19, 9, -74, }, /* 346 */ + { 19, 8, -9, }, /* 347 */ + { 19, 5, -7205, }, /* 348 */ + { 19, 9, -86, }, /* 349 */ + { 19, 9, -100, }, /* 350 */ + { 19, 9, -112, }, /* 351 */ + { 19, 9, -128, }, /* 352 */ + { 19, 9, -126, }, /* 353 */ + { 27, 1, 0, }, /* 354 */ + { 9, 27, 0, }, /* 355 */ + { 9, 28, 0, }, /* 356 */ + { 27, 11, 0, }, /* 357 */ + { 9, 9, 0, }, /* 358 */ + { 9, 5, 0, }, /* 359 */ + { 19, 9, -7517, }, /* 360 */ + { 33, 9, -8383, }, /* 361 */ + { 33, 9, -8262, }, /* 362 */ + { 33, 9, 28, }, /* 363 */ + { 33, 5, -28, }, /* 364 */ + { 33, 14, 16, }, /* 365 */ + { 33, 14, -16, }, /* 366 */ + { 33, 14, 0, }, /* 367 */ + { 9, 26, 26, }, /* 368 */ + { 9, 26, -26, }, /* 369 */ + { 4, 26, 0, }, /* 370 */ + { 17, 9, 48, }, /* 371 */ + { 17, 5, -48, }, /* 372 */ + { 33, 9, -10743, }, /* 373 */ + { 33, 9, -3814, }, /* 374 */ + { 33, 9, -10727, }, /* 375 */ + { 33, 5, -10795, }, /* 376 */ + { 33, 5, -10792, }, /* 377 */ + { 33, 9, -10780, }, /* 378 */ + { 33, 9, -10749, }, /* 379 */ + { 33, 9, -10783, }, /* 380 */ + { 33, 9, -10782, }, /* 381 */ + { 33, 9, -10815, }, /* 382 */ + { 10, 5, 0, }, /* 383 */ + { 10, 26, 0, }, /* 384 */ + { 10, 12, 0, }, /* 385 */ + { 10, 21, 0, }, /* 386 */ + { 10, 15, 0, }, /* 387 */ + { 16, 5, -7264, }, /* 388 */ + { 58, 7, 0, }, /* 389 */ + { 58, 6, 0, }, /* 390 */ + { 22, 26, 0, }, /* 391 */ + { 22, 6, 0, }, /* 392 */ + { 22, 14, 0, }, /* 393 */ + { 26, 7, 0, }, /* 394 */ + { 26, 6, 0, }, /* 395 */ + { 29, 7, 0, }, /* 396 */ + { 29, 6, 0, }, /* 397 */ + { 3, 7, 0, }, /* 398 */ + { 23, 26, 0, }, /* 399 */ + { 29, 26, 0, }, /* 400 */ + { 22, 7, 0, }, /* 401 */ + { 60, 7, 0, }, /* 402 */ + { 60, 6, 0, }, /* 403 */ + { 60, 26, 0, }, /* 404 */ + { 85, 7, 0, }, /* 405 */ + { 85, 6, 0, }, /* 406 */ + { 85, 21, 0, }, /* 407 */ + { 76, 7, 0, }, /* 408 */ + { 76, 6, 0, }, /* 409 */ + { 76, 21, 0, }, /* 410 */ + { 76, 13, 0, }, /* 411 */ + { 12, 7, 0, }, /* 412 */ + { 12, 21, 0, }, /* 413 */ + { 78, 7, 0, }, /* 414 */ + { 78, 14, 0, }, /* 415 */ + { 78, 12, 0, }, /* 416 */ + { 78, 21, 0, }, /* 417 */ + { 33, 9, -35332, }, /* 418 */ + { 48, 7, 0, }, /* 419 */ + { 48, 12, 0, }, /* 420 */ + { 48, 10, 0, }, /* 421 */ + { 48, 26, 0, }, /* 422 */ + { 64, 7, 0, }, /* 423 */ + { 64, 21, 0, }, /* 424 */ + { 74, 10, 0, }, /* 425 */ + { 74, 7, 0, }, /* 426 */ + { 74, 12, 0, }, /* 427 */ + { 74, 21, 0, }, /* 428 */ + { 74, 13, 0, }, /* 429 */ + { 14, 21, 0, }, /* 430 */ + { 68, 13, 0, }, /* 431 */ + { 68, 7, 0, }, /* 432 */ + { 68, 12, 0, }, /* 433 */ + { 68, 21, 0, }, /* 434 */ + { 73, 7, 0, }, /* 435 */ + { 73, 12, 0, }, /* 436 */ + { 73, 10, 0, }, /* 437 */ + { 73, 21, 0, }, /* 438 */ + { 83, 12, 0, }, /* 439 */ + { 83, 10, 0, }, /* 440 */ + { 83, 7, 0, }, /* 441 */ + { 83, 21, 0, }, /* 442 */ + { 83, 6, 0, }, /* 443 */ + { 83, 13, 0, }, /* 444 */ + { 67, 7, 0, }, /* 445 */ + { 67, 12, 0, }, /* 446 */ + { 67, 10, 0, }, /* 447 */ + { 67, 13, 0, }, /* 448 */ + { 67, 21, 0, }, /* 449 */ + { 38, 6, 0, }, /* 450 */ + { 91, 7, 0, }, /* 451 */ + { 91, 12, 0, }, /* 452 */ + { 91, 6, 0, }, /* 453 */ + { 91, 21, 0, }, /* 454 */ + { 86, 7, 0, }, /* 455 */ + { 86, 10, 0, }, /* 456 */ + { 86, 12, 0, }, /* 457 */ + { 86, 21, 0, }, /* 458 */ + { 86, 13, 0, }, /* 459 */ + { 9, 4, 0, }, /* 460 */ + { 9, 3, 0, }, /* 461 */ + { 25, 25, 0, }, /* 462 */ + { 35, 7, 0, }, /* 463 */ + { 19, 14, 0, }, /* 464 */ + { 19, 15, 0, }, /* 465 */ + { 19, 26, 0, }, /* 466 */ + { 70, 7, 0, }, /* 467 */ + { 66, 7, 0, }, /* 468 */ + { 41, 7, 0, }, /* 469 */ + { 41, 15, 0, }, /* 470 */ + { 18, 7, 0, }, /* 471 */ + { 18, 14, 0, }, /* 472 */ + { 59, 7, 0, }, /* 473 */ + { 59, 21, 0, }, /* 474 */ + { 42, 7, 0, }, /* 475 */ + { 42, 21, 0, }, /* 476 */ + { 42, 14, 0, }, /* 477 */ + { 13, 9, 40, }, /* 478 */ + { 13, 5, -40, }, /* 479 */ + { 46, 7, 0, }, /* 480 */ + { 44, 7, 0, }, /* 481 */ + { 44, 13, 0, }, /* 482 */ + { 11, 7, 0, }, /* 483 */ + { 80, 7, 0, }, /* 484 */ + { 80, 21, 0, }, /* 485 */ + { 80, 15, 0, }, /* 486 */ + { 65, 7, 0, }, /* 487 */ + { 65, 15, 0, }, /* 488 */ + { 65, 21, 0, }, /* 489 */ + { 71, 7, 0, }, /* 490 */ + { 71, 21, 0, }, /* 491 */ + { 30, 7, 0, }, /* 492 */ + { 30, 12, 0, }, /* 493 */ + { 30, 15, 0, }, /* 494 */ + { 30, 21, 0, }, /* 495 */ + { 87, 7, 0, }, /* 496 */ + { 87, 15, 0, }, /* 497 */ + { 87, 21, 0, }, /* 498 */ + { 77, 7, 0, }, /* 499 */ + { 77, 21, 0, }, /* 500 */ + { 82, 7, 0, }, /* 501 */ + { 82, 15, 0, }, /* 502 */ + { 81, 7, 0, }, /* 503 */ + { 81, 15, 0, }, /* 504 */ + { 88, 7, 0, }, /* 505 */ + { 0, 15, 0, }, /* 506 */ + { 84, 12, 0, }, /* 507 */ + { 84, 10, 0, }, /* 508 */ + { 84, 7, 0, }, /* 509 */ + { 84, 21, 0, }, /* 510 */ + { 84, 1, 0, }, /* 511 */ + { 62, 7, 0, }, /* 512 */ + { 62, 14, 0, }, /* 513 */ + { 62, 21, 0, }, /* 514 */ + { 79, 7, 0, }, /* 515 */ + { 19, 12, 0, }, /* 516 */ + { 26, 26, 0, }, /* 517 */ }; 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 */ + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, /* U+0800 */ + 32, 33, 34, 34, 35, 36, 37, 38, 39, 40, 40, 40, 41, 42, 43, 44, /* U+1000 */ + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, /* U+1800 */ + 61, 62, 63, 64, 65, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, /* U+2000 */ + 76, 76, 65, 77, 65, 65, 78, 17, 79, 80, 81, 82, 83, 84, 85, 86, /* U+2800 */ + 87, 88, 89, 90, 91, 92, 93, 70, 94, 94, 94, 94, 94, 94, 94, 94, /* U+3000 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+3800 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+4000 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 95, 94, 94, 94, 94, /* U+4800 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+5000 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+5800 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+6000 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+6800 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+7000 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+7800 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+8000 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+8800 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+9000 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 96, /* U+9800 */ + 97, 98, 98, 98, 98, 98, 98, 98, 98, 99,100,100,101,102,103,104, /* U+A000 */ +105,106,107,108,109,110, 17,111, 34, 34, 34, 34, 34, 34, 34, 34, /* U+A800 */ + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, /* U+B000 */ + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, /* U+B800 */ + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, /* U+C000 */ + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, /* U+C800 */ + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,112, /* U+D000 */ +113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, /* U+D800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+E000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+E800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F000 */ +114,114, 94, 94,115,116,117,118,119,119,120,121,122,123,124,125, /* U+F800 */ +126,127,128,129, 17,130,131,132,133,134, 17, 17, 17, 17, 17, 17, /* U+10000 */ +135, 17,136, 17,137, 17,138, 17,139, 17, 17, 17,140, 17, 17, 17, /* U+10800 */ + 17,141, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+11000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+11800 */ +142,142,142,142,142,142,143, 17,144, 17, 17, 17, 17, 17, 17, 17, /* U+12000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+12800 */ +145,145,145,145,145,145,145,145,146, 17, 17, 17, 17, 17, 17, 17, /* U+13000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+13800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+14000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+14800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+15000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+15800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+16000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+16800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+17000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+17800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+18000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+18800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+19000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+19800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+1A000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+1A800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+1B000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+1B800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+1C000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+1C800 */ + 70,147,148,149,150, 17,151, 17,152,153,154,155,156,157,158,159, /* U+1D000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+1D800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+1E000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+1E800 */ +160,161,162,163,164, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+1F000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+1F800 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+20000 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+20800 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+21000 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+21800 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+22000 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+22800 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+23000 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+23800 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+24000 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+24800 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+25000 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+25800 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+26000 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+26800 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+27000 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+27800 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+28000 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+28800 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+29000 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+29800 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,165, 94, 94, /* U+2A000 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+2A800 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,166, 17, /* U+2B000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+2B800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+2C000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+2C800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+2D000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+2D800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+2E000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+2E800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+2F000 */ + 94, 94, 94, 94,167, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+2F800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+30000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+30800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+31000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+31800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+32000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+32800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+33000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+33800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+34000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+34800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+35000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+35800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+36000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+36800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+37000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+37800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+38000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+38800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+39000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+39800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+3A000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+3A800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+3B000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+3B800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+3C000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+3C800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+3D000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+3D800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+3E000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+3E800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+3F000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+3F800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+40000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+40800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+41000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+41800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+42000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+42800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+43000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+43800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+44000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+44800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+45000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+45800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+46000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+46800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+47000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+47800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+48000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+48800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+49000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+49800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+4A000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+4A800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+4B000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+4B800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+4C000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+4C800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+4D000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+4D800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+4E000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+4E800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+4F000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+4F800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+50000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+50800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+51000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+51800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+52000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+52800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+53000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+53800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+54000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+54800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+55000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+55800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+56000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+56800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+57000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+57800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+58000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+58800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+59000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+59800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+5A000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+5A800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+5B000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+5B800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+5C000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+5C800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+5D000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+5D800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+5E000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+5E800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+5F000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+5F800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+60000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+60800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+61000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+61800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+62000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+62800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+63000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+63800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+64000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+64800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+65000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+65800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+66000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+66800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+67000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+67800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+68000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+68800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+69000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+69800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+6A000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+6A800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+6B000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+6B800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+6C000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+6C800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+6D000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+6D800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+6E000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+6E800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+6F000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+6F800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+70000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+70800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+71000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+71800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+72000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+72800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+73000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+73800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+74000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+74800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+75000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+75800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+76000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+76800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+77000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+77800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+78000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+78800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+79000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+79800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+7A000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+7A800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+7B000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+7B800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+7C000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+7C800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+7D000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+7D800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+7E000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+7E800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+7F000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+7F800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+80000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+80800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+81000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+81800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+82000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+82800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+83000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+83800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+84000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+84800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+85000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+85800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+86000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+86800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+87000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+87800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+88000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+88800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+89000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+89800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+8A000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+8A800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+8B000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+8B800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+8C000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+8C800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+8D000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+8D800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+8E000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+8E800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+8F000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+8F800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+90000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+90800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+91000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+91800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+92000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+92800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+93000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+93800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+94000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+94800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+95000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+95800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+96000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+96800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+97000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+97800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+98000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+98800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+99000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+99800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+9A000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+9A800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+9B000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+9B800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+9C000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+9C800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+9D000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+9D800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+9E000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+9E800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+9F000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+9F800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A0000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A0800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A1000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A1800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A2000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A2800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A3000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A3800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A4000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A4800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A5000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A5800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A6000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A6800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A7000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A7800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A8000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A8800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A9000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A9800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+AA000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+AA800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+AB000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+AB800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+AC000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+AC800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+AD000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+AD800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+AE000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+AE800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+AF000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+AF800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B0000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B0800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B1000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B1800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B2000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B2800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B3000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B3800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B4000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B4800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B5000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B5800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B6000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B6800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B7000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B7800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B8000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B8800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B9000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B9800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+BA000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+BA800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+BB000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+BB800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+BC000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+BC800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+BD000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+BD800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+BE000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+BE800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+BF000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+BF800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C0000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C0800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C1000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C1800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C2000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C2800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C3000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C3800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C4000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C4800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C5000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C5800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C6000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C6800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C7000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C7800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C8000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C8800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C9000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C9800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+CA000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+CA800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+CB000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+CB800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+CC000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+CC800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+CD000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+CD800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+CE000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+CE800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+CF000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+CF800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D0000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D0800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D1000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D1800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D2000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D2800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D3000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D3800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D4000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D4800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D5000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D5800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D6000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D6800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D7000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D7800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D8000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D8800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D9000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D9800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+DA000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+DA800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+DB000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+DB800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+DC000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+DC800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+DD000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+DD800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+DE000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+DE800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+DF000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+DF800 */ +168, 17,169,170, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E0000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E0800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E1000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E1800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E2000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E2800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E3000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E3800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E4000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E4800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E5000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E5800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E6000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E6800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E7000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E7800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E8000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E8800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E9000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E9800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+EA000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+EA800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+EB000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+EB800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+EC000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+EC800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+ED000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+ED800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+EE000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+EE800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+EF000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+EF800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F0000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F0800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F1000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F1800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F2000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F2800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F3000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F3800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F4000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F4800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F5000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F5800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F6000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F6800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F7000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F7800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F8000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F8800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F9000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F9800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+FA000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+FA800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+FB000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+FB800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+FC000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+FC800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+FD000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+FD800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+FE000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+FE800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+FF000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,171, /* U+FF800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+100000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+100800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+101000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+101800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+102000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+102800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+103000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+103800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+104000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+104800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+105000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+105800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+106000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+106800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+107000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+107800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+108000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+108800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+109000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+109800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+10A000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+10A800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+10B000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+10B800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+10C000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+10C800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+10D000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+10D800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+10E000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+10E800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+10F000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,171, /* U+10F800 */ }; -const pcre_uint16 _pcre_ucd_stage2[] = { /* 40448 bytes, block = 128 */ +const pcre_uint16 _pcre_ucd_stage2[] = { /* 44032 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, @@ -1084,513 +1145,533 @@ 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, + 21, 22, 21, 22, 14, 14, 14, 14, 14, 14, 54, 21, 22, 55, 56, 57, + 57, 21, 22, 58, 59, 60, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, + 61, 62, 63, 64, 65, 14, 66, 66, 14, 67, 14, 68, 14, 14, 14, 14, + 66, 14, 14, 69, 14, 14, 14, 14, 70, 71, 14, 72, 14, 14, 14, 71, + 14, 73, 74, 14, 14, 75, 14, 14, 14, 14, 14, 14, 14, 76, 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, + 77, 14, 14, 77, 14, 14, 14, 14, 77, 78, 79, 79, 80, 14, 14, 14, + 14, 14, 81, 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, + 82, 82, 82, 82, 82, 82, 82, 82, 82, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 10, 10, 10, 10, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 82, 82, 82, 82, 82, 10, 10, 10, 10, 10, 10, 10, 83, 10, 83, 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, + 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 85, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, + 86, 87, 86, 87, 83, 88, 86, 87, 89, 89, 90, 91, 91, 91, 2, 89, /* 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, + 89, 89, 89, 89, 88, 10, 92, 2, 93, 93, 93, 89, 94, 89, 95, 95, + 96, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, + 97, 97, 89, 97, 97, 97, 97, 97, 97, 97, 97, 97, 98, 99, 99, 99, + 96,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, +100,100,101,100,100,100,100,100,100,100,100,100,102,103,103,104, +105,106,107,107,107,108,109,110, 86, 87, 86, 87, 86, 87, 86, 87, + 86, 87,111,112,111,112,111,112,111,112,111,112,111,112,111,112, +113,114,115, 96,116,117,118, 86, 87,119, 86, 87, 96,120,120,120, /* 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, +122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122, +123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, +123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, +124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, +125,126,125,126,125,126,125,126,125,126,125,126,125,126,125,126, +125,126,125,126,125,126,125,126,125,126,125,126,125,126,125,126, /* 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, +125,126,127,128,128, 84, 84,128,129,129,125,126,125,126,125,126, +125,126,125,126,125,126,125,126,125,126,125,126,125,126,125,126, +125,126,125,126,125,126,125,126,125,126,125,126,125,126,125,126, +125,126,125,126,125,126,125,126,125,126,125,126,125,126,125,126, +130,125,126,125,126,125,126,125,126,125,126,125,126,125,126,131, +125,126,125,126,125,126,125,126,125,126,125,126,125,126,125,126, +125,126,125,126,125,126,125,126,125,126,125,126,125,126,125,126, +125,126,125,126,125,126,125,126,125,126,125,126,125,126,125,126, /* 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, +125,126,125,126,125,126,125,126,125,126,125,126,125,126,125,126, +125,126,125,126,125,126,125,126,125,126,125,126,125,126,125,126, +125,126,125,126,125,126, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132, +132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132, +132,132,132,132,132,132,132, 89, 89,133,134,134,134,134,134,134, + 89,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135, +135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135, /* 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, +135,135,135,135,135,135,135,136, 89, 2,137, 89, 89, 89, 89, 89, + 89,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138, +138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138, +138,138,138,138,138,138,138,138,138,138,138,138,138,138,139,138, +140,138,138,140,138,138,140,138, 89, 89, 89, 89, 89, 89, 89, 89, +141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, +141,141,141,141,141,141,141,141,141,141,141, 89, 89, 89, 89, 89, +141,141,141,140,140, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* 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, + 16, 16, 16, 16, 89, 89,142,142,142,143,143,144, 2,143,145,145, +146,146,146,146,146,146,146,146,146,146,146, 2, 89, 89,143, 2, + 89,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147, +147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147, + 83,147,147,147,147,147,147,147,147,147,147, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84,146,146,146,146,146,146,146,146,146, 89, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,143,143,143,143,147,147, + 84,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147, /* 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, +147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147, +147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147, +147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147, +147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147, +147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147, +147,147,147,147,143,147,146,146,146,146,146,146,146, 16,148,146, +146,146,146,146,146,149,149,146,146,145,146,146,146,146,147,147, +150,150,150,150,150,150,150,150,150,150,147,147,147,145,145,147, /* 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, +151,151,151,151,151,151,151,151,151,151,151,151,151,151, 89,152, +153,154,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,154,154,154,154,154, +154,154,154,154,154,154,154,154,154,154,154, 89, 89,153,153,153, +147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147, +147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147, +147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147, /* 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, +155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155, +155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155, +155,155,155,155,155,155,156,156,156,156,156,156,156,156,156,156, +156,155, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, +157,157,157,157,157,157,157,157,157,157,158,158,158,158,158,158, +158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158, +158,158,158,158,158,158,158,158,158,158,158,159,159,159,159,159, +159,159,159,159,160,160,161,162,162,162,160, 89, 89, 89, 89, 89, /* 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, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,164,164,164,164,165,164,164,164,164,164, +164,164,164,164,165,164,164,164,165,164,164,164,164,164, 89, 89, +166,166,166,166,166,166,166,166,166,166,166,166,166,166,166, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* 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, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* 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, +167,167,167,168,169,169,169,169,169,169,169,169,169,169,169,169, +169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169, +169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169, +169,169,169,169,169,169,169,169,169,169, 89, 89,167,169,168,168, +168,167,167,167,167,167,167,167,167,168,168,168,168,167,168, 89, +169, 84, 84,167,167,167, 89, 89,169,169,169,169,169,169,169,169, +169,169,167,167, 2, 2,170,170,170,170,170,170,170,170,170,170, + 2,171,169, 89, 89, 89, 89, 89, 89,169,169,169,169,169,169,169, /* 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, + 89,172,173,173, 89,174,174,174,174,174,174,174,174, 89, 89,174, +174, 89, 89,174,174,174,174,174,174,174,174,174,174,174,174,174, +174,174,174,174,174,174,174,174,174, 89,174,174,174,174,174,174, +174, 89,174, 89, 89, 89,174,174,174,174, 89, 89,172,174,173,173, +173,172,172,172,172, 89, 89,173,173, 89, 89,173,173,172,174, 89, + 89, 89, 89, 89, 89, 89, 89,173, 89, 89, 89, 89,174,174, 89,174, +174,174,172,172, 89, 89,175,175,175,175,175,175,175,175,175,175, +174,174,176,176,177,177,177,177,177,177,178,176, 89, 89, 89, 89, /* 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, + 89,179,179,180, 89,181,181,181,181,181,181, 89, 89, 89, 89,181, +181, 89, 89,181,181,181,181,181,181,181,181,181,181,181,181,181, +181,181,181,181,181,181,181,181,181, 89,181,181,181,181,181,181, +181, 89,181,181, 89,181,181, 89,181,181, 89, 89,179, 89,180,180, +180,179,179, 89, 89, 89, 89,179,179, 89, 89,179,179,179, 89, 89, + 89,179, 89, 89, 89, 89, 89, 89, 89,181,181,181,181, 89,181, 89, + 89, 89, 89, 89, 89, 89,182,182,182,182,182,182,182,182,182,182, +179,179,181,181,181,179, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* 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, + 89,183,183,184, 89,185,185,185,185,185,185,185,185,185, 89,185, +185,185, 89,185,185,185,185,185,185,185,185,185,185,185,185,185, +185,185,185,185,185,185,185,185,185, 89,185,185,185,185,185,185, +185, 89,185,185, 89,185,185,185,185,185, 89, 89,183,185,184,184, +184,183,183,183,183,183, 89,183,183,184, 89,184,184,183, 89, 89, +185, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, +185,185,183,183, 89, 89,186,186,186,186,186,186,186,186,186,186, + 89,187, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* 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, + 89,188,189,189, 89,190,190,190,190,190,190,190,190, 89, 89,190, +190, 89, 89,190,190,190,190,190,190,190,190,190,190,190,190,190, +190,190,190,190,190,190,190,190,190, 89,190,190,190,190,190,190, +190, 89,190,190, 89,190,190,190,190,190, 89, 89,188,190,189,188, +189,188,188,188,188, 89, 89,189,189, 89, 89,189,189,188, 89, 89, + 89, 89, 89, 89, 89, 89,188,189, 89, 89, 89, 89,190,190, 89,190, +190,190,188,188, 89, 89,191,191,191,191,191,191,191,191,191,191, +192,190, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* 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, + 89, 89,193,194, 89,194,194,194,194,194,194, 89, 89, 89,194,194, +194, 89,194,194,194,194, 89, 89, 89,194,194, 89,194, 89,194,194, + 89, 89, 89,194,194, 89, 89, 89,194,194,194, 89, 89, 89,194,194, +194,194,194,194,194,194,194,194,194,194, 89, 89, 89, 89,195,195, +193,195,195, 89, 89, 89,195,195,195, 89,195,195,195,193, 89, 89, +194, 89, 89, 89, 89, 89, 89,195, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89,196,196,196,196,196,196,196,196,196,196, +197,197,197,198,198,198,198,198,198,199,198, 89, 89, 89, 89, 89, /* 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, + 89,200,200,200, 89,201,201,201,201,201,201,201,201, 89,201,201, +201, 89,201,201,201,201,201,201,201,201,201,201,201,201,201,201, +201,201,201,201,201,201,201,201,201, 89,201,201,201,201,201,201, +201,201,201,201, 89,201,201,201,201,201, 89, 89, 89,201,202,202, +202,200,200,200,200, 89,202,202,202, 89,202,202,202,202, 89, 89, + 89, 89, 89, 89, 89,202,202, 89,201,201, 89, 89, 89, 89, 89, 89, +201,201,202,202, 89, 89,203,203,203,203,203,203,203,203,203,203, + 89, 89, 89, 89, 89, 89, 89, 89,204,204,204,204,204,204,204,205, /* 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, + 89, 89,206,206, 89,207,207,207,207,207,207,207,207, 89,207,207, +207, 89,207,207,207,207,207,207,207,207,207,207,207,207,207,207, +207,207,207,207,207,207,207,207,207, 89,207,207,207,207,207,207, +207,207,207,207, 89,207,207,207,207,207, 89, 89,208,207,206,208, +206,206,206,206,206, 89,208,206,206, 89,206,206,208,208, 89, 89, + 89, 89, 89, 89, 89,206,206, 89, 89, 89, 89, 89, 89, 89,207, 89, +207,207,208,208, 89, 89,209,209,209,209,209,209,209,209,209,209, + 89, 13, 13, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* 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, + 89, 89,210,210, 89,211,211,211,211,211,211,211,211, 89,211,211, +211, 89,211,211,211,211,211,211,211,211,211,211,211,211,211,211, +211,211,211,211,211,211,211,211,211, 89,211,211,211,211,211,211, +211,211,211,211,211,211,211,211,211,211, 89, 89, 89,211,210,210, +210,212,212,212,212, 89,210,210,210, 89,210,210,210,212, 89, 89, + 89, 89, 89, 89, 89, 89, 89,210, 89, 89, 89, 89, 89, 89, 89, 89, +211,211,212,212, 89, 89,213,213,213,213,213,213,213,213,213,213, +214,214,214,214,214,214, 89, 89, 89,215,211,211,211,211,211,211, /* 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, + 89, 89,216,216, 89,217,217,217,217,217,217,217,217,217,217,217, +217,217,217,217,217,217,217, 89, 89, 89,217,217,217,217,217,217, +217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,217, +217,217, 89,217,217,217,217,217,217,217,217,217, 89,217, 89, 89, +217,217,217,217,217,217,217, 89, 89, 89,218, 89, 89, 89, 89,216, +216,216,218,218,218, 89,218, 89,216,216,216,216,216,216,216,216, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89,216,216,219, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* 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, + 89,220,220,220,220,220,220,220,220,220,220,220,220,220,220,220, +220,220,220,220,220,220,220,220,220,220,220,220,220,220,220,220, +220,220,220,220,220,220,220,220,220,220,220,220,220,220,220,220, +220,221,220,220,221,221,221,221,221,221,221, 89, 89, 89, 89, 3, +220,220,220,220,220,220,222,221,221,221,221,221,221,221,221,223, +224,224,224,224,224,224,224,224,224,224,223,223, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* 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, + 89,225,225, 89,225, 89, 89,225,225, 89,225, 89, 89,225, 89, 89, + 89, 89, 89, 89,225,225,225,225, 89,225,225,225,225,225,225,225, + 89,225,225,225, 89,225, 89,225, 89, 89,225,225, 89,225,225,225, +225,226,225,225,226,226,226,226,226,226, 89,226,226,225, 89, 89, +225,225,225,225,225, 89,227, 89,226,226,226,226,226,226, 89, 89, +228,228,228,228,228,228,228,228,228,228, 89, 89,225,225, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* 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, +229,230,230,230,231,231,231,231,231,231,231,231,231,231,231,231, +231,231,231,230,230,230,230,230,232,232,230,230,230,230,230,230, +233,233,233,233,233,233,233,233,233,233,234,234,234,234,234,234, +234,234,234,234,230,232,230,232,230,232,235,236,235,236,237,237, +229,229,229,229,229,229,229,229, 89,229,229,229,229,229,229,229, +229,229,229,229,229,229,229,229,229,229,229,229,229,229,229,229, +229,229,229,229,229,229,229,229,229,229,229,229,229, 89, 89, 89, + 89,232,232,232,232,232,232,232,232,232,232,232,232,232,232,237, /* block 31 */ +232,232,232,232,232,231,232,232,229,229,229,229, 89, 89, 89, 89, +232,232,232,232,232,232,232,232, 89,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,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, +232,232,232,232,232,232,232,232,232,232,232,232,232, 89,230,230, +230,230,230,230,230,230,232,230,230,230,230,230,230, 89,230,230, +231,231,231,231,231, 13, 13, 13, 13, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* 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, +238,238,238,238,238,238,238,238,238,238,238,239,239,240,240,240, +240,239,240,240,240,240,240,240,239,240,240,239,239,240,240,238, +241,241,241,241,241,241,241,241,241,241,242,242,242,242,242,242, +238,238,238,238,238,238,239,239,240,240,238,238,238,238,240,240, +240,238,239,239,239,238,238,239,239,239,239,239,239,239,238,238, +238,240,240,240,240,238,238,238,238,238,238,238,238,238,238,238, /* 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, +238,238,240,239,239,240,240,239,239,239,239,239,239,240,238,239, +241,241,241,241,241,241,241,241,241,241,239,239,239,240,243,243, +244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244, +244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244, +244,244,244,244,244,244, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, +245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245, +245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245, +245,245,245,245,245,245,245,245,245,245,245, 2,246, 89, 89, 89, /* 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, +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, -/* 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, +/* block 35 */ 248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248, 248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248, 248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248, 248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248, +248,248,248,248,248,248,248,248,248, 89,248,248,248,248, 89, 89, +248,248,248,248,248,248,248, 89,248, 89,248,248,248,248, 89, 89, 248,248,248,248,248,248,248,248,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, +/* block 36 */ +248,248,248,248,248,248,248,248,248, 89,248,248,248,248, 89, 89, 248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248, 248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248, +248, 89,248,248,248,248, 89, 89,248,248,248,248,248,248,248, 89, +248, 89,248,248,248,248, 89, 89,248,248,248,248,248,248,248,248, +248,248,248,248,248,248,248, 89,248,248,248,248,248,248,248,248, 248,248,248,248,248,248,248,248,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, +/* block 37 */ 248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248, +248, 89,248,248,248,248, 89, 89,248,248,248,248,248,248,248,248, 248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248, 248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248, 248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248, +248,248,248,248,248,248,248,248,248,248,248, 89, 89, 89, 89,249, +250,251,251,251,251,251,251,251,251,252,252,252,252,252,252,252, +252,252,252,252,252,252,252,252,252,252,252,252,252, 89, 89, 89, + +/* block 38 */ 248,248,248,248,248,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, +250,250,250,250,250,250,250,250,250,250, 89, 89, 89, 89, 89, 89, +253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253, +253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253, +253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253, +253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253, +253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253, +253,253,253,253,253, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + +/* block 39 */ +254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, + +/* block 40 */ +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, + +/* block 41 */ +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,256,256,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, /* 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, +257,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258, +258,258,258,258,258,258,258,258,258,258,258,259,260, 89, 89, 89, +261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261, +261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261, +261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261, +261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261, +261,261,261,261,261,261,261,261,261,261,261, 2, 2, 2,262,262, +262, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* 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, +263,263,263,263,263,263,263,263,263,263,263,263,263, 89,263,263, +263,263,264,264,264, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, +265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265, +265,265,266,266,266, 2, 2, 89, 89, 89, 89, 89, 89, 89, 89, 89, +267,267,267,267,267,267,267,267,267,267,267,267,267,267,267,267, +267,267,268,268, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, +269,269,269,269,269,269,269,269,269,269,269,269,269, 89,269,269, +269, 89,270,270, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* 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, +271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271, +271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271, +271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271, +271,271,271,271,272,272,273,274,274,274,274,274,274,274,273,273, +273,273,273,273,273,273,274,273,273,274,274,274,274,274,274,274, +274,274,274,274,275,275,275,276,275,275,275,277,271,274, 89, 89, +278,278,278,278,278,278,278,278,278,278, 89, 89, 89, 89, 89, 89, +279,279,279,279,279,279,279,279,279,279, 89, 89, 89, 89, 89, 89, /* 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, +280,280, 2, 2,280, 2,281,280,280,280,280,282,282,282,283, 89, +284,284,284,284,284,284,284,284,284,284, 89, 89, 89, 89, 89, 89, +285,285,285,285,285,285,285,285,285,285,285,285,285,285,285,285, +285,285,285,285,285,285,285,285,285,285,285,285,285,285,285,285, +285,285,285,286,285,285,285,285,285,285,285,285,285,285,285,285, +285,285,285,285,285,285,285,285,285,285,285,285,285,285,285,285, +285,285,285,285,285,285,285,285,285,285,285,285,285,285,285,285, +285,285,285,285,285,285,285,285, 89, 89, 89, 89, 89, 89, 89, 89, /* 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, +285,285,285,285,285,285,285,285,285,285,285,285,285,285,285,285, +285,285,285,285,285,285,285,285,285,285,285,285,285,285,285,285, +285,285,285,285,285,285,285,285,285,282,285, 89, 89, 89, 89, 89, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* 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, +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, 89, 89, 89, +288,288,288,289,289,289,289,288,288,289,289,289, 89, 89, 89, 89, +289,289,288,289,289,289,289,289,289,288,288,288, 89, 89, 89, 89, +290, 89, 89, 89,291,291,292,292,292,292,292,292,292,292,292,292, +293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,293, +293,293,293,293,293,293,293,293,293,293,293,293,293,293, 89, 89, +293,293,293,293,293, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* 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, +294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,294, +294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,294, +294,294,294,294,294,294,294,294,294,294,294,294, 89, 89, 89, 89, +295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295, +295,294,294,294,294,294,294,294,295,295, 89, 89, 89, 89, 89, 89, +296,296,296,296,296,296,296,296,296,296,296, 89, 89, 89,297,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, /* 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, +299,299,299,299,299,299,299,299,299,299,299,299,299,299,299,299, +299,299,299,299,299,299,299,300,300,301,301,301, 89, 89,302,302, +303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,303, +303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,303, +303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,303, +303,303,303,303,303,304,305,304,305,305,305,305,305,305,305, 89, +305,304,305,304,304,305,305,305,305,305,305,305,305,304,304,304, +304,304,304,305,305,305,305,305,305,305,305,305,305, 89, 89,305, /* 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, +306,306,306,306,306,306,306,306,306,306, 89, 89, 89, 89, 89, 89, +306,306,306,306,306,306,306,306,306,306, 89, 89, 89, 89, 89, 89, +307,307,307,307,307,307,307,308,307,307,307,307,307,307, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* 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, +309,309,309,309,310,311,311,311,311,311,311,311,311,311,311,311, +311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,311, +311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,311, +311,311,311,311,309,310,309,309,309,309,309,310,309,310,310,310, +310,310,309,310,310,311,311,311,311,311,311,311, 89, 89, 89, 89, +312,312,312,312,312,312,312,312,312,312,313,313,313,313,313,313, +313,314,314,314,314,314,314,314,314,314,314,309,309,309,309,309, +309,309,309,309,314,314,314,314,314,314,314,314,314, 89, 89, 89, /* 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, +315,315,316,317,317,317,317,317,317,317,317,317,317,317,317,317, +317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317, +317,316,315,315,315,315,316,316,315,315,316, 89, 89, 89,317,317, +318,318,318,318,318,318,318,318,318,318, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* 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, +319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,319, +319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,319, +319,319,319,319,320,320,320,320,320,320,320,320,321,321,321,321, +321,321,321,321,320,320,321,321, 89, 89, 89,322,322,322,322,322, +323,323,323,323,323,323,323,323,323,323, 89, 89, 89,319,319,319, +324,324,324,324,324,324,324,324,324,324,325,325,325,325,325,325, +325,325,325,325,325,325,325,325,325,325,325,325,325,325,325,325, +325,325,325,325,325,325,325,325,326,326,326,326,326,326,327,327, /* block 54 */ + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 84, 84, 84, 2, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, + 84,328, 84, 84, 84, 84, 84, 84, 84,329,329,329,329, 84,329,329, +329,329,328, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + +/* block 55 */ + 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, 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, + 14, 14, 14, 14, 14, 14, 96, 96, 96, 96, 96,330, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 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, + 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 90, 90, 90, + 90, 90, 14, 14, 14, 14, 96, 96, 96, 96, 96, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14,331,332, 14, 14, 14,333, 14, 14, -/* block 55 */ +/* block 56 */ + 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, 82, 82, 82, 82, 82, + 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, + 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 90, + 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 84, 84, 84, + +/* block 57 */ 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, @@ -1600,9 +1681,9 @@ 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 */ +/* block 58 */ 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, 14, 14, 14, 14, 14,334, 14, 14,335, 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, @@ -1610,58 +1691,58 @@ 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 59 */ +336,336,336,336,336,336,336,336,337,337,337,337,337,337,337,337, +336,336,336,336,336,336, 89, 89,337,337,337,337,337,337, 89, 89, +336,336,336,336,336,336,336,336,337,337,337,337,337,337,337,337, +336,336,336,336,336,336,336,336,337,337,337,337,337,337,337,337, +336,336,336,336,336,336, 89, 89,337,337,337,337,337,337, 89, 89, + 96,336, 96,336, 96,336, 96,336, 89,337, 89,337, 89,337, 89,337, +336,336,336,336,336,336,336,336,337,337,337,337,337,337,337,337, +338,338,339,339,339,339,340,340,341,341,342,342,343,343, 89, 89, -/* 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 60 */ +336,336,336,336,336,336,336,336,344,344,344,344,344,344,344,344, +336,336,336,336,336,336,336,336,344,344,344,344,344,344,344,344, +336,336,336,336,336,336,336,336,344,344,344,344,344,344,344,344, +336,336, 96,345, 96, 89, 96, 96,337,337,346,346,347, 88,348, 88, + 88, 88, 96,345, 96, 89, 96, 96,349,349,349,349,347, 88, 88, 88, +336,336, 96, 96, 89, 89, 96, 96,337,337,350,350, 89, 88, 88, 88, +336,336, 96, 96, 96,115, 96, 96,337,337,351,351,119, 88, 88, 88, + 89, 89, 96,345, 96, 89, 96, 96,352,352,353,353,347, 88, 88, 89, -/* block 59 */ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16,339,339, 16, 16, +/* block 61 */ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16,354,354, 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,355,356, 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, + 16, 16, 16, 16, 16, 89, 89, 89, 89, 89, 16, 16, 16, 16, 16, 16, + 17, 82, 89, 89, 17, 17, 17, 17, 17, 17, 6, 6, 6, 4, 5, 82, -/* 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, +/* block 62 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 6, 6, 6, 4, 5, 89, + 82, 82, 82, 82, 82, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 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, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,357,357,357, +357, 84,357,357,357, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, + 84, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, -/* 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 63 */ + 13, 13,358, 13, 13, 13, 13,358, 13, 13,359,358,358,358,359,359, +358,358,358,359, 13,358, 13, 13, 13,358,358,358,358,358, 13, 13, + 13, 13, 13, 13,358, 13,360, 13,358, 13,361,362,358,358, 13,359, +358,358,363,358,359,329,329,329,329,359, 13, 13,359,359,358,358, + 6, 6, 6, 6, 6,358,359,359,359,359, 13, 6, 13, 13,364, 13, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, +365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365, +366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,366, -/* block 62 */ -353,353,353, 21, 22,353,353,353,353, 87, 87, 87, 87, 87, 87, 87, +/* block 64 */ +367,367,367, 21, 22,367,367,367,367, 17, 89, 89, 89, 89, 89, 89, 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, @@ -1670,7 +1751,7 @@ 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 */ +/* block 65 */ 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, @@ -1680,7 +1761,7 @@ 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 */ +/* block 66 */ 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, @@ -1690,37 +1771,37 @@ 13, 13, 13, 13, 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 */ +/* block 67 */ 13, 13, 13, 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, + 6, 6, 13, 13, 13, 13, 13, 13, 13, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, -/* block 66 */ +/* 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, 87, 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, + 13, 13, 13, 13, 13, 13, 13, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 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 */ +/* block 69 */ 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, + 13, 13, 13, 13, 13, 13,368,368,368,368,368,368,368,368,368,368, +368,368,368,368,368,368,368,368,368,368,368,368,368,368,368,368, +369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369, +369,369,369,369,369,369,369,369,369,369, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, -/* block 68 */ +/* 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, @@ -1730,7 +1811,7 @@ 13, 13, 13, 13, 13, 13, 13, 13, 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 */ +/* 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, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, @@ -1740,7 +1821,7 @@ 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 */ +/* block 72 */ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, @@ -1750,47 +1831,47 @@ 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 */ +/* block 73 */ + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 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, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 89, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 89, 13, 89, 89, 89, 89, 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 72 */ - 87, 13, 13, 13, 13, 87, 13, 13, 13, 13, 87, 87, 13, 13, 13, 13, +/* block 74 */ + 89, 13, 13, 13, 13, 89, 13, 13, 13, 13, 89, 89, 13, 13, 13, 13, 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, 89, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 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, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 89, 13, 89, 13, + 13, 13, 13, 89, 89, 89, 13, 13, 13, 13, 13, 13, 13, 13, 13, 89, + 89, 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 */ +/* block 75 */ 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, + 17, 17, 17, 17, 13, 89, 89, 89, 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, + 89, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 89, + 6, 6, 6, 6, 6, 4, 5, 6, 6, 6, 6, 89, 6, 89, 89, 89, 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 76 */ +370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370, +370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370, +370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370, +370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370, +370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370, +370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370, +370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370, +370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370, -/* block 75 */ +/* block 77 */ 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, @@ -1800,617 +1881,697 @@ 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 */ +/* block 78 */ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 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, + 6, 6, 6, 6, 6, 13, 13, 6, 6, 6, 6, 6, 6, 89, 89, 89, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* 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, +371,371,371,371,371,371,371,371,371,371,371,371,371,371,371, 89, 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, +372,372,372,372,372,372,372,372,372,372,372,372,372,372,372, 89, + 21, 22,373,374,375,376,377, 21, 22, 21, 22, 21, 22,378,379,380, +381, 14, 21, 22, 14, 21, 22, 14, 14, 14, 14, 14, 14, 82,382,382, /* 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, +111,112,111,112,111,112,111,112,111,112,111,112,111,112,111,112, +111,112,111,112,111,112,111,112,111,112,111,112,111,112,111,112, +111,112,111,112,111,112,111,112,111,112,111,112,111,112,111,112, +111,112,111,112,111,112,111,112,111,112,111,112,111,112,111,112, +111,112,111,112,111,112,111,112,111,112,111,112,111,112,111,112, +111,112,111,112,111,112,111,112,111,112,111,112,111,112,111,112, +111,112,111,112,383,384,384,384,384,384,384,111,112,111,112,385, +385,385, 89, 89, 89, 89, 89, 89, 89,386,386,386,386,387,386,386, /* 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, +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, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, +389,389,389,389,389,389,389,389,389,389,389,389,389,389,389,389, +389,389,389,389,389,389,389,389,389,389,389,389,389,389,389,389, +389,389,389,389,389,389,389,389,389,389,389,389,389,389,389,389, +389,389,389,389,389,389, 89, 89, 89, 89, 89, 89, 89, 89, 89,390, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* 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, +248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248, +248,248,248,248,248,248,248, 89, 89, 89, 89, 89, 89, 89, 89, 89, +248,248,248,248,248,248,248, 89,248,248,248,248,248,248,248, 89, +248,248,248,248,248,248,248, 89,248,248,248,248,248,248,248, 89, +248,248,248,248,248,248,248, 89,248,248,248,248,248,248,248, 89, +248,248,248,248,248,248,248, 89,248,248,248,248,248,248,248, 89, +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* 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, + 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, 83, + 2, 2, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* 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, +391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391, +391,391,391,391,391,391,391,391,391,391, 89,391,391,391,391,391, +391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391, +391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391, +391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391, +391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391, +391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391, +391,391,391,391, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* 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, +391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391, +391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391, +391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391, +391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391, +391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391, +391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391, +391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391, +391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391, /* 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, +391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391, +391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391, +391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391, +391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391, +391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391, +391,391,391,391,391,391, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 89, 89, 89, 89, /* 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, + 1, 2, 2, 2, 13,392,329,393, 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,393,393,393,393,393,393,393,393,393, 84, 84, 84, 84, 84, 84, + 7, 83, 83, 83, 83, 83, 13, 13,393,393,393,392,329, 2, 13, 13, + 89,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394, +394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394, +394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394, +394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394, /* block 88 */ -241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, 87, +394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394, +394,394,394,394,394,394,394, 89, 89, 84, 84, 10, 10,395,395,394, + 7,396,396,396,396,396,396,396,396,396,396,396,396,396,396,396, +396,396,396,396,396,396,396,396,396,396,396,396,396,396,396,396, +396,396,396,396,396,396,396,396,396,396,396,396,396,396,396,396, +396,396,396,396,396,396,396,396,396,396,396,396,396,396,396,396, +396,396,396,396,396,396,396,396,396,396,396,396,396,396,396,396, +396,396,396,396,396,396,396,396,396,396,396, 2, 83,397,397,396, + +/* block 89 */ + 89, 89, 89, 89, 89,398,398,398,398,398,398,398,398,398,398,398, +398,398,398,398,398,398,398,398,398,398,398,398,398,398,398,398, +398,398,398,398,398,398,398,398,398,398,398,398,398,398, 89, 89, + 89,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, + +/* block 90 */ +247,247,247,247,247,247,247,247,247,247,247,247,247,247,247, 89, 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, +398,398,398,398,398,398,398,398,398,398,398,398,398,398,398,398, +398,398,398,398,398,398,398,398, 89, 89, 89, 89, 89, 89, 89, 89, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 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, + 13, 13, 13, 13, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, +396,396,396,396,396,396,396,396,396,396,396,396,396,396,396,396, -/* 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, +/* block 91 */ +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, 89, 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, 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, -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, +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, 13, -/* block 90 */ +/* block 92 */ 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, +400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400, +400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400, +400,400,400,400,400,400,400,400,400,400,400,400,400,400,400, 89, -/* 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, +/* block 93 */ +400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400, +400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400, +400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400, +400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400, +400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400, +400,400,400,400,400,400,400,400, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 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 94 */ +401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401, +401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401, +401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401, +401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401, +401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401, +401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401, +401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401, +401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401, -/* 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, +/* block 95 */ +401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401, +401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401, +401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401, +401,401,401,401,401,401, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 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, +401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401, +401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401, +401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401, +401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401, +401,401,401,401,401,401,401,401,401,401,401,401, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* 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, +402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,402, +402,402,402,402,402,403,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,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,402,402,402,402,402,402, /* 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, +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,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,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, /* 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, +402,402,402,402,402,402,402,402,402,402,402,402,402, 89, 89, 89, +404,404,404,404,404,404,404,404,404,404,404,404,404,404,404,404, +404,404,404,404,404,404,404,404,404,404,404,404,404,404,404,404, +404,404,404,404,404,404,404,404,404,404,404,404,404,404,404,404, +404,404,404,404,404,404,404, 89, 89, 89, 89, 89, 89, 89, 89, 89, +405,405,405,405,405,405,405,405,405,405,405,405,405,405,405,405, +405,405,405,405,405,405,405,405,405,405,405,405,405,405,405,405, +405,405,405,405,405,405,405,405,406,406,406,406,406,406,407,407, /* 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, +408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408, +408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408, +408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408, +408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408, +408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408, +408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408, +408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408, +408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408, /* block 101 */ +408,408,408,408,408,408,408,408,408,408,408,408,409,410,410,410, +408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408, +411,411,411,411,411,411,411,411,411,411,408,408, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, +125,126,125,126,125,126,125,126,125,126,125,126,125,126,125,126, +125,126,125,126,125,126,125,126,125,126,125,126,125,126,125,126, + 89, 89,125,126,125,126,125,126,125,126,125,126,125,126,412,128, +129,129,129,413, 89, 89, 89, 89, 89, 89, 89, 89,128,128,413,331, + +/* block 102 */ +125,126,125,126,125,126,125,126,125,126,125,126,125,126,125,126, +125,126,125,126,125,126,125,126, 89, 89, 89, 89, 89, 89, 89, 89, +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,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,415,415,415,415, +416,416,417,417,417,417,417,417, 89, 89, 89, 89, 89, 89, 89, 89, + +/* block 103 */ 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, 10, 10, 10, 10, 10, 83, 83, 83, 83, 83, 83, 83, 83, 83, 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, + 82, 14, 14, 14, 14, 14, 14, 14, 14, 21, 22, 21, 22,418, 21, 22, /* 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, + 21, 22, 21, 22, 21, 22, 21, 22, 83, 10, 10, 21, 22, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 45, 45, 45, 45, 45, /* 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, +419,419,420,419,419,419,420,419,419,419,419,420,419,419,419,419, +419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419, +419,419,419,421,421,420,420,421,422,422,422,422, 89, 89, 89, 89, + 17, 17, 17, 17, 17, 17, 13, 13, 3, 13, 89, 89, 89, 89, 89, 89, +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, 89, 89, 89, 89, 89, 89, 89, 89, /* 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, +425,425,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,426, +426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426, +426,426,426,426,425,425,425,425,425,425,425,425,425,425,425,425, +425,425,425,425,427, 89, 89, 89, 89, 89, 89, 89, 89, 89,428,428, +429,429,429,429,429,429,429,429,429,429, 89, 89, 89, 89, 89, 89, +167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167, +167,167,169,169,169,169,169,169,430,430,430,169, 89, 89, 89, 89, /* 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