summaryrefslogtreecommitdiff
path: root/srclib
diff options
context:
space:
mode:
authorBrian Pane <brianp@apache.org>2004-11-27 07:28:04 +0000
committerBrian Pane <brianp@apache.org>2004-11-27 07:28:04 +0000
commit99ea2adc1f516bf95c970042a8ca59505805163b (patch)
tree22cefd950b779c5099de716ee7945a252c323119 /srclib
parent5f83105351067860c2baac6cc7730d32f596b571 (diff)
downloadhttpd-99ea2adc1f516bf95c970042a8ca59505805163b.tar.gz
Upgraded the copy of PCRE within srclib/pcre to version 5.0
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@106690 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'srclib')
-rw-r--r--srclib/pcre/AUTHORS2
-rw-r--r--srclib/pcre/COPYING69
-rw-r--r--srclib/pcre/ChangeLog862
-rw-r--r--srclib/pcre/LICENCE69
-rw-r--r--srclib/pcre/Makefile.in2
-rw-r--r--srclib/pcre/NEWS116
-rw-r--r--srclib/pcre/NON-UNIX-USE217
-rw-r--r--srclib/pcre/README274
-rwxr-xr-xsrclib/pcre/RunTest.in139
-rw-r--r--srclib/pcre/config.in64
-rw-r--r--srclib/pcre/configure.in93
-rw-r--r--srclib/pcre/dftables.c139
-rw-r--r--srclib/pcre/doc/Tech.Notes178
-rw-r--r--srclib/pcre/doc/html/index.html108
-rw-r--r--srclib/pcre/doc/html/pcre.html214
-rw-r--r--srclib/pcre/doc/html/pcre_compile.html75
-rw-r--r--srclib/pcre/doc/html/pcre_config.html60
-rw-r--r--srclib/pcre/doc/html/pcre_copy_named_substring.html53
-rw-r--r--srclib/pcre/doc/html/pcre_copy_substring.html51
-rw-r--r--srclib/pcre/doc/html/pcre_exec.html78
-rw-r--r--srclib/pcre/doc/html/pcre_free_substring.html40
-rw-r--r--srclib/pcre/doc/html/pcre_free_substring_list.html40
-rw-r--r--srclib/pcre/doc/html/pcre_fullinfo.html71
-rw-r--r--srclib/pcre/doc/html/pcre_get_named_substring.html54
-rw-r--r--srclib/pcre/doc/html/pcre_get_stringnumber.html46
-rw-r--r--srclib/pcre/doc/html/pcre_get_substring.html52
-rw-r--r--srclib/pcre/doc/html/pcre_get_substring_list.html51
-rw-r--r--srclib/pcre/doc/html/pcre_info.html39
-rw-r--r--srclib/pcre/doc/html/pcre_maketables.html42
-rw-r--r--srclib/pcre/doc/html/pcre_study.html56
-rw-r--r--srclib/pcre/doc/html/pcre_version.html39
-rw-r--r--srclib/pcre/doc/html/pcreapi.html1287
-rw-r--r--srclib/pcre/doc/html/pcrebuild.html186
-rw-r--r--srclib/pcre/doc/html/pcrecallout.html180
-rw-r--r--srclib/pcre/doc/html/pcrecompat.html150
-rw-r--r--srclib/pcre/doc/html/pcregrep.html158
-rw-r--r--srclib/pcre/doc/html/pcrepartial.html111
-rw-r--r--srclib/pcre/doc/html/pcrepattern.html1470
-rw-r--r--srclib/pcre/doc/html/pcreperform.html97
-rw-r--r--srclib/pcre/doc/html/pcreposix.html218
-rw-r--r--srclib/pcre/doc/html/pcreprecompile.html133
-rw-r--r--srclib/pcre/doc/html/pcresample.html81
-rw-r--r--srclib/pcre/doc/html/pcretest.html495
-rw-r--r--srclib/pcre/doc/pcre.32141
-rw-r--r--srclib/pcre/doc/pcre.txt5552
-rw-r--r--srclib/pcre/doc/pcre_compile.364
-rw-r--r--srclib/pcre/doc/pcre_config.348
-rw-r--r--srclib/pcre/doc/pcre_copy_named_substring.344
-rw-r--r--srclib/pcre/doc/pcre_copy_substring.341
-rw-r--r--srclib/pcre/doc/pcre_exec.367
-rw-r--r--srclib/pcre/doc/pcre_free_substring.328
-rw-r--r--srclib/pcre/doc/pcre_free_substring_list.328
-rw-r--r--srclib/pcre/doc/pcre_fullinfo.359
-rw-r--r--srclib/pcre/doc/pcre_get_named_substring.345
-rw-r--r--srclib/pcre/doc/pcre_get_stringnumber.335
-rw-r--r--srclib/pcre/doc/pcre_get_substring.342
-rw-r--r--srclib/pcre/doc/pcre_get_substring_list.340
-rw-r--r--srclib/pcre/doc/pcre_info.327
-rw-r--r--srclib/pcre/doc/pcre_maketables.330
-rw-r--r--srclib/pcre/doc/pcre_study.343
-rw-r--r--srclib/pcre/doc/pcre_version.327
-rw-r--r--srclib/pcre/doc/pcreapi.31288
-rw-r--r--srclib/pcre/doc/pcrebuild.3174
-rw-r--r--srclib/pcre/doc/pcrecallout.3155
-rw-r--r--srclib/pcre/doc/pcrecompat.3121
-rw-r--r--srclib/pcre/doc/pcregrep.1122
-rw-r--r--srclib/pcre/doc/pcregrep.txt147
-rw-r--r--srclib/pcre/doc/pcrepartial.395
-rw-r--r--srclib/pcre/doc/pcrepattern.31456
-rw-r--r--srclib/pcre/doc/pcreperform.376
-rw-r--r--srclib/pcre/doc/pcreposix.3222
-rw-r--r--srclib/pcre/doc/pcreprecompile.3125
-rw-r--r--srclib/pcre/doc/pcresample.366
-rw-r--r--srclib/pcre/doc/pcretest.1577
-rw-r--r--srclib/pcre/doc/pcretest.txt679
-rw-r--r--srclib/pcre/doc/perltest.txt36
-rw-r--r--srclib/pcre/get.c168
-rw-r--r--srclib/pcre/internal.h680
-rw-r--r--srclib/pcre/libpcre.def19
-rw-r--r--srclib/pcre/libpcre.pc.in12
-rw-r--r--srclib/pcre/libpcreposix.def24
-rw-r--r--srclib/pcre/maketables.c66
-rw-r--r--srclib/pcre/makevp.bat25
-rw-r--r--srclib/pcre/pcre-config.in11
-rw-r--r--srclib/pcre/pcre.c7301
-rw-r--r--srclib/pcre/pcre.def3
-rw-r--r--srclib/pcre/pcre.in246
-rw-r--r--srclib/pcre/pcredemo.c260
-rw-r--r--srclib/pcre/pcregrep.c177
-rw-r--r--srclib/pcre/pcreposix.c139
-rw-r--r--srclib/pcre/pcreposix.h37
-rw-r--r--srclib/pcre/pcretest.c1206
-rwxr-xr-xsrclib/pcre/perltest64
-rw-r--r--srclib/pcre/printint.c461
-rw-r--r--srclib/pcre/study.c191
-rw-r--r--srclib/pcre/testdata/testinput11895
-rw-r--r--srclib/pcre/testdata/testinput2677
-rw-r--r--srclib/pcre/testdata/testinput31735
-rw-r--r--srclib/pcre/testdata/testinput4524
-rw-r--r--srclib/pcre/testdata/testinput5335
-rw-r--r--srclib/pcre/testdata/testinput6531
-rw-r--r--srclib/pcre/testdata/testoutput13264
-rw-r--r--srclib/pcre/testdata/testoutput23429
-rw-r--r--srclib/pcre/testdata/testoutput33036
-rw-r--r--srclib/pcre/testdata/testoutput4949
-rw-r--r--srclib/pcre/testdata/testoutput51253
-rw-r--r--srclib/pcre/testdata/testoutput61164
-rw-r--r--srclib/pcre/ucp.c151
-rw-r--r--srclib/pcre/ucp.h58
-rw-r--r--srclib/pcre/ucpinternal.h91
-rw-r--r--srclib/pcre/ucptable.c15105
-rw-r--r--srclib/pcre/ucptypetable.c93
112 files changed, 54128 insertions, 12911 deletions
diff --git a/srclib/pcre/AUTHORS b/srclib/pcre/AUTHORS
index 832dddca45..00bd1d0642 100644
--- a/srclib/pcre/AUTHORS
+++ b/srclib/pcre/AUTHORS
@@ -3,4 +3,4 @@ Written by: Philip Hazel <ph10@cam.ac.uk>
University of Cambridge Computing Service,
Cambridge, England. Phone: +44 1223 334714.
-Copyright (c) 1997-2001 University of Cambridge
+Copyright (c) 1997-2004 University of Cambridge
diff --git a/srclib/pcre/COPYING b/srclib/pcre/COPYING
index 8effa66492..1573583b6c 100644
--- a/srclib/pcre/COPYING
+++ b/srclib/pcre/COPYING
@@ -4,47 +4,42 @@ PCRE LICENCE
PCRE is a library of functions to support regular expressions whose syntax
and semantics are as close as possible to those of the Perl 5 language.
+Release 5 of PCRE is distributed under the terms of the "BSD" licence, as
+specified below. The documentation for PCRE, supplied in the "doc"
+directory, is distributed under the same terms as the software itself.
+
Written by: Philip Hazel <ph10@cam.ac.uk>
University of Cambridge Computing Service,
Cambridge, England. Phone: +44 1223 334714.
-Copyright (c) 1997-2001 University of Cambridge
-
-Permission is granted to anyone to use this software for any purpose on any
-computer system, and to redistribute it freely, subject to the following
-restrictions:
-
-1. This software is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-2. The origin of this software must not be misrepresented, either by
- explicit claim or by omission. In practice, this means that if you use
- PCRE in software which you distribute to others, commercially or
- otherwise, you must put a sentence like this
-
- Regular expression support is provided by the PCRE library package,
- which is open source software, written by Philip Hazel, and copyright
- by the University of Cambridge, England.
-
- somewhere reasonably visible in your documentation and in any relevant
- files or online help data or similar. A reference to the ftp site for
- the source, that is, to
-
- ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/
-
- should also be given in the documentation.
-
-3. Altered versions must be plainly marked as such, and must not be
- misrepresented as being the original software.
-
-4. If PCRE is embedded in any software that is released under the GNU
- General Purpose Licence (GPL), or Lesser General Purpose Licence (LGPL),
- then the terms of that licence shall supersede any condition above with
- which it is incompatible.
-
-The documentation for PCRE, supplied in the "doc" directory, is distributed
-under the same terms as the software itself.
+Copyright (c) 1997-2004 University of Cambridge
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
End
diff --git a/srclib/pcre/ChangeLog b/srclib/pcre/ChangeLog
index a93f347f45..266cb18cea 100644
--- a/srclib/pcre/ChangeLog
+++ b/srclib/pcre/ChangeLog
@@ -1,7 +1,867 @@
ChangeLog for PCRE
------------------
-Version 3.0 02-Jan-02
+Version 5.0 13-Sep-04
+---------------------
+
+ 1. Internal change: literal characters are no longer packed up into items
+ containing multiple characters in a single byte-string. Each character
+ is now matched using a separate opcode. However, there may be more than one
+ byte in the character in UTF-8 mode.
+
+ 2. The pcre_callout_block structure has two new fields: pattern_position and
+ next_item_length. These contain the offset in the pattern to the next match
+ item, and its length, respectively.
+
+ 3. The PCRE_AUTO_CALLOUT option for pcre_compile() requests the automatic
+ insertion of callouts before each pattern item. Added the /C option to
+ pcretest to make use of this.
+
+ 4. On the advice of a Windows user, the lines
+
+ #if defined(_WIN32) || defined(WIN32)
+ _setmode( _fileno( stdout ), 0x8000 );
+ #endif /* defined(_WIN32) || defined(WIN32) */
+
+ have been added to the source of pcretest. This apparently does useful
+ magic in relation to line terminators.
+
+ 5. Changed "r" and "w" in the calls to fopen() in pcretest to "rb" and "wb"
+ for the benefit of those environments where the "b" makes a difference.
+
+ 6. The icc compiler has the same options as gcc, but "configure" doesn't seem
+ to know about it. I have put a hack into configure.in that adds in code
+ to set GCC=yes if CC=icc. This seems to end up at a point in the
+ generated configure script that is early enough to affect the setting of
+ compiler options, which is what is needed, but I have no means of testing
+ whether it really works. (The user who reported this had patched the
+ generated configure script, which of course I cannot do.)
+
+ LATER: After change 22 below (new libtool files), the configure script
+ seems to know about icc (and also ecc). Therefore, I have commented out
+ this hack in configure.in.
+
+ 7. Added support for pkg-config (2 patches were sent in).
+
+ 8. Negated POSIX character classes that used a combination of internal tables
+ were completely broken. These were [[:^alpha:]], [[:^alnum:]], and
+ [[:^ascii]]. Typically, they would match almost any characters. The other
+ POSIX classes were not broken in this way.
+
+ 9. Matching the pattern "\b.*?" against "ab cd", starting at offset 1, failed
+ to find the match, as PCRE was deluded into thinking that the match had to
+ start at the start point or following a newline. The same bug applied to
+ patterns with negative forward assertions or any backward assertions
+ preceding ".*" at the start, unless the pattern required a fixed first
+ character. This was a failing pattern: "(?!.bcd).*". The bug is now fixed.
+
+10. In UTF-8 mode, when moving forwards in the subject after a failed match
+ starting at the last subject character, bytes beyond the end of the subject
+ string were read.
+
+11. Renamed the variable "class" as "classbits" to make life easier for C++
+ users. (Previously there was a macro definition, but it apparently wasn't
+ enough.)
+
+12. Added the new field "tables" to the extra data so that tables can be passed
+ in at exec time, or the internal tables can be re-selected. This allows
+ a compiled regex to be saved and re-used at a later time by a different
+ program that might have everything at different addresses.
+
+13. Modified the pcre-config script so that, when run on Solaris, it shows a
+ -R library as well as a -L library.
+
+14. The debugging options of pcretest (-d on the command line or D on a
+ pattern) showed incorrect output for anything following an extended class
+ that contained multibyte characters and which was followed by a quantifier.
+
+15. Added optional support for general category Unicode character properties
+ via the \p, \P, and \X escapes. Unicode property support implies UTF-8
+ support. It adds about 90K to the size of the library. The meanings of the
+ inbuilt class escapes such as \d and \s have NOT been changed.
+
+16. Updated pcredemo.c to include calls to free() to release the memory for the
+ compiled pattern.
+
+17. The generated file chartables.c was being created in the source directory
+ instead of in the building directory. This caused the build to fail if the
+ source directory was different from the building directory, and was
+ read-only.
+
+18. Added some sample Win commands from Mark Tetrode into the NON-UNIX-USE
+ file. No doubt somebody will tell me if they don't make sense... Also added
+ Dan Mooney's comments about building on OpenVMS.
+
+19. Added support for partial matching via the PCRE_PARTIAL option for
+ pcre_exec() and the \P data escape in pcretest.
+
+20. Extended pcretest with 3 new pattern features:
+
+ (i) A pattern option of the form ">rest-of-line" causes pcretest to
+ write the compiled pattern to the file whose name is "rest-of-line".
+ This is a straight binary dump of the data, with the saved pointer to
+ the character tables forced to be NULL. The study data, if any, is
+ written too. After writing, pcretest reads a new pattern.
+
+ (ii) If, instead of a pattern, "<rest-of-line" is given, pcretest reads a
+ compiled pattern from the given file. There must not be any
+ occurrences of "<" in the file name (pretty unlikely); if there are,
+ pcretest will instead treat the initial "<" as a pattern delimiter.
+ After reading in the pattern, pcretest goes on to read data lines as
+ usual.
+
+ (iii) The F pattern option causes pcretest to flip the bytes in the 32-bit
+ and 16-bit fields in a compiled pattern, to simulate a pattern that
+ was compiled on a host of opposite endianness.
+
+21. The pcre-exec() function can now cope with patterns that were compiled on
+ hosts of opposite endianness, with this restriction:
+
+ As for any compiled expression that is saved and used later, the tables
+ pointer field cannot be preserved; the extra_data field in the arguments
+ to pcre_exec() should be used to pass in a tables address if a value
+ other than the default internal tables were used at compile time.
+
+22. Calling pcre_exec() with a negative value of the "ovecsize" parameter is
+ now diagnosed as an error. Previously, most of the time, a negative number
+ would have been treated as zero, but if in addition "ovector" was passed as
+ NULL, a crash could occur.
+
+23. Updated the files ltmain.sh, config.sub, config.guess, and aclocal.m4 with
+ new versions from the libtool 1.5 distribution (the last one is a copy of
+ a file called libtool.m4). This seems to have fixed the need to patch
+ "configure" to support Darwin 1.3 (which I used to do). However, I still
+ had to patch ltmain.sh to ensure that ${SED} is set (it isn't on my
+ workstation).
+
+24. Changed the PCRE licence to be the more standard "BSD" licence.
+
+
+Version 4.5 01-Dec-03
+---------------------
+
+ 1. There has been some re-arrangement of the code for the match() function so
+ that it can be compiled in a version that does not call itself recursively.
+ Instead, it keeps those local variables that need separate instances for
+ each "recursion" in a frame on the heap, and gets/frees frames whenever it
+ needs to "recurse". Keeping track of where control must go is done by means
+ of setjmp/longjmp. The whole thing is implemented by a set of macros that
+ hide most of the details from the main code, and operates only if
+ NO_RECURSE is defined while compiling pcre.c. If PCRE is built using the
+ "configure" mechanism, "--disable-stack-for-recursion" turns on this way of
+ operating.
+
+ To make it easier for callers to provide specially tailored get/free
+ functions for this usage, two new functions, pcre_stack_malloc, and
+ pcre_stack_free, are used. They are always called in strict stacking order,
+ and the size of block requested is always the same.
+
+ The PCRE_CONFIG_STACKRECURSE info parameter can be used to find out whether
+ PCRE has been compiled to use the stack or the heap for recursion. The
+ -C option of pcretest uses this to show which version is compiled.
+
+ A new data escape \S, is added to pcretest; it causes the amounts of store
+ obtained and freed by both kinds of malloc/free at match time to be added
+ to the output.
+
+ 2. Changed the locale test to use "fr_FR" instead of "fr" because that's
+ what's available on my current Linux desktop machine.
+
+ 3. When matching a UTF-8 string, the test for a valid string at the start has
+ been extended. If start_offset is not zero, PCRE now checks that it points
+ to a byte that is the start of a UTF-8 character. If not, it returns
+ PCRE_ERROR_BADUTF8_OFFSET (-11). Note: the whole string is still checked;
+ this is necessary because there may be backward assertions in the pattern.
+ When matching the same subject several times, it may save resources to use
+ PCRE_NO_UTF8_CHECK on all but the first call if the string is long.
+
+ 4. The code for checking the validity of UTF-8 strings has been tightened so
+ that it rejects (a) strings containing 0xfe or 0xff bytes and (b) strings
+ containing "overlong sequences".
+
+ 5. Fixed a bug (appearing twice) that I could not find any way of exploiting!
+ I had written "if ((digitab[*p++] && chtab_digit) == 0)" where the "&&"
+ should have been "&", but it just so happened that all the cases this let
+ through by mistake were picked up later in the function.
+
+ 6. I had used a variable called "isblank" - this is a C99 function, causing
+ some compilers to warn. To avoid this, I renamed it (as "blankclass").
+
+ 7. Cosmetic: (a) only output another newline at the end of pcretest if it is
+ prompting; (b) run "./pcretest /dev/null" at the start of the test script
+ so the version is shown; (c) stop "make test" echoing "./RunTest".
+
+ 8. Added patches from David Burgess to enable PCRE to run on EBCDIC systems.
+
+ 9. The prototype for memmove() for systems that don't have it was using
+ size_t, but the inclusion of the header that defines size_t was later. I've
+ moved the #includes for the C headers earlier to avoid this.
+
+10. Added some adjustments to the code to make it easier to compiler on certain
+ special systems:
+
+ (a) Some "const" qualifiers were missing.
+ (b) Added the macro EXPORT before all exported functions; by default this
+ is defined to be empty.
+ (c) Changed the dftables auxiliary program (that builds chartables.c) so
+ that it reads its output file name as an argument instead of writing
+ to the standard output and assuming this can be redirected.
+
+11. In UTF-8 mode, if a recursive reference (e.g. (?1)) followed a character
+ class containing characters with values greater than 255, PCRE compilation
+ went into a loop.
+
+12. A recursive reference to a subpattern that was within another subpattern
+ that had a minimum quantifier of zero caused PCRE to crash. For example,
+ (x(y(?2))z)? provoked this bug with a subject that got as far as the
+ recursion. If the recursively-called subpattern itself had a zero repeat,
+ that was OK.
+
+13. In pcretest, the buffer for reading a data line was set at 30K, but the
+ buffer into which it was copied (for escape processing) was still set at
+ 1024, so long lines caused crashes.
+
+14. A pattern such as /[ab]{1,3}+/ failed to compile, giving the error
+ "internal error: code overflow...". This applied to any character class
+ that was followed by a possessive quantifier.
+
+15. Modified the Makefile to add libpcre.la as a prerequisite for
+ libpcreposix.la because I was told this is needed for a parallel build to
+ work.
+
+16. If a pattern that contained .* following optional items at the start was
+ studied, the wrong optimizing data was generated, leading to matching
+ errors. For example, studying /[ab]*.*c/ concluded, erroneously, that any
+ matching string must start with a or b or c. The correct conclusion for
+ this pattern is that a match can start with any character.
+
+
+Version 4.4 13-Aug-03
+---------------------
+
+ 1. In UTF-8 mode, a character class containing characters with values between
+ 127 and 255 was not handled correctly if the compiled pattern was studied.
+ In fixing this, I have also improved the studying algorithm for such
+ classes (slightly).
+
+ 2. Three internal functions had redundant arguments passed to them. Removal
+ might give a very teeny performance improvement.
+
+ 3. Documentation bug: the value of the capture_top field in a callout is *one
+ more than* the number of the hightest numbered captured substring.
+
+ 4. The Makefile linked pcretest and pcregrep with -lpcre, which could result
+ in incorrectly linking with a previously installed version. They now link
+ explicitly with libpcre.la.
+
+ 5. configure.in no longer needs to recognize Cygwin specially.
+
+ 6. A problem in pcre.in for Windows platforms is fixed.
+
+ 7. If a pattern was successfully studied, and the -d (or /D) flag was given to
+ pcretest, it used to include the size of the study block as part of its
+ output. Unfortunately, the structure contains a field that has a different
+ size on different hardware architectures. This meant that the tests that
+ showed this size failed. As the block is currently always of a fixed size,
+ this information isn't actually particularly useful in pcretest output, so
+ I have just removed it.
+
+ 8. Three pre-processor statements accidentally did not start in column 1.
+ Sadly, there are *still* compilers around that complain, even though
+ standard C has not required this for well over a decade. Sigh.
+
+ 9. In pcretest, the code for checking callouts passed small integers in the
+ callout_data field, which is a void * field. However, some picky compilers
+ complained about the casts involved for this on 64-bit systems. Now
+ pcretest passes the address of the small integer instead, which should get
+ rid of the warnings.
+
+10. By default, when in UTF-8 mode, PCRE now checks for valid UTF-8 strings at
+ both compile and run time, and gives an error if an invalid UTF-8 sequence
+ is found. There is a option for disabling this check in cases where the
+ string is known to be correct and/or the maximum performance is wanted.
+
+11. In response to a bug report, I changed one line in Makefile.in from
+
+ -Wl,--out-implib,.libs/lib@WIN_PREFIX@pcreposix.dll.a \
+ to
+ -Wl,--out-implib,.libs/@WIN_PREFIX@libpcreposix.dll.a \
+
+ to look similar to other lines, but I have no way of telling whether this
+ is the right thing to do, as I do not use Windows. No doubt I'll get told
+ if it's wrong...
+
+
+Version 4.3 21-May-03
+---------------------
+
+1. Two instances of @WIN_PREFIX@ omitted from the Windows targets in the
+ Makefile.
+
+2. Some refactoring to improve the quality of the code:
+
+ (i) The utf8_table... variables are now declared "const".
+
+ (ii) The code for \cx, which used the "case flipping" table to upper case
+ lower case letters, now just substracts 32. This is ASCII-specific,
+ but the whole concept of \cx is ASCII-specific, so it seems
+ reasonable.
+
+ (iii) PCRE was using its character types table to recognize decimal and
+ hexadecimal digits in the pattern. This is silly, because it handles
+ only 0-9, a-f, and A-F, but the character types table is locale-
+ specific, which means strange things might happen. A private
+ table is now used for this - though it costs 256 bytes, a table is
+ much faster than multiple explicit tests. Of course, the standard
+ character types table is still used for matching digits in subject
+ strings against \d.
+
+ (iv) Strictly, the identifier ESC_t is reserved by POSIX (all identifiers
+ ending in _t are). So I've renamed it as ESC_tee.
+
+3. The first argument for regexec() in the POSIX wrapper should have been
+ defined as "const".
+
+4. Changed pcretest to use malloc() for its buffers so that they can be
+ Electric Fenced for debugging.
+
+5. There were several places in the code where, in UTF-8 mode, PCRE would try
+ to read one or more bytes before the start of the subject string. Often this
+ had no effect on PCRE's behaviour, but in some circumstances it could
+ provoke a segmentation fault.
+
+6. A lookbehind at the start of a pattern in UTF-8 mode could also cause PCRE
+ to try to read one or more bytes before the start of the subject string.
+
+7. A lookbehind in a pattern matched in non-UTF-8 mode on a PCRE compiled with
+ UTF-8 support could misbehave in various ways if the subject string
+ contained bytes with the 0x80 bit set and the 0x40 bit unset in a lookbehind
+ area. (PCRE was not checking for the UTF-8 mode flag, and trying to move
+ back over UTF-8 characters.)
+
+
+Version 4.2 14-Apr-03
+---------------------
+
+1. Typo "#if SUPPORT_UTF8" instead of "#ifdef SUPPORT_UTF8" fixed.
+
+2. Changes to the building process, supplied by Ronald Landheer-Cieslak
+ [ON_WINDOWS]: new variable, "#" on non-Windows platforms
+ [NOT_ON_WINDOWS]: new variable, "#" on Windows platforms
+ [WIN_PREFIX]: new variable, "cyg" for Cygwin
+ * Makefile.in: use autoconf substitution for OBJEXT, EXEEXT, BUILD_OBJEXT
+ and BUILD_EXEEXT
+ Note: automatic setting of the BUILD variables is not yet working
+ set CPPFLAGS and BUILD_CPPFLAGS (but don't use yet) - should be used at
+ compile-time but not at link-time
+ [LINK]: use for linking executables only
+ make different versions for Windows and non-Windows
+ [LINKLIB]: new variable, copy of UNIX-style LINK, used for linking
+ libraries
+ [LINK_FOR_BUILD]: new variable
+ [OBJEXT]: use throughout
+ [EXEEXT]: use throughout
+ <winshared>: new target
+ <wininstall>: new target
+ <dftables.o>: use native compiler
+ <dftables>: use native linker
+ <install>: handle Windows platform correctly
+ <clean>: ditto
+ <check>: ditto
+ copy DLL to top builddir before testing
+
+ As part of these changes, -no-undefined was removed again. This was reported
+ to give trouble on HP-UX 11.0, so getting rid of it seems like a good idea
+ in any case.
+
+3. Some tidies to get rid of compiler warnings:
+
+ . In the match_data structure, match_limit was an unsigned long int, whereas
+ match_call_count was an int. I've made them both unsigned long ints.
+
+ . In pcretest the fact that a const uschar * doesn't automatically cast to
+ a void * provoked a warning.
+
+ . Turning on some more compiler warnings threw up some "shadow" variables
+ and a few more missing casts.
+
+4. If PCRE was complied with UTF-8 support, but called without the PCRE_UTF8
+ option, a class that contained a single character with a value between 128
+ and 255 (e.g. /[\xFF]/) caused PCRE to crash.
+
+5. If PCRE was compiled with UTF-8 support, but called without the PCRE_UTF8
+ option, a class that contained several characters, but with at least one
+ whose value was between 128 and 255 caused PCRE to crash.
+
+
+Version 4.1 12-Mar-03
+---------------------
+
+1. Compiling with gcc -pedantic found a couple of places where casts were
+needed, and a string in dftables.c that was longer than standard compilers are
+required to support.
+
+2. Compiling with Sun's compiler found a few more places where the code could
+be tidied up in order to avoid warnings.
+
+3. The variables for cross-compiling were called HOST_CC and HOST_CFLAGS; the
+first of these names is deprecated in the latest Autoconf in favour of the name
+CC_FOR_BUILD, because "host" is typically used to mean the system on which the
+compiled code will be run. I can't find a reference for HOST_CFLAGS, but by
+analogy I have changed it to CFLAGS_FOR_BUILD.
+
+4. Added -no-undefined to the linking command in the Makefile, because this is
+apparently helpful for Windows. To make it work, also added "-L. -lpcre" to the
+linking step for the pcreposix library.
+
+5. PCRE was failing to diagnose the case of two named groups with the same
+name.
+
+6. A problem with one of PCRE's optimizations was discovered. PCRE remembers a
+literal character that is needed in the subject for a match, and scans along to
+ensure that it is present before embarking on the full matching process. This
+saves time in cases of nested unlimited repeats that are never going to match.
+Problem: the scan can take a lot of time if the subject is very long (e.g.
+megabytes), thus penalizing straightforward matches. It is now done only if the
+amount of subject to be scanned is less than 1000 bytes.
+
+7. A lesser problem with the same optimization is that it was recording the
+first character of an anchored pattern as "needed", thus provoking a search
+right along the subject, even when the first match of the pattern was going to
+fail. The "needed" character is now not set for anchored patterns, unless it
+follows something in the pattern that is of non-fixed length. Thus, it still
+fulfils its original purpose of finding quick non-matches in cases of nested
+unlimited repeats, but isn't used for simple anchored patterns such as /^abc/.
+
+
+Version 4.0 17-Feb-03
+---------------------
+
+1. If a comment in an extended regex that started immediately after a meta-item
+extended to the end of string, PCRE compiled incorrect data. This could lead to
+all kinds of weird effects. Example: /#/ was bad; /()#/ was bad; /a#/ was not.
+
+2. Moved to autoconf 2.53 and libtool 1.4.2.
+
+3. Perl 5.8 no longer needs "use utf8" for doing UTF-8 things. Consequently,
+the special perltest8 script is no longer needed - all the tests can be run
+from a single perltest script.
+
+4. From 5.004, Perl has not included the VT character (0x0b) in the set defined
+by \s. It has now been removed in PCRE. This means it isn't recognized as
+whitespace in /x regexes too, which is the same as Perl. Note that the POSIX
+class [:space:] *does* include VT, thereby creating a mess.
+
+5. Added the class [:blank:] (a GNU extension from Perl 5.8) to match only
+space and tab.
+
+6. Perl 5.005 was a long time ago. It's time to amalgamate the tests that use
+its new features into the main test script, reducing the number of scripts.
+
+7. Perl 5.8 has changed the meaning of patterns like /a(?i)b/. Earlier versions
+were backward compatible, and made the (?i) apply to the whole pattern, as if
+/i were given. Now it behaves more logically, and applies the option setting
+only to what follows. PCRE has been changed to follow suit. However, if it
+finds options settings right at the start of the pattern, it extracts them into
+the global options, as before. Thus, they show up in the info data.
+
+8. Added support for the \Q...\E escape sequence. Characters in between are
+treated as literals. This is slightly different from Perl in that $ and @ are
+also handled as literals inside the quotes. In Perl, they will cause variable
+interpolation. Note the following examples:
+
+ Pattern PCRE matches Perl matches
+
+ \Qabc$xyz\E abc$xyz abc followed by the contents of $xyz
+ \Qabc\$xyz\E abc\$xyz abc\$xyz
+ \Qabc\E\$\Qxyz\E abc$xyz abc$xyz
+
+For compatibility with Perl, \Q...\E sequences are recognized inside character
+classes as well as outside them.
+
+9. Re-organized 3 code statements in pcretest to avoid "overflow in
+floating-point constant arithmetic" warnings from a Microsoft compiler. Added a
+(size_t) cast to one statement in pcretest and one in pcreposix to avoid
+signed/unsigned warnings.
+
+10. SunOS4 doesn't have strtoul(). This was used only for unpicking the -o
+option for pcretest, so I've replaced it by a simple function that does just
+that job.
+
+11. pcregrep was ending with code 0 instead of 2 for the commands "pcregrep" or
+"pcregrep -".
+
+12. Added "possessive quantifiers" ?+, *+, ++, and {,}+ which come from Sun's
+Java package. This provides some syntactic sugar for simple cases of what my
+documentation calls "once-only subpatterns". A pattern such as x*+ is the same
+as (?>x*). In other words, if what is inside (?>...) is just a single repeated
+item, you can use this simplified notation. Note that only makes sense with
+greedy quantifiers. Consequently, the use of the possessive quantifier forces
+greediness, whatever the setting of the PCRE_UNGREEDY option.
+
+13. A change of greediness default within a pattern was not taking effect at
+the current level for patterns like /(b+(?U)a+)/. It did apply to parenthesized
+subpatterns that followed. Patterns like /b+(?U)a+/ worked because the option
+was abstracted outside.
+
+14. PCRE now supports the \G assertion. It is true when the current matching
+position is at the start point of the match. This differs from \A when the
+starting offset is non-zero. Used with the /g option of pcretest (or similar
+code), it works in the same way as it does for Perl's /g option. If all
+alternatives of a regex begin with \G, the expression is anchored to the start
+match position, and the "anchored" flag is set in the compiled expression.
+
+15. Some bugs concerning the handling of certain option changes within patterns
+have been fixed. These applied to options other than (?ims). For example,
+"a(?x: b c )d" did not match "XabcdY" but did match "Xa b c dY". It should have
+been the other way round. Some of this was related to change 7 above.
+
+16. PCRE now gives errors for /[.x.]/ and /[=x=]/ as unsupported POSIX
+features, as Perl does. Previously, PCRE gave the warnings only for /[[.x.]]/
+and /[[=x=]]/. PCRE now also gives an error for /[:name:]/ because it supports
+POSIX classes only within a class (e.g. /[[:alpha:]]/).
+
+17. Added support for Perl's \C escape. This matches one byte, even in UTF8
+mode. Unlike ".", it always matches newline, whatever the setting of
+PCRE_DOTALL. However, PCRE does not permit \C to appear in lookbehind
+assertions. Perl allows it, but it doesn't (in general) work because it can't
+calculate the length of the lookbehind. At least, that's the case for Perl
+5.8.0 - I've been told they are going to document that it doesn't work in
+future.
+
+18. Added an error diagnosis for escapes that PCRE does not support: these are
+\L, \l, \N, \P, \p, \U, \u, and \X.
+
+19. Although correctly diagnosing a missing ']' in a character class, PCRE was
+reading past the end of the pattern in cases such as /[abcd/.
+
+20. PCRE was getting more memory than necessary for patterns with classes that
+contained both POSIX named classes and other characters, e.g. /[[:space:]abc/.
+
+21. Added some code, conditional on #ifdef VPCOMPAT, to make life easier for
+compiling PCRE for use with Virtual Pascal.
+
+22. Small fix to the Makefile to make it work properly if the build is done
+outside the source tree.
+
+23. Added a new extension: a condition to go with recursion. If a conditional
+subpattern starts with (?(R) the "true" branch is used if recursion has
+happened, whereas the "false" branch is used only at the top level.
+
+24. When there was a very long string of literal characters (over 255 bytes
+without UTF support, over 250 bytes with UTF support), the computation of how
+much memory was required could be incorrect, leading to segfaults or other
+strange effects.
+
+25. PCRE was incorrectly assuming anchoring (either to start of subject or to
+start of line for a non-DOTALL pattern) when a pattern started with (.*) and
+there was a subsequent back reference to those brackets. This meant that, for
+example, /(.*)\d+\1/ failed to match "abc123bc". Unfortunately, it isn't
+possible to check for precisely this case. All we can do is abandon the
+optimization if .* occurs inside capturing brackets when there are any back
+references whatsoever. (See below for a better fix that came later.)
+
+26. The handling of the optimization for finding the first character of a
+non-anchored pattern, and for finding a character that is required later in the
+match were failing in some cases. This didn't break the matching; it just
+failed to optimize when it could. The way this is done has been re-implemented.
+
+27. Fixed typo in error message for invalid (?R item (it said "(?p").
+
+28. Added a new feature that provides some of the functionality that Perl
+provides with (?{...}). The facility is termed a "callout". The way it is done
+in PCRE is for the caller to provide an optional function, by setting
+pcre_callout to its entry point. Like pcre_malloc and pcre_free, this is a
+global variable. By default it is unset, which disables all calling out. To get
+the function called, the regex must include (?C) at appropriate points. This
+is, in fact, equivalent to (?C0), and any number <= 255 may be given with (?C).
+This provides a means of identifying different callout points. When PCRE
+reaches such a point in the regex, if pcre_callout has been set, the external
+function is called. It is provided with data in a structure called
+pcre_callout_block, which is defined in pcre.h. If the function returns 0,
+matching continues; if it returns a non-zero value, the match at the current
+point fails. However, backtracking will occur if possible. [This was changed
+later and other features added - see item 49 below.]
+
+29. pcretest is upgraded to test the callout functionality. It provides a
+callout function that displays information. By default, it shows the start of
+the match and the current position in the text. There are some new data escapes
+to vary what happens:
+
+ \C+ in addition, show current contents of captured substrings
+ \C- do not supply a callout function
+ \C!n return 1 when callout number n is reached
+ \C!n!m return 1 when callout number n is reached for the mth time
+
+30. If pcregrep was called with the -l option and just a single file name, it
+output "<stdin>" if a match was found, instead of the file name.
+
+31. Improve the efficiency of the POSIX API to PCRE. If the number of capturing
+slots is less than POSIX_MALLOC_THRESHOLD, use a block on the stack to pass to
+pcre_exec(). This saves a malloc/free per call. The default value of
+POSIX_MALLOC_THRESHOLD is 10; it can be changed by --with-posix-malloc-threshold
+when configuring.
+
+32. The default maximum size of a compiled pattern is 64K. There have been a
+few cases of people hitting this limit. The code now uses macros to handle the
+storing of links as offsets within the compiled pattern. It defaults to 2-byte
+links, but this can be changed to 3 or 4 bytes by --with-link-size when
+configuring. Tests 2 and 5 work only with 2-byte links because they output
+debugging information about compiled patterns.
+
+33. Internal code re-arrangements:
+
+(a) Moved the debugging function for printing out a compiled regex into
+ its own source file (printint.c) and used #include to pull it into
+ pcretest.c and, when DEBUG is defined, into pcre.c, instead of having two
+ separate copies.
+
+(b) Defined the list of op-code names for debugging as a macro in
+ internal.h so that it is next to the definition of the opcodes.
+
+(c) Defined a table of op-code lengths for simpler skipping along compiled
+ code. This is again a macro in internal.h so that it is next to the
+ definition of the opcodes.
+
+34. Added support for recursive calls to individual subpatterns, along the
+lines of Robin Houston's patch (but implemented somewhat differently).
+
+35. Further mods to the Makefile to help Win32. Also, added code to pcregrep to
+allow it to read and process whole directories in Win32. This code was
+contributed by Lionel Fourquaux; it has not been tested by me.
+
+36. Added support for named subpatterns. The Python syntax (?P<name>...) is
+used to name a group. Names consist of alphanumerics and underscores, and must
+be unique. Back references use the syntax (?P=name) and recursive calls use
+(?P>name) which is a PCRE extension to the Python extension. Groups still have
+numbers. The function pcre_fullinfo() can be used after compilation to extract
+a name/number map. There are three relevant calls:
+
+ PCRE_INFO_NAMEENTRYSIZE yields the size of each entry in the map
+ PCRE_INFO_NAMECOUNT yields the number of entries
+ PCRE_INFO_NAMETABLE yields a pointer to the map.
+
+The map is a vector of fixed-size entries. The size of each entry depends on
+the length of the longest name used. The first two bytes of each entry are the
+group number, most significant byte first. There follows the corresponding
+name, zero terminated. The names are in alphabetical order.
+
+37. Make the maximum literal string in the compiled code 250 for the non-UTF-8
+case instead of 255. Making it the same both with and without UTF-8 support
+means that the same test output works with both.
+
+38. There was a case of malloc(0) in the POSIX testing code in pcretest. Avoid
+calling malloc() with a zero argument.
+
+39. Change 25 above had to resort to a heavy-handed test for the .* anchoring
+optimization. I've improved things by keeping a bitmap of backreferences with
+numbers 1-31 so that if .* occurs inside capturing brackets that are not in
+fact referenced, the optimization can be applied. It is unlikely that a
+relevant occurrence of .* (i.e. one which might indicate anchoring or forcing
+the match to follow \n) will appear inside brackets with a number greater than
+31, but if it does, any back reference > 31 suppresses the optimization.
+
+40. Added a new compile-time option PCRE_NO_AUTO_CAPTURE. This has the effect
+of disabling numbered capturing parentheses. 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 will acquire numbers in the usual
+way).
+
+41. Redesigned the return codes from the match() function into yes/no/error so
+that errors can be passed back from deep inside the nested calls. A malloc
+failure while inside a recursive subpattern call now causes the
+PCRE_ERROR_NOMEMORY return instead of quietly going wrong.
+
+42. It is now possible to set a limit on the number of times the match()
+function is called in a call to pcre_exec(). This facility makes it possible to
+limit the amount of recursion and backtracking, though not in a directly
+obvious way, because the match() function is used in a number of different
+circumstances. The count starts from zero for each position in the subject
+string (for non-anchored patterns). The default limit is, for compatibility, a
+large number, namely 10 000 000. You can change this in two ways:
+
+(a) When configuring PCRE before making, you can use --with-match-limit=n
+ to set a default value for the compiled library.
+
+(b) For each call to pcre_exec(), you can pass a pcre_extra block in which
+ a different value is set. See 45 below.
+
+If the limit is exceeded, pcre_exec() returns PCRE_ERROR_MATCHLIMIT.
+
+43. Added a new function pcre_config(int, void *) to enable run-time extraction
+of things that can be changed at compile time. The first argument specifies
+what is wanted and the second points to where the information is to be placed.
+The current list of available information is:
+
+ PCRE_CONFIG_UTF8
+
+The output is an integer that is set to one if UTF-8 support is available;
+otherwise it is set to zero.
+
+ PCRE_CONFIG_NEWLINE
+
+The output is an integer that it set to the value of the code that is used for
+newline. It is either LF (10) or CR (13).
+
+ PCRE_CONFIG_LINK_SIZE
+
+The output is an integer that contains the number of bytes used for internal
+linkage in compiled expressions. The value is 2, 3, or 4. See item 32 above.
+
+ PCRE_CONFIG_POSIX_MALLOC_THRESHOLD
+
+The output is an integer that contains the threshold above which the POSIX
+interface uses malloc() for output vectors. See item 31 above.
+
+ PCRE_CONFIG_MATCH_LIMIT
+
+The output is an unsigned integer that contains the default limit of the number
+of match() calls in a pcre_exec() execution. See 42 above.
+
+44. pcretest has been upgraded by the addition of the -C option. This causes it
+to extract all the available output from the new pcre_config() function, and to
+output it. The program then exits immediately.
+
+45. A need has arisen to pass over additional data with calls to pcre_exec() in
+order to support additional features. One way would have been to define
+pcre_exec2() (for example) with extra arguments, but this would not have been
+extensible, and would also have required all calls to the original function to
+be mapped to the new one. Instead, I have chosen to extend the mechanism that
+is used for passing in "extra" data from pcre_study().
+
+The pcre_extra structure is now exposed and defined in pcre.h. It currently
+contains the following fields:
+
+ flags a bitmap indicating which of the following fields are set
+ study_data opaque data from pcre_study()
+ match_limit a way of specifying a limit on match() calls for a specific
+ call to pcre_exec()
+ callout_data data for callouts (see 49 below)
+
+The flag bits are also defined in pcre.h, and are
+
+ PCRE_EXTRA_STUDY_DATA
+ PCRE_EXTRA_MATCH_LIMIT
+ PCRE_EXTRA_CALLOUT_DATA
+
+The pcre_study() function now returns one of these new pcre_extra blocks, with
+the actual study data pointed to by the study_data field, and the
+PCRE_EXTRA_STUDY_DATA flag set. This can be passed directly to pcre_exec() as
+before. That is, this change is entirely upwards-compatible and requires no
+change to existing code.
+
+If you want to pass in additional data to pcre_exec(), you can either place it
+in a pcre_extra block provided by pcre_study(), or create your own pcre_extra
+block.
+
+46. pcretest has been extended to test the PCRE_EXTRA_MATCH_LIMIT feature. If a
+data string contains the escape sequence \M, pcretest calls pcre_exec() several
+times with different match limits, until it finds the minimum value needed for
+pcre_exec() to complete. The value is then output. This can be instructive; for
+most simple matches the number is quite small, but for pathological cases it
+gets very large very quickly.
+
+47. There's a new option for pcre_fullinfo() called PCRE_INFO_STUDYSIZE. It
+returns the size of the data block pointed to by the study_data field in a
+pcre_extra block, that is, the value that was passed as the argument to
+pcre_malloc() when PCRE was getting memory in which to place the information
+created by pcre_study(). The fourth argument should point to a size_t variable.
+pcretest has been extended so that this information is shown after a successful
+pcre_study() call when information about the compiled regex is being displayed.
+
+48. Cosmetic change to Makefile: there's no need to have / after $(DESTDIR)
+because what follows is always an absolute path. (Later: it turns out that this
+is more than cosmetic for MinGW, because it doesn't like empty path
+components.)
+
+49. Some changes have been made to the callout feature (see 28 above):
+
+(i) A callout function now has three choices for what it returns:
+
+ 0 => success, carry on matching
+ > 0 => failure at this point, but backtrack if possible
+ < 0 => serious error, return this value from pcre_exec()
+
+ Negative values should normally be chosen from the set of PCRE_ERROR_xxx
+ values. In particular, returning PCRE_ERROR_NOMATCH forces a standard
+ "match failed" error. The error number PCRE_ERROR_CALLOUT is reserved for
+ use by callout functions. It will never be used by PCRE itself.
+
+(ii) The pcre_extra structure (see 45 above) has a void * field called
+ callout_data, with corresponding flag bit PCRE_EXTRA_CALLOUT_DATA. The
+ pcre_callout_block structure has a field of the same name. The contents of
+ the field passed in the pcre_extra structure are passed to the callout
+ function in the corresponding field in the callout block. This makes it
+ easier to use the same callout-containing regex from multiple threads. For
+ testing, the pcretest program has a new data escape
+
+ \C*n pass the number n (may be negative) as callout_data
+
+ If the callout function in pcretest receives a non-zero value as
+ callout_data, it returns that value.
+
+50. Makefile wasn't handling CFLAGS properly when compiling dftables. Also,
+there were some redundant $(CFLAGS) in commands that are now specified as
+$(LINK), which already includes $(CFLAGS).
+
+51. Extensions to UTF-8 support are listed below. These all apply when (a) PCRE
+has been compiled with UTF-8 support *and* pcre_compile() has been compiled
+with the PCRE_UTF8 flag. Patterns that are compiled without that flag assume
+one-byte characters throughout. Note that case-insensitive matching applies
+only to characters whose values are less than 256. PCRE doesn't support the
+notion of cases for higher-valued characters.
+
+(i) A character class whose characters are all within 0-255 is handled as
+ a bit map, and the map is inverted for negative classes. Previously, a
+ character > 255 always failed to match such a class; however it should
+ match if the class was a negative one (e.g. [^ab]). This has been fixed.
+
+(ii) A negated character class with a single character < 255 is coded as
+ "not this character" (OP_NOT). This wasn't working properly when the test
+ character was multibyte, either singly or repeated.
+
+(iii) Repeats of multibyte characters are now handled correctly in UTF-8
+ mode, for example: \x{100}{2,3}.
+
+(iv) The character escapes \b, \B, \d, \D, \s, \S, \w, and \W (either
+ singly or repeated) now correctly test multibyte characters. However,
+ PCRE doesn't recognize any characters with values greater than 255 as
+ digits, spaces, or word characters. Such characters always match \D, \S,
+ and \W, and never match \d, \s, or \w.
+
+(v) Classes may now contain characters and character ranges with values
+ greater than 255. For example: [ab\x{100}-\x{400}].
+
+(vi) pcregrep now has a --utf-8 option (synonym -u) which makes it call
+ PCRE in UTF-8 mode.
+
+52. The info request value PCRE_INFO_FIRSTCHAR has been renamed
+PCRE_INFO_FIRSTBYTE because it is a byte value. However, the old name is
+retained for backwards compatibility. (Note that LASTLITERAL is also a byte
+value.)
+
+53. The single man page has become too large. I have therefore split it up into
+a number of separate man pages. These also give rise to individual HTML pages;
+these are now put in a separate directory, and there is an index.html page that
+lists them all. Some hyperlinking between the pages has been installed.
+
+54. Added convenience functions for handling named capturing parentheses.
+
+55. Unknown escapes inside character classes (e.g. [\M]) and escapes that
+aren't interpreted therein (e.g. [\C]) are literals in Perl. This is now also
+true in PCRE, except when the PCRE_EXTENDED option is set, in which case they
+are faulted.
+
+56. Introduced HOST_CC and HOST_CFLAGS which can be set in the environment when
+calling configure. These values are used when compiling the dftables.c program
+which is run to generate the source of the default character tables. They
+default to the values of CC and CFLAGS. If you are cross-compiling PCRE,
+you will need to set these values.
+
+57. Updated the building process for Windows DLL, as provided by Fred Cox.
+
+
+Version 3.9 02-Jan-02
---------------------
1. A bit of extraneous text had somehow crept into the pcregrep documentation.
diff --git a/srclib/pcre/LICENCE b/srclib/pcre/LICENCE
index 8effa66492..1573583b6c 100644
--- a/srclib/pcre/LICENCE
+++ b/srclib/pcre/LICENCE
@@ -4,47 +4,42 @@ PCRE LICENCE
PCRE is a library of functions to support regular expressions whose syntax
and semantics are as close as possible to those of the Perl 5 language.
+Release 5 of PCRE is distributed under the terms of the "BSD" licence, as
+specified below. The documentation for PCRE, supplied in the "doc"
+directory, is distributed under the same terms as the software itself.
+
Written by: Philip Hazel <ph10@cam.ac.uk>
University of Cambridge Computing Service,
Cambridge, England. Phone: +44 1223 334714.
-Copyright (c) 1997-2001 University of Cambridge
-
-Permission is granted to anyone to use this software for any purpose on any
-computer system, and to redistribute it freely, subject to the following
-restrictions:
-
-1. This software is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-2. The origin of this software must not be misrepresented, either by
- explicit claim or by omission. In practice, this means that if you use
- PCRE in software which you distribute to others, commercially or
- otherwise, you must put a sentence like this
-
- Regular expression support is provided by the PCRE library package,
- which is open source software, written by Philip Hazel, and copyright
- by the University of Cambridge, England.
-
- somewhere reasonably visible in your documentation and in any relevant
- files or online help data or similar. A reference to the ftp site for
- the source, that is, to
-
- ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/
-
- should also be given in the documentation.
-
-3. Altered versions must be plainly marked as such, and must not be
- misrepresented as being the original software.
-
-4. If PCRE is embedded in any software that is released under the GNU
- General Purpose Licence (GPL), or Lesser General Purpose Licence (LGPL),
- then the terms of that licence shall supersede any condition above with
- which it is incompatible.
-
-The documentation for PCRE, supplied in the "doc" directory, is distributed
-under the same terms as the software itself.
+Copyright (c) 1997-2004 University of Cambridge
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
End
diff --git a/srclib/pcre/Makefile.in b/srclib/pcre/Makefile.in
index 357ce6e2a1..d748f11027 100644
--- a/srclib/pcre/Makefile.in
+++ b/srclib/pcre/Makefile.in
@@ -15,6 +15,6 @@ dftables: dftables.lo
$(LINK) $(EXTRA_LDFLAGS) dftables.lo $(EXTRA_LIBS)
$(srcdir)/chartables.c: dftables
- ./dftables > $@
+ ./dftables $@
pcre.lo: $(srcdir)/chartables.c
diff --git a/srclib/pcre/NEWS b/srclib/pcre/NEWS
index 27866b68a2..e9a5cf255e 100644
--- a/srclib/pcre/NEWS
+++ b/srclib/pcre/NEWS
@@ -1,6 +1,122 @@
News about PCRE releases
------------------------
+Release 5.0 13-Sep-04
+---------------------
+
+The licence under which PCRE is released has been changed to the more
+conventional "BSD" licence.
+
+In the code, some bugs have been fixed, and there are also some major changes
+in this release (which is why I've increased the number to 5.0). Some changes
+are internal rearrangements, and some provide a number of new facilities. The
+new features are:
+
+1. There's an "automatic callout" feature that inserts callouts before every
+ item in the regex, and there's a new callout field that gives the position
+ in the pattern - useful for debugging and tracing.
+
+2. The extra_data structure can now be used to pass in a set of character
+ tables at exec time. This is useful if compiled regex are saved and re-used
+ at a later time when the tables may not be at the same address. If the
+ default internal tables are used, the pointer saved with the compiled
+ pattern is now set to NULL, which means that you don't need to do anything
+ special unless you are using custom tables.
+
+3. It is possible, with some restrictions on the content of the regex, to
+ request "partial" matching. A special return code is given if all of the
+ subject string matched part of the regex. This could be useful for testing
+ an input field as it is being typed.
+
+4. There is now some optional support for Unicode character properties, which
+ means that the patterns items such as \p{Lu} and \X can now be used. Only
+ the general category properties are supported. If PCRE is compiled with this
+ support, an additional 90K data structure is include, which increases the
+ size of the library dramatically.
+
+5. There is support for saving compiled patterns and re-using them later.
+
+6. There is support for running regular expressions that were compiled on a
+ different host with the opposite endianness.
+
+7. The pcretest program has been extended to accommodate the new features.
+
+The main internal rearrangement is that sequences of literal characters are no
+longer handled as strings. Instead, each character is handled on its own. This
+makes some UTF-8 handling easier, and makes the support of partial matching
+possible. Compiled patterns containing long literal strings will be larger as a
+result of this change; I hope that performance will not be much affected.
+
+
+Release 4.5 01-Dec-03
+---------------------
+
+Again mainly a bug-fix and tidying release, with only a couple of new features:
+
+1. It's possible now to compile PCRE so that it does not use recursive
+function calls when matching. Instead it gets memory from the heap. This slows
+things down, but may be necessary on systems with limited stacks.
+
+2. UTF-8 string checking has been tightened to reject overlong sequences and to
+check that a starting offset points to the start of a character. Failure of the
+latter returns a new error code: PCRE_ERROR_BADUTF8_OFFSET.
+
+3. PCRE can now be compiled for systems that use EBCDIC code.
+
+
+Release 4.4 21-Aug-03
+---------------------
+
+This is mainly a bug-fix and tidying release. The only new feature is that PCRE
+checks UTF-8 strings for validity by default. There is an option to suppress
+this, just in case anybody wants that teeny extra bit of performance.
+
+
+Releases 4.1 - 4.3
+------------------
+
+Sorry, I forgot about updating the NEWS file for these releases. Please take a
+look at ChangeLog.
+
+
+Release 4.0 17-Feb-03
+---------------------
+
+There have been a lot of changes for the 4.0 release, adding additional
+functionality and mending bugs. Below is a list of the highlights of the new
+functionality. For full details of these features, please consult the
+documentation. For a complete list of changes, see the ChangeLog file.
+
+1. Support for Perl's \Q...\E escapes.
+
+2. "Possessive quantifiers" ?+, *+, ++, and {,}+ which come from Sun's Java
+package. They provide some syntactic sugar for simple cases of "atomic
+grouping".
+
+3. Support for the \G assertion. It is true when the current matching position
+is at the start point of the match.
+
+4. A new feature that provides some of the functionality that Perl provides
+with (?{...}). The facility is termed a "callout". The way it is done in PCRE
+is for the caller to provide an optional function, by setting pcre_callout to
+its entry point. To get the function called, the regex must include (?C) at
+appropriate points.
+
+5. Support for recursive calls to individual subpatterns. This makes it really
+easy to get totally confused.
+
+6. Support for named subpatterns. The Python syntax (?P<name>...) is used to
+name a group.
+
+7. Several extensions to UTF-8 support; it is now fairly complete. There is an
+option for pcregrep to make it operate in UTF-8 mode.
+
+8. The single man page has been split into a number of separate man pages.
+These also give rise to individual HTML pages which are put in a separate
+directory. There is an index.html page that lists them all. Some hyperlinking
+between the pages has been installed.
+
+
Release 3.5 15-Aug-01
---------------------
diff --git a/srclib/pcre/NON-UNIX-USE b/srclib/pcre/NON-UNIX-USE
index 14b1cc0d05..f6280af6f6 100644
--- a/srclib/pcre/NON-UNIX-USE
+++ b/srclib/pcre/NON-UNIX-USE
@@ -1,10 +1,25 @@
Compiling PCRE on non-Unix systems
----------------------------------
-If you want to compile PCRE for a non-Unix system, note that it consists
-entirely of code written in Standard C, and so should compile successfully
-on any machine with a Standard C compiler and library, using normal compiling
-commands to do the following:
+See below for comments on Cygwin or MinGW and OpenVMS usage. I (Philip Hazel)
+have no knowledge of Windows or VMS sytems and how their libraries work. The
+items in the PCRE Makefile that relate to anything other than Unix-like systems
+have been contributed by PCRE users. There are some other comments and files in
+the Contrib directory on the ftp site that you may find useful. See
+
+ ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/Contrib
+
+If you want to compile PCRE for a non-Unix system (or perhaps, more strictly,
+for a system that does not support "configure" and "make" files), note that
+PCRE consists entirely of code written in Standard C, and so should compile
+successfully on any system that has a Standard C compiler and library.
+
+
+GENERIC INSTRUCTIONS
+
+The following are generic comments about building PCRE. The interspersed
+indented commands are suggestions from Mark Tetrode as to which commands you
+might use on a Windows system to build a static library.
(1) Copy or rename the file config.in as config.h, and change the macros that
define HAVE_STRERROR and HAVE_MEMMOVE to define them as 1 rather than 0.
@@ -14,40 +29,216 @@ particular, if you want to force a specific value for newline, you can define
the NEWLINE macro. The default is to use '\n', thereby using whatever value
your compiler gives to '\n'.
+ rem Mark Tetrode's commands
+ copy config.in config.h
+ rem Use write, because notepad cannot handle UNIX files. Change values.
+ write config.h
+
(2) Copy or rename the file pcre.in as pcre.h, and change the macro definitions
for PCRE_MAJOR, PCRE_MINOR, and PCRE_DATE near its start to the values set in
configure.in.
+ rem Mark Tetrode's commands
+ copy pcre.in pcre.h
+ rem Read values from configure.in
+ write configure.in
+ rem Change values
+ write pcre.h
+
(3) Compile dftables.c as a stand-alone program, and then run it with
-the standard output sent to chartables.c. This generates a set of standard
-character tables.
+the single argument "chartables.c". This generates a set of standard
+character tables and writes them to that file.
+
+ rem Mark Tetrode's commands
+ rem Compile & run
+ cl -DSUPPORT_UTF8 dftables.c
+ dftables.exe > chartables.c
(4) Compile maketables.c, get.c, study.c and pcre.c and link them all
together into an object library in whichever form your system keeps such
-libraries. This is the pcre library (chartables.c gets included by means of an
-#include directive).
+libraries. This is the pcre library (chartables.c is included by means of an
+#include directive). If your system has static and shared libraries, you may
+have to do this once for each type.
+
+ rem Mark Tetrode's commands, for a static library
+ rem Compile & lib
+ cl -DSUPPORT_UTF8 -DPOSIX_MALLOC_THRESHOLD=10 /c maketables.c get.c study.c pcre.c
+ lib /OUT:pcre.lib maketables.obj get.obj study.obj pcre.obj
-(5) Similarly, compile pcreposix.c and link it as the pcreposix library.
+(5) Similarly, compile pcreposix.c and link it (on its own) as the pcreposix
+library.
+
+ rem Mark Tetrode's commands, for a static library
+ rem Compile & lib
+ cl -DSUPPORT_UTF8 -DPOSIX_MALLOC_THRESHOLD=10 /c pcreposix.c
+ lib /OUT:pcreposix.lib pcreposix.obj
(6) Compile the test program pcretest.c. This needs the functions in the
pcre and pcreposix libraries when linking.
+ rem Mark Tetrode's commands
+ rem compile & link
+ cl pcretest.c pcre.lib pcreposix.lib
+
(7) Run pcretest on the testinput files in the testdata directory, and check
that the output matches the corresponding testoutput files. You must use the
--i option when checking testinput2.
+-i option when checking testinput2. Note that the supplied files are in Unix
+format, with just LF characters as line terminators. You may need to edit them
+to change this if your system uses a different convention.
+
+ rem Mark Tetrode's commands
+ rem Make a change, i.e. space, backspace, and save again - do this for all
+ rem to change UNIX to Win, \n to \n\r
+ write testoutput1
+ write testoutput2
+ write testoutput3
+ write testoutput4
+ write testoutput5
+ pcretest testdata\testinput1 testdata\myoutput1
+ windiff testdata\testoutput1 testdata\myoutput1
+ pcretest -i testdata\testinput2 testdata\myoutput2
+ windiff testdata\testoutput2 testdata\myoutput2
+ pcretest testdata\testinput3 testdata\myoutput3
+ windiff testdata\testoutput3 testdata\myoutput3
+ pcretest testdata\testinput4 testdata\myoutput4
+ windiff testdata\testoutput4 testdata\myoutput4
+ pcretest testdata\testinput5 testdata\myoutput5
+ windiff testdata\testoutput5 testdata\myoutput5
+
+
+FURTHER REMARKS
If you have a system without "configure" but where you can use a Makefile, edit
Makefile.in to create Makefile, substituting suitable values for the variables
at the head of the file.
Some help in building a Win32 DLL of PCRE in GnuWin32 environments was
-contributed by Paul.Sokolovsky@technologist.com. These environments are
-Mingw32 (http://www.xraylith.wisc.edu/~khan/software/gnu-win32/) and
-CygWin (http://sourceware.cygnus.com/cygwin/). Paul comments:
+contributed by Paul Sokolovsky. These environments are Mingw32
+(http://www.xraylith.wisc.edu/~khan/software/gnu-win32/) and CygWin
+(http://sourceware.cygnus.com/cygwin/). Paul comments:
For CygWin, set CFLAGS=-mno-cygwin, and do 'make dll'. You'll get
pcre.dll (containing pcreposix also), libpcre.dll.a, and dynamically
linked pgrep and pcretest. If you have /bin/sh, run RunTest (three
main test go ok, locale not supported).
+Changes to do MinGW with autoconf 2.50 were supplied by Fred Cox
+<sailorFred@yahoo.com>, who comments as follows:
+
+ If you are using the PCRE DLL, the normal Unix style configure && make &&
+ make check && make install should just work[*]. If you want to statically
+ link against the .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 hilarious results. See the configure.in
+ and pcretest.c for how it is done for the static test.
+
+ Also, there will only be a libpcre.la, not a libpcreposix.la, as you
+ would expect from the Unix version. The single DLL includes the pcreposix
+ interface.
+
+[*] But note that the supplied test files are in Unix format, with just LF
+characters as line terminators. You will have to edit them to change to CR LF
+terminators.
+
+A script for building PCRE using Borland's C++ compiler for use with VPASCAL
+was contributed by Alexander Tokarev. It is called makevp.bat.
+
+These are some further comments about Win32 builds from Mark Evans. They
+were contributed before Fred Cox's changes were made, so it is possible that
+they may no longer be relevant.
+
+"The documentation for Win32 builds is a bit shy. Under MSVC6 I
+followed their instructions to the letter, but there were still
+some things missing.
+
+(1) Must #define STATIC for entire project if linking statically.
+ (I see no reason to use DLLs for code this compact.) This of
+ course is a project setting in MSVC under Preprocessor.
+
+(2) Missing some #ifdefs relating to the function pointers
+ pcre_malloc and pcre_free. See my solution below. (The stubs
+ may not be mandatory but they made me feel better.)"
+
+=========================
+#ifdef _WIN32
+#include <malloc.h>
+
+void* malloc_stub(size_t N)
+{ return malloc(N); }
+void free_stub(void* p)
+{ free(p); }
+void *(*pcre_malloc)(size_t) = &malloc_stub;
+void (*pcre_free)(void *) = &free_stub;
+
+#else
+
+void *(*pcre_malloc)(size_t) = malloc;
+void (*pcre_free)(void *) = free;
+
+#endif
+=========================
+
+
+BUILDING PCRE ON OPENVMS
+
+Dan Mooney sent the following comments about building PCRE on OpenVMS:
+
+"It was quite easy to compile and link the library. I don't have a formal
+make file but the attached file [reproduced below] contains the OpenVMS DCL
+commands I used to build the library. I had to add #define
+POSIX_MALLOC_THRESHOLD 10 to pcre.h since it was not defined anywhere.
+
+The library was built on:
+O/S: HP OpenVMS v7.3-1
+Compiler: Compaq C v6.5-001-48BCD
+Linker: vA13-01
+
+The test results did not match 100% due to the issues you mention in your
+documentation regarding isprint(), iscntrl(), isgraph() and ispunct(). I
+modified some of the character tables temporarily and was able to get the
+results to match. Tests using the fr locale did not match since I don't have
+that locale loaded. The study size was always reported to be 3 less than the
+value in the standard test output files."
+
+=========================
+$! This DCL procedure builds PCRE on OpenVMS
+$!
+$! I followed the instructions in the non-unix-use file in the distribution.
+$!
+$ COMPILE == "CC/LIST/NOMEMBER_ALIGNMENT/PREFIX_LIBRARY_ENTRIES=ALL_ENTRIES
+$ COMPILE DFTABLES.C
+$ LINK/EXE=DFTABLES.EXE DFTABLES.OBJ
+$ RUN DFTABLES.EXE/OUTPUT=CHARTABLES.C
+$ COMPILE MAKETABLES.C
+$ COMPILE GET.C
+$ COMPILE STUDY.C
+$! I had to set POSIX_MALLOC_THRESHOLD to 10 in PCRE.H since the symbol
+$! did not seem to be defined anywhere.
+$! I edited pcre.h and added #DEFINE SUPPORT_UTF8 to enable UTF8 support.
+$ COMPILE PCRE.C
+$ LIB/CREATE PCRE MAKETABLES.OBJ, GET.OBJ, STUDY.OBJ, PCRE.OBJ
+$! I had to set POSIX_MALLOC_THRESHOLD to 10 in PCRE.H since the symbol
+$! did not seem to be defined anywhere.
+$ COMPILE PCREPOSIX.C
+$ LIB/CREATE PCREPOSIX PCREPOSIX.OBJ
+$ COMPILE PCRETEST.C
+$ LINK/EXE=PCRETEST.EXE PCRETEST.OBJ, PCRE/LIB, PCREPOSIX/LIB
+$! C programs that want access to command line arguments must be
+$! defined as a symbol
+$ PCRETEST :== "$ SYS$ROADSUSERS:[DMOONEY.REGEXP]PCRETEST.EXE"
+$! Arguments must be enclosed in quotes.
+$ PCRETEST "-C"
+$! Test results:
+$!
+$! The test results did not match 100%. The functions isprint(), iscntrl(),
+$! isgraph() and ispunct() on OpenVMS must not produce the same results
+$! as the system that built the test output files provided with the
+$! distribution.
+$!
+$! The study size did not match and was always 3 less on OpenVMS.
+$!
+$! Locale could not be set to fr
+$!
+=========================
+
****
diff --git a/srclib/pcre/README b/srclib/pcre/README
index 7557374791..fc5397ecce 100644
--- a/srclib/pcre/README
+++ b/srclib/pcre/README
@@ -16,6 +16,33 @@ regex.h, but I didn't want to risk possible problems with existing files of
that name by distributing it that way. To use it with an existing program that
uses the POSIX API, it will have to be renamed or pointed at by a link.
+If you are using the POSIX interface to PCRE and there is already a POSIX regex
+library installed on your system, you must take care when linking programs to
+ensure that they link with PCRE's libpcreposix library. Otherwise they may pick
+up the "real" POSIX functions of the same name.
+
+
+Documentation for PCRE
+----------------------
+
+If you install PCRE in the normal way, you will end up with an installed set of
+man pages whose names all start with "pcre". The one that is called "pcre"
+lists all the others. In addition to these man pages, the PCRE documentation is
+supplied in two other forms; however, as there is no standard place to install
+them, they are left in the doc directory of the unpacked source distribution.
+These forms are:
+
+ 1. Files called doc/pcre.txt, doc/pcregrep.txt, and doc/pcretest.txt. The
+ first of these is a concatenation of the text forms of all the section 3
+ man pages except those that summarize individual functions. The other two
+ are the text forms of the section 1 man pages for the pcregrep and
+ pcretest commands. Text forms are provided for ease of scanning with text
+ editors or similar tools.
+
+ 2. A subdirectory called doc/html contains all the documentation in HTML
+ form, hyperlinked in various ways, and rooted in a file called
+ doc/index.html.
+
Contributions by users of PCRE
------------------------------
@@ -30,17 +57,18 @@ Windows systems (I myself do not use Windows). Some are complete in themselves;
others are pointers to URLs containing relevant files.
-Building PCRE on a Unix system
-------------------------------
+Building PCRE on a Unix-like system
+-----------------------------------
-To build PCRE on a Unix system, first run the "configure" command from the PCRE
-distribution directory, with your current directory set to the directory where
-you want the files to be created. This command is a standard GNU "autoconf"
-configuration script, for which generic instructions are supplied in INSTALL.
+To build PCRE on a Unix-like system, first run the "configure" command from the
+PCRE distribution directory, with your current directory set to the directory
+where you want the files to be created. This command is a standard GNU
+"autoconf" configuration script, for which generic instructions are supplied in
+INSTALL.
Most commonly, people build PCRE within its own distribution directory, and in
this case, on many systems, just running "./configure" is sufficient, but the
-usual methods of changing standard defaults are available. For example,
+usual methods of changing standard defaults are available. For example:
CFLAGS='-O2 -Wall' ./configure --prefix=/opt/local
@@ -55,18 +83,71 @@ into /source/pcre/pcre-xxx, but you want to build it in /build/pcre/pcre-xxx:
cd /build/pcre/pcre-xxx
/source/pcre/pcre-xxx/configure
-If you want to make use of the experimential, incomplete support for UTF-8
-character strings in PCRE, you must add --enable-utf8 to the "configure"
-command. Without it, the code for handling UTF-8 is not included in the
-library. (Even when included, it still has to be enabled by an option at run
-time.)
+There are some optional features that can be included or omitted from the PCRE
+library. You can read more about them in the pcrebuild man page.
-The "configure" script builds five files:
+. If you want to make use of the support for UTF-8 character strings in PCRE,
+ you must add --enable-utf8 to the "configure" command. Without it, the code
+ for handling UTF-8 is not included in the library. (Even when included, it
+ still has to be enabled by an option at run time.)
-. libtool is a script that builds shared and/or static libraries
+. If, in addition to support for UTF-8 character strings, you want to include
+ support for the \P, \p, and \X sequences that recognize Unicode character
+ properties, you must add --enable-unicode-properties to the "configure"
+ command. This adds about 90K to the size of the library (in the form of a
+ property table); only the basic two-letter properties such as Lu are
+ supported.
+
+. You can build PCRE to recognized CR or NL as the newline character, instead
+ of whatever your compiler uses for "\n", by adding --newline-is-cr or
+ --newline-is-nl to the "configure" command, respectively. Only do this if you
+ really understand what you are doing. On traditional Unix-like systems, the
+ newline character is NL.
+
+. When called via the POSIX interface, PCRE uses malloc() to get additional
+ storage for processing capturing parentheses if there are more than 10 of
+ them. You can increase this threshold by setting, for example,
+
+ --with-posix-malloc-threshold=20
+
+ on the "configure" command.
+
+. PCRE has a counter which can be set to limit the amount of resources it uses.
+ If the limit is exceeded during a match, the match fails. The default is ten
+ million. You can change the default by setting, for example,
+
+ --with-match-limit=500000
+
+ on the "configure" command. This is just the default; individual calls to
+ pcre_exec() can supply their own value. There is discussion on the pcreapi
+ man page.
+
+. The default maximum compiled pattern size is around 64K. You can increase
+ this by adding --with-link-size=3 to the "configure" command. You can
+ increase it even more by setting --with-link-size=4, but this is unlikely
+ ever to be necessary. If you build PCRE with an increased link size, test 2
+ (and 5 if you are using UTF-8) will fail. Part of the output of these tests
+ is a representation of the compiled pattern, and this changes with the link
+ size.
+
+. You can build PCRE so that its match() function does not call itself
+ recursively. Instead, it uses blocks of data from the heap via special
+ functions pcre_stack_malloc() and pcre_stack_free() to save data that would
+ otherwise be saved on the stack. To build PCRE like this, use
+
+ --disable-stack-for-recursion
+
+ on the "configure" command. PCRE runs more slowly in this mode, but it may be
+ necessary in environments with limited stack sizes.
+
+The "configure" script builds seven files:
+
+. pcre.h is build by copying pcre.in and making substitutions
. Makefile is built by copying Makefile.in and making substitutions.
. config.h is built by copying config.in and making substitutions.
. pcre-config is built by copying pcre-config.in and making substitutions.
+. libpcre.pc is data for the pkg-config command, built from libpcre.pc.in
+. libtool is a script that builds shared and/or static libraries
. RunTest is a script for running tests
Once "configure" has run, you can run "make". It builds two libraries called
@@ -75,30 +156,36 @@ command. You can use "make install" to copy these, the public header files
pcre.h and pcreposix.h, and the man pages to appropriate live directories on
your system, in the normal way.
+
+Retrieving configuration information on Unix-like systems
+---------------------------------------------------------
+
Running "make install" also installs the command pcre-config, which can be used
to recall information about the PCRE configuration and installation. For
-example,
+example:
pcre-config --version
prints the version number, and
- pcre-config --libs
+ pcre-config --libs
outputs information about where the library is installed. This command can be
included in makefiles for programs that use PCRE, saving the programmer from
having to remember too many details.
-There is one esoteric feature that is controlled by "configure". It concerns
-the character value used for "newline", and is something that you probably do
-not want to change on a Unix system. The default is to use whatever value your
-compiler gives to '\n'. By using --enable-newline-is-cr or
---enable-newline-is-lf you can force the value to be CR (13) or LF (10) if you
-really want to.
+The pkg-config command is another system for saving and retrieving information
+about installed libraries. Instead of separate commands for each library, a
+single command is used. For example:
+ pkg-config --cflags pcre
-Shared libraries on Unix systems
---------------------------------
+The data is held in *.pc files that are installed in a directory called
+pkgconfig.
+
+
+Shared libraries on Unix-like systems
+-------------------------------------
The default distribution builds PCRE as two shared libraries and two static
libraries, as long as the operating system supports shared libraries. Shared
@@ -115,7 +202,7 @@ installed themselves. However, the versions left in the source directory still
use the uninstalled libraries.
To build PCRE using static libraries only you must use --disable-shared when
-configuring it. For example
+configuring it. For example:
./configure --prefix=/usr/gnu --disable-shared
@@ -123,12 +210,28 @@ Then run "make" in the usual way. Similarly, you can use --disable-static to
build only shared libraries.
+Cross-compiling on a Unix-like system
+-------------------------------------
+
+You can specify CC and CFLAGS in the normal way to the "configure" command, in
+order to cross-compile PCRE for some other host. However, during the building
+process, the dftables.c source file is compiled *and run* on the local host, in
+order to generate the default character tables (the chartables.c file). It
+therefore needs to be compiled with the local compiler, not the cross compiler.
+You can do this by specifying CC_FOR_BUILD (and if necessary CFLAGS_FOR_BUILD)
+when calling the "configure" command. If they are not specified, they default
+to the values of CC and CFLAGS.
+
+
Building on non-Unix systems
----------------------------
-For a non-Unix system, read the comments in the file NON-UNIX-USE. PCRE has
-been compiled on Windows systems and on Macintoshes, but I don't know the
-details because I don't use those systems. It should be straightforward to
+For a non-Unix system, read the comments in the file NON-UNIX-USE, though if
+the system supports the use of "configure" and "make" you may be able to build
+PCRE in the same way as for Unix systems.
+
+PCRE has been compiled on Windows systems and on Macintoshes, but I don't know
+the details because I don't use those systems. It should be straightforward to
build PCRE on any system that has a Standard C compiler, because it uses only
Standard C functions.
@@ -138,22 +241,20 @@ Testing PCRE
To test PCRE on a Unix system, run the RunTest script that is created by the
configuring process. (This can also be run by "make runtest", "make check", or
-"make test".) For other systems, see the instruction in NON-UNIX-USE.
+"make test".) For other systems, see the instructions in NON-UNIX-USE.
-The script runs the pcretest test program (which is documented in the doc
-directory) on each of the testinput files (in the testdata directory) in turn,
+The script runs the pcretest test program (which is documented in its own man
+page) on each of the testinput files (in the testdata directory) in turn,
and compares the output with the contents of the corresponding testoutput file.
-A file called testtry is used to hold the output from pcretest. To run pcretest
-on just one of the test files, give its number as an argument to RunTest, for
-example:
+A file called testtry is used to hold the main output from pcretest
+(testsavedregex is also used as a working file). To run pcretest on just one of
+the test files, give its number as an argument to RunTest, for example:
- RunTest 3
+ RunTest 2
-The first and third test files can also be fed directly into the perltest
-script to check that Perl gives the same results. The third file requires the
-additional features of release 5.005, which is why it is kept separate from the
-main test input, which needs only Perl 5.004. In the long run, when 5.005 (or
-higher) is widespread, these two test files may get amalgamated.
+The first file can also be fed directly into the perltest script to check that
+Perl gives the same results. The only difference you should see is in the first
+few lines, where the Perl version is given instead of the PCRE version.
The second set of tests check pcre_fullinfo(), pcre_info(), pcre_study(),
pcre_copy_substring(), pcre_get_substring(), pcre_get_substring_list(), error
@@ -171,34 +272,42 @@ listed for checking. Where the comparison test output contains [\x00-\x7f] the
test will contain [\x00-\xff], and similarly in some other cases. This is not a
bug in PCRE.
-The fourth set of tests checks pcre_maketables(), the facility for building a
+The third set of tests checks pcre_maketables(), the facility for building a
set of character tables for a specific locale and using them instead of the
-default tables. The tests make use of the "fr" (French) locale. Before running
-the test, the script checks for the presence of this locale by running the
-"locale" command. If that command fails, or if it doesn't include "fr" in the
-list of available locales, the fourth test cannot be run, and a comment is
-output to say why. If running this test produces instances of the error
+default tables. The tests make use of the "fr_FR" (French) locale. Before
+running the test, the script checks for the presence of this locale by running
+the "locale" command. If that command fails, or if it doesn't include "fr_FR"
+in the list of available locales, the third test cannot be run, and a comment
+is output to say why. If running this test produces instances of the error
- ** Failed to set locale "fr"
+ ** Failed to set locale "fr_FR"
in the comparison output, it means that locale is not available on your system,
despite being listed by "locale". This does not mean that PCRE is broken.
-The fifth test checks the experimental, incomplete UTF-8 support. It is not run
-automatically unless PCRE is built with UTF-8 support. This file can be fed
-directly to the perltest8 script, which requires Perl 5.6 or higher. The sixth
-file tests internal UTF-8 features of PCRE that are not relevant to Perl.
+The fourth test checks the UTF-8 support. It is not run automatically unless
+PCRE is built with UTF-8 support. To do this you must set --enable-utf8 when
+running "configure". This file can be also fed directly to the perltest script,
+provided you are running Perl 5.8 or higher. (For Perl 5.6, a small patch,
+commented in the script, can be be used.)
+
+The fifth test checks error handling with UTF-8 encoding, and internal UTF-8
+features of PCRE that are not relevant to Perl.
+
+The sixth and final test checks the support for Unicode character properties.
+It it not run automatically unless PCRE is built with Unicode property support.
+To to this you must set --enable-unicode-properties when running "configure".
Character tables
----------------
-PCRE uses four tables for manipulating and identifying characters. The final
-argument of the pcre_compile() function is a pointer to a block of memory
-containing the concatenated tables. A call to pcre_maketables() can be used to
-generate a set of tables in the current locale. If the final argument for
-pcre_compile() is passed as NULL, a set of default tables that is built into
-the binary is used.
+PCRE uses four tables for manipulating and identifying characters whose values
+are less than 256. The final argument of the pcre_compile() function is a
+pointer to a block of memory containing the concatenated tables. A call to
+pcre_maketables() can be used to generate a set of tables in the current
+locale. If the final argument for pcre_compile() is passed as NULL, a set of
+default tables that is built into the binary is used.
The source file called chartables.c contains the default set of tables. This is
not supplied in the distribution, but is built by the program dftables
@@ -238,11 +347,20 @@ The distribution should contain the following files:
headers:
dftables.c auxiliary program for building chartables.c
+
get.c )
maketables.c )
- study.c ) source of
- pcre.c ) the functions
+ study.c ) source of the functions
+ pcre.c ) in the library
pcreposix.c )
+ printint.c )
+
+ ucp.c )
+ ucp.h ) source for the code that is used for
+ ucpinternal.h ) Unicode property handling
+ ucptable.c )
+ ucptypetable.c )
+
pcre.in "source" for the header for the external API; pcre.h
is built from this by "configure"
pcreposix.h header for the external POSIX wrapper API
@@ -266,31 +384,27 @@ The distribution should contain the following files:
configure a configuring shell script (built by autoconf)
configure.in the autoconf input used to build configure
doc/Tech.Notes notes on the encoding
- doc/pcre.3 man page source for the PCRE functions
- doc/pcre.html HTML version
- doc/pcre.txt plain text version
- doc/pcreposix.3 man page source for the POSIX wrapper API
- doc/pcreposix.html HTML version
- doc/pcreposix.txt plain text version
- doc/pcretest.txt documentation of test program
- doc/perltest.txt documentation of Perl test program
- doc/pcregrep.1 man page source for the pcregrep utility
- doc/pcregrep.html HTML version
- doc/pcregrep.txt plain text version
+ doc/*.3 man page sources for the PCRE functions
+ doc/*.1 man page sources for pcregrep and pcretest
+ doc/html/* HTML documentation
+ doc/pcre.txt plain text version of the man pages
+ doc/pcretest.txt plain text documentation of test program
+ doc/perltest.txt plain text documentation of Perl test program
install-sh a shell script for installing files
+ libpcre.pc.in "source" for libpcre.pc for pkg-config
ltmain.sh file used to build a libtool script
+ mkinstalldirs script for making install directories
pcretest.c comprehensive test program
pcredemo.c simple demonstration of coding calls to PCRE
perltest Perl test program
- perltest8 Perl test program for UTF-8 tests
pcregrep.c source of a grep utility that uses PCRE
pcre-config.in source of script which retains PCRE information
- testdata/testinput1 test data, compatible with Perl 5.004 and 5.005
+ testdata/testinput1 test data, compatible with Perl
testdata/testinput2 test data for error messages and non-Perl things
- testdata/testinput3 test data, compatible with Perl 5.005
- testdata/testinput4 test data for locale-specific tests
- testdata/testinput5 test data for UTF-8 tests compatible with Perl 5.6
- testdata/testinput6 test data for other UTF-8 tests
+ testdata/testinput3 test data for locale-specific tests
+ testdata/testinput4 test data for UTF-8 tests compatible with Perl
+ testdata/testinput5 test data for other UTF-8 tests
+ testdata/testinput6 test data for Unicode property support tests
testdata/testoutput1 test results corresponding to testinput1
testdata/testoutput2 test results corresponding to testinput2
testdata/testoutput3 test results corresponding to testinput3
@@ -301,7 +415,13 @@ The distribution should contain the following files:
(C) Auxiliary files for Win32 DLL
dll.mk
+ libpcre.def
+ libpcreposix.def
pcre.def
+(D) Auxiliary file for VPASCAL
+
+ makevp.bat
+
Philip Hazel <ph10@cam.ac.uk>
-August 2001
+September 2004
diff --git a/srclib/pcre/RunTest.in b/srclib/pcre/RunTest.in
index 63c4b26b15..5e945e1baf 100755
--- a/srclib/pcre/RunTest.in
+++ b/srclib/pcre/RunTest.in
@@ -30,35 +30,66 @@ while [ $# -gt 0 ] ; do
shift
done
+if [ "@LINK_SIZE@" != "" -a "@LINK_SIZE@" != "-DLINK_SIZE=2" ] ; then
+ if [ $do2 = yes ] ; then
+ echo "Can't run test 2 with an internal link size other than 2"
+ exit 1
+ fi
+ if [ $do5 = yes ] ; then
+ echo "Can't run test 5 with an internal link size other than 2"
+ exit 1
+ fi
+ if [ $do6 = yes ] ; then
+ echo "Can't run test 6 with an internal link size other than 2"
+ exit 1
+ fi
+fi
+
if [ "@UTF8@" = "" ] ; then
+ if [ $do4 = yes ] ; then
+ echo "Can't run test 4 because UTF-8 support is not configured"
+ exit 1
+ fi
if [ $do5 = yes ] ; then
- echo "Can't run test 5 because UFT8 support is not configured"
+ echo "Can't run test 5 because UTF-8 support is not configured"
exit 1
fi
if [ $do6 = yes ] ; then
- echo "Can't run test 6 because UFT8 support is not configured"
+ echo "Can't run test 6 because UTF-8 support is not configured"
exit 1
fi
fi
-if [ $do1 = no -a $do2 = no -a $do3 = no -a $do4 = no -a\
+if [ "@UCP@" = "" ] ; then
+ if [ $do6 = yes ] ; then
+ echo "Can't run test 6 because Unicode property support is not configured"
+ exit 1
+ fi
+fi
+
+if [ $do1 = no -a $do2 = no -a $do3 = no -a $do4 = no -a \
$do5 = no -a $do6 = no ] ; then
do1=yes
- do2=yes
+ do2=yes
do3=yes
- do4=yes
+ if [ "@UTF8@" != "" ] ; then do4=yes; fi
if [ "@UTF8@" != "" ] ; then do5=yes; fi
- if [ "@UTF8@" != "" ] ; then do6=yes; fi
+ if [ "@UTF8@" != "" -a "@UCP@" != "" ] ; then do6=yes; fi
fi
+# Show which release
+
+./pcretest /dev/null
+
# Primary test, Perl-compatible
if [ $do1 = yes ] ; then
- echo "Testing main functionality (Perl compatible)"
+ echo "Test 1: main functionality (Perl compatible)"
./pcretest $testdata/testinput1 testtry
if [ $? = 0 ] ; then
$cf testtry $testdata/testoutput1
if [ $? != 0 ] ; then exit 1; fi
+ echo " "
else exit 1
fi
fi
@@ -66,42 +97,34 @@ fi
# PCRE tests that are not Perl-compatible - API & error tests, mostly
if [ $do2 = yes ] ; then
- echo "Testing API and error handling (not Perl compatible)"
- ./pcretest -i $testdata/testinput2 testtry
- if [ $? = 0 ] ; then
- $cf testtry $testdata/testoutput2
- if [ $? != 0 ] ; then exit 1; fi
- else exit 1
- fi
-fi
-
-# Additional Perl-compatible tests for Perl 5.005's new features
-
-if [ $do3 = yes ] ; then
- echo "Testing Perl 5.005 features (Perl 5.005 compatible)"
- ./pcretest $testdata/testinput3 testtry
- if [ $? = 0 ] ; then
- $cf testtry $testdata/testoutput3
- if [ $? != 0 ] ; then exit 1; fi
- else exit 1
- fi
+ if [ "@LINK_SIZE@" = "" -o "@LINK_SIZE@" = "-DLINK_SIZE=2" ] ; then
+ echo "Test 2: API and error handling (not Perl compatible)"
+ ./pcretest -i $testdata/testinput2 testtry
+ if [ $? = 0 ] ; then
+ $cf testtry $testdata/testoutput2
+ if [ $? != 0 ] ; then exit 1; fi
+ else exit 1
+ fi
+ else
+ echo Test 2 skipped for link size other than 2 \(@LINK_SIZE@\)
+ fi
fi
-if [ $do1 = yes -a $do2 = yes -a $do3 = yes ] ; then
+if [ $do1 = yes -a $do2 = yes ] ; then
echo " "
- echo "The three main tests all ran OK"
+ echo "The two main tests ran OK"
echo " "
fi
-# Locale-specific tests, provided the "fr" locale is available
+# Locale-specific tests, provided the "fr_FR" locale is available
-if [ $do4 = yes ] ; then
- locale -a | grep '^fr$' >/dev/null
+if [ $do3 = yes ] ; then
+ locale -a | grep '^fr_FR$' >/dev/null
if [ $? -eq 0 ] ; then
- echo "Testing locale-specific features (using 'fr' locale)"
- ./pcretest $testdata/testinput4 testtry
+ echo "Test 3: locale-specific features (using 'fr_FR' locale)"
+ ./pcretest $testdata/testinput3 testtry
if [ $? = 0 ] ; then
- $cf testtry $testdata/testoutput4
+ $cf testtry $testdata/testoutput3
if [ $? != 0 ] ; then
echo " "
echo "Locale test did not run entirely successfully."
@@ -114,7 +137,7 @@ if [ $do4 = yes ] ; then
else exit 1
fi
else
- echo "Cannot test locale-specific features - 'fr' locale not found,"
+ echo "Cannot test locale-specific features - 'fr_FR' locale not found,"
echo "or the \"locale\" command is not available to check for it."
echo " "
fi
@@ -122,11 +145,11 @@ fi
# Additional tests for UTF8 support
-if [ $do5 = yes ] ; then
- echo "Testing experimental, incomplete UTF8 support (Perl compatible)"
- ./pcretest $testdata/testinput5 testtry
+if [ $do4 = yes ] ; then
+ echo "Test 4: UTF-8 support (Perl compatible)"
+ ./pcretest $testdata/testinput4 testtry
if [ $? = 0 ] ; then
- $cf testtry $testdata/testoutput5
+ $cf testtry $testdata/testoutput4
if [ $? != 0 ] ; then exit 1; fi
else exit 1
fi
@@ -134,16 +157,36 @@ if [ $do5 = yes ] ; then
echo " "
fi
+if [ $do5 = yes ] ; then
+ if [ "@LINK_SIZE@" = "" -o "@LINK_SIZE@" = "-DLINK_SIZE=2" ] ; then
+ echo "Test 5: API and internals for UTF-8 support (not Perl compatible)"
+ ./pcretest $testdata/testinput5 testtry
+ if [ $? = 0 ] ; then
+ $cf testtry $testdata/testoutput5
+ if [ $? != 0 ] ; then exit 1; fi
+ else exit 1
+ fi
+ echo "UTF8 internals test ran OK"
+ echo " "
+ else
+ echo Test 5 skipped for link size other than 2 \(@LINK_SIZE@\)
+ fi
+fi
+
if [ $do6 = yes ] ; then
- echo "Testing API and internals for UTF8 support (not Perl compatible)"
- ./pcretest $testdata/testinput6 testtry
- if [ $? = 0 ] ; then
- $cf testtry $testdata/testoutput6
- if [ $? != 0 ] ; then exit 1; fi
- else exit 1
- fi
- echo "UTF8 internals test ran OK"
- echo " "
+ if [ "@LINK_SIZE@" = "" -o "@LINK_SIZE@" = "-DLINK_SIZE=2" ] ; then
+ echo "Test 6: Unicode property support"
+ ./pcretest $testdata/testinput6 testtry
+ if [ $? = 0 ] ; then
+ $cf testtry $testdata/testoutput6
+ if [ $? != 0 ] ; then exit 1; fi
+ else exit 1
+ fi
+ echo "Unicode properties test ran OK"
+ echo " "
+ else
+ echo Test 6 skipped for link size other than 2 \(@LINK_SIZE@\)
+ fi
fi
# End
diff --git a/srclib/pcre/config.in b/srclib/pcre/config.in
index 767cbd055c..fc17ddd13c 100644
--- a/srclib/pcre/config.in
+++ b/srclib/pcre/config.in
@@ -11,11 +11,25 @@ memmove(), change the definition of HAVE_BCOPY instead of HAVE_MEMMOVE. If your
system has neither bcopy() nor memmove(), leave them both as 0; an emulation
function will be used. */
-/* Define to empty if the keyword does not work. */
+/* If you are compiling for a system that uses EBCDIC instead of ASCII
+character codes, define this macro as 1. On systems that can use "configure",
+this can be done via --enable-ebcdic. */
+
+#ifndef EBCDIC
+#define EBCDIC 0
+#endif
+
+/* If you are compiling for a system that needs some magic to be inserted
+before the definition of an exported function, define this macro to contain the
+relevant magic. It apears at the start of every exported function. */
+
+#define EXPORT
+
+/* Define to empty if the "const" keyword does not work. */
#undef const
-/* Define to `unsigned' if <stddef.h> doesn't define size_t. */
+/* Define to "unsigned" if <stddef.h> doesn't define size_t. */
#undef size_t
@@ -44,4 +58,50 @@ On Unix systems, "configure" can be used to override this default. */
#define NEWLINE '\n'
#endif
+/* The value of LINK_SIZE determines the number of bytes used to store
+links as offsets within the compiled regex. The default is 2, which allows for
+compiled patterns up to 64K long. This covers the vast majority of cases.
+However, PCRE can also be compiled to use 3 or 4 bytes instead. This allows for
+longer patterns in extreme cases. On Unix systems, "configure" can be used to
+override this default. */
+
+#ifndef LINK_SIZE
+#define LINK_SIZE 2
+#endif
+
+/* The value of MATCH_LIMIT determines the default number of times the match()
+function can be called during a single execution of pcre_exec(). (There is a
+runtime method of setting a different limit.) The limit exists in order to
+catch runaway regular expressions that take for ever to determine that they do
+not match. The default is set very large so that it does not accidentally catch
+legitimate cases. On Unix systems, "configure" can be used to override this
+default default. */
+
+#ifndef MATCH_LIMIT
+#define MATCH_LIMIT 10000000
+#endif
+
+/* When calling PCRE via the POSIX interface, additional working storage is
+required for holding the pointers to capturing substrings because PCRE requires
+three integers per substring, whereas the POSIX interface provides only two. If
+the number of expected substrings is small, the wrapper function uses space on
+the stack, because this is faster than using malloc() for each call. The
+threshold above which the stack is no longer use is defined by POSIX_MALLOC_
+THRESHOLD. On Unix systems, "configure" can be used to override this default.
+*/
+
+#ifndef POSIX_MALLOC_THRESHOLD
+#define POSIX_MALLOC_THRESHOLD 10
+#endif
+
+/* PCRE uses recursive function calls to handle backtracking while matching.
+This can sometimes be a problem on systems that have stacks of limited size.
+Define NO_RECURSE to get a version that doesn't use recursion in the match()
+function; instead it creates its own stack by steam using pcre_recurse_malloc
+to get memory. For more detail, see comments and other stuff just above the
+match() function. On Unix systems, "configure" can be used to set this in the
+Makefile (use --disable-stack-for-recursion). */
+
+/* #define NO_RECURSE */
+
/* End */
diff --git a/srclib/pcre/configure.in b/srclib/pcre/configure.in
index 061cfb68df..4f8d031aaf 100644
--- a/srclib/pcre/configure.in
+++ b/srclib/pcre/configure.in
@@ -5,6 +5,10 @@ dnl it should be seeing, to verify it is in the same directory.
AC_INIT(dftables.c)
+dnl A safety precaution
+
+AC_PREREQ(2.57)
+
dnl Arrange to build config.h from config.in. Note that pcre.h is
dnl built differently, as it is just a "substitution" file.
dnl Manual says this macro should come right after AC_INIT.
@@ -16,11 +20,15 @@ dnl macro, and may be treated as octal constants. Stick to single
dnl digits for minor numbers less than 10. There are unlikely to be
dnl that many releases anyway.
-PCRE_MAJOR=3
-PCRE_MINOR=9
-PCRE_DATE=02-Jan-2002
+PCRE_MAJOR=5
+PCRE_MINOR=0
+PCRE_DATE=13-Sep-2004
PCRE_VERSION=${PCRE_MAJOR}.${PCRE_MINOR}
+dnl Default values for miscellaneous macros
+
+POSIX_MALLOC_THRESHOLD=-DPOSIX_MALLOC_THRESHOLD=10
+
dnl Provide versioning information for libtool shared libraries that
dnl are built by default on Unix systems.
@@ -30,7 +38,6 @@ PCRE_POSIXLIB_VERSION=0:0:0
dnl Checks for programs.
AC_PROG_CC
-AC_PROG_RANLIB
dnl Checks for header files.
@@ -61,12 +68,21 @@ fi
dnl Handle --enable-utf8
AC_ARG_ENABLE(utf8,
-[ --enable-utf8 enable UTF8 support (incomplete)],
+[ --enable-utf8 enable UTF8 support],
if test "$enableval" = "yes"; then
UTF8=-DSUPPORT_UTF8
fi
)
+dnl Handle --enable-unicode-properties
+
+AC_ARG_ENABLE(unicode-properties,
+[ --enable-unicode-properties enable Unicode properties support],
+if test "$enableval" = "yes"; then
+ UCP=-DSUPPORT_UCP
+fi
+)
+
dnl Handle --enable-newline-is-cr
AC_ARG_ENABLE(newline-is-cr,
@@ -85,20 +101,85 @@ if test "$enableval" = "yes"; then
fi
)
+dnl Handle --enable-ebcdic
+
+AC_ARG_ENABLE(ebcdic,
+[ --enable-ebcdic assume EBCDIC coding rather than ASCII],
+if test "$enableval" == "yes"; then
+ EBCDIC=-DEBCDIC=1
+fi
+)
+
+dnl Handle --disable-stack-for-recursion
+
+AC_ARG_ENABLE(stack-for-recursion,
+[ --disable-stack-for-recursion disable use of stack recursion when matching],
+if test "$enableval" = "no"; then
+ NO_RECURSE=-DNO_RECURSE
+fi
+)
+
+dnl There doesn't seem to be a straightforward way of having parameters
+dnl that set values, other than fudging the --with thing. So that's what
+dnl I've done.
+
+dnl Handle --with-posix-malloc-threshold=n
+
+AC_ARG_WITH(posix-malloc-threshold,
+[ --with-posix-malloc-threshold=5 threshold for POSIX malloc usage],
+ POSIX_MALLOC_THRESHOLD=-DPOSIX_MALLOC_THRESHOLD=$withval
+)
+
+dnl Handle --with-link-size=n
+
+AC_ARG_WITH(link-size,
+[ --with-link-size=2 internal link size (2, 3, or 4 allowed)],
+ LINK_SIZE=-DLINK_SIZE=$withval
+)
+
+dnl Handle --with-match_limit=n
+
+AC_ARG_WITH(match-limit,
+[ --with-match-limit=10000000 default limit on internal looping)],
+ MATCH_LIMIT=-DMATCH_LIMIT=$withval
+)
+
+dnl Unicode character property support implies UTF-8 support
+
+if test "$UCP" != "" ; then
+ UTF8=-DSUPPORT_UTF8
+fi
+
dnl "Export" these variables
+AC_SUBST(BUILD_EXEEXT)
+AC_SUBST(BUILD_OBJEXT)
+AC_SUBST(CC_FOR_BUILD)
+AC_SUBST(CFLAGS_FOR_BUILD)
+AC_SUBST(EBCDIC)
AC_SUBST(HAVE_MEMMOVE)
AC_SUBST(HAVE_STRERROR)
AC_SUBST(LIBTOOL)
AC_SUBST(LIBSUFFIX)
+AC_SUBST(LINK_SIZE)
+AC_SUBST(MATCH_LIMIT)
AC_SUBST(NEWLINE)
-AC_SUBST(UTF8)
+AC_SUBST(NO_RECURSE)
AC_SUBST(PCRE_MAJOR)
AC_SUBST(PCRE_MINOR)
AC_SUBST(PCRE_DATE)
AC_SUBST(PCRE_VERSION)
AC_SUBST(PCRE_LIB_VERSION)
AC_SUBST(PCRE_POSIXLIB_VERSION)
+AC_SUBST(POSIX_MALLOC_THRESHOLD)
+AC_SUBST(UCP)
+AC_SUBST(UTF8)
+
+
+if test "x$enable_shared" = "xno" ; then
+ AC_DEFINE([PCRE_STATIC],[1],[to link statically])
+fi
dnl This must be last; it determines what files are written as well as config.h
AC_OUTPUT(Makefile pcre.h:pcre.in pcre-config,[chmod a+x pcre-config])
+
diff --git a/srclib/pcre/dftables.c b/srclib/pcre/dftables.c
index fe4ffcdb7a..8458c60f1c 100644
--- a/srclib/pcre/dftables.c
+++ b/srclib/pcre/dftables.c
@@ -8,29 +8,35 @@ and semantics are as close as possible to those of the Perl 5 language.
Written by: Philip Hazel <ph10@cam.ac.uk>
- Copyright (c) 1997-2001 University of Cambridge
+ Copyright (c) 1997-2004 University of Cambridge
-----------------------------------------------------------------------------
-Permission is granted to anyone to use this software for any purpose on any
-computer system, and to redistribute it freely, subject to the following
-restrictions:
-
-1. This software is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-2. The origin of this software must not be misrepresented, either by
- explicit claim or by omission.
-
-3. Altered versions must be plainly marked as such, and must not be
- misrepresented as being the original software.
-
-4. If PCRE is embedded in any software that is released under the GNU
- General Purpose Licence (GPL), then the terms of that licence shall
- supersede any condition above with which it is incompatible.
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
-----------------------------------------------------------------------------
-
-See the file Tech.Notes for some information on the internals.
*/
@@ -50,65 +56,83 @@ order to be consistent. */
#include "maketables.c"
-int main(void)
+int main(int argc, char **argv)
{
int i;
+FILE *f;
const unsigned char *tables = pcre_maketables();
-printf(
+if (argc != 2)
+ {
+ fprintf(stderr, "dftables: one filename argument is required\n");
+ return 1;
+ }
+
+f = fopen(argv[1], "w");
+if (f == NULL)
+ {
+ fprintf(stderr, "dftables: failed to open %s for writing\n", argv[1]);
+ return 1;
+ }
+
+/* There are two fprintf() calls here, because gcc in pedantic mode complains
+about the very long string otherwise. */
+
+fprintf(f,
"/*************************************************\n"
"* Perl-Compatible Regular Expressions *\n"
"*************************************************/\n\n"
"/* This file is automatically written by the dftables auxiliary \n"
"program. If you edit it by hand, you might like to edit the Makefile to \n"
- "prevent its ever being regenerated.\n\n"
+ "prevent its ever being regenerated.\n\n");
+fprintf(f,
"This file is #included in the compilation of pcre.c to build the default\n"
"character tables which are used when no tables are passed to the compile\n"
"function. */\n\n"
"static unsigned char pcre_default_tables[] = {\n\n"
"/* This table is a lower casing table. */\n\n");
-printf(" ");
+fprintf(f, " ");
for (i = 0; i < 256; i++)
{
- if ((i & 7) == 0 && i != 0) printf("\n ");
- printf("%3d", *tables++);
- if (i != 255) printf(",");
+ if ((i & 7) == 0 && i != 0) fprintf(f, "\n ");
+ fprintf(f, "%3d", *tables++);
+ if (i != 255) fprintf(f, ",");
}
-printf(",\n\n");
+fprintf(f, ",\n\n");
-printf("/* This table is a case flipping table. */\n\n");
+fprintf(f, "/* This table is a case flipping table. */\n\n");
-printf(" ");
+fprintf(f, " ");
for (i = 0; i < 256; i++)
{
- if ((i & 7) == 0 && i != 0) printf("\n ");
- printf("%3d", *tables++);
- if (i != 255) printf(",");
+ if ((i & 7) == 0 && i != 0) fprintf(f, "\n ");
+ fprintf(f, "%3d", *tables++);
+ if (i != 255) fprintf(f, ",");
}
-printf(",\n\n");
+fprintf(f, ",\n\n");
-printf(
+fprintf(f,
"/* This table contains bit maps for various character classes.\n"
"Each map is 32 bytes long and the bits run from the least\n"
"significant end of each byte. The classes that have their own\n"
"maps are: space, xdigit, digit, upper, lower, word, graph\n"
"print, punct, and cntrl. Other classes are built from combinations. */\n\n");
-printf(" ");
+fprintf(f, " ");
for (i = 0; i < cbit_length; i++)
{
if ((i & 7) == 0 && i != 0)
{
- if ((i & 31) == 0) printf("\n");
- printf("\n ");
+ if ((i & 31) == 0) fprintf(f, "\n");
+ fprintf(f, "\n ");
}
- printf("0x%02x", *tables++);
- if (i != cbit_length - 1) printf(",");
+ fprintf(f, "0x%02x", *tables++);
+ if (i != cbit_length - 1) fprintf(f, ",");
}
-printf(",\n\n");
+fprintf(f, ",\n\n");
-printf(
+fprintf(f,
"/* This table identifies various classes of character by individual bits:\n"
" 0x%02x white space character\n"
" 0x%02x letter\n"
@@ -119,29 +143,30 @@ printf(
ctype_space, ctype_letter, ctype_digit, ctype_xdigit, ctype_word,
ctype_meta);
-printf(" ");
+fprintf(f, " ");
for (i = 0; i < 256; i++)
{
if ((i & 7) == 0 && i != 0)
{
- printf(" /* ");
- if (isprint(i-8)) printf(" %c -", i-8);
- else printf("%3d-", i-8);
- if (isprint(i-1)) printf(" %c ", i-1);
- else printf("%3d", i-1);
- printf(" */\n ");
+ fprintf(f, " /* ");
+ if (isprint(i-8)) fprintf(f, " %c -", i-8);
+ else fprintf(f, "%3d-", i-8);
+ if (isprint(i-1)) fprintf(f, " %c ", i-1);
+ else fprintf(f, "%3d", i-1);
+ fprintf(f, " */\n ");
}
- printf("0x%02x", *tables++);
- if (i != 255) printf(",");
+ fprintf(f, "0x%02x", *tables++);
+ if (i != 255) fprintf(f, ",");
}
-printf("};/* ");
-if (isprint(i-8)) printf(" %c -", i-8);
- else printf("%3d-", i-8);
-if (isprint(i-1)) printf(" %c ", i-1);
- else printf("%3d", i-1);
-printf(" */\n\n/* End of chartables.c */\n");
+fprintf(f, "};/* ");
+if (isprint(i-8)) fprintf(f, " %c -", i-8);
+ else fprintf(f, "%3d-", i-8);
+if (isprint(i-1)) fprintf(f, " %c ", i-1);
+ else fprintf(f, "%3d", i-1);
+fprintf(f, " */\n\n/* End of chartables.c */\n");
+fclose(f);
return 0;
}
diff --git a/srclib/pcre/doc/Tech.Notes b/srclib/pcre/doc/Tech.Notes
index f5ca280115..18eb72bce7 100644
--- a/srclib/pcre/doc/Tech.Notes
+++ b/srclib/pcre/doc/Tech.Notes
@@ -1,19 +1,25 @@
Technical Notes about PCRE
--------------------------
+Historical note 1
+-----------------
+
Many years ago I implemented some regular expression functions to an algorithm
suggested by Martin Richards. These were not Unix-like in form, and were quite
restricted in what they could do by comparison with Perl. The interesting part
about the algorithm was that the amount of space required to hold the compiled
form of an expression was known in advance. The code to apply an expression did
-not operate by backtracking, as the Henry Spencer and Perl code does, but
-instead checked all possibilities simultaneously by keeping a list of current
-states and checking all of them as it advanced through the subject string. (In
-the terminology of Jeffrey Friedl's book, it was a "DFA algorithm".) When the
-pattern was all used up, all remaining states were possible matches, and the
-one matching the longest subset of the subject string was chosen. This did not
-necessarily maximize the individual wild portions of the pattern, as is
-expected in Unix and Perl-style regular expressions.
+not operate by backtracking, as the original Henry Spencer code and current
+Perl code does, but instead checked all possibilities simultaneously by keeping
+a list of current states and checking all of them as it advanced through the
+subject string. In the terminology of Jeffrey Friedl's book, it was a "DFA
+algorithm". When the pattern was all used up, all remaining states were
+possible matches, and the one matching the longest subset of the subject string
+was chosen. This did not necessarily maximize the individual wild portions of
+the pattern, as is expected in Unix and Perl-style regular expressions.
+
+Historical note 2
+-----------------
By contrast, the code originally written by Henry Spencer and subsequently
heavily modified for Perl actually compiles the expression twice: once in a
@@ -23,24 +29,34 @@ optionally, minimizing in Perl) the amount of the subject that matches
individual wild portions of the pattern. This is an "NFA algorithm" in Friedl's
terminology.
+OK, here's the real stuff
+-------------------------
+
For the set of functions that forms PCRE (which are unrelated to those
mentioned above), I tried at first to invent an algorithm that used an amount
of store bounded by a multiple of the number of characters in the pattern, to
save on compiling time. However, because of the greater complexity in Perl
regular expressions, I couldn't do this. In any case, a first pass through the
-pattern is needed, in order to find internal flag settings like (?i) at top
-level. So PCRE works by running a very degenerate first pass to calculate a
-maximum store size, and then a second pass to do the real compile - which may
-use a bit less than the predicted amount of store. The idea is that this is
-going to turn out faster because the first pass is degenerate and the second
-pass can just store stuff straight into the vector. It does make the compiling
-functions bigger, of course, but they have got quite big anyway to handle all
-the Perl stuff.
+pattern is needed, for a number of reasons. PCRE works by running a very
+degenerate first pass to calculate a maximum store size, and then a second pass
+to do the real compile - which may use a bit less than the predicted amount of
+store. The idea is that this is going to turn out faster because the first pass
+is degenerate and the second pass can just store stuff straight into the
+vector. It does make the compiling functions bigger, of course, but they have
+got quite big anyway to handle all the Perl stuff.
The compiled form of a pattern is a vector of bytes, containing items of
variable length. The first byte in an item is an opcode, and the length of the
-item is either implicit in the opcode or contained in the data bytes which
-follow it. A list of all the opcodes follows:
+item is either implicit in the opcode or contained in the data bytes that
+follow it.
+
+In many cases below "two-byte" data values are specified. This is in fact just
+a default. PCRE can be compiled to use 3-byte or 4-byte values (impairing the
+performance). This is necessary only when patterns whose compiled length is
+greater than 64K are going to be processed. In this description, we assume the
+"normal" compilation options.
+
+A list of all the opcodes follows:
Opcodes with no following data
------------------------------
@@ -49,7 +65,9 @@ These items are all just one byte long
OP_END end of pattern
OP_ANY match any character
+ OP_ANYBYTE match any single byte, even in UTF-8 mode
OP_SOD match start of data: \A
+ OP_SOM, start of match (subject + offset): \G
OP_CIRC ^ (start of data, or after \n in multiline)
OP_NOT_WORD_BOUNDARY \W
OP_WORD_BOUNDARY \w
@@ -62,14 +80,14 @@ These items are all just one byte long
OP_EODN match end of data or \n at end: \Z
OP_EOD match end of data: \z
OP_DOLL $ (end of data, or before \n in multiline)
- OP_RECURSE match the pattern recursively
-
+ OP_EXTUNI match an extended Unicode character
+
Repeating single characters
---------------------------
-The common repeats (*, +, ?) when applied to a single character appear as
-two-byte items using the following opcodes:
+The common repeats (*, +, ?) when applied to a single character use the
+following opcodes:
OP_STAR
OP_MINSTAR
@@ -78,6 +96,7 @@ two-byte items using the following opcodes:
OP_QUERY
OP_MINQUERY
+In ASCII mode, these are two-byte items; in UTF-8 mode, the length is variable.
Those with "MIN" in their name are the minimizing versions. Each is followed by
the character that is to be repeated. Other repeats make use of
@@ -109,27 +128,53 @@ byte. The opcodes are:
OP_TYPEEXACT
-Matching a character string
+Match by Unicode property
+-------------------------
+
+OP_PROP and OP_NOTPROP are used for positive and negative matches of a
+character by testing its Unicode property (the \p and \P escape sequences).
+Each is followed by a single byte that encodes the desired property value.
+
+Repeats of these items use the OP_TYPESTAR etc. set of opcodes, followed by two
+bytes: OP_PROP or OP_NOTPROP and then the desired property value.
+
+
+Matching literal characters
---------------------------
-The OP_CHARS opcode is followed by a one-byte count and then that number of
-characters. If there are more than 255 characters in sequence, successive
-instances of OP_CHARS are used.
+The OP_CHAR opcode is followed by a single character that is to be matched
+casefully. For caseless matching, OP_CHARNC is used. In UTF-8 mode, the
+character may be more than one byte long. (Earlier versions of PCRE used
+multi-character strings, but this was changed to allow some new features to be
+added.)
Character classes
-----------------
-OP_CLASS is used for a character class, provided there are at least two
-characters in the class. If there is only one character, OP_CHARS is used for a
-positive class, and OP_NOT for a negative one (that is, for something like
-[^a]). Another set of repeating opcodes (OP_NOTSTAR etc.) are used for a
-repeated, negated, single-character class. The normal ones (OP_STAR etc.) are
-used for a repeated positive single-character class.
+If there is only one character, OP_CHAR or OP_CHARNC is used for a positive
+class, and OP_NOT for a negative one (that is, for something like [^a]).
+However, in UTF-8 mode, the use of OP_NOT applies only to characters with
+values < 128, because OP_NOT is confined to single bytes.
+
+Another set of repeating opcodes (OP_NOTSTAR etc.) are used for a repeated,
+negated, single-character class. The normal ones (OP_STAR etc.) are used for a
+repeated positive single-character class.
+
+When there's more than one character in a class and all the characters are less
+than 256, OP_CLASS is used for a positive class, and OP_NCLASS for a negative
+one. In either case, the opcode is followed by a 32-byte bit map containing a 1
+bit for every character that is acceptable. The bits are counted from the least
+significant end of each byte.
-OP_CLASS is followed by a 32-byte bit map containing a 1 bit for every
-character that is acceptable. The bits are counted from the least significant
-end of each byte.
+The reason for having both OP_CLASS and OP_NCLASS is so that, in UTF-8 mode,
+subject characters with values greater than 256 can be handled correctly. For
+OP_CLASS they don't match, whereas for OP_NCLASS they do.
+
+For classes containing characters with values > 255, OP_XCLASS is used. It
+optionally uses a bit map (if any characters lie within it), followed by a list
+of pairs and single characters. There is a flag character than indicates
+whether it's a positive or a negative class.
Back references
@@ -179,14 +224,14 @@ the bracket itself. (They could have all been done like this, but I was making
minimal changes.)
A bracket opcode is followed by two bytes which give the offset to the next
-alternative OP_ALT or, if there aren't any branches, to the matching KET
+alternative OP_ALT or, if there aren't any branches, to the matching OP_KET
opcode. Each OP_ALT is followed by two bytes giving the offset to the next one,
-or to the KET opcode.
+or to the OP_KET opcode.
OP_KET is used for subpatterns that do not repeat indefinitely, while
OP_KETRMIN and OP_KETRMAX are used for indefinite repetitions, minimally or
maximally respectively. All three are followed by two bytes giving (as a
-positive number) the offset back to the matching BRA opcode.
+positive number) the offset back to the matching OP_BRA opcode.
If a subpattern is quantified such that it is permitted to match zero times, it
is preceded by one of OP_BRAZERO or OP_BRAMINZERO. These are single-byte
@@ -194,15 +239,14 @@ opcodes which tell the matcher that skipping this subpattern entirely is a
valid branch.
A subpattern with an indefinite maximum repetition is replicated in the
-compiled data its minimum number of times (or once with a BRAZERO if the
-minimum is zero), with the final copy terminating with a KETRMIN or KETRMAX as
-appropriate.
+compiled data its minimum number of times (or once with OP_BRAZERO if the
+minimum is zero), with the final copy terminating with OP_KETRMIN or OP_KETRMAX
+as appropriate.
A subpattern with a bounded maximum repetition is replicated in a nested
-fashion up to the maximum number of times, with BRAZERO or BRAMINZERO before
-each replication after the minimum, so that, for example, (abc){2,5} is
-compiled as (abc)(abc)((abc)((abc)(abc)?)?)?. The 99 and 200 bracket limits do
-not apply to these internally generated brackets.
+fashion up to the maximum number of times, with OP_BRAZERO or OP_BRAMINZERO
+before each replication after the minimum, so that, for example, (abc){2,5} is
+compiled as (abc)(abc)((abc)((abc)(abc)?)?)?.
Assertions
@@ -231,23 +275,41 @@ Conditional subpatterns
These are like other subpatterns, but they start with the opcode OP_COND. If
the condition is a back reference, this is stored at the start of the
subpattern using the opcode OP_CREF followed by two bytes containing the
-reference number. Otherwise, a conditional subpattern will always start with
-one of the assertions.
+reference number. If the condition is "in recursion" (coded as "(?(R)"), the
+same scheme is used, with a "reference number" of 0xffff. Otherwise, a
+conditional subpattern always starts with one of the assertions.
+
+
+Recursion
+---------
+
+Recursion either matches the current regex, or some subexpression. The opcode
+OP_RECURSE is followed by an value which is the offset to the starting bracket
+from the start of the whole pattern.
+
+
+Callout
+-------
+
+OP_CALLOUT is followed by one byte of data that holds a callout number in the
+range 0 to 254 for manual callouts, or 255 for an automatic callout. In both
+cases there follows a two-byte value giving the offset in the pattern to the
+start of the following item, and another two-byte item giving the length of the
+next item.
Changing options
----------------
-If any of the /i, /m, or /s options are changed within a parenthesized group,
-an OP_OPT opcode is compiled, followed by one byte containing the new settings
-of these flags. If there are several alternatives in a group, there is an
-occurrence of OP_OPT at the start of all those following the first options
-change, to set appropriate options for the start of the alternative.
-Immediately after the end of the group there is another such item to reset the
-flags to their previous values. Other changes of flag within the pattern can be
-handled entirely at compile time, and so do not cause anything to be put into
-the compiled data.
-
+If any of the /i, /m, or /s options are changed within a pattern, an OP_OPT
+opcode is compiled, followed by one byte containing the new settings of these
+flags. If there are several alternatives, there is an occurrence of OP_OPT at
+the start of all those following the first options change, to set appropriate
+options for the start of the alternative. Immediately after the end of the
+group there is another such item to reset the flags to their previous values. A
+change of flag right at the very start of the pattern can be handled entirely
+at compile time, and so does not cause anything to be put into the compiled
+data.
Philip Hazel
-August 2001
+September 2004
diff --git a/srclib/pcre/doc/html/index.html b/srclib/pcre/doc/html/index.html
new file mode 100644
index 0000000000..c0dbf59d15
--- /dev/null
+++ b/srclib/pcre/doc/html/index.html
@@ -0,0 +1,108 @@
+<html>
+<head>
+<title>PCRE specification</title>
+</head>
+<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
+<h1>Perl-compatible Regular Expressions (PCRE)</h1>
+<p>
+The HTML documentation for PCRE comprises the following pages:
+</p>
+
+<table>
+<tr><td><a href="pcre.html">pcre</a></td>
+ <td>&nbsp;&nbsp;Introductory page</td></tr>
+
+<tr><td><a href="pcreapi.html">pcreapi</a></td>
+ <td>&nbsp;&nbsp;PCRE's native API</td></tr>
+
+<tr><td><a href="pcrebuild.html">pcrebuild</a></td>
+ <td>&nbsp;&nbsp;Options for building PCRE</td></tr>
+
+<tr><td><a href="pcrecallout.html">pcrecallout</a></td>
+ <td>&nbsp;&nbsp;The <i>callout</i> facility</td></tr>
+
+<tr><td><a href="pcrecompat.html">pcrecompat</a></td>
+ <td>&nbsp;&nbsp;Compability with Perl</td></tr>
+
+<tr><td><a href="pcregrep.html">pcregrep</a></td>
+ <td>&nbsp;&nbsp;The <b>pcregrep</b> command</td></tr>
+
+<tr><td><a href="pcrepartial.html">pcrepartial</a></td>
+ <td>&nbsp;&nbsp;Using PCRE for partial matching</td></tr>
+
+<tr><td><a href="pcrepattern.html">pcrepattern</a></td>
+ <td>&nbsp;&nbsp;Specification of the regular expressions supported by PCRE</td></tr>
+
+<tr><td><a href="pcreperform.html">pcreperform</a></td>
+ <td>&nbsp;&nbsp;Some comments on performance</td></tr>
+
+<tr><td><a href="pcreposix.html">pcreposix</a></td>
+ <td>&nbsp;&nbsp;The POSIX API to the PCRE library</td></tr>
+
+<tr><td><a href="pcreprecompile.html">pcreprecompile</a></td>
+ <td>&nbsp;&nbsp;How to save and re-use compiled patterns</td></tr>
+
+<tr><td><a href="pcresample.html">pcresample</a></td>
+ <td>&nbsp;&nbsp;Description of the sample program</td></tr>
+
+<tr><td><a href="pcretest.html">pcretest</a></td>
+ <td>&nbsp;&nbsp;The <b>pcretest</b> command for testing PCRE</td></tr>
+</table>
+
+<p>
+There are also individual pages that summarize the interface for each function
+in the library:
+</p>
+
+<table>
+
+<tr><td><a href="pcre_compile.html">pcre_compile</a></td>
+ <td>&nbsp;&nbsp;Compile a regular expression</td></tr>
+
+<tr><td><a href="pcre_config.html">pcre_config</a></td>
+ <td>&nbsp;&nbsp;Show build-time configuration options</td></tr>
+
+<tr><td><a href="pcre_copy_named_substring.html">pcre_copy_named_substring</a></td>
+ <td>&nbsp;&nbsp;Extract named substring into given buffer</td></tr>
+
+<tr><td><a href="pcre_copy_substring.html">pcre_copy_substring</a></td>
+ <td>&nbsp;&nbsp;Extract numbered substring into given buffer</td></tr>
+
+<tr><td><a href="pcre_exec.html">pcre_exec</a></td>
+ <td>&nbsp;&nbsp;Match a compiled pattern to a subject string</td></tr>
+
+<tr><td><a href="pcre_free_substring.html">pcre_free_substring</a></td>
+ <td>&nbsp;&nbsp;Free extracted substring</td></tr>
+
+<tr><td><a href="pcre_free_substring_list.html">pcre_free_substring_list</a></td>
+ <td>&nbsp;&nbsp;Free list of extracted substrings</td></tr>
+
+<tr><td><a href="pcre_fullinfo.html">pcre_fullinfo</a></td>
+ <td>&nbsp;&nbsp;Extract information about a pattern</td></tr>
+
+<tr><td><a href="pcre_get_named_substring.html">pcre_get_named_substring</a></td>
+ <td>&nbsp;&nbsp;Extract named substring into new memory</td></tr>
+
+<tr><td><a href="pcre_get_stringnumber.html">pcre_get_stringnumber</a></td>
+ <td>&nbsp;&nbsp;Convert captured string name to number</td></tr>
+
+<tr><td><a href="pcre_get_substring.html">pcre_get_substring</a></td>
+ <td>&nbsp;&nbsp;Extract numbered substring into new memory</td></tr>
+
+<tr><td><a href="pcre_get_substring_list.html">pcre_get_substring_list</a></td>
+ <td>&nbsp;&nbsp;Extract all substrings into new memory</td></tr>
+
+<tr><td><a href="pcre_info.html">pcre_info</a></td>
+ <td>&nbsp;&nbsp;Obsolete information extraction function</td></tr>
+
+<tr><td><a href="pcre_maketables.html">pcre_maketables</a></td>
+ <td>&nbsp;&nbsp;Build character tables in current locale</td></tr>
+
+<tr><td><a href="pcre_study.html">pcre_study</a></td>
+ <td>&nbsp;&nbsp;Study a compiled pattern</td></tr>
+
+<tr><td><a href="pcre_version.html">pcre_version</a></td>
+ <td>&nbsp;&nbsp;Return PCRE version and release date</td></tr>
+</table>
+
+</html>
diff --git a/srclib/pcre/doc/html/pcre.html b/srclib/pcre/doc/html/pcre.html
new file mode 100644
index 0000000000..b1caf80701
--- /dev/null
+++ b/srclib/pcre/doc/html/pcre.html
@@ -0,0 +1,214 @@
+<html>
+<head>
+<title>pcre specification</title>
+</head>
+<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
+<h1>pcre man page</h1>
+<p>
+Return to the <a href="index.html">PCRE index page</a>.
+</p>
+<p>
+This page is part of the PCRE HTML documentation. It was generated automatically
+from the original man page. If there is any nonsense in it, please consult the
+man page, in case the conversion went wrong.
+<br>
+<ul>
+<li><a name="TOC1" href="#SEC1">INTRODUCTION</a>
+<li><a name="TOC2" href="#SEC2">USER DOCUMENTATION</a>
+<li><a name="TOC3" href="#SEC3">LIMITATIONS</a>
+<li><a name="TOC4" href="#SEC4">UTF-8 AND UNICODE PROPERTY SUPPORT</a>
+<li><a name="TOC5" href="#SEC5">AUTHOR</a>
+</ul>
+<br><a name="SEC1" href="#TOC1">INTRODUCTION</a><br>
+<P>
+The PCRE library is a set of functions that implement regular expression
+pattern matching using the same syntax and semantics as Perl, with just a few
+differences. The current implementation of PCRE (release 5.x) corresponds
+approximately with Perl 5.8, including support for UTF-8 encoded strings and
+Unicode general category properties. However, this support has to be explicitly
+enabled; it is not the default.
+</P>
+<P>
+PCRE is written in C and released as a C library. A number of people have
+written wrappers and interfaces of various kinds. A C++ class is included in
+these contributions, which can be found in the <i>Contrib</i> directory at the
+primary FTP site, which is:
+<a href="ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre">ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre</a>
+</P>
+<P>
+Details of exactly which Perl regular expression features are and are not
+supported by PCRE are given in separate documents. See the
+<a href="pcrepattern.html"><b>pcrepattern</b></a>
+and
+<a href="pcrecompat.html"><b>pcrecompat</b></a>
+pages.
+</P>
+<P>
+Some features of PCRE can be included, excluded, or changed when the library is
+built. The
+<a href="pcre_config.html"><b>pcre_config()</b></a>
+function makes it possible for a client to discover which features are
+available. The features themselves are described in the
+<a href="pcrebuild.html"><b>pcrebuild</b></a>
+page. Documentation about building PCRE for various operating systems can be
+found in the <b>README</b> file in the source distribution.
+</P>
+<br><a name="SEC2" href="#TOC1">USER DOCUMENTATION</a><br>
+<P>
+The user documentation for PCRE comprises a number of different sections. In
+the "man" format, each of these is a separate "man page". In the HTML format,
+each is a separate page, linked from the index page. In the plain text format,
+all the sections are concatenated, for ease of searching. The sections are as
+follows:
+<pre>
+ pcre this document
+ pcreapi details of PCRE's native API
+ pcrebuild options for building PCRE
+ pcrecallout details of the callout feature
+ pcrecompat discussion of Perl compatibility
+ pcregrep description of the <b>pcregrep</b> command
+ pcrepartial details of the partial matching facility
+ pcrepattern syntax and semantics of supported regular expressions
+ pcreperform discussion of performance issues
+ pcreposix the POSIX-compatible API
+ pcreprecompile details of saving and re-using precompiled patterns
+ pcresample discussion of the sample program
+ pcretest description of the <b>pcretest</b> testing command
+</pre>
+In addition, in the "man" and HTML formats, there is a short page for each
+library function, listing its arguments and results.
+</P>
+<br><a name="SEC3" href="#TOC1">LIMITATIONS</a><br>
+<P>
+There are some size limitations in PCRE but it is hoped that they will never in
+practice be relevant.
+</P>
+<P>
+The maximum length of a compiled pattern is 65539 (sic) bytes if PCRE is
+compiled with the default internal linkage size of 2. If you want to process
+regular expressions that are truly enormous, you can compile PCRE with an
+internal linkage size of 3 or 4 (see the <b>README</b> file in the source
+distribution and the
+<a href="pcrebuild.html"><b>pcrebuild</b></a>
+documentation for details). In these cases the limit is substantially larger.
+However, the speed of execution will be slower.
+</P>
+<P>
+All values in repeating quantifiers must be less than 65536.
+The maximum number of capturing subpatterns is 65535.
+</P>
+<P>
+There is no limit to the number of non-capturing subpatterns, but the maximum
+depth of nesting of all kinds of parenthesized subpattern, including capturing
+subpatterns, assertions, and other types of subpattern, is 200.
+</P>
+<P>
+The maximum length of a subject string is the largest positive number that an
+integer variable can hold. However, PCRE uses recursion to handle subpatterns
+and indefinite repetition. This means that the available stack space may limit
+the size of a subject string that can be processed by certain patterns.
+<a name="utf8support"></a></P>
+<br><a name="SEC4" href="#TOC1">UTF-8 AND UNICODE PROPERTY SUPPORT</a><br>
+<P>
+From release 3.3, PCRE has had some support for character strings encoded in
+the UTF-8 format. For release 4.0 this was greatly extended to cover most
+common requirements, and in release 5.0 additional support for Unicode general
+category properties was added.
+</P>
+<P>
+In order process UTF-8 strings, you must build PCRE to include UTF-8 support in
+the code, and, in addition, you must call
+<a href="pcre_compile.html"><b>pcre_compile()</b></a>
+with the PCRE_UTF8 option flag. When you do this, both the pattern and any
+subject strings that are matched against it are treated as UTF-8 strings
+instead of just strings of bytes.
+</P>
+<P>
+If you compile PCRE with UTF-8 support, but do not use it at run time, the
+library will be a bit bigger, but the additional run time overhead is limited
+to testing the PCRE_UTF8 flag in several places, so should not be very large.
+</P>
+<P>
+If PCRE is built with Unicode character property support (which implies UTF-8
+support), the escape sequences \p{..}, \P{..}, and \X are supported.
+The available properties that can be tested are limited to the general
+category properties such as Lu for an upper case letter or Nd for a decimal
+number. A full list is given in the
+<a href="pcrepattern.html"><b>pcrepattern</b></a>
+documentation. The PCRE library is increased in size by about 90K when Unicode
+property support is included.
+</P>
+<P>
+The following comments apply when PCRE is running in UTF-8 mode:
+</P>
+<P>
+1. When you set the PCRE_UTF8 flag, the strings passed as patterns and subjects
+are checked for validity on entry to the relevant functions. If an invalid
+UTF-8 string is passed, an error return is given. In some situations, you may
+already know that your strings are valid, and therefore want to skip these
+checks in order to improve performance. If you set the PCRE_NO_UTF8_CHECK flag
+at compile time or at run time, PCRE assumes that the pattern or subject it
+is given (respectively) contains only valid UTF-8 codes. In this case, it does
+not diagnose an invalid UTF-8 string. If you pass an invalid UTF-8 string to
+PCRE when PCRE_NO_UTF8_CHECK is set, the results are undefined. Your program
+may crash.
+</P>
+<P>
+2. In a pattern, the escape sequence \x{...}, where the contents of the braces
+is a string of hexadecimal digits, is interpreted as a UTF-8 character whose
+code number is the given hexadecimal number, for example: \x{1234}. If a
+non-hexadecimal digit appears between the braces, the item is not recognized.
+This escape sequence can be used either as a literal, or within a character
+class.
+</P>
+<P>
+3. The original hexadecimal escape sequence, \xhh, matches a two-byte UTF-8
+character if the value is greater than 127.
+</P>
+<P>
+4. Repeat quantifiers apply to complete UTF-8 characters, not to individual
+bytes, for example: \x{100}{3}.
+</P>
+<P>
+5. The dot metacharacter matches one UTF-8 character instead of a single byte.
+</P>
+<P>
+6. The escape sequence \C can be used to match a single byte in UTF-8 mode,
+but its use can lead to some strange effects.
+</P>
+<P>
+7. 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}.
+</P>
+<P>
+8. Similarly, characters that match the POSIX named character classes are all
+low-valued characters.
+</P>
+<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
+property support is available, PCRE still uses its own character tables when
+checking the case of low-valued characters, so as not to degrade performance.
+The Unicode property information is used only for characters with higher
+values.
+</P>
+<br><a name="SEC5" href="#TOC1">AUTHOR</a><br>
+<P>
+Philip Hazel &#60;ph10@cam.ac.uk&#62;
+<br>
+University Computing Service,
+<br>
+Cambridge CB2 3QG, England.
+<br>
+Phone: +44 1223 334714
+Last updated: 09 September 2004
+<br>
+Copyright &copy; 1997-2004 University of Cambridge.
+<p>
+Return to the <a href="index.html">PCRE index page</a>.
+</p>
diff --git a/srclib/pcre/doc/html/pcre_compile.html b/srclib/pcre/doc/html/pcre_compile.html
new file mode 100644
index 0000000000..0d417a1fc9
--- /dev/null
+++ b/srclib/pcre/doc/html/pcre_compile.html
@@ -0,0 +1,75 @@
+<html>
+<head>
+<title>pcre_compile specification</title>
+</head>
+<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
+<h1>pcre_compile man page</h1>
+<p>
+Return to the <a href="index.html">PCRE index page</a>.
+</p>
+<p>
+This page is part of the PCRE HTML documentation. It was generated automatically
+from the original man page. If there is any nonsense in it, please consult the
+man page, in case the conversion went wrong.
+<br>
+<br><b>
+SYNOPSIS
+</b><br>
+<P>
+<b>#include &#60;pcre.h&#62;</b>
+</P>
+<P>
+<b>pcre *pcre_compile(const char *<i>pattern</i>, int <i>options</i>,</b>
+<b>const char **<i>errptr</i>, int *<i>erroffset</i>,</b>
+<b>const unsigned char *<i>tableptr</i>);</b>
+</P>
+<br><b>
+DESCRIPTION
+</b><br>
+<P>
+This function compiles a regular expression into an internal form. Its
+arguments are:
+<pre>
+ <i>pattern</i> A zero-terminated string containing the
+ regular expression to be compiled
+ <i>options</i> Zero or more option bits
+ <i>errptr</i> Where to put an error message
+ <i>erroffset</i> Offset in pattern where error was found
+ <i>tableptr</i> Pointer to character tables, or NULL to
+ use the built-in default
+</pre>
+The option bits are:
+<pre>
+ PCRE_ANCHORED Force pattern anchoring
+ PCRE_AUTO_CALLOUT Compile automatic callouts
+ PCRE_CASELESS Do caseless matching
+ PCRE_DOLLAR_ENDONLY $ not to match newline at end
+ PCRE_DOTALL . matches anything including NL
+ PCRE_EXTENDED Ignore whitespace and # comments
+ PCRE_EXTRA PCRE extra features
+ (not much use currently)
+ PCRE_MULTILINE ^ and $ match newlines within data
+ PCRE_NO_AUTO_CAPTURE Disable numbered capturing paren-
+ theses (named ones available)
+ PCRE_UNGREEDY Invert greediness of quantifiers
+ PCRE_UTF8 Run in UTF-8 mode
+ PCRE_NO_UTF8_CHECK Do not check the pattern for UTF-8
+ validity (only relevant if
+ PCRE_UTF8 is set)
+</pre>
+PCRE must be built with UTF-8 support in order to use PCRE_UTF8 and
+PCRE_NO_UTF8_CHECK.
+</P>
+<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.
+</P>
+<P>
+There is a complete description of the PCRE native API in the
+<a href="pcreapi.html"><b>pcreapi</b></a>
+page and a description of the POSIX API in the
+<a href="pcreposix.html"><b>pcreposix</b></a>
+page.
+<p>
+Return to the <a href="index.html">PCRE index page</a>.
+</p>
diff --git a/srclib/pcre/doc/html/pcre_config.html b/srclib/pcre/doc/html/pcre_config.html
new file mode 100644
index 0000000000..8d8cc6073d
--- /dev/null
+++ b/srclib/pcre/doc/html/pcre_config.html
@@ -0,0 +1,60 @@
+<html>
+<head>
+<title>pcre_config specification</title>
+</head>
+<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
+<h1>pcre_config man page</h1>
+<p>
+Return to the <a href="index.html">PCRE index page</a>.
+</p>
+<p>
+This page is part of the PCRE HTML documentation. It was generated automatically
+from the original man page. If there is any nonsense in it, please consult the
+man page, in case the conversion went wrong.
+<br>
+<br><b>
+SYNOPSIS
+</b><br>
+<P>
+<b>#include &#60;pcre.h&#62;</b>
+</P>
+<P>
+<b>int pcre_config(int <i>what</i>, void *<i>where</i>);</b>
+</P>
+<br><b>
+DESCRIPTION
+</b><br>
+<P>
+This function makes it possible for a client program to find out which optional
+features are available in the version of the PCRE library it is using. Its
+arguments are as follows:
+<pre>
+ <i>what</i> A code specifying what information is required
+ <i>where</i> Points to where to put the data
+</pre>
+The available codes are:
+<pre>
+ PCRE_CONFIG_LINK_SIZE Internal link size: 2, 3, or 4
+ PCRE_CONFIG_MATCH_LIMIT Internal resource limit
+ PCRE_CONFIG_NEWLINE Value of the newline character
+ PCRE_CONFIG_POSIX_MALLOC_THRESHOLD
+ Threshold of return slots, above
+ which <b>malloc()</b> is used by
+ the POSIX API
+ PCRE_CONFIG_STACKRECURSE Recursion implementation (1=stack 0=heap)
+ PCRE_CONFIG_UTF8 Availability of UTF-8 support (1=yes 0=no)
+ PCRE_CONFIG_UNICODE_PROPERTIES
+ Availability of Unicode property support
+ (1=yes 0=no)
+</pre>
+The function yields 0 on success or PCRE_ERROR_BADOPTION otherwise.
+</P>
+<P>
+There is a complete description of the PCRE native API in the
+<a href="pcreapi.html"><b>pcreapi</b></a>
+page and a description of the POSIX API in the
+<a href="pcreposix.html"><b>pcreposix</b></a>
+page.
+<p>
+Return to the <a href="index.html">PCRE index page</a>.
+</p>
diff --git a/srclib/pcre/doc/html/pcre_copy_named_substring.html b/srclib/pcre/doc/html/pcre_copy_named_substring.html
new file mode 100644
index 0000000000..2185518c8a
--- /dev/null
+++ b/srclib/pcre/doc/html/pcre_copy_named_substring.html
@@ -0,0 +1,53 @@
+<html>
+<head>
+<title>pcre_copy_named_substring specification</title>
+</head>
+<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
+<h1>pcre_copy_named_substring man page</h1>
+<p>
+Return to the <a href="index.html">PCRE index page</a>.
+</p>
+<p>
+This page is part of the PCRE HTML documentation. It was generated automatically
+from the original man page. If there is any nonsense in it, please consult the
+man page, in case the conversion went wrong.
+<br>
+<br><b>
+SYNOPSIS
+</b><br>
+<P>
+<b>#include &#60;pcre.h&#62;</b>
+</P>
+<P>
+<b>int pcre_copy_named_substring(const pcre *<i>code</i>,</b>
+<b>const char *<i>subject</i>, int *<i>ovector</i>,</b>
+<b>int <i>stringcount</i>, const char *<i>stringname</i>,</b>
+<b>char *<i>buffer</i>, int <i>buffersize</i>);</b>
+</P>
+<br><b>
+DESCRIPTION
+</b><br>
+<P>
+This is a convenience function for extracting a captured substring, identified
+by name, into a given buffer. The arguments are:
+<pre>
+ <i>code</i> Pattern that was successfully matched
+ <i>subject</i> Subject that has been successfully matched
+ <i>ovector</i> Offset vector that <b>pcre_exec()</b> used
+ <i>stringcount</i> Value returned by <b>pcre_exec()</b>
+ <i>stringname</i> Name of the required substring
+ <i>buffer</i> Buffer to receive the string
+ <i>buffersize</i> Size of buffer
+</pre>
+The yield is the length of the substring, PCRE_ERROR_NOMEMORY if the buffer was
+too small, or PCRE_ERROR_NOSUBSTRING if the string name is invalid.
+</P>
+<P>
+There is a complete description of the PCRE native API in the
+<a href="pcreapi.html"><b>pcreapi</b></a>
+page and a description of the POSIX API in the
+<a href="pcreposix.html"><b>pcreposix</b></a>
+page.
+<p>
+Return to the <a href="index.html">PCRE index page</a>.
+</p>
diff --git a/srclib/pcre/doc/html/pcre_copy_substring.html b/srclib/pcre/doc/html/pcre_copy_substring.html
new file mode 100644
index 0000000000..9aa87c1746
--- /dev/null
+++ b/srclib/pcre/doc/html/pcre_copy_substring.html
@@ -0,0 +1,51 @@
+<html>
+<head>
+<title>pcre_copy_substring specification</title>
+</head>
+<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
+<h1>pcre_copy_substring man page</h1>
+<p>
+Return to the <a href="index.html">PCRE index page</a>.
+</p>
+<p>
+This page is part of the PCRE HTML documentation. It was generated automatically
+from the original man page. If there is any nonsense in it, please consult the
+man page, in case the conversion went wrong.
+<br>
+<br><b>
+SYNOPSIS
+</b><br>
+<P>
+<b>#include &#60;pcre.h&#62;</b>
+</P>
+<P>
+<b>int pcre_copy_substring(const char *<i>subject</i>, int *<i>ovector</i>,</b>
+<b>int <i>stringcount</i>, int <i>stringnumber</i>, char *<i>buffer</i>,</b>
+<b>int <i>buffersize</i>);</b>
+</P>
+<br><b>
+DESCRIPTION
+</b><br>
+<P>
+This is a convenience function for extracting a captured substring into a given
+buffer. The arguments are:
+<pre>
+ <i>subject</i> Subject that has been successfully matched
+ <i>ovector</i> Offset vector that <b>pcre_exec()</b> used
+ <i>stringcount</i> Value returned by <b>pcre_exec()</b>
+ <i>stringnumber</i> Number of the required substring
+ <i>buffer</i> Buffer to receive the string
+ <i>buffersize</i> Size of buffer
+</pre>
+The yield is the legnth of the string, PCRE_ERROR_NOMEMORY if the buffer was
+too small, or PCRE_ERROR_NOSUBSTRING if the string number is invalid.
+</P>
+<P>
+There is a complete description of the PCRE native API in the
+<a href="pcreapi.html"><b>pcreapi</b></a>
+page and a description of the POSIX API in the
+<a href="pcreposix.html"><b>pcreposix</b></a>
+page.
+<p>
+Return to the <a href="index.html">PCRE index page</a>.
+</p>
diff --git a/srclib/pcre/doc/html/pcre_exec.html b/srclib/pcre/doc/html/pcre_exec.html
new file mode 100644
index 0000000000..fc3d32282d
--- /dev/null
+++ b/srclib/pcre/doc/html/pcre_exec.html
@@ -0,0 +1,78 @@
+<html>
+<head>
+<title>pcre_exec specification</title>
+</head>
+<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
+<h1>pcre_exec man page</h1>
+<p>
+Return to the <a href="index.html">PCRE index page</a>.
+</p>
+<p>
+This page is part of the PCRE HTML documentation. It was generated automatically
+from the original man page. If there is any nonsense in it, please consult the
+man page, in case the conversion went wrong.
+<br>
+<br><b>
+SYNOPSIS
+</b><br>
+<P>
+<b>#include &#60;pcre.h&#62;</b>
+</P>
+<P>
+<b>int pcre_exec(const pcre *<i>code</i>, const pcre_extra *<i>extra</i>,</b>
+<b>const char *<i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
+<b>int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>);</b>
+</P>
+<br><b>
+DESCRIPTION
+</b><br>
+<P>
+This function matches a compiled regular expression against a given subject
+string, and returns offsets to capturing subexpressions. Its arguments are:
+<pre>
+ <i>code</i> Points to the compiled pattern
+ <i>extra</i> Points to an associated <b>pcre_extra</b> structure,
+ or is NULL
+ <i>subject</i> Points to the subject string
+ <i>length</i> Length of the subject string, in bytes
+ <i>startoffset</i> Offset in bytes in the subject at which to
+ start matching
+ <i>options</i> Option bits
+ <i>ovector</i> Points to a vector of ints for result offsets
+ <i>ovecsize</i> Number of elements in the vector (a multiple of 3)
+</pre>
+The options are:
+<pre>
+ PCRE_ANCHORED Match only at the first position
+ PCRE_NOTBOL Subject is not the beginning of a line
+ PCRE_NOTEOL Subject is not the end of a line
+ PCRE_NOTEMPTY An empty string is not a valid match
+ PCRE_NO_UTF8_CHECK Do not check the subject for UTF-8
+ validity (only relevant if PCRE_UTF8
+ was set at compile time)
+ PCRE_PARTIAL Return PCRE_ERROR_PARTIAL for a partial match
+</pre>
+There are restrictions on what may appear in a pattern when partial matching is
+requested.
+</P>
+<P>
+A <b>pcre_extra</b> structure contains the following fields:
+<pre>
+ <i>flags</i> Bits indicating which fields are set
+ <i>study_data</i> Opaque data from <b>pcre_study()</b>
+ <i>match_limit</i> Limit on internal recursion
+ <i>callout_data</i> Opaque data passed back to callouts
+ <i>tables</i> Points to character tables or is NULL
+</pre>
+The flag bits are PCRE_EXTRA_STUDY_DATA, PCRE_EXTRA_MATCH_LIMIT,
+PCRE_EXTRA_CALLOUT_DATA, and PCRE_EXTRA_TABLES.
+</P>
+<P>
+There is a complete description of the PCRE native API in the
+<a href="pcreapi.html"><b>pcreapi</b></a>
+page and a description of the POSIX API in the
+<a href="pcreposix.html"><b>pcreposix</b></a>
+page.
+<p>
+Return to the <a href="index.html">PCRE index page</a>.
+</p>
diff --git a/srclib/pcre/doc/html/pcre_free_substring.html b/srclib/pcre/doc/html/pcre_free_substring.html
new file mode 100644
index 0000000000..fe6261474c
--- /dev/null
+++ b/srclib/pcre/doc/html/pcre_free_substring.html
@@ -0,0 +1,40 @@
+<html>
+<head>
+<title>pcre_free_substring specification</title>
+</head>
+<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
+<h1>pcre_free_substring man page</h1>
+<p>
+Return to the <a href="index.html">PCRE index page</a>.
+</p>
+<p>
+This page is part of the PCRE HTML documentation. It was generated automatically
+from the original man page. If there is any nonsense in it, please consult the
+man page, in case the conversion went wrong.
+<br>
+<br><b>
+SYNOPSIS
+</b><br>
+<P>
+<b>#include &#60;pcre.h&#62;</b>
+</P>
+<P>
+<b>void pcre_free_substring(const char *<i>stringptr</i>);</b>
+</P>
+<br><b>
+DESCRIPTION
+</b><br>
+<P>
+This is a convenience function for freeing the store obtained by a previous
+call to <b>pcre_get_substring()</b> or <b>pcre_get_named_substring()</b>. Its
+only argument is a pointer to the string.
+</P>
+<P>
+There is a complete description of the PCRE native API in the
+<a href="pcreapi.html"><b>pcreapi</b></a>
+page and a description of the POSIX API in the
+<a href="pcreposix.html"><b>pcreposix</b></a>
+page.
+<p>
+Return to the <a href="index.html">PCRE index page</a>.
+</p>
diff --git a/srclib/pcre/doc/html/pcre_free_substring_list.html b/srclib/pcre/doc/html/pcre_free_substring_list.html
new file mode 100644
index 0000000000..a92c9603f0
--- /dev/null
+++ b/srclib/pcre/doc/html/pcre_free_substring_list.html
@@ -0,0 +1,40 @@
+<html>
+<head>
+<title>pcre_free_substring_list specification</title>
+</head>
+<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
+<h1>pcre_free_substring_list man page</h1>
+<p>
+Return to the <a href="index.html">PCRE index page</a>.
+</p>
+<p>
+This page is part of the PCRE HTML documentation. It was generated automatically
+from the original man page. If there is any nonsense in it, please consult the
+man page, in case the conversion went wrong.
+<br>
+<br><b>
+SYNOPSIS
+</b><br>
+<P>
+<b>#include &#60;pcre.h&#62;</b>
+</P>
+<P>
+<b>void pcre_free_substring_list(const char **<i>stringptr</i>);</b>
+</P>
+<br><b>
+DESCRIPTION
+</b><br>
+<P>
+This is a convenience function for freeing the store obtained by a previous
+call to <b>pcre_get_substring_list()</b>. Its only argument is a pointer to the
+list of string pointers.
+</P>
+<P>
+There is a complete description of the PCRE native API in the
+<a href="pcreapi.html"><b>pcreapi</b></a>
+page and a description of the POSIX API in the
+<a href="pcreposix.html"><b>pcreposix</b></a>
+page.
+<p>
+Return to the <a href="index.html">PCRE index page</a>.
+</p>
diff --git a/srclib/pcre/doc/html/pcre_fullinfo.html b/srclib/pcre/doc/html/pcre_fullinfo.html
new file mode 100644
index 0000000000..3488285c2a
--- /dev/null
+++ b/srclib/pcre/doc/html/pcre_fullinfo.html
@@ -0,0 +1,71 @@
+<html>
+<head>
+<title>pcre_fullinfo specification</title>
+</head>
+<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
+<h1>pcre_fullinfo man page</h1>
+<p>
+Return to the <a href="index.html">PCRE index page</a>.
+</p>
+<p>
+This page is part of the PCRE HTML documentation. It was generated automatically
+from the original man page. If there is any nonsense in it, please consult the
+man page, in case the conversion went wrong.
+<br>
+<br><b>
+SYNOPSIS
+</b><br>
+<P>
+<b>#include &#60;pcre.h&#62;</b>
+</P>
+<P>
+<b>int pcre_fullinfo(const pcre *<i>code</i>, const pcre_extra *<i>extra</i>,</b>
+<b>int <i>what</i>, void *<i>where</i>);</b>
+</P>
+<br><b>
+DESCRIPTION
+</b><br>
+<P>
+This function returns information about a compiled pattern. Its arguments are:
+<pre>
+ <i>code</i> Compiled regular expression
+ <i>extra</i> Result of <b>pcre_study()</b> or NULL
+ <i>what</i> What information is required
+ <i>where</i> Where to put the information
+</pre>
+The following information is available:
+<pre>
+ PCRE_INFO_BACKREFMAX Number of highest back reference
+ PCRE_INFO_CAPTURECOUNT Number of capturing subpatterns
+ PCRE_INFO_DEFAULT_TABLES Pointer to default tables
+ PCRE_INFO_FIRSTBYTE Fixed first byte for a match, or
+ -1 for start of string
+ or after newline, or
+ -2 otherwise
+ PCRE_INFO_FIRSTTABLE Table of first bytes
+ (after studying)
+ PCRE_INFO_LASTLITERAL Literal last byte required
+ PCRE_INFO_NAMECOUNT Number of named subpatterns
+ PCRE_INFO_NAMEENTRYSIZE Size of name table entry
+ PCRE_INFO_NAMETABLE Pointer to name table
+ PCRE_INFO_OPTIONS Options used for compilation
+ PCRE_INFO_SIZE Size of compiled pattern
+ PCRE_INFO_STUDYSIZE Size of study data
+</pre>
+The yield of the function is zero on success or:
+<pre>
+ PCRE_ERROR_NULL the argument <i>code</i> was NULL
+ the argument <i>where</i> was NULL
+ PCRE_ERROR_BADMAGIC the "magic number" was not found
+ PCRE_ERROR_BADOPTION the value of <i>what</i> was invalid
+</PRE>
+</P>
+<P>
+There is a complete description of the PCRE native API in the
+<a href="pcreapi.html"><b>pcreapi</b></a>
+page and a description of the POSIX API in the
+<a href="pcreposix.html"><b>pcreposix</b></a>
+page.
+<p>
+Return to the <a href="index.html">PCRE index page</a>.
+</p>
diff --git a/srclib/pcre/doc/html/pcre_get_named_substring.html b/srclib/pcre/doc/html/pcre_get_named_substring.html
new file mode 100644
index 0000000000..ff8456bb57
--- /dev/null
+++ b/srclib/pcre/doc/html/pcre_get_named_substring.html
@@ -0,0 +1,54 @@
+<html>
+<head>
+<title>pcre_get_named_substring specification</title>
+</head>
+<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
+<h1>pcre_get_named_substring man page</h1>
+<p>
+Return to the <a href="index.html">PCRE index page</a>.
+</p>
+<p>
+This page is part of the PCRE HTML documentation. It was generated automatically
+from the original man page. If there is any nonsense in it, please consult the
+man page, in case the conversion went wrong.
+<br>
+<br><b>
+SYNOPSIS
+</b><br>
+<P>
+<b>#include &#60;pcre.h&#62;</b>
+</P>
+<P>
+<b>int pcre_get_named_substring(const pcre *<i>code</i>,</b>
+<b>const char *<i>subject</i>, int *<i>ovector</i>,</b>
+<b>int <i>stringcount</i>, const char *<i>stringname</i>,</b>
+<b>const char **<i>stringptr</i>);</b>
+</P>
+<br><b>
+DESCRIPTION
+</b><br>
+<P>
+This is a convenience function for extracting a captured substring by name. The
+arguments are:
+<pre>
+ <i>code</i> Compiled pattern
+ <i>subject</i> Subject that has been successfully matched
+ <i>ovector</i> Offset vector that <b>pcre_exec()</b> used
+ <i>stringcount</i> Value returned by <b>pcre_exec()</b>
+ <i>stringname</i> Name of the required substring
+ <i>stringptr</i> Where to put the string pointer
+</pre>
+The memory in which the substring is placed is obtained by calling
+<b>pcre_malloc()</b>. The yield of the function is the length of the extracted
+substring, PCRE_ERROR_NOMEMORY if sufficient memory could not be obtained, or
+PCRE_ERROR_NOSUBSTRING if the string name is invalid.
+</P>
+<P>
+There is a complete description of the PCRE native API in the
+<a href="pcreapi.html"><b>pcreapi</b></a>
+page and a description of the POSIX API in the
+<a href="pcreposix.html"><b>pcreposix</b></a>
+page.
+<p>
+Return to the <a href="index.html">PCRE index page</a>.
+</p>
diff --git a/srclib/pcre/doc/html/pcre_get_stringnumber.html b/srclib/pcre/doc/html/pcre_get_stringnumber.html
new file mode 100644
index 0000000000..9c8bea0b4b
--- /dev/null
+++ b/srclib/pcre/doc/html/pcre_get_stringnumber.html
@@ -0,0 +1,46 @@
+<html>
+<head>
+<title>pcre_get_stringnumber specification</title>
+</head>
+<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
+<h1>pcre_get_stringnumber man page</h1>
+<p>
+Return to the <a href="index.html">PCRE index page</a>.
+</p>
+<p>
+This page is part of the PCRE HTML documentation. It was generated automatically
+from the original man page. If there is any nonsense in it, please consult the
+man page, in case the conversion went wrong.
+<br>
+<br><b>
+SYNOPSIS
+</b><br>
+<P>
+<b>#include &#60;pcre.h&#62;</b>
+</P>
+<P>
+<b>int pcre_get_stringnumber(const pcre *<i>code</i>,</b>
+<b>const char *<i>name</i>);</b>
+</P>
+<br><b>
+DESCRIPTION
+</b><br>
+<P>
+This convenience function finds the number of a named substring capturing
+parenthesis in a compiled pattern. Its arguments are:
+<pre>
+ <i>code</i> Compiled regular expression
+ <i>name</i> Name whose number is required
+</pre>
+The yield of the function is the number of the parenthesis if the name is
+found, or PCRE_ERROR_NOSUBSTRING otherwise.
+</P>
+<P>
+There is a complete description of the PCRE native API in the
+<a href="pcreapi.html"><b>pcreapi</b></a>
+page and a description of the POSIX API in the
+<a href="pcreposix.html"><b>pcreposix</b></a>
+page.
+<p>
+Return to the <a href="index.html">PCRE index page</a>.
+</p>
diff --git a/srclib/pcre/doc/html/pcre_get_substring.html b/srclib/pcre/doc/html/pcre_get_substring.html
new file mode 100644
index 0000000000..14a413222a
--- /dev/null
+++ b/srclib/pcre/doc/html/pcre_get_substring.html
@@ -0,0 +1,52 @@
+<html>
+<head>
+<title>pcre_get_substring specification</title>
+</head>
+<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
+<h1>pcre_get_substring man page</h1>
+<p>
+Return to the <a href="index.html">PCRE index page</a>.
+</p>
+<p>
+This page is part of the PCRE HTML documentation. It was generated automatically
+from the original man page. If there is any nonsense in it, please consult the
+man page, in case the conversion went wrong.
+<br>
+<br><b>
+SYNOPSIS
+</b><br>
+<P>
+<b>#include &#60;pcre.h&#62;</b>
+</P>
+<P>
+<b>int pcre_get_substring(const char *<i>subject</i>, int *<i>ovector</i>,</b>
+<b>int <i>stringcount</i>, int <i>stringnumber</i>,</b>
+<b>const char **<i>stringptr</i>);</b>
+</P>
+<br><b>
+DESCRIPTION
+</b><br>
+<P>
+This is a convenience function for extracting a captured substring. The
+arguments are:
+<pre>
+ <i>subject</i> Subject that has been successfully matched
+ <i>ovector</i> Offset vector that <b>pcre_exec()</b> used
+ <i>stringcount</i> Value returned by <b>pcre_exec()</b>
+ <i>stringnumber</i> Number of the required substring
+ <i>stringptr</i> Where to put the string pointer
+</pre>
+The memory in which the substring is placed is obtained by calling
+<b>pcre_malloc()</b>. The yield of the function is the length of the substring,
+PCRE_ERROR_NOMEMORY if sufficient memory could not be obtained, or
+PCRE_ERROR_NOSUBSTRING if the string number is invalid.
+</P>
+<P>
+There is a complete description of the PCRE native API in the
+<a href="pcreapi.html"><b>pcreapi</b></a>
+page and a description of the POSIX API in the
+<a href="pcreposix.html"><b>pcreposix</b></a>
+page.
+<p>
+Return to the <a href="index.html">PCRE index page</a>.
+</p>
diff --git a/srclib/pcre/doc/html/pcre_get_substring_list.html b/srclib/pcre/doc/html/pcre_get_substring_list.html
new file mode 100644
index 0000000000..d278b1793d
--- /dev/null
+++ b/srclib/pcre/doc/html/pcre_get_substring_list.html
@@ -0,0 +1,51 @@
+<html>
+<head>
+<title>pcre_get_substring_list specification</title>
+</head>
+<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
+<h1>pcre_get_substring_list man page</h1>
+<p>
+Return to the <a href="index.html">PCRE index page</a>.
+</p>
+<p>
+This page is part of the PCRE HTML documentation. It was generated automatically
+from the original man page. If there is any nonsense in it, please consult the
+man page, in case the conversion went wrong.
+<br>
+<br><b>
+SYNOPSIS
+</b><br>
+<P>
+<b>#include &#60;pcre.h&#62;</b>
+</P>
+<P>
+<b>int pcre_get_substring_list(const char *<i>subject</i>,</b>
+<b>int *<i>ovector</i>, int <i>stringcount</i>, const char ***<i>listptr</i>);</b>
+</P>
+<br><b>
+DESCRIPTION
+</b><br>
+<P>
+This is a convenience function for extracting a list of all the captured
+substrings. The arguments are:
+<pre>
+ <i>subject</i> Subject that has been successfully matched
+ <i>ovector</i> Offset vector that <b>pcre_exec</b> used
+ <i>stringcount</i> Value returned by <b>pcre_exec</b>
+ <i>listptr</i> Where to put a pointer to the list
+</pre>
+The memory in which the substrings and the list are placed is obtained by
+calling <b>pcre_malloc()</b>. A pointer to a list of pointers is put in
+the variable whose address is in <i>listptr</i>. The list is terminated by a
+NULL pointer. The yield of the function is zero on success or
+PCRE_ERROR_NOMEMORY if sufficient memory could not be obtained.
+</P>
+<P>
+There is a complete description of the PCRE native API in the
+<a href="pcreapi.html"><b>pcreapi</b></a>
+page and a description of the POSIX API in the
+<a href="pcreposix.html"><b>pcreposix</b></a>
+page.
+<p>
+Return to the <a href="index.html">PCRE index page</a>.
+</p>
diff --git a/srclib/pcre/doc/html/pcre_info.html b/srclib/pcre/doc/html/pcre_info.html
new file mode 100644
index 0000000000..6693ffee6c
--- /dev/null
+++ b/srclib/pcre/doc/html/pcre_info.html
@@ -0,0 +1,39 @@
+<html>
+<head>
+<title>pcre_info specification</title>
+</head>
+<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
+<h1>pcre_info man page</h1>
+<p>
+Return to the <a href="index.html">PCRE index page</a>.
+</p>
+<p>
+This page is part of the PCRE HTML documentation. It was generated automatically
+from the original man page. If there is any nonsense in it, please consult the
+man page, in case the conversion went wrong.
+<br>
+<br><b>
+SYNOPSIS
+</b><br>
+<P>
+<b>#include &#60;pcre.h&#62;</b>
+</P>
+<P>
+<b>int pcre_info(const pcre *<i>code</i>, int *<i>optptr</i>, int</b>
+<b>*<i>firstcharptr</i>);</b>
+</P>
+<br><b>
+DESCRIPTION
+</b><br>
+<P>
+This function is obsolete. You should be using <b>pcre_fullinfo()</b> instead.
+</P>
+<P>
+There is a complete description of the PCRE native API in the
+<a href="pcreapi.html"><b>pcreapi</b></a>
+page and a description of the POSIX API in the
+<a href="pcreposix.html"><b>pcreposix</b></a>
+page.
+<p>
+Return to the <a href="index.html">PCRE index page</a>.
+</p>
diff --git a/srclib/pcre/doc/html/pcre_maketables.html b/srclib/pcre/doc/html/pcre_maketables.html
new file mode 100644
index 0000000000..cf8d69ecfd
--- /dev/null
+++ b/srclib/pcre/doc/html/pcre_maketables.html
@@ -0,0 +1,42 @@
+<html>
+<head>
+<title>pcre_maketables specification</title>
+</head>
+<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
+<h1>pcre_maketables man page</h1>
+<p>
+Return to the <a href="index.html">PCRE index page</a>.
+</p>
+<p>
+This page is part of the PCRE HTML documentation. It was generated automatically
+from the original man page. If there is any nonsense in it, please consult the
+man page, in case the conversion went wrong.
+<br>
+<br><b>
+SYNOPSIS
+</b><br>
+<P>
+<b>#include &#60;pcre.h&#62;</b>
+</P>
+<P>
+<b>const unsigned char *pcre_maketables(void);</b>
+</P>
+<br><b>
+DESCRIPTION
+</b><br>
+<P>
+This function builds a set of character tables for character values less than
+256. These can be passed to <b>pcre_compile()</b> to override PCRE's internal,
+built-in tables (which were made by <b>pcre_maketables()</b> when PCRE was
+compiled). You might want to do this if you are using a non-standard locale.
+The function yields a pointer to the tables.
+</P>
+<P>
+There is a complete description of the PCRE native API in the
+<a href="pcreapi.html"><b>pcreapi</b></a>
+page and a description of the POSIX API in the
+<a href="pcreposix.html"><b>pcreposix</b></a>
+page.
+<p>
+Return to the <a href="index.html">PCRE index page</a>.
+</p>
diff --git a/srclib/pcre/doc/html/pcre_study.html b/srclib/pcre/doc/html/pcre_study.html
new file mode 100644
index 0000000000..d290420e54
--- /dev/null
+++ b/srclib/pcre/doc/html/pcre_study.html
@@ -0,0 +1,56 @@
+<html>
+<head>
+<title>pcre_study specification</title>
+</head>
+<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
+<h1>pcre_study man page</h1>
+<p>
+Return to the <a href="index.html">PCRE index page</a>.
+</p>
+<p>
+This page is part of the PCRE HTML documentation. It was generated automatically
+from the original man page. If there is any nonsense in it, please consult the
+man page, in case the conversion went wrong.
+<br>
+<br><b>
+SYNOPSIS
+</b><br>
+<P>
+<b>#include &#60;pcre.h&#62;</b>
+</P>
+<P>
+<b>pcre_extra *pcre_study(const pcre *<i>code</i>, int <i>options</i>,</b>
+<b>const char **<i>errptr</i>);</b>
+</P>
+<br><b>
+DESCRIPTION
+</b><br>
+<P>
+This function studies a compiled pattern, to see if additional information can
+be extracted that might speed up matching. Its arguments are:
+<pre>
+ <i>code</i> A compiled regular expression
+ <i>options</i> Options for <b>pcre_study()</b>
+ <i>errptr</i> Where to put an error message
+</pre>
+If the function succeeds, it returns a value that can be passed to
+<b>pcre_exec()</b> via its <i>extra</i> argument.
+</P>
+<P>
+If the function returns NULL, either it could not find any additional
+information, or there was an error. You can tell the difference by looking at
+the error value. It is NULL in first case.
+</P>
+<P>
+There are currently no options defined; the value of the second argument should
+always be zero.
+</P>
+<P>
+There is a complete description of the PCRE native API in the
+<a href="pcreapi.html"><b>pcreapi</b></a>
+page and a description of the POSIX API in the
+<a href="pcreposix.html"><b>pcreposix</b></a>
+page.
+<p>
+Return to the <a href="index.html">PCRE index page</a>.
+</p>
diff --git a/srclib/pcre/doc/html/pcre_version.html b/srclib/pcre/doc/html/pcre_version.html
new file mode 100644
index 0000000000..7bc8f8653e
--- /dev/null
+++ b/srclib/pcre/doc/html/pcre_version.html
@@ -0,0 +1,39 @@
+<html>
+<head>
+<title>pcre_version specification</title>
+</head>
+<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
+<h1>pcre_version man page</h1>
+<p>
+Return to the <a href="index.html">PCRE index page</a>.
+</p>
+<p>
+This page is part of the PCRE HTML documentation. It was generated automatically
+from the original man page. If there is any nonsense in it, please consult the
+man page, in case the conversion went wrong.
+<br>
+<br><b>
+SYNOPSIS
+</b><br>
+<P>
+<b>#include &#60;pcre.h&#62;</b>
+</P>
+<P>
+<b>char *pcre_version(void);</b>
+</P>
+<br><b>
+DESCRIPTION
+</b><br>
+<P>
+This function returns a character string that gives the version number of the
+PCRE library and the date of its release.
+</P>
+<P>
+There is a complete description of the PCRE native API in the
+<a href="pcreapi.html"><b>pcreapi</b></a>
+page and a description of the POSIX API in the
+<a href="pcreposix.html"><b>pcreposix</b></a>
+page.
+<p>
+Return to the <a href="index.html">PCRE index page</a>.
+</p>
diff --git a/srclib/pcre/doc/html/pcreapi.html b/srclib/pcre/doc/html/pcreapi.html
new file mode 100644
index 0000000000..72639f4cc3
--- /dev/null
+++ b/srclib/pcre/doc/html/pcreapi.html
@@ -0,0 +1,1287 @@
+<html>
+<head>
+<title>pcreapi specification</title>
+</head>
+<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
+<h1>pcreapi man page</h1>
+<p>
+Return to the <a href="index.html">PCRE index page</a>.
+</p>
+<p>
+This page is part of the PCRE HTML documentation. It was generated automatically
+from the original man page. If there is any nonsense in it, please consult the
+man page, in case the conversion went wrong.
+<br>
+<ul>
+<li><a name="TOC1" href="#SEC1">PCRE NATIVE API</a>
+<li><a name="TOC2" href="#SEC2">PCRE API OVERVIEW</a>
+<li><a name="TOC3" href="#SEC3">MULTITHREADING</a>
+<li><a name="TOC4" href="#SEC4">SAVING PRECOMPILED PATTERNS FOR LATER USE</a>
+<li><a name="TOC5" href="#SEC5">CHECKING BUILD-TIME OPTIONS</a>
+<li><a name="TOC6" href="#SEC6">COMPILING A PATTERN</a>
+<li><a name="TOC7" href="#SEC7">STUDYING A PATTERN</a>
+<li><a name="TOC8" href="#SEC8">LOCALE SUPPORT</a>
+<li><a name="TOC9" href="#SEC9">INFORMATION ABOUT A PATTERN</a>
+<li><a name="TOC10" href="#SEC10">OBSOLETE INFO FUNCTION</a>
+<li><a name="TOC11" href="#SEC11">MATCHING A PATTERN</a>
+<li><a name="TOC12" href="#SEC12">EXTRACTING CAPTURED SUBSTRINGS BY NUMBER</a>
+<li><a name="TOC13" href="#SEC13">EXTRACTING CAPTURED SUBSTRINGS BY NAME</a>
+</ul>
+<br><a name="SEC1" href="#TOC1">PCRE NATIVE API</a><br>
+<P>
+<b>#include &#60;pcre.h&#62;</b>
+</P>
+<P>
+<b>pcre *pcre_compile(const char *<i>pattern</i>, int <i>options</i>,</b>
+<b>const char **<i>errptr</i>, int *<i>erroffset</i>,</b>
+<b>const unsigned char *<i>tableptr</i>);</b>
+</P>
+<P>
+<b>pcre_extra *pcre_study(const pcre *<i>code</i>, int <i>options</i>,</b>
+<b>const char **<i>errptr</i>);</b>
+</P>
+<P>
+<b>int pcre_exec(const pcre *<i>code</i>, const pcre_extra *<i>extra</i>,</b>
+<b>const char *<i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
+<b>int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>);</b>
+</P>
+<P>
+<b>int pcre_copy_named_substring(const pcre *<i>code</i>,</b>
+<b>const char *<i>subject</i>, int *<i>ovector</i>,</b>
+<b>int <i>stringcount</i>, const char *<i>stringname</i>,</b>
+<b>char *<i>buffer</i>, int <i>buffersize</i>);</b>
+</P>
+<P>
+<b>int pcre_copy_substring(const char *<i>subject</i>, int *<i>ovector</i>,</b>
+<b>int <i>stringcount</i>, int <i>stringnumber</i>, char *<i>buffer</i>,</b>
+<b>int <i>buffersize</i>);</b>
+</P>
+<P>
+<b>int pcre_get_named_substring(const pcre *<i>code</i>,</b>
+<b>const char *<i>subject</i>, int *<i>ovector</i>,</b>
+<b>int <i>stringcount</i>, const char *<i>stringname</i>,</b>
+<b>const char **<i>stringptr</i>);</b>
+</P>
+<P>
+<b>int pcre_get_stringnumber(const pcre *<i>code</i>,</b>
+<b>const char *<i>name</i>);</b>
+</P>
+<P>
+<b>int pcre_get_substring(const char *<i>subject</i>, int *<i>ovector</i>,</b>
+<b>int <i>stringcount</i>, int <i>stringnumber</i>,</b>
+<b>const char **<i>stringptr</i>);</b>
+</P>
+<P>
+<b>int pcre_get_substring_list(const char *<i>subject</i>,</b>
+<b>int *<i>ovector</i>, int <i>stringcount</i>, const char ***<i>listptr</i>);</b>
+</P>
+<P>
+<b>void pcre_free_substring(const char *<i>stringptr</i>);</b>
+</P>
+<P>
+<b>void pcre_free_substring_list(const char **<i>stringptr</i>);</b>
+</P>
+<P>
+<b>const unsigned char *pcre_maketables(void);</b>
+</P>
+<P>
+<b>int pcre_fullinfo(const pcre *<i>code</i>, const pcre_extra *<i>extra</i>,</b>
+<b>int <i>what</i>, void *<i>where</i>);</b>
+</P>
+<P>
+<b>int pcre_info(const pcre *<i>code</i>, int *<i>optptr</i>, int</b>
+<b>*<i>firstcharptr</i>);</b>
+</P>
+<P>
+<b>int pcre_config(int <i>what</i>, void *<i>where</i>);</b>
+</P>
+<P>
+<b>char *pcre_version(void);</b>
+</P>
+<P>
+<b>void *(*pcre_malloc)(size_t);</b>
+</P>
+<P>
+<b>void (*pcre_free)(void *);</b>
+</P>
+<P>
+<b>void *(*pcre_stack_malloc)(size_t);</b>
+</P>
+<P>
+<b>void (*pcre_stack_free)(void *);</b>
+</P>
+<P>
+<b>int (*pcre_callout)(pcre_callout_block *);</b>
+</P>
+<br><a name="SEC2" href="#TOC1">PCRE API OVERVIEW</a><br>
+<P>
+PCRE has its own native API, which is described in this document. There is also
+a set of wrapper functions that correspond to the POSIX regular expression API.
+These are described in the
+<a href="pcreposix.html"><b>pcreposix</b></a>
+documentation.
+</P>
+<P>
+The native API function prototypes are defined in the header file <b>pcre.h</b>,
+and on Unix systems the library itself is called <b>libpcre</b>. It can
+normally be accessed by adding <b>-lpcre</b> to the command for linking an
+application that uses PCRE. The header file defines the macros PCRE_MAJOR 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>
+<P>
+The functions <b>pcre_compile()</b>, <b>pcre_study()</b>, and <b>pcre_exec()</b>
+are used for compiling and matching regular expressions. A sample program that
+demonstrates the simplest way of using them is provided in the file called
+<i>pcredemo.c</i> in the source distribution. The
+<a href="pcresample.html"><b>pcresample</b></a>
+documentation describes how to run it.
+</P>
+<P>
+In addition to the main compiling and matching functions, there are convenience
+functions for extracting captured substrings from a matched subject string.
+They are:
+<pre>
+ <b>pcre_copy_substring()</b>
+ <b>pcre_copy_named_substring()</b>
+ <b>pcre_get_substring()</b>
+ <b>pcre_get_named_substring()</b>
+ <b>pcre_get_substring_list()</b>
+ <b>pcre_get_stringnumber()</b>
+</pre>
+<b>pcre_free_substring()</b> and <b>pcre_free_substring_list()</b> are also
+provided, to free the memory used for extracted strings.
+</P>
+<P>
+The function <b>pcre_maketables()</b> is used to build a set of character tables
+in the current locale for passing to <b>pcre_compile()</b> or <b>pcre_exec()</b>.
+This is an optional facility that is provided for specialist use. Most
+commonly, no special tables are passed, in which case internal tables that are
+generated when PCRE is built are used.
+</P>
+<P>
+The function <b>pcre_fullinfo()</b> is used to find out information about a
+compiled pattern; <b>pcre_info()</b> is an obsolete version that returns only
+some of the available information, but is retained for backwards compatibility.
+The function <b>pcre_version()</b> returns a pointer to a string containing the
+version of PCRE and its date of release.
+</P>
+<P>
+The global variables <b>pcre_malloc</b> and <b>pcre_free</b> initially contain
+the entry points of the standard <b>malloc()</b> and <b>free()</b> functions,
+respectively. PCRE calls the memory management functions via these variables,
+so a calling program can replace them if it wishes to intercept the calls. This
+should be done before calling any PCRE functions.
+</P>
+<P>
+The global variables <b>pcre_stack_malloc</b> and <b>pcre_stack_free</b> are also
+indirections to memory management functions. These special functions are used
+only when PCRE is compiled to use the heap for remembering data, instead of
+recursive function calls. This is a non-standard way of building PCRE, for use
+in environments that have limited stacks. Because of the greater use of memory
+management, it runs more slowly. Separate functions are provided so that
+special-purpose external code can be used for this case. When used, these
+functions are always called in a stack-like manner (last obtained, first
+freed), and always for memory blocks of the same size.
+</P>
+<P>
+The global variable <b>pcre_callout</b> initially contains NULL. It can be set
+by the caller to a "callout" function, which PCRE will then call at specified
+points during a matching operation. Details are given in the
+<a href="pcrecallout.html"><b>pcrecallout</b></a>
+documentation.
+</P>
+<br><a name="SEC3" href="#TOC1">MULTITHREADING</a><br>
+<P>
+The PCRE functions can be used in multi-threading applications, with the
+proviso that the memory management functions pointed to by <b>pcre_malloc</b>,
+<b>pcre_free</b>, <b>pcre_stack_malloc</b>, and <b>pcre_stack_free</b>, and the
+callout function pointed to by <b>pcre_callout</b>, are shared by all threads.
+</P>
+<P>
+The compiled form of a regular expression is not altered during matching, so
+the same compiled pattern can safely be used by several threads at once.
+</P>
+<br><a name="SEC4" href="#TOC1">SAVING PRECOMPILED PATTERNS FOR LATER USE</a><br>
+<P>
+The compiled form of a regular expression can be saved and re-used at a later
+time, possibly by a different program, and even on a host other than the one on
+which it was compiled. Details are given in the
+<a href="pcreprecompile.html"><b>pcreprecompile</b></a>
+documentation.
+</P>
+<br><a name="SEC5" href="#TOC1">CHECKING BUILD-TIME OPTIONS</a><br>
+<P>
+<b>int pcre_config(int <i>what</i>, void *<i>where</i>);</b>
+</P>
+<P>
+The function <b>pcre_config()</b> makes it possible for a PCRE client to
+discover which optional features have been compiled into the PCRE library. The
+<a href="pcrebuild.html"><b>pcrebuild</b></a>
+documentation has more details about these optional features.
+</P>
+<P>
+The first argument for <b>pcre_config()</b> is an integer, specifying which
+information is required; the second argument is a pointer to a variable into
+which the information is placed. The following information is available:
+<pre>
+ PCRE_CONFIG_UTF8
+</pre>
+The output is an integer that is set to one if UTF-8 support is available;
+otherwise it is set to zero.
+<pre>
+ PCRE_CONFIG_UNICODE_PROPERTIES
+</pre>
+The output is an integer that is set to one if support for Unicode character
+properties is available; otherwise it is set to zero.
+<pre>
+ PCRE_CONFIG_NEWLINE
+</pre>
+The output is an integer that is set to the value of the code that is used for
+the newline character. It is either linefeed (10) or carriage return (13), and
+should normally be the standard character for your operating system.
+<pre>
+ PCRE_CONFIG_LINK_SIZE
+</pre>
+The output is an integer that contains the number of bytes used for internal
+linkage in compiled regular expressions. The value is 2, 3, or 4. Larger values
+allow larger regular expressions to be compiled, at the expense of slower
+matching. The default value of 2 is sufficient for all but the most massive
+patterns, since it allows the compiled pattern to be up to 64K in size.
+<pre>
+ PCRE_CONFIG_POSIX_MALLOC_THRESHOLD
+</pre>
+The output is an integer that contains the threshold above which the POSIX
+interface uses <b>malloc()</b> for output vectors. Further details are given in
+the
+<a href="pcreposix.html"><b>pcreposix</b></a>
+documentation.
+<pre>
+ PCRE_CONFIG_MATCH_LIMIT
+</pre>
+The output is an integer that gives the default limit for the number of
+internal matching function calls in a <b>pcre_exec()</b> execution. Further
+details are given with <b>pcre_exec()</b> below.
+<pre>
+ PCRE_CONFIG_STACKRECURSE
+</pre>
+The output is an integer that is set to one if internal recursion is
+implemented by recursive function calls that use the stack to remember their
+state. This is the usual way that PCRE is compiled. The output is zero if PCRE
+was compiled to use blocks of data on the heap instead of recursive function
+calls. In this case, <b>pcre_stack_malloc</b> and <b>pcre_stack_free</b> are
+called to manage memory blocks on the heap, thus avoiding the use of the stack.
+</P>
+<br><a name="SEC6" href="#TOC1">COMPILING A PATTERN</a><br>
+<P>
+<b>pcre *pcre_compile(const char *<i>pattern</i>, int <i>options</i>,</b>
+<b>const char **<i>errptr</i>, int *<i>erroffset</i>,</b>
+<b>const unsigned char *<i>tableptr</i>);</b>
+</P>
+<P>
+The function <b>pcre_compile()</b> is called to compile a pattern into an
+internal form. The pattern is a C string terminated by a binary zero, and
+is passed in the <i>pattern</i> argument. A pointer to a single block of memory
+that is obtained via <b>pcre_malloc</b> is returned. This contains the compiled
+code and related data. The <b>pcre</b> type is defined for the returned block;
+this is a typedef for a structure whose contents are not externally defined. It
+is up to the caller to free the memory when it is no longer required.
+</P>
+<P>
+Although the compiled code of a PCRE regex is relocatable, that is, it does not
+depend on memory location, the complete <b>pcre</b> data block is not
+fully relocatable, because it may contain a copy of the <i>tableptr</i>
+argument, which is an address (see below).
+</P>
+<P>
+The <i>options</i> argument contains independent bits that affect the
+compilation. It should be zero if no options are required. The available
+options are described below. Some of them, in particular, those that are
+compatible with Perl, can also be set and unset from within the pattern (see
+the detailed description in the
+<a href="pcrepattern.html"><b>pcrepattern</b></a>
+documentation). For these options, the contents of the <i>options</i> argument
+specifies their initial settings at the start of compilation and execution. The
+PCRE_ANCHORED option can be set at the time of matching as well as at compile
+time.
+</P>
+<P>
+If <i>errptr</i> is NULL, <b>pcre_compile()</b> returns NULL immediately.
+Otherwise, if compilation of a pattern fails, <b>pcre_compile()</b> returns
+NULL, and sets the variable pointed to by <i>errptr</i> to point to a textual
+error message. The offset from the start of the pattern to the character where
+the error was discovered is placed in the variable pointed to by
+<i>erroffset</i>, which must not be NULL. If it is, an immediate error is given.
+</P>
+<P>
+If the final argument, <i>tableptr</i>, is NULL, PCRE uses a default set of
+character tables that are built when PCRE is compiled, using the default C
+locale. Otherwise, <i>tableptr</i> must be an address that is the result of a
+call to <b>pcre_maketables()</b>. This value is stored with the compiled
+pattern, and used again by <b>pcre_exec()</b>, unless another table pointer is
+passed to it. For more discussion, see the section on locale support below.
+</P>
+<P>
+This code fragment shows a typical straightforward call to <b>pcre_compile()</b>:
+<pre>
+ pcre *re;
+ const char *error;
+ int erroffset;
+ re = pcre_compile(
+ "^A.*Z", /* the pattern */
+ 0, /* default options */
+ &error, /* for error message */
+ &erroffset, /* for error offset */
+ NULL); /* use default character tables */
+</pre>
+The following names for option bits are defined in the <b>pcre.h</b> header
+file:
+<pre>
+ PCRE_ANCHORED
+</pre>
+If this bit is set, the pattern is forced to be "anchored", that is, it is
+constrained to match only at the first matching point in the string that is
+being searched (the "subject string"). This effect can also be achieved by
+appropriate constructs in the pattern itself, which is the only way to do it in
+Perl.
+<pre>
+ PCRE_AUTO_CALLOUT
+</pre>
+If this bit is set, <b>pcre_compile()</b> automatically inserts callout items,
+all with number 255, before each pattern item. For discussion of the callout
+facility, see the
+<a href="pcrecallout.html"><b>pcrecallout</b></a>
+documentation.
+<pre>
+ PCRE_CASELESS
+</pre>
+If this bit is set, letters in the pattern match both upper and lower case
+letters. It is equivalent to Perl's /i option, and it can be changed within a
+pattern by a (?i) option setting. When running in UTF-8 mode, case support for
+high-valued characters is available only when PCRE is built with Unicode
+character property support.
+<pre>
+ PCRE_DOLLAR_ENDONLY
+</pre>
+If this bit is set, a dollar metacharacter in the pattern matches only at the
+end of the subject string. Without this option, a dollar also matches
+immediately before the final character if it is a newline (but not before any
+other newlines). The PCRE_DOLLAR_ENDONLY option is ignored if PCRE_MULTILINE is
+set. There is no equivalent to this option in Perl, and no way to set it within
+a pattern.
+<pre>
+ PCRE_DOTALL
+</pre>
+If this bit is set, a dot metacharater in the pattern matches all characters,
+including newlines. Without it, newlines are excluded. This option is
+equivalent to Perl's /s option, and it can be changed within a pattern by a
+(?s) option setting. A negative class such as [^a] always matches a newline
+character, independent of the setting of this option.
+<pre>
+ PCRE_EXTENDED
+</pre>
+If this bit is set, whitespace data characters in the pattern are totally
+ignored except when escaped or inside a character class. Whitespace does not
+include the VT character (code 11). In addition, characters between an
+unescaped # outside a character class and the next newline character,
+inclusive, are also ignored. This is equivalent to Perl's /x option, and it can
+be changed within a pattern by a (?x) option setting.
+</P>
+<P>
+This option makes it possible to include comments inside complicated patterns.
+Note, however, that this applies only to data characters. Whitespace characters
+may never appear within special character sequences in a pattern, for example
+within the sequence (?( which introduces a conditional subpattern.
+<pre>
+ PCRE_EXTRA
+</pre>
+This option was invented in order to turn on additional functionality of PCRE
+that is incompatible with Perl, but it is currently of very little use. When
+set, any backslash in a pattern that is followed by a 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. 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_MULTILINE
+</pre>
+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.
+</P>
+<P>
+When PCRE_MULTILINE it is set, the "start of line" and "end of line" constructs
+match immediately following or immediately before any newline 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 "\n" characters in a subject string, or no
+occurrences of ^ or $ in a pattern, setting PCRE_MULTILINE has no effect.
+<pre>
+ PCRE_NO_AUTO_CAPTURE
+</pre>
+If this option is set, it disables the use of numbered capturing parentheses 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.
+<pre>
+ PCRE_UNGREEDY
+</pre>
+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.
+<pre>
+ PCRE_UTF8
+</pre>
+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 support. If not, the use
+of this option provokes an error. Details of how this option changes the
+behaviour of PCRE are given in the
+<a href="pcre.html#utf8support">section on UTF-8 support</a>
+in the main
+<a href="pcre.html"><b>pcre</b></a>
+page.
+<pre>
+ PCRE_NO_UTF8_CHECK
+</pre>
+When PCRE_UTF8 is set, the validity of the pattern as a UTF-8 string is
+automatically checked. If an invalid UTF-8 sequence of bytes is found,
+<b>pcre_compile()</b> returns an error. If you already know that your pattern is
+valid, and you want to skip this check for performance 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 <b>pcre_exec()</b>, to suppress the
+UTF-8 validity checking of subject strings.
+</P>
+<br><a name="SEC7" href="#TOC1">STUDYING A PATTERN</a><br>
+<P>
+<b>pcre_extra *pcre_study(const pcre *<i>code</i>, int <i>options</i>,</b>
+<b>const char **<i>errptr</i>);</b>
+</P>
+<P>
+If a compiled pattern is going to be used several times, it is worth spending
+more time analyzing it in order to speed up the time taken for matching. The
+function <b>pcre_study()</b> takes a pointer to a compiled pattern as its first
+argument. If studying the pattern produces additional information that will
+help speed up matching, <b>pcre_study()</b> returns a pointer to a
+<b>pcre_extra</b> block, in which the <i>study_data</i> field points to the
+results of the study.
+</P>
+<P>
+The returned value from <b>pcre_study()</b> can be passed directly to
+<b>pcre_exec()</b>. However, a <b>pcre_extra</b> block also contains other
+fields that can be set by the caller before the block is passed; these are
+described
+<a href="#extradata">below</a>
+in the section on matching a pattern.
+</P>
+<P>
+If studying the pattern does not produce any additional information,
+<b>pcre_study()</b> returns NULL. In that circumstance, if the calling program
+wants to pass any of the other fields to <b>pcre_exec()</b>, it must set up its
+own <b>pcre_extra</b> block.
+</P>
+<P>
+The second argument of <b>pcre_study()</b> contains option bits. At present, no
+options are defined, and this argument should always be zero.
+</P>
+<P>
+The third argument for <b>pcre_study()</b> is a pointer for an error message. If
+studying succeeds (even if no data is returned), the variable it points to is
+set to NULL. Otherwise it points to a textual error message. You should
+therefore test the error pointer for NULL after calling <b>pcre_study()</b>, to
+be sure that it has run successfully.
+</P>
+<P>
+This is a typical call to <b>pcre_study</b>():
+<pre>
+ pcre_extra *pe;
+ pe = pcre_study(
+ re, /* result of pcre_compile() */
+ 0, /* no options exist */
+ &error); /* set to NULL or points to a message */
+</pre>
+At present, studying a pattern is useful only for non-anchored patterns that do
+not have a single fixed starting character. A bitmap of possible starting
+bytes is created.
+<a name="localesupport"></a></P>
+<br><a name="SEC8" 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.)
+</P>
+<P>
+An internal set of tables is created in the default C locale when PCRE is
+built. This is used when the final argument of <b>pcre_compile()</b> is NULL,
+and is sufficient for many applications. An alternative set of tables can,
+however, be supplied. These may be created in a different locale from the
+default. As more and more applications change to using Unicode, the need for
+this locale support is expected to die away.
+</P>
+<P>
+External tables are built by calling the <b>pcre_maketables()</b> function,
+which has no arguments, in the relevant locale. The result can then be passed
+to <b>pcre_compile()</b> or <b>pcre_exec()</b> 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:
+<pre>
+ setlocale(LC_CTYPE, "fr_FR");
+ tables = pcre_maketables();
+ re = pcre_compile(..., tables);
+</pre>
+When <b>pcre_maketables()</b> runs, the tables are built in memory that is
+obtained via <b>pcre_malloc</b>. It is the caller's responsibility to ensure
+that the memory containing the tables remains available for as long as it is
+needed.
+</P>
+<P>
+The pointer that is passed to <b>pcre_compile()</b> is saved with the compiled
+pattern, and the same tables are used via this pointer by <b>pcre_study()</b>
+and normally also by <b>pcre_exec()</b>. Thus, by default, for any single
+pattern, compilation, studying and matching all happen in the same locale, but
+different patterns can be compiled in different locales.
+</P>
+<P>
+It is possible to pass a table pointer or NULL (indicating the use of the
+internal tables) to <b>pcre_exec()</b>. 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.
+</P>
+<br><a name="SEC9" href="#TOC1">INFORMATION ABOUT A PATTERN</a><br>
+<P>
+<b>int pcre_fullinfo(const pcre *<i>code</i>, const pcre_extra *<i>extra</i>,</b>
+<b>int <i>what</i>, void *<i>where</i>);</b>
+</P>
+<P>
+The <b>pcre_fullinfo()</b> function returns information about a compiled
+pattern. It replaces the obsolete <b>pcre_info()</b> function, which is
+nevertheless retained for backwards compability (and is documented below).
+</P>
+<P>
+The first argument for <b>pcre_fullinfo()</b> is a pointer to the compiled
+pattern. The second argument is the result of <b>pcre_study()</b>, 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:
+<pre>
+ PCRE_ERROR_NULL the argument <i>code</i> was NULL
+ the argument <i>where</i> was NULL
+ PCRE_ERROR_BADMAGIC the "magic number" was not found
+ PCRE_ERROR_BADOPTION the value of <i>what</i> was invalid
+</pre>
+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
+<b>pcre_fullinfo()</b>, to obtain the length of the compiled pattern:
+<pre>
+ int rc;
+ unsigned long int length;
+ rc = pcre_fullinfo(
+ re, /* result of pcre_compile() */
+ pe, /* result of pcre_study(), or NULL */
+ PCRE_INFO_SIZE, /* what is required */
+ &length); /* where to put the data */
+</pre>
+The possible values for the third argument are defined in <b>pcre.h</b>, and are
+as follows:
+<pre>
+ PCRE_INFO_BACKREFMAX
+</pre>
+Return the number of the highest back reference in the pattern. The fourth
+argument should point to an <b>int</b> variable. Zero is returned if there are
+no back references.
+<pre>
+ PCRE_INFO_CAPTURECOUNT
+</pre>
+Return the number of capturing subpatterns in the pattern. The fourth argument
+should point to an <b>int</b> variable.
+<pre>
+ PCRE_INFO_DEFAULTTABLES
+</pre>
+Return a pointer to the internal default character tables within PCRE. The
+fourth argument should point to an <b>unsigned char *</b> variable. This
+information call is provided for internal use by the <b>pcre_study()</b>
+function. External callers can cause PCRE to use its internal tables by passing
+a NULL table pointer.
+<pre>
+ PCRE_INFO_FIRSTBYTE
+</pre>
+Return information about the first byte of any matched string, for a
+non-anchored pattern. (This option used to be called PCRE_INFO_FIRSTCHAR; the
+old name is still recognized for backwards compatibility.)
+</P>
+<P>
+If there is a fixed first byte, for example, from a pattern such as
+(cat|cow|coyote), it is returned in the integer pointed to by <i>where</i>.
+Otherwise, if either
+<br>
+<br>
+(a) the pattern was compiled with the PCRE_MULTILINE option, and every branch
+starts with "^", or
+<br>
+<br>
+(b) every branch of the pattern starts with ".*" and PCRE_DOTALL is not set
+(if it were set, the pattern would be anchored),
+<br>
+<br>
+-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.
+<pre>
+ PCRE_INFO_FIRSTTABLE
+</pre>
+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 <b>unsigned char *</b> variable.
+<pre>
+ PCRE_INFO_LASTLITERAL
+</pre>
+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 <b>int</b> 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 example, for the pattern
+/^a\d+z\d+/ the returned value is "z", but for /^a\dz\d/ the returned value
+is -1.
+<pre>
+ PCRE_INFO_NAMECOUNT
+ PCRE_INFO_NAMEENTRYSIZE
+ PCRE_INFO_NAMETABLE
+</pre>
+PCRE supports the use of named as well as numbered capturing parentheses. The
+names are just an additional way of identifying the parentheses, which still
+acquire numbers. A convenience function called <b>pcre_get_named_substring()</b>
+is provided for extracting an individual captured substring 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
+<b>pcre_exec()</b> below). To do the conversion, you need to use the
+name-to-number map, which is described by these three values.
+</P>
+<P>
+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 <b>int</b> 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 <b>char</b>). The first two bytes of each entry
+are the number of the capturing parenthesis, most significant byte first. The
+rest of the entry is the corresponding name, zero terminated. The names are in
+alphabetical order. For example, consider the following pattern (assume
+PCRE_EXTENDED is set, so white space - including newlines - is ignored):
+<pre>
+ (?P&#60;date&#62; (?P&#60;year&#62;(\d\d)?\d\d) - (?P&#60;month&#62;\d\d) - (?P&#60;day&#62;\d\d) )
+</pre>
+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 ??:
+<pre>
+ 00 01 d a t e 00 ??
+ 00 05 d a y 00 ?? ??
+ 00 04 m o n t h 00
+ 00 02 y e a r 00 ??
+</pre>
+When writing code to extract data from named subpatterns using the
+name-to-number map, remember that the length of each entry is likely to be
+different for each compiled pattern.
+<pre>
+ PCRE_INFO_OPTIONS
+</pre>
+Return a copy of the options with which the pattern was compiled. The fourth
+argument should point to an <b>unsigned long int</b> variable. These option bits
+are those specified in the call to <b>pcre_compile()</b>, modified by any
+top-level option settings within the pattern itself.
+</P>
+<P>
+A pattern is automatically anchored by PCRE if all of its top-level
+alternatives begin with one of the following:
+<pre>
+ ^ unless PCRE_MULTILINE is set
+ \A always
+ \G always
+ .* if PCRE_DOTALL is set and there are no back references to the subpattern in which .* appears
+</pre>
+For such patterns, the PCRE_ANCHORED bit is set in the options returned by
+<b>pcre_fullinfo()</b>.
+<pre>
+ PCRE_INFO_SIZE
+</pre>
+Return the size of the compiled pattern, that is, the value that was passed as
+the argument to <b>pcre_malloc()</b> when PCRE was getting memory in which to
+place the compiled data. The fourth argument should point to a <b>size_t</b>
+variable.
+<pre>
+ PCRE_INFO_STUDYSIZE
+</pre>
+Return the size of the data block pointed to by the <i>study_data</i> field in
+a <b>pcre_extra</b> block. That is, it is the value that was passed to
+<b>pcre_malloc()</b> when PCRE was getting memory into which to place the data
+created by <b>pcre_study()</b>. The fourth argument should point to a
+<b>size_t</b> variable.
+</P>
+<br><a name="SEC10" href="#TOC1">OBSOLETE INFO FUNCTION</a><br>
+<P>
+<b>int pcre_info(const pcre *<i>code</i>, int *<i>optptr</i>, int</b>
+<b>*<i>firstcharptr</i>);</b>
+</P>
+<P>
+The <b>pcre_info()</b> function is now obsolete because its interface is too
+restrictive to return all the available data about a compiled pattern. New
+programs should use <b>pcre_fullinfo()</b> instead. The yield of
+<b>pcre_info()</b> is the number of capturing subpatterns, or one of the
+following negative numbers:
+<pre>
+ PCRE_ERROR_NULL the argument <i>code</i> was NULL
+ PCRE_ERROR_BADMAGIC the "magic number" was not found
+</pre>
+If the <i>optptr</i> 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).
+</P>
+<P>
+If the pattern is not anchored and the <i>firstcharptr</i> argument is not NULL,
+it is used to pass back information about the first character of any matched
+string (see PCRE_INFO_FIRSTBYTE above).
+</P>
+<br><a name="SEC11" href="#TOC1">MATCHING A PATTERN</a><br>
+<P>
+<b>int pcre_exec(const pcre *<i>code</i>, const pcre_extra *<i>extra</i>,</b>
+<b>const char *<i>subject</i>, int <i>length</i>, int <i>startoffset</i>,</b>
+<b>int <i>options</i>, int *<i>ovector</i>, int <i>ovecsize</i>);</b>
+</P>
+<P>
+The function <b>pcre_exec()</b> is called to match a subject string against a
+compiled pattern, which is passed in the <i>code</i> argument. If the
+pattern has been studied, the result of the study should be passed in the
+<i>extra</i> argument.
+</P>
+<P>
+In most applications, the pattern will have been compiled (and optionally
+studied) in the same process that calls <b>pcre_exec()</b>. 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 discussion
+about this, see the
+<a href="pcreprecompile.html"><b>pcreprecompile</b></a>
+documentation.
+</P>
+<P>
+Here is an example of a simple call to <b>pcre_exec()</b>:
+<pre>
+ int rc;
+ int ovector[30];
+ rc = pcre_exec(
+ re, /* result of pcre_compile() */
+ NULL, /* we didn't study the pattern */
+ "some string", /* the subject string */
+ 11, /* the length of the subject string */
+ 0, /* start at offset 0 in the subject */
+ 0, /* default options */
+ ovector, /* vector of integers for substring information */
+ 30); /* number of elements in the vector (NOT size in bytes) */
+<a name="extradata"></a></PRE>
+</P>
+<br><b>
+Extra data for <b>pcre_exec()</b>
+</b><br>
+<P>
+If the <i>extra</i> argument is not NULL, it must point to a <b>pcre_extra</b>
+data block. The <b>pcre_study()</b> function returns such a block (when it
+doesn't return NULL), but you can also create one for yourself, and pass
+additional information in it. The fields in a <b>pcre_extra</b> block are as
+follows:
+<pre>
+ unsigned long int <i>flags</i>;
+ void *<i>study_data</i>;
+ unsigned long int <i>match_limit</i>;
+ void *<i>callout_data</i>;
+ const unsigned char *<i>tables</i>;
+</pre>
+The <i>flags</i> field is a bitmap that specifies which of the other fields
+are set. The flag bits are:
+<pre>
+ PCRE_EXTRA_STUDY_DATA
+ PCRE_EXTRA_MATCH_LIMIT
+ PCRE_EXTRA_CALLOUT_DATA
+ PCRE_EXTRA_TABLES
+</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
+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 flag bits.
+</P>
+<P>
+The <i>match_limit</i> field provides a means of preventing PCRE from using up a
+vast amount of resources when running patterns that are not going to match,
+but which have a very large number of possibilities in their search trees. The
+classic example is the use of nested unlimited repeats.
+</P>
+<P>
+Internally, PCRE uses a function called <b>match()</b> which it calls repeatedly
+(sometimes recursively). The limit is imposed on the number of times this
+function is called during a match, which has the effect of limiting the amount
+of recursion and backtracking that can take place. For patterns that are not
+anchored, the count starts from zero for each position in the subject string.
+</P>
+<P>
+The default limit for the library can be set when PCRE is built; the default
+default is 10 million, which handles all but the most extreme cases. You can
+reduce the default by suppling <b>pcre_exec()</b> with a <b>pcre_extra</b> block
+in which <i>match_limit</i> is set to a smaller value, and
+PCRE_EXTRA_MATCH_LIMIT is set in the <i>flags</i> field. If the limit is
+exceeded, <b>pcre_exec()</b> returns PCRE_ERROR_MATCHLIMIT.
+</P>
+<P>
+The <i>pcre_callout</i> field is used in conjunction with the "callout" feature,
+which is described in the
+<a href="pcrecallout.html"><b>pcrecallout</b></a>
+documentation.
+</P>
+<P>
+The <i>tables</i> field is used to pass a character tables pointer to
+<b>pcre_exec()</b>; 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 <b>pcre_compile()</b> via its <i>tableptr</i> argument.
+If NULL is passed to <b>pcre_exec()</b> 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 <b>pcre_exec()</b> is
+called. See the
+<a href="pcreprecompile.html"><b>pcreprecompile</b></a>
+documentation for a discussion of saving compiled patterns for later use.
+</P>
+<br><b>
+Option bits for <b>pcre_exec()</b>
+</b><br>
+<P>
+The unused bits of the <i>options</i> argument for <b>pcre_exec()</b> must be
+zero. The only bits that may be set are PCRE_ANCHORED, PCRE_NOTBOL,
+PCRE_NOTEOL, PCRE_NOTEMPTY, PCRE_NO_UTF8_CHECK and PCRE_PARTIAL.
+<pre>
+ PCRE_ANCHORED
+</pre>
+The PCRE_ANCHORED option limits <b>pcre_exec()</b> 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.
+<pre>
+ PCRE_NOTBOL
+</pre>
+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 behaviour of the circumflex
+metacharacter. It does not affect \A.
+<pre>
+ PCRE_NOTEOL
+</pre>
+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 without PCRE_MULTILINE (at
+compile time) causes dollar never to match. This option affects only the
+behaviour of the dollar metacharacter. It does not affect \Z or \z.
+<pre>
+ PCRE_NOTEMPTY
+</pre>
+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 example, if the pattern
+<pre>
+ a?b?
+</pre>
+is applied to a string not beginning with "a" or "b", it matches the empty
+string at the start of the subject. With PCRE_NOTEMPTY set, this match is not
+valid, so PCRE searches further into the string for occurrences of "a" or "b".
+</P>
+<P>
+Perl has no direct equivalent of PCRE_NOTEMPTY, but it does make a special case
+of a pattern match of the empty string within its <b>split()</b> function, and
+when using the /g modifier. It is possible to emulate Perl's behaviour after
+matching a null string by first trying the match again at the same offset with
+PCRE_NOTEMPTY and PCRE_ANCHORED, and then if that fails by advancing the
+starting offset (see below) and trying an ordinary match again. There is some
+code that demonstrates how to do this in the <i>pcredemo.c</i> sample program.
+<pre>
+ PCRE_NO_UTF8_CHECK
+</pre>
+When PCRE_UTF8 is set at compile time, the validity of the subject as a UTF-8
+string is automatically checked when <b>pcre_exec()</b> is subsequently called.
+The value of <i>startoffset</i> is also checked to ensure that it points to the
+start of a UTF-8 character. If an invalid UTF-8 sequence of bytes is found,
+<b>pcre_exec()</b> returns the error PCRE_ERROR_BADUTF8. If <i>startoffset</i>
+contains an invalid value, PCRE_ERROR_BADUTF8_OFFSET is returned.
+</P>
+<P>
+If you already know that your subject is valid, and you want to skip these
+checks for performance reasons, you can set the PCRE_NO_UTF8_CHECK option when
+calling <b>pcre_exec()</b>. You might want to do this for the second and
+subsequent calls to <b>pcre_exec()</b> if you are making repeated calls to find
+all the matches in a single subject string. However, you should be sure that
+the value of <i>startoffset</i> points to the start of a UTF-8 character. When
+PCRE_NO_UTF8_CHECK is set, the effect of passing an invalid UTF-8 string as a
+subject, or a value of <i>startoffset</i> that does not point to the start of a
+UTF-8 character, is undefined. Your program may crash.
+<pre>
+ PCRE_PARTIAL
+</pre>
+This option turns on the partial matching feature. If the subject string fails
+to match the pattern, but at some point during the matching process the end of
+the subject was reached (that is, the subject partially matches the pattern and
+the failure to match occurred only because there were not enough subject
+characters), <b>pcre_exec()</b> returns PCRE_ERROR_PARTIAL instead of
+PCRE_ERROR_NOMATCH. When PCRE_PARTIAL is used, there are restrictions on what
+may appear in the pattern. These are discussed in the
+<a href="pcrepartial.html"><b>pcrepartial</b></a>
+documentation.
+</P>
+<br><b>
+The string to be matched by <b>pcre_exec()</b>
+</b><br>
+<P>
+The subject string is passed to <b>pcre_exec()</b> as a pointer in
+<i>subject</i>, a length in <i>length</i>, and a starting byte offset in
+<i>startoffset</i>. In UTF-8 mode, the byte offset must point to the start of a
+UTF-8 character. Unlike the pattern string, the subject may contain binary zero
+bytes. When the starting offset is zero, the search for a match starts at the
+beginning of the subject, and this is by far the most common case.
+</P>
+<P>
+A non-zero starting offset is useful when searching for another match in the
+same subject by calling <b>pcre_exec()</b> again after a previous success.
+Setting <i>startoffset</i> differs from just passing over a shortened string and
+setting PCRE_NOTBOL in the case of a pattern that begins with any kind of
+lookbehind. For example, consider the pattern
+<pre>
+ \Biss\B
+</pre>
+which finds occurrences of "iss" in the middle of words. (\B matches only if
+the current position in the subject is not a word boundary.) When applied to
+the string "Mississipi" the first call to <b>pcre_exec()</b> finds the first
+occurrence. If <b>pcre_exec()</b> is called again with just the remainder of the
+subject, namely "issipi", it does not match, because \B is always false at the
+start of the subject, which is deemed to be a word boundary. However, if
+<b>pcre_exec()</b> is passed the entire string again, but with <i>startoffset</i>
+set to 4, it finds the second occurrence of "iss" because it is able to look
+behind the starting point to discover that it is preceded by a letter.
+</P>
+<P>
+If a non-zero starting offset is passed when the pattern is anchored, one
+attempt to match at the given offset is made. This can only succeed if the
+pattern does not require the match to be at the start of the subject.
+</P>
+<br><b>
+How <b>pcre_exec()</b> returns captured substrings
+</b><br>
+<P>
+In general, a pattern matches a certain portion of the subject, and in
+addition, further substrings from the subject may be picked out by parts of the
+pattern. Following the usage in Jeffrey Friedl's book, this is called
+"capturing" in what follows, and the phrase "capturing subpattern" is used for
+a fragment of a pattern that picks out a substring. PCRE supports several other
+kinds of parenthesized subpattern that do not cause substrings to be captured.
+</P>
+<P>
+Captured substrings are returned to the caller via a vector of integer offsets
+whose address is passed in <i>ovector</i>. The number of elements in the vector
+is passed in <i>ovecsize</i>, which must be a non-negative number. <b>Note</b>:
+this argument is NOT the size of <i>ovector</i> in bytes.
+</P>
+<P>
+The first two-thirds of the vector is used to pass back captured substrings,
+each substring using a pair of integers. The remaining third of the vector is
+used as workspace by <b>pcre_exec()</b> while matching capturing subpatterns,
+and is not available for passing back information. The length passed in
+<i>ovecsize</i> should always be a multiple of three. If it is not, it is
+rounded down.
+</P>
+<P>
+When a match is successful, information about captured substrings is returned
+in pairs of integers, starting at the beginning of <i>ovector</i>, and
+continuing up to two-thirds of its length at the most. The first element of a
+pair is set to the offset of the first character in a substring, and the second
+is set to the offset of the first character after the end of a substring. The
+first pair, <i>ovector[0]</i> and <i>ovector[1]</i>, identify the portion of the
+subject string matched by the entire pattern. The next pair is used for the
+first capturing subpattern, and so on. The value returned by <b>pcre_exec()</b>
+is the number of pairs that have been set. If there are no capturing
+subpatterns, the return value from a successful match is 1, indicating that
+just the first pair of offsets has been set.
+</P>
+<P>
+Some convenience functions are provided for extracting the captured substrings
+as separate strings. These are described in the following section.
+</P>
+<P>
+It is possible for an capturing subpattern number <i>n+1</i> to match some
+part of the subject when subpattern <i>n</i> has not been used at all. For
+example, if the string "abc" is matched against the pattern (a|(z))(bc)
+subpatterns 1 and 3 are matched, but 2 is not. When this happens, both offset
+values corresponding to the unused subpattern are set to -1.
+</P>
+<P>
+If a capturing subpattern is matched repeatedly, it is the last portion of the
+string that it matched that is returned.
+</P>
+<P>
+If the vector is too small to hold all the captured substring offsets, it is
+used as far as possible (up to two-thirds of its length), and the function
+returns a value of zero. In particular, if the substring offsets are not of
+interest, <b>pcre_exec()</b> may be called with <i>ovector</i> passed as NULL and
+<i>ovecsize</i> as zero. However, if the pattern contains back references and
+the <i>ovector</i> is not big enough to remember the related substrings, PCRE
+has to get additional memory for use during matching. Thus it is usually
+advisable to supply an <i>ovector</i>.
+</P>
+<P>
+Note that <b>pcre_info()</b> can be used to find out how many capturing
+subpatterns there are in a compiled pattern. The smallest size for
+<i>ovector</i> that will allow for <i>n</i> captured substrings, in addition to
+the offsets of the substring matched by the whole pattern, is (<i>n</i>+1)*3.
+</P>
+<br><b>
+Return values from <b>pcre_exec()</b>
+</b><br>
+<P>
+If <b>pcre_exec()</b> fails, it returns a negative number. The following are
+defined in the header file:
+<pre>
+ PCRE_ERROR_NOMATCH (-1)
+</pre>
+The subject string did not match the pattern.
+<pre>
+ PCRE_ERROR_NULL (-2)
+</pre>
+Either <i>code</i> or <i>subject</i> was passed as NULL, or <i>ovector</i> was
+NULL and <i>ovecsize</i> was not zero.
+<pre>
+ PCRE_ERROR_BADOPTION (-3)
+</pre>
+An unrecognized bit was set in the <i>options</i> argument.
+<pre>
+ PCRE_ERROR_BADMAGIC (-4)
+</pre>
+PCRE stores a 4-byte "magic number" at the start of the compiled code, to catch
+the case when it is passed a junk pointer and to detect when a pattern that was
+compiled in an environment of one endianness is run in an environment with the
+other endianness. This is the error that PCRE gives when the magic number is
+not present.
+<pre>
+ PCRE_ERROR_UNKNOWN_NODE (-5)
+</pre>
+While running the pattern match, an unknown item was encountered in the
+compiled pattern. This error could be caused by a bug in PCRE or by overwriting
+of the compiled pattern.
+<pre>
+ PCRE_ERROR_NOMEMORY (-6)
+</pre>
+If a pattern contains back references, but the <i>ovector</i> that is passed to
+<b>pcre_exec()</b> is not big enough to remember the referenced substrings, PCRE
+gets a block of memory at the start of matching to use for this purpose. If the
+call via <b>pcre_malloc()</b> fails, this error is given. The memory is
+automatically freed at the end of matching.
+<pre>
+ PCRE_ERROR_NOSUBSTRING (-7)
+</pre>
+This error is used by the <b>pcre_copy_substring()</b>,
+<b>pcre_get_substring()</b>, and <b>pcre_get_substring_list()</b> functions (see
+below). It is never returned by <b>pcre_exec()</b>.
+<pre>
+ PCRE_ERROR_MATCHLIMIT (-8)
+</pre>
+The recursion and backtracking limit, as specified by the <i>match_limit</i>
+field in a <b>pcre_extra</b> structure (or defaulted) was reached. See the
+description above.
+<pre>
+ PCRE_ERROR_CALLOUT (-9)
+</pre>
+This error is never generated by <b>pcre_exec()</b> itself. It is provided for
+use by callout functions that want to yield a distinctive error code. See the
+<a href="pcrecallout.html"><b>pcrecallout</b></a>
+documentation for details.
+<pre>
+ PCRE_ERROR_BADUTF8 (-10)
+</pre>
+A string that contains an invalid UTF-8 byte sequence was passed as a subject.
+<pre>
+ PCRE_ERROR_BADUTF8_OFFSET (-11)
+</pre>
+The UTF-8 byte sequence that was passed as a subject was valid, but the value
+of <i>startoffset</i> did not point to the beginning of a UTF-8 character.
+<pre>
+ PCRE_ERROR_PARTIAL (-12)
+</pre>
+The subject string did not match, but it did match partially. See the
+<a href="pcrepartial.html"><b>pcrepartial</b></a>
+documentation for details of partial matching.
+<pre>
+ PCRE_ERROR_BAD_PARTIAL (-13)
+</pre>
+The PCRE_PARTIAL option was used with a compiled pattern containing items that
+are not supported for partial matching. See the
+<a href="pcrepartial.html"><b>pcrepartial</b></a>
+documentation for details of partial matching.
+<pre>
+ PCRE_ERROR_INTERNAL (-14)
+</pre>
+An unexpected internal error has occurred. This error could be caused by a bug
+in PCRE or by overwriting of the compiled pattern.
+<pre>
+ PCRE_ERROR_BADCOUNT (-15)
+</pre>
+This error is given if the value of the <i>ovecsize</i> argument is negative.
+</P>
+<br><a name="SEC12" href="#TOC1">EXTRACTING CAPTURED SUBSTRINGS BY NUMBER</a><br>
+<P>
+<b>int pcre_copy_substring(const char *<i>subject</i>, int *<i>ovector</i>,</b>
+<b>int <i>stringcount</i>, int <i>stringnumber</i>, char *<i>buffer</i>,</b>
+<b>int <i>buffersize</i>);</b>
+</P>
+<P>
+<b>int pcre_get_substring(const char *<i>subject</i>, int *<i>ovector</i>,</b>
+<b>int <i>stringcount</i>, int <i>stringnumber</i>,</b>
+<b>const char **<i>stringptr</i>);</b>
+</P>
+<P>
+<b>int pcre_get_substring_list(const char *<i>subject</i>,</b>
+<b>int *<i>ovector</i>, int <i>stringcount</i>, const char ***<i>listptr</i>);</b>
+</P>
+<P>
+Captured substrings can be accessed directly by using the offsets returned by
+<b>pcre_exec()</b> in <i>ovector</i>. For convenience, the functions
+<b>pcre_copy_substring()</b>, <b>pcre_get_substring()</b>, and
+<b>pcre_get_substring_list()</b> are provided for extracting captured substrings
+as new, separate, zero-terminated strings. These functions identify substrings
+by number. The next section describes functions for extracting named
+substrings. A substring that contains a binary zero is correctly extracted and
+has a further zero added on the end, but the result is not, of course,
+a C string.
+</P>
+<P>
+The first three arguments are the same for all three of these functions:
+<i>subject</i> is the subject string that has just been successfully matched,
+<i>ovector</i> is a pointer to the vector of integer offsets that was passed to
+<b>pcre_exec()</b>, and <i>stringcount</i> is the number of substrings that were
+captured by the match, including the substring that matched the entire regular
+expression. This is the value returned by <b>pcre_exec()</b> if it is greater
+than zero. If <b>pcre_exec()</b> returned zero, indicating that it ran out of
+space in <i>ovector</i>, the value passed as <i>stringcount</i> should be the
+number of elements in the vector divided by three.
+</P>
+<P>
+The functions <b>pcre_copy_substring()</b> and <b>pcre_get_substring()</b>
+extract a single substring, whose number is given as <i>stringnumber</i>. A
+value of zero extracts the substring that matched the entire pattern, whereas
+higher values extract the captured substrings. For <b>pcre_copy_substring()</b>,
+the string is placed in <i>buffer</i>, whose length is given by
+<i>buffersize</i>, while for <b>pcre_get_substring()</b> a new block of memory is
+obtained via <b>pcre_malloc</b>, and its address is returned via
+<i>stringptr</i>. The yield of the function is the length of the string, not
+including the terminating zero, or one of
+<pre>
+ PCRE_ERROR_NOMEMORY (-6)
+</pre>
+The buffer was too small for <b>pcre_copy_substring()</b>, or the attempt to get
+memory failed for <b>pcre_get_substring()</b>.
+<pre>
+ PCRE_ERROR_NOSUBSTRING (-7)
+</pre>
+There is no substring whose number is <i>stringnumber</i>.
+</P>
+<P>
+The <b>pcre_get_substring_list()</b> function extracts all available substrings
+and builds a list of pointers to them. All this is done in a single block of
+memory that is obtained via <b>pcre_malloc</b>. The address of the memory block
+is returned via <i>listptr</i>, which is also the start of the list of string
+pointers. The end of the list is marked by a NULL pointer. The yield of the
+function is zero if all went well, or
+<pre>
+ PCRE_ERROR_NOMEMORY (-6)
+</pre>
+if the attempt to get the memory block failed.
+</P>
+<P>
+When any of these functions encounter a substring that is unset, which can
+happen when capturing subpattern number <i>n+1</i> matches some part of the
+subject, but subpattern <i>n</i> has not been used at all, they return an empty
+string. This can be distinguished from a genuine zero-length substring by
+inspecting the appropriate offset in <i>ovector</i>, which is negative for unset
+substrings.
+</P>
+<P>
+The two convenience functions <b>pcre_free_substring()</b> and
+<b>pcre_free_substring_list()</b> can be used to free the memory returned by
+a previous call of <b>pcre_get_substring()</b> or
+<b>pcre_get_substring_list()</b>, respectively. They do nothing more than call
+the function pointed to by <b>pcre_free</b>, which of course could be called
+directly from a C program. However, PCRE is used in some situations where it is
+linked via a special interface to another programming language which cannot use
+<b>pcre_free</b> directly; it is for these cases that the functions are
+provided.
+</P>
+<br><a name="SEC13" href="#TOC1">EXTRACTING CAPTURED SUBSTRINGS BY NAME</a><br>
+<P>
+<b>int pcre_get_stringnumber(const pcre *<i>code</i>,</b>
+<b>const char *<i>name</i>);</b>
+</P>
+<P>
+<b>int pcre_copy_named_substring(const pcre *<i>code</i>,</b>
+<b>const char *<i>subject</i>, int *<i>ovector</i>,</b>
+<b>int <i>stringcount</i>, const char *<i>stringname</i>,</b>
+<b>char *<i>buffer</i>, int <i>buffersize</i>);</b>
+</P>
+<P>
+<b>int pcre_get_named_substring(const pcre *<i>code</i>,</b>
+<b>const char *<i>subject</i>, int *<i>ovector</i>,</b>
+<b>int <i>stringcount</i>, const char *<i>stringname</i>,</b>
+<b>const char **<i>stringptr</i>);</b>
+</P>
+<P>
+To extract a substring by name, you first have to find associated number.
+For example, for this pattern
+<pre>
+ (a+)b(?&#60;xxx&#62;\d+)...
+</pre>
+the number of the subpattern called "xxx" is 2. You can find the number from
+the name by calling <b>pcre_get_stringnumber()</b>. The first argument is the
+compiled pattern, and the second is the name. The yield of the function is the
+subpattern number, or PCRE_ERROR_NOSUBSTRING (-7) if there is no subpattern of
+that name.
+</P>
+<P>
+Given the number, you can extract the substring directly, or use one of the
+functions described in the previous section. For convenience, there are also
+two functions that do the whole job.
+</P>
+<P>
+Most of the arguments of <i>pcre_copy_named_substring()</i> and
+<i>pcre_get_named_substring()</i> are the same as those for the similarly named
+functions that extract by number. As these are described in the previous
+section, they are not re-described here. There are just two differences:
+</P>
+<P>
+First, instead of a substring number, a substring name is given. Second, there
+is an extra argument, given at the start, which is a pointer to the compiled
+pattern. This is needed in order to gain access to the name-to-number
+translation table.
+</P>
+<P>
+These functions call <b>pcre_get_stringnumber()</b>, and if it succeeds, they
+then call <i>pcre_copy_substring()</i> or <i>pcre_get_substring()</i>, as
+appropriate.
+</P>
+<P>
+Last updated: 09 September 2004
+<br>
+Copyright &copy; 1997-2004 University of Cambridge.
+<p>
+Return to the <a href="index.html">PCRE index page</a>.
+</p>
diff --git a/srclib/pcre/doc/html/pcrebuild.html b/srclib/pcre/doc/html/pcrebuild.html
new file mode 100644
index 0000000000..98c7d27e6e
--- /dev/null
+++ b/srclib/pcre/doc/html/pcrebuild.html
@@ -0,0 +1,186 @@
+<html>
+<head>
+<title>pcrebuild specification</title>
+</head>
+<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
+<h1>pcrebuild man page</h1>
+<p>
+Return to the <a href="index.html">PCRE index page</a>.
+</p>
+<p>
+This page is part of the PCRE HTML documentation. It was generated automatically
+from the original man page. If there is any nonsense in it, please consult the
+man page, in case the conversion went wrong.
+<br>
+<ul>
+<li><a name="TOC1" href="#SEC1">PCRE BUILD-TIME OPTIONS</a>
+<li><a name="TOC2" href="#SEC2">UTF-8 SUPPORT</a>
+<li><a name="TOC3" href="#SEC3">UNICODE CHARACTER PROPERTY SUPPORT</a>
+<li><a name="TOC4" href="#SEC4">CODE VALUE OF NEWLINE</a>
+<li><a name="TOC5" href="#SEC5">BUILDING SHARED AND STATIC LIBRARIES</a>
+<li><a name="TOC6" href="#SEC6">POSIX MALLOC USAGE</a>
+<li><a name="TOC7" href="#SEC7">LIMITING PCRE RESOURCE USAGE</a>
+<li><a name="TOC8" href="#SEC8">HANDLING VERY LARGE PATTERNS</a>
+<li><a name="TOC9" href="#SEC9">AVOIDING EXCESSIVE STACK USAGE</a>
+<li><a name="TOC10" href="#SEC10">USING EBCDIC CODE</a>
+</ul>
+<br><a name="SEC1" href="#TOC1">PCRE BUILD-TIME OPTIONS</a><br>
+<P>
+This document describes the optional features of PCRE that can be selected when
+the library is compiled. They are all selected, or deselected, by providing
+options to the <b>configure</b> script that is run before the <b>make</b>
+command. The complete list of options for <b>configure</b> (which includes the
+standard ones such as the selection of the installation directory) can be
+obtained by running
+<pre>
+ ./configure --help
+</pre>
+The following sections describe certain options whose names begin with --enable
+or --disable. These settings specify changes to the defaults for the
+<b>configure</b> command. Because of the way that <b>configure</b> works,
+--enable and --disable always come in pairs, so the complementary option always
+exists as well, but as it specifies the default, it is not described.
+</P>
+<br><a name="SEC2" href="#TOC1">UTF-8 SUPPORT</a><br>
+<P>
+To build PCRE with support for UTF-8 character strings, add
+<pre>
+ --enable-utf8
+</pre>
+to the <b>configure</b> command. Of itself, this does not make PCRE treat
+strings as UTF-8. As well as compiling PCRE with this option, you also have
+have to set the PCRE_UTF8 option when you call the <b>pcre_compile()</b>
+function.
+</P>
+<br><a name="SEC3" href="#TOC1">UNICODE CHARACTER PROPERTY SUPPORT</a><br>
+<P>
+UTF-8 support allows PCRE to process character values greater than 255 in the
+strings that it handles. On its own, however, it does not provide any
+facilities for accessing the properties of such characters. If you want to be
+able to use the pattern escapes \P, \p, and \X, which refer to Unicode
+character properties, you must add
+<pre>
+ --enable-unicode-properties
+</pre>
+to the <b>configure</b> command. This implies UTF-8 support, even if you have
+not explicitly requested it.
+</P>
+<P>
+Including Unicode property support adds around 90K of tables to the PCRE
+library, approximately doubling its size. Only the general category properties
+such as <i>Lu</i> and <i>Nd</i> are supported. Details are given in the
+<a href="pcrepattern.html"><b>pcrepattern</b></a>
+documentation.
+</P>
+<br><a name="SEC4" href="#TOC1">CODE VALUE OF NEWLINE</a><br>
+<P>
+By default, PCRE treats character 10 (linefeed) as the newline character. This
+is the normal newline character on Unix-like systems. You can compile PCRE to
+use character 13 (carriage return) instead by adding
+<pre>
+ --enable-newline-is-cr
+</pre>
+to the <b>configure</b> command. For completeness there is also a
+--enable-newline-is-lf option, which explicitly specifies linefeed as the
+newline character.
+</P>
+<br><a name="SEC5" href="#TOC1">BUILDING SHARED AND STATIC LIBRARIES</a><br>
+<P>
+The PCRE building process uses <b>libtool</b> to build both shared and static
+Unix libraries by default. You can suppress one of these by adding one of
+<pre>
+ --disable-shared
+ --disable-static
+</pre>
+to the <b>configure</b> command, as required.
+</P>
+<br><a name="SEC6" href="#TOC1">POSIX MALLOC USAGE</a><br>
+<P>
+When PCRE is called through the POSIX interface (see the
+<a href="pcreposix.html"><b>pcreposix</b></a>
+documentation), additional working storage is required for holding the pointers
+to capturing substrings, because PCRE requires three integers per substring,
+whereas the POSIX interface provides only two. If the number of expected
+substrings is small, the wrapper function uses space on the stack, because this
+is faster than using <b>malloc()</b> for each call. The default threshold above
+which the stack is no longer used is 10; it can be changed by adding a setting
+such as
+<pre>
+ --with-posix-malloc-threshold=20
+</pre>
+to the <b>configure</b> command.
+</P>
+<br><a name="SEC7" href="#TOC1">LIMITING PCRE RESOURCE USAGE</a><br>
+<P>
+Internally, PCRE has a function called <b>match()</b>, which it calls repeatedly
+(possibly recursively) when matching a pattern. By controlling the maximum
+number of times this function may be called during a single matching operation,
+a limit can be placed on the resources used by a single call to
+<b>pcre_exec()</b>. The limit can be changed at run time, as described in the
+<a href="pcreapi.html"><b>pcreapi</b></a>
+documentation. The default is 10 million, but this can be changed by adding a
+setting such as
+<pre>
+ --with-match-limit=500000
+</pre>
+to the <b>configure</b> command.
+</P>
+<br><a name="SEC8" href="#TOC1">HANDLING VERY LARGE PATTERNS</a><br>
+<P>
+Within a compiled pattern, offset values are used to point from one part to
+another (for example, from an opening parenthesis to an alternation
+metacharacter). By default, two-byte values are used for these offsets, leading
+to a maximum size for a compiled pattern of around 64K. This is sufficient to
+handle all but the most gigantic patterns. Nevertheless, some people do want to
+process enormous patterns, so it is possible to compile PCRE to use three-byte
+or four-byte offsets by adding a setting such as
+<pre>
+ --with-link-size=3
+</pre>
+to the <b>configure</b> command. The value given must be 2, 3, or 4. Using
+longer offsets slows down the operation of PCRE because it has to load
+additional bytes when handling them.
+</P>
+<P>
+If you build PCRE with an increased link size, test 2 (and test 5 if you are
+using UTF-8) will fail. Part of the output of these tests is a representation
+of the compiled pattern, and this changes with the link size.
+</P>
+<br><a name="SEC9" href="#TOC1">AVOIDING EXCESSIVE STACK USAGE</a><br>
+<P>
+PCRE implements backtracking while matching by making recursive calls to an
+internal function called <b>match()</b>. In environments where the size of the
+stack is limited, this can severely limit PCRE's operation. (The Unix
+environment does not usually suffer from this problem.) An alternative approach
+that uses memory from the heap to remember data, instead of using recursive
+function calls, has been implemented to work round this problem. If you want to
+build a version of PCRE that works this way, add
+<pre>
+ --disable-stack-for-recursion
+</pre>
+to the <b>configure</b> command. With this configuration, PCRE will use the
+<b>pcre_stack_malloc</b> and <b>pcre_stack_free</b> variables to call memory
+management functions. Separate functions are provided because the usage is very
+predictable: the block sizes requested are always the same, and the blocks are
+always freed in reverse order. A calling program might be able to implement
+optimized functions that perform better than the standard <b>malloc()</b> and
+<b>free()</b> functions. PCRE runs noticeably more slowly when built in this
+way.
+</P>
+<br><a name="SEC10" href="#TOC1">USING EBCDIC CODE</a><br>
+<P>
+PCRE assumes by default that it will run in an environment where the character
+code is ASCII (or Unicode, which is a superset of ASCII). PCRE can, however, be
+compiled to run in an EBCDIC environment by adding
+<pre>
+ --enable-ebcdic
+</pre>
+to the <b>configure</b> command.
+</P>
+<P>
+Last updated: 09 September 2004
+<br>
+Copyright &copy; 1997-2004 University of Cambridge.
+<p>
+Return to the <a href="index.html">PCRE index page</a>.
+</p>
diff --git a/srclib/pcre/doc/html/pcrecallout.html b/srclib/pcre/doc/html/pcrecallout.html
new file mode 100644
index 0000000000..dc2ef51697
--- /dev/null
+++ b/srclib/pcre/doc/html/pcrecallout.html
@@ -0,0 +1,180 @@
+<html>
+<head>
+<title>pcrecallout specification</title>
+</head>
+<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
+<h1>pcrecallout man page</h1>
+<p>
+Return to the <a href="index.html">PCRE index page</a>.
+</p>
+<p>
+This page is part of the PCRE HTML documentation. It was generated automatically
+from the original man page. If there is any nonsense in it, please consult the
+man page, in case the conversion went wrong.
+<br>
+<ul>
+<li><a name="TOC1" href="#SEC1">PCRE CALLOUTS</a>
+<li><a name="TOC2" href="#SEC2">MISSING CALLOUTS</a>
+<li><a name="TOC3" href="#SEC3">THE CALLOUT INTERFACE</a>
+<li><a name="TOC4" href="#SEC4">RETURN VALUES</a>
+</ul>
+<br><a name="SEC1" href="#TOC1">PCRE CALLOUTS</a><br>
+<P>
+<b>int (*pcre_callout)(pcre_callout_block *);</b>
+</P>
+<P>
+PCRE provides a feature called "callout", which is a means of temporarily
+passing control to the caller of PCRE in the middle of pattern matching. The
+caller of PCRE provides an external function by putting its entry point in the
+global variable <i>pcre_callout</i>. By default, this variable contains NULL,
+which disables all calling out.
+</P>
+<P>
+Within a regular expression, (?C) indicates the points at which the external
+function is to be called. Different callout points can be identified by putting
+a number less than 256 after the letter C. The default value is zero.
+For example, this pattern has two callout points:
+<pre>
+ (?C1)\deabc(?C2)def
+</pre>
+If the PCRE_AUTO_CALLOUT option bit is set when <b>pcre_compile()</b> is called,
+PCRE automatically inserts callouts, all with number 255, before each item in
+the pattern. For example, if PCRE_AUTO_CALLOUT is used with the pattern
+<pre>
+ A(\d{2}|--)
+</pre>
+it is processed as if it were
+<br>
+<br>
+(?C255)A(?C255)((?C255)\d{2}(?C255)|(?C255)-(?C255)-(?C255))(?C255)
+<br>
+<br>
+Notice that there is a callout before and after each parenthesis and
+alternation bar. Automatic callouts can be used for tracking the progress of
+pattern matching. The
+<a href="pcretest.html"><b>pcretest</b></a>
+command has an option that sets automatic callouts; when it is used, the output
+indicates how the pattern is matched. This is useful information when you are
+trying to optimize the performance of a particular pattern.
+</P>
+<br><a name="SEC2" href="#TOC1">MISSING CALLOUTS</a><br>
+<P>
+You should be aware that, because of optimizations in the way PCRE matches
+patterns, callouts sometimes do not happen. For example, if the pattern is
+<pre>
+ ab(?C4)cd
+</pre>
+PCRE knows that any matching string must contain the letter "d". If the subject
+string is "abyz", the lack of "d" means that matching doesn't ever start, and
+the callout is never reached. However, with "abyd", though the result is still
+no match, the callout is obeyed.
+</P>
+<br><a name="SEC3" href="#TOC1">THE CALLOUT INTERFACE</a><br>
+<P>
+During matching, when PCRE reaches a callout point, the external function
+defined by <i>pcre_callout</i> is called (if it is set). The only argument is a
+pointer to a <b>pcre_callout</b> block. This structure contains the following
+fields:
+<pre>
+ int <i>version</i>;
+ int <i>callout_number</i>;
+ int *<i>offset_vector</i>;
+ const char *<i>subject</i>;
+ int <i>subject_length</i>;
+ int <i>start_match</i>;
+ int <i>current_position</i>;
+ int <i>capture_top</i>;
+ int <i>capture_last</i>;
+ void *<i>callout_data</i>;
+ int <i>pattern_position</i>;
+ int <i>next_item_length</i>;
+</pre>
+The <i>version</i> field is an integer containing the version number of the
+block format. The initial version was 0; the current version is 1. The version
+number will change again in future if additional fields are added, but the
+intention is never to remove any of the existing fields.
+</P>
+<P>
+The <i>callout_number</i> field contains the number of the callout, as compiled
+into the pattern (that is, the number after ?C for manual callouts, and 255 for
+automatically generated callouts).
+</P>
+<P>
+The <i>offset_vector</i> field is a pointer to the vector of offsets that was
+passed by the caller to <b>pcre_exec()</b>. The contents can be inspected in
+order to extract substrings that have been matched so far, in the same way as
+for extracting substrings after a match has completed.
+</P>
+<P>
+The <i>subject</i> and <i>subject_length</i> fields contain copies of the values
+that were passed to <b>pcre_exec()</b>.
+</P>
+<P>
+The <i>start_match</i> field contains the offset within the subject at which the
+current match attempt started. If the pattern is not anchored, the callout
+function may be called several times from the same point in the pattern for
+different starting points in the subject.
+</P>
+<P>
+The <i>current_position</i> field contains the offset within the subject of the
+current match pointer.
+</P>
+<P>
+The <i>capture_top</i> field contains one more than the number of the highest
+numbered captured substring so far. If no substrings have been captured,
+the value of <i>capture_top</i> is one.
+</P>
+<P>
+The <i>capture_last</i> field contains the number of the most recently captured
+substring. If no substrings have been captured, its value is -1.
+</P>
+<P>
+The <i>callout_data</i> field contains a value that is passed to
+<b>pcre_exec()</b> by the caller specifically so that it can be passed back in
+callouts. It is passed in the <i>pcre_callout</i> field of the <b>pcre_extra</b>
+data structure. If no such data was passed, the value of <i>callout_data</i> in
+a <b>pcre_callout</b> block is NULL. There is a description of the
+<b>pcre_extra</b> structure in the
+<a href="pcreapi.html"><b>pcreapi</b></a>
+documentation.
+</P>
+<P>
+The <i>pattern_position</i> field is present from version 1 of the
+<i>pcre_callout</i> structure. It contains the offset to the next item to be
+matched in the pattern string.
+</P>
+<P>
+The <i>next_item_length</i> field is present from version 1 of the
+<i>pcre_callout</i> structure. It contains the length of the next item to be
+matched in the pattern string. When the callout immediately precedes an
+alternation bar, a closing parenthesis, or the end of the pattern, the length
+is zero. When the callout precedes an opening parenthesis, the length is that
+of the entire subpattern.
+</P>
+<P>
+The <i>pattern_position</i> and <i>next_item_length</i> fields are intended to
+help in distinguishing between different automatic callouts, which all have the
+same callout number. However, they are set for all callouts.
+</P>
+<br><a name="SEC4" href="#TOC1">RETURN VALUES</a><br>
+<P>
+The external callout function returns an integer to PCRE. If the value is zero,
+matching proceeds as normal. If the value is greater than zero, matching fails
+at the current point, but backtracking to test other matching possibilities
+goes ahead, just as if a lookahead assertion had failed. If the value is less
+than zero, the match is abandoned, and <b>pcre_exec()</b> returns the negative
+value.
+</P>
+<P>
+Negative values should normally be chosen from the set of PCRE_ERROR_xxx
+values. In particular, PCRE_ERROR_NOMATCH forces a standard "no match" failure.
+The error number PCRE_ERROR_CALLOUT is reserved for use by callout functions;
+it will never be used by PCRE itself.
+</P>
+<P>
+Last updated: 09 September 2004
+<br>
+Copyright &copy; 1997-2004 University of Cambridge.
+<p>
+Return to the <a href="index.html">PCRE index page</a>.
+</p>
diff --git a/srclib/pcre/doc/html/pcrecompat.html b/srclib/pcre/doc/html/pcrecompat.html
new file mode 100644
index 0000000000..6529c0966a
--- /dev/null
+++ b/srclib/pcre/doc/html/pcrecompat.html
@@ -0,0 +1,150 @@
+<html>
+<head>
+<title>pcrecompat specification</title>
+</head>
+<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
+<h1>pcrecompat man page</h1>
+<p>
+Return to the <a href="index.html">PCRE index page</a>.
+</p>
+<p>
+This page is part of the PCRE HTML documentation. It was generated automatically
+from the original man page. If there is any nonsense in it, please consult the
+man page, in case the conversion went wrong.
+<br>
+<br><b>
+DIFFERENCES BETWEEN PCRE AND PERL
+</b><br>
+<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.8.
+</P>
+<P>
+1. PCRE does not have full UTF-8 support. Details of what it does have are
+given in the
+<a href="pcre.html#utf8support">section on UTF-8 support</a>
+in the main
+<a href="pcre.html"><b>pcre</b></a>
+page.
+</P>
+<P>
+2. PCRE does not allow repeat quantifiers on lookahead assertions. Perl permits
+them, but they do not mean what you might think. For example, (?!a){3} does
+not assert that the next three characters are not "a". It just asserts that the
+next character is not "a" three times.
+</P>
+<P>
+3. Capturing subpatterns that occur inside negative lookahead assertions are
+counted, but their entries in the offsets vector are never set. Perl sets its
+numerical variables from any such patterns that are matched before the
+assertion fails to match something (thereby succeeding), but only if the
+negative lookahead assertion contains just one branch.
+</P>
+<P>
+4. Though binary zero characters are supported in the subject string, they are
+not allowed in a pattern string because it is passed as a normal C string,
+terminated by zero. The escape sequence \0 can be used in the pattern to
+represent a binary zero.
+</P>
+<P>
+5. The following Perl escape sequences are not supported: \l, \u, \L,
+\U, and \N. In fact these are implemented by Perl's general string-handling
+and are not part of its pattern matching engine. If any of these are
+encountered by PCRE, an error is generated.
+</P>
+<P>
+6. The Perl escape sequences \p, \P, and \X are supported only if PCRE is
+built with Unicode character property support. The properties that can be
+tested with \p and \P are limited to the general category properties such as
+Lu and Nd.
+</P>
+<P>
+7. PCRE does support the \Q...\E escape for quoting substrings. Characters in
+between are treated as literals. This is slightly different from Perl in that $
+and @ are also handled as literals inside the quotes. In Perl, they cause
+variable interpolation (but of course PCRE does not have variables). Note the
+following examples:
+<pre>
+ Pattern PCRE matches Perl matches
+
+ \Qabc$xyz\E abc$xyz abc followed by the contents of $xyz
+ \Qabc\$xyz\E abc\$xyz abc\$xyz
+ \Qabc\E\$\Qxyz\E abc$xyz abc$xyz
+</pre>
+The \Q...\E sequence is recognized both inside and outside character classes.
+</P>
+<P>
+8. Fairly obviously, PCRE does not support the (?{code}) and (?p{code})
+constructions. However, there is support for recursive patterns using the
+non-Perl items (?R), (?number), and (?P&#62;name). Also, the PCRE "callout" feature
+allows an external function to be called during pattern matching. See the
+<a href="pcrecallout.html"><b>pcrecallout</b></a>
+documentation for details.
+</P>
+<P>
+9. There are some differences that are concerned with the settings of captured
+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>
+<P>
+10. PCRE provides some extensions to the Perl regular expression facilities:
+<br>
+<br>
+(a) Although lookbehind assertions must match fixed length strings, each
+alternative branch of a lookbehind assertion can match a different length of
+string. Perl requires them all to have the same length.
+<br>
+<br>
+(b) If PCRE_DOLLAR_ENDONLY is set and PCRE_MULTILINE is not set, the $
+meta-character matches only at the very end of the string.
+<br>
+<br>
+(c) If PCRE_EXTRA is set, a backslash followed by a letter with no special
+meaning is faulted.
+<br>
+<br>
+(d) If PCRE_UNGREEDY is set, the greediness of the repetition quantifiers is
+inverted, that is, by default they are not greedy, but if followed by a
+question mark they are.
+<br>
+<br>
+(e) PCRE_ANCHORED can be used at matching time to force a pattern to be tried
+only at the first matching position in the subject string.
+<br>
+<br>
+(f) The PCRE_NOTBOL, PCRE_NOTEOL, PCRE_NOTEMPTY, and PCRE_NO_AUTO_CAPTURE
+options for <b>pcre_exec()</b> have no Perl equivalents.
+<br>
+<br>
+(g) The (?R), (?number), and (?P&#62;name) constructs allows for recursive pattern
+matching (Perl can do this using the (?p{code}) construct, which PCRE cannot
+support.)
+<br>
+<br>
+(h) PCRE supports named capturing substrings, using the Python syntax.
+<br>
+<br>
+(i) PCRE supports the possessive quantifier "++" syntax, taken from Sun's Java
+package.
+<br>
+<br>
+(j) The (R) condition, for testing recursion, is a PCRE extension.
+<br>
+<br>
+(k) The callout facility is PCRE-specific.
+<br>
+<br>
+(l) The partial matching facility is PCRE-specific.
+<br>
+<br>
+(m) Patterns compiled by PCRE can be saved and re-used at a later time, even on
+different hosts that have the other endianness.
+</P>
+<P>
+Last updated: 09 September 2004
+<br>
+Copyright &copy; 1997-2004 University of Cambridge.
+<p>
+Return to the <a href="index.html">PCRE index page</a>.
+</p>
diff --git a/srclib/pcre/doc/html/pcregrep.html b/srclib/pcre/doc/html/pcregrep.html
new file mode 100644
index 0000000000..922487d440
--- /dev/null
+++ b/srclib/pcre/doc/html/pcregrep.html
@@ -0,0 +1,158 @@
+<html>
+<head>
+<title>pcregrep specification</title>
+</head>
+<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
+<h1>pcregrep man page</h1>
+<p>
+Return to the <a href="index.html">PCRE index page</a>.
+</p>
+<p>
+This page is part of the PCRE HTML documentation. It was generated automatically
+from the original man page. If there is any nonsense in it, please consult the
+man page, in case the conversion went wrong.
+<br>
+<ul>
+<li><a name="TOC1" href="#SEC1">SYNOPSIS</a>
+<li><a name="TOC2" href="#SEC2">DESCRIPTION</a>
+<li><a name="TOC3" href="#SEC3">OPTIONS</a>
+<li><a name="TOC4" href="#SEC4">LONG OPTIONS</a>
+<li><a name="TOC5" href="#SEC5">DIAGNOSTICS</a>
+<li><a name="TOC6" href="#SEC6">AUTHOR</a>
+</ul>
+<br><a name="SEC1" href="#TOC1">SYNOPSIS</a><br>
+<P>
+<b>pcregrep [-Vcfhilnrsuvx] [long options] [pattern] [file1 file2 ...]</b>
+</P>
+<br><a name="SEC2" href="#TOC1">DESCRIPTION</a><br>
+<P>
+<b>pcregrep</b> searches files for character patterns, in the same way as other
+grep commands do, but it uses the PCRE regular expression library to support
+patterns that are compatible with the regular expressions of Perl 5. See
+<a href="pcrepattern.html"><b>pcrepattern</b></a>
+for a full description of syntax and semantics of the regular expressions that
+PCRE supports.
+</P>
+<P>
+A pattern must be specified on the command line unless the <b>-f</b> option is
+used (see below).
+</P>
+<P>
+If no files are specified, <b>pcregrep</b> reads the standard input. By default,
+each line that matches the pattern is copied to the standard output, and if
+there is more than one file, the file name is printed before each line of
+output. However, there are options that can change how <b>pcregrep</b> behaves.
+</P>
+<P>
+Lines are limited to BUFSIZ characters. BUFSIZ is defined in <b>&#60;stdio.h&#62;</b>.
+The newline character is removed from the end of each line before it is matched
+against the pattern.
+</P>
+<br><a name="SEC3" href="#TOC1">OPTIONS</a><br>
+<P>
+<b>-V</b>
+Write the version number of the PCRE library being used to the standard error
+stream.
+</P>
+<P>
+<b>-c</b>
+Do not print individual lines; instead just print a count of the number of
+lines that would otherwise have been printed. If several files are given, a
+count is printed for each of them.
+</P>
+<P>
+<b>-f</b><i>filename</i>
+Read a number of patterns from the file, one per line, and match all of them
+against each line of input. A line is output if any of the patterns match it.
+When <b>-f</b> is used, no pattern is taken from the command line; all arguments
+are treated as file names. There is a maximum of 100 patterns. Trailing white
+space is removed, and blank lines are ignored. An empty file contains no
+patterns and therefore matches nothing.
+</P>
+<P>
+<b>-h</b>
+Suppress printing of filenames when searching multiple files.
+</P>
+<P>
+<b>-i</b>
+Ignore upper/lower case distinctions during comparisons.
+</P>
+<P>
+<b>-l</b>
+Instead of printing lines from the files, just print the names of the files
+containing lines that would have been printed. Each file name is printed
+once, on a separate line.
+</P>
+<P>
+<b>-n</b>
+Precede each line by its line number in the file.
+</P>
+<P>
+<b>-r</b>
+If any file is a directory, recursively scan the files it contains. Without
+<b>-r</b> a directory is scanned as a normal file.
+</P>
+<P>
+<b>-s</b>
+Work silently, that is, display nothing except error messages.
+The exit status indicates whether any matches were found.
+</P>
+<P>
+<b>-u</b>
+Operate in UTF-8 mode. This option is available only if PCRE has been compiled
+with UTF-8 support. Both the pattern and each subject line must be valid
+strings of UTF-8 characters.
+</P>
+<P>
+<b>-v</b>
+Invert the sense of the match, so that lines which do <i>not</i> match the
+pattern are now the ones that are found.
+</P>
+<P>
+<b>-x</b>
+Force the pattern to be anchored (it must start matching at the beginning of
+the line) and in addition, require it to match the entire line. This is
+equivalent to having ^ and $ characters at the start and end of each
+alternative branch in the regular expression.
+</P>
+<br><a name="SEC4" href="#TOC1">LONG OPTIONS</a><br>
+<P>
+Long forms of all the options are available, as in GNU grep. They are shown in
+the following table:
+<pre>
+ -c --count
+ -h --no-filename
+ -i --ignore-case
+ -l --files-with-matches
+ -n --line-number
+ -r --recursive
+ -s --no-messages
+ -u --utf-8
+ -V --version
+ -v --invert-match
+ -x --line-regex
+ -x --line-regexp
+</pre>
+In addition, --file=<i>filename</i> is equivalent to -f<i>filename</i>, and
+--help shows the list of options and then exits.
+</P>
+<br><a name="SEC5" href="#TOC1">DIAGNOSTICS</a><br>
+<P>
+Exit status is 0 if any matches were found, 1 if no matches were found, and 2
+for syntax errors or inacessible files (even if matches were found).
+</P>
+<br><a name="SEC6" href="#TOC1">AUTHOR</a><br>
+<P>
+Philip Hazel &#60;ph10@cam.ac.uk&#62;
+<br>
+University Computing Service
+<br>
+Cambridge CB2 3QG, England.
+</P>
+<P>
+Last updated: 09 September 2004
+<br>
+Copyright &copy; 1997-2004 University of Cambridge.
+<p>
+Return to the <a href="index.html">PCRE index page</a>.
+</p>
diff --git a/srclib/pcre/doc/html/pcrepartial.html b/srclib/pcre/doc/html/pcrepartial.html
new file mode 100644
index 0000000000..c4dd88613b
--- /dev/null
+++ b/srclib/pcre/doc/html/pcrepartial.html
@@ -0,0 +1,111 @@
+<html>
+<head>
+<title>pcrepartial specification</title>
+</head>
+<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
+<h1>pcrepartial man page</h1>
+<p>
+Return to the <a href="index.html">PCRE index page</a>.
+</p>
+<p>
+This page is part of the PCRE HTML documentation. It was generated automatically
+from the original man page. If there is any nonsense in it, please consult the
+man page, in case the conversion went wrong.
+<br>
+<ul>
+<li><a name="TOC1" href="#SEC1">PARTIAL MATCHING IN PCRE</a>
+<li><a name="TOC2" href="#SEC2">RESTRICTED PATTERNS FOR PCRE_PARTIAL</a>
+<li><a name="TOC3" href="#SEC3">EXAMPLE OF PARTIAL MATCHING USING PCRETEST</a>
+</ul>
+<br><a name="SEC1" href="#TOC1">PARTIAL MATCHING IN PCRE</a><br>
+<P>
+In normal use of PCRE, if the subject string that is passed to
+<b>pcre_exec()</b> matches as far as it goes, but is too short to match the
+entire pattern, PCRE_ERROR_NOMATCH is returned. There are circumstances where
+it might be helpful to distinguish this case from other cases in which there is
+no match.
+</P>
+<P>
+Consider, for example, an application where a human is required to type in data
+for a field with specific formatting requirements. An example might be a date
+in the form <i>ddmmmyy</i>, defined by this pattern:
+<pre>
+ ^\d?\d(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\d\d$
+</pre>
+If the application sees the user's keystrokes one by one, and can check that
+what has been typed so far is potentially valid, it is able to raise an error
+as soon as a mistake is made, possibly beeping and not reflecting the
+character that has been typed. This immediate feedback is likely to be a better
+user interface than a check that is delayed until the entire string has been
+entered.
+</P>
+<P>
+PCRE supports the concept of partial matching by means of the PCRE_PARTIAL
+option, which can be set when calling <b>pcre_exec()</b>. When this is done, the
+return code PCRE_ERROR_NOMATCH is converted into PCRE_ERROR_PARTIAL if at any
+time during the matching process the entire subject string matched part of the
+pattern. No captured data is set when this occurs.
+</P>
+<P>
+Using PCRE_PARTIAL disables one of PCRE's optimizations. PCRE remembers the
+last literal byte in a pattern, and abandons matching immediately if such a
+byte is not present in the subject string. This optimization cannot be used
+for a subject string that might match only partially.
+</P>
+<br><a name="SEC2" href="#TOC1">RESTRICTED PATTERNS FOR PCRE_PARTIAL</a><br>
+<P>
+Because of the way certain internal optimizations are implemented in PCRE, the
+PCRE_PARTIAL option cannot be used with all patterns. Repeated single
+characters such as
+<pre>
+ a{2,4}
+</pre>
+and repeated single metasequences such as
+<pre>
+ \d+
+</pre>
+are not permitted if the maximum number of occurrences is greater than one.
+Optional items such as \d? (where the maximum is one) are permitted.
+Quantifiers with any values are permitted after parentheses, so the invalid
+examples above can be coded thus:
+<pre>
+ (a){2,4}
+ (\d)+
+</pre>
+These constructions run more slowly, but for the kinds of application that are
+envisaged for this facility, this is not felt to be a major restriction.
+</P>
+<P>
+If PCRE_PARTIAL is set for a pattern that does not conform to the restrictions,
+<b>pcre_exec()</b> returns the error code PCRE_ERROR_BADPARTIAL (-13).
+</P>
+<br><a name="SEC3" href="#TOC1">EXAMPLE OF PARTIAL MATCHING USING PCRETEST</a><br>
+<P>
+If the escape sequence \P is present in a <b>pcretest</b> data line, the
+PCRE_PARTIAL flag is used for the match. Here is a run of <b>pcretest</b> that
+uses the date example quoted above:
+<pre>
+ re&#62; /^\d?\d(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\d\d$/
+ data&#62; 25jun04\P
+ 0: 25jun04
+ 1: jun
+ data&#62; 25dec3\P
+ Partial match
+ data&#62; 3ju\P
+ Partial match
+ data&#62; 3juj\P
+ No match
+ data&#62; j\P
+ No match
+</pre>
+The first data string is matched completely, so <b>pcretest</b> shows the
+matched substrings. The remaining four strings do not match the complete
+pattern, but the first two are partial matches.
+</P>
+<P>
+Last updated: 08 September 2004
+<br>
+Copyright &copy; 1997-2004 University of Cambridge.
+<p>
+Return to the <a href="index.html">PCRE index page</a>.
+</p>
diff --git a/srclib/pcre/doc/html/pcrepattern.html b/srclib/pcre/doc/html/pcrepattern.html
new file mode 100644
index 0000000000..1220eb7e02
--- /dev/null
+++ b/srclib/pcre/doc/html/pcrepattern.html
@@ -0,0 +1,1470 @@
+<html>
+<head>
+<title>pcrepattern specification</title>
+</head>
+<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
+<h1>pcrepattern man page</h1>
+<p>
+Return to the <a href="index.html">PCRE index page</a>.
+</p>
+<p>
+This page is part of the PCRE HTML documentation. It was generated automatically
+from the original man page. If there is any nonsense in it, please consult the
+man page, in case the conversion went wrong.
+<br>
+<ul>
+<li><a name="TOC1" href="#SEC1">PCRE REGULAR EXPRESSION DETAILS</a>
+<li><a name="TOC2" href="#SEC2">BACKSLASH</a>
+<li><a name="TOC3" href="#SEC3">CIRCUMFLEX AND DOLLAR</a>
+<li><a name="TOC4" href="#SEC4">FULL STOP (PERIOD, DOT)</a>
+<li><a name="TOC5" href="#SEC5">MATCHING A SINGLE BYTE</a>
+<li><a name="TOC6" href="#SEC6">SQUARE BRACKETS AND CHARACTER CLASSES</a>
+<li><a name="TOC7" href="#SEC7">POSIX CHARACTER CLASSES</a>
+<li><a name="TOC8" href="#SEC8">VERTICAL BAR</a>
+<li><a name="TOC9" href="#SEC9">INTERNAL OPTION SETTING</a>
+<li><a name="TOC10" href="#SEC10">SUBPATTERNS</a>
+<li><a name="TOC11" href="#SEC11">NAMED SUBPATTERNS</a>
+<li><a name="TOC12" href="#SEC12">REPETITION</a>
+<li><a name="TOC13" href="#SEC13">ATOMIC GROUPING AND POSSESSIVE QUANTIFIERS</a>
+<li><a name="TOC14" href="#SEC14">BACK REFERENCES</a>
+<li><a name="TOC15" href="#SEC15">ASSERTIONS</a>
+<li><a name="TOC16" href="#SEC16">CONDITIONAL SUBPATTERNS</a>
+<li><a name="TOC17" href="#SEC17">COMMENTS</a>
+<li><a name="TOC18" href="#SEC18">RECURSIVE PATTERNS</a>
+<li><a name="TOC19" href="#SEC19">SUBPATTERNS AS SUBROUTINES</a>
+<li><a name="TOC20" href="#SEC20">CALLOUTS</a>
+</ul>
+<br><a name="SEC1" href="#TOC1">PCRE REGULAR EXPRESSION DETAILS</a><br>
+<P>
+The syntax and semantics of the regular expressions supported by PCRE are
+described below. Regular expressions are also described in the Perl
+documentation and in a number of books, some of which have copious examples.
+Jeffrey Friedl's "Mastering Regular Expressions", published by O'Reilly, covers
+regular expressions in great detail. This description of PCRE's regular
+expressions is intended as reference material.
+</P>
+<P>
+The original operation of PCRE was on strings of one-byte characters. However,
+there is now also support for UTF-8 character strings. To use this, you must
+build PCRE to include UTF-8 support, and then call <b>pcre_compile()</b> with
+the PCRE_UTF8 option. How this affects pattern matching is mentioned in several
+places below. There is also a summary of UTF-8 features in the
+<a href="pcre.html#utf8support">section on UTF-8 support</a>
+in the main
+<a href="pcre.html"><b>pcre</b></a>
+page.
+</P>
+<P>
+A regular expression is a pattern that is matched against a subject string from
+left to right. Most characters stand for themselves in a pattern, and match the
+corresponding characters in the subject. As a trivial example, the pattern
+<pre>
+ The quick brown fox
+</pre>
+matches a portion of a subject string that is identical to itself. The power of
+regular expressions comes from the ability to include alternatives and
+repetitions in the pattern. These are encoded in the pattern by the use of
+<i>metacharacters</i>, which do not stand for themselves but instead are
+interpreted in some special way.
+</P>
+<P>
+There are two different sets of metacharacters: those that are recognized
+anywhere in the pattern except within square brackets, and those that are
+recognized in square brackets. Outside square brackets, the metacharacters are
+as follows:
+<pre>
+ \ general escape character with several uses
+ ^ assert start of string (or line, in multiline mode)
+ $ assert end of string (or line, in multiline mode)
+ . match any character except newline (by default)
+ [ start character class definition
+ | start of alternative branch
+ ( start subpattern
+ ) end subpattern
+ ? extends the meaning of (
+ also 0 or 1 quantifier
+ also quantifier minimizer
+ * 0 or more quantifier
+ + 1 or more quantifier
+ also "possessive quantifier"
+ { start min/max quantifier
+</pre>
+Part of a pattern that is in square brackets is called a "character class". In
+a character class the only metacharacters are:
+<pre>
+ \ general escape character
+ ^ negate the class, but only if the first character
+ - indicates character range
+ [ POSIX character class (only if followed by POSIX syntax)
+ ] terminates the character class
+</pre>
+The following sections describe the use of each of the metacharacters.
+</P>
+<br><a name="SEC2" href="#TOC1">BACKSLASH</a><br>
+<P>
+The backslash character has several uses. Firstly, if it is followed by a
+non-alphanumeric character, it takes away any special meaning that character may
+have. This use of backslash as an escape character applies both inside and
+outside character classes.
+</P>
+<P>
+For example, if you want to match a * character, you write \* in the pattern.
+This escaping action applies whether or not the following character would
+otherwise be interpreted as a metacharacter, so it is always safe to precede a
+non-alphanumeric with backslash to specify that it stands for itself. In
+particular, if you want to match a backslash, you write \\.
+</P>
+<P>
+If a pattern is compiled with the PCRE_EXTENDED option, whitespace in the
+pattern (other than in a character class) and characters between a # outside
+a character class and the next newline character are ignored. An escaping
+backslash can be used to include a whitespace or # character as part of the
+pattern.
+</P>
+<P>
+If you want to remove the special meaning from a sequence of characters, you
+can do so by putting them between \Q and \E. This is different from Perl in
+that $ and @ are handled as literals in \Q...\E sequences in PCRE, whereas in
+Perl, $ and @ cause variable interpolation. Note the following examples:
+<pre>
+ Pattern PCRE matches Perl matches
+
+ \Qabc$xyz\E abc$xyz abc followed by the contents of $xyz
+ \Qabc\$xyz\E abc\$xyz abc\$xyz
+ \Qabc\E\$\Qxyz\E abc$xyz abc$xyz
+</pre>
+The \Q...\E sequence is recognized both inside and outside character classes.
+<a name="digitsafterbackslash"></a></P>
+<br><b>
+Non-printing characters
+</b><br>
+<P>
+A second use of backslash provides a way of encoding non-printing characters
+in patterns in a visible manner. There is no restriction on the appearance of
+non-printing characters, apart from the binary zero that terminates a pattern,
+but when a pattern is being prepared by text editing, it is usually easier to
+use one of the following escape sequences than the binary character it
+represents:
+<pre>
+ \a alarm, that is, the BEL character (hex 07)
+ \cx "control-x", where x is any character
+ \e escape (hex 1B)
+ \f formfeed (hex 0C)
+ \n newline (hex 0A)
+ \r carriage return (hex 0D)
+ \t tab (hex 09)
+ \ddd character with octal code ddd, or backreference
+ \xhh character with hex code hh
+ \x{hhh..} character with hex code hhh... (UTF-8 mode only)
+</pre>
+The precise effect of \cx is as follows: if x is a lower case letter, it
+is converted to upper case. Then bit 6 of the character (hex 40) is inverted.
+Thus \cz becomes hex 1A, but \c{ becomes hex 3B, while \c; becomes hex
+7B.
+</P>
+<P>
+After \x, from zero to two hexadecimal digits are read (letters can be in
+upper or lower case). In UTF-8 mode, any number of hexadecimal digits may
+appear between \x{ and }, but the value of the character code must be less
+than 2**31 (that is, the maximum hexadecimal value is 7FFFFFFF). If characters
+other than hexadecimal digits appear between \x{ and }, or if there is no
+terminating }, this form of escape is not recognized. Instead, the initial
+\x will be interpreted as a basic hexadecimal escape, with no following
+digits, giving a character whose value is zero.
+</P>
+<P>
+Characters whose value is less than 256 can be defined by either of the two
+syntaxes for \x when PCRE is in UTF-8 mode. There is no difference in the
+way they are handled. For example, \xdc is exactly the same as \x{dc}.
+</P>
+<P>
+After \0 up to two further octal digits are read. In both cases, if there
+are fewer than two digits, just those that are present are used. Thus the
+sequence \0\x\07 specifies two binary zeros followed by a BEL character
+(code value 7). Make sure you supply two digits after the initial zero if the
+pattern character that follows is itself an octal digit.
+</P>
+<P>
+The handling of a backslash followed by a digit other than 0 is complicated.
+Outside a character class, PCRE reads it and any following digits as a decimal
+number. If the number is less than 10, or if there have been at least that many
+previous capturing left parentheses in the expression, the entire sequence is
+taken as a <i>back reference</i>. A description of how this works is given
+<a href="#backreferences">later,</a>
+following the discussion of
+<a href="#subpattern">parenthesized subpatterns.</a>
+</P>
+<P>
+Inside a character class, or if the decimal number is greater than 9 and there
+have not been that many capturing subpatterns, PCRE re-reads up to three octal
+digits following the backslash, and generates a single byte from the least
+significant 8 bits of the value. Any subsequent digits stand for themselves.
+For example:
+<pre>
+ \040 is another way of writing a space
+ \40 is the same, provided there are fewer than 40 previous capturing subpatterns
+ \7 is always a back reference
+ \11 might be a back reference, or another way of writing a tab
+ \011 is always a tab
+ \0113 is a tab followed by the character "3"
+ \113 might be a back reference, otherwise the character with octal code 113
+ \377 might be a back reference, otherwise the byte consisting entirely of 1 bits
+ \81 is either a back reference, or a binary zero followed by the two characters "8" and "1"
+</pre>
+Note that octal values of 100 or greater must not be introduced by a leading
+zero, because no more than three octal digits are ever read.
+</P>
+<P>
+All the sequences that define a single byte value or a single UTF-8 character
+(in UTF-8 mode) 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 sequence \X is interpreted as the
+character "X". Outside a character class, these sequences have different
+meanings
+<a href="#uniextseq">(see below).</a>
+</P>
+<br><b>
+Generic character types
+</b><br>
+<P>
+The third use of backslash is for specifying generic character types. The
+following are always recognized:
+<pre>
+ \d any decimal digit
+ \D any character that is not a decimal digit
+ \s any whitespace character
+ \S any character that is not a whitespace character
+ \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.
+</P>
+<P>
+These character type 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
+there is no character to match.
+</P>
+<P>
+For compatibility with Perl, \s does not match the VT character (code 11).
+This makes it different from the the POSIX "space" class. The \s characters
+are HT (9), LF (10), FF (12), CR (13), and space (32).
+</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
+<a href="pcreapi.html#localesupport">"Locale support"</a>
+in the
+<a href="pcreapi.html"><b>pcreapi</b></a>
+page). For example, in the "fr_FR" (French) locale, some character codes
+greater than 128 are used for accented letters, and these are matched by \w.
+</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.
+<a name="uniextseq"></a></P>
+<br><b>
+Unicode character properties
+</b><br>
+<P>
+When PCRE is built with Unicode character property support, three additional
+escape sequences to match generic character types are available when UTF-8 mode
+is selected. They are:
+<pre>
+ \p{<i>xx</i>} a character with the <i>xx</i> property
+ \P{<i>xx</i>} a character without the <i>xx</i> property
+ \X an extended Unicode sequence
+</pre>
+The property names represented by <i>xx</i> above are limited to the
+Unicode general category properties. Each character has exactly one such
+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 properties
+that start with that letter. In this case, in the absence of negation, the
+curly brackets in the escape sequence are optional; these two examples have
+the same effect:
+<pre>
+ \p{L}
+ \pL
+</pre>
+The following property codes are supported:
+<pre>
+ C Other
+ Cc Control
+ Cf Format
+ Cn Unassigned
+ Co Private use
+ Cs Surrogate
+
+ L Letter
+ Ll Lower case letter
+ Lm Modifier letter
+ Lo Other letter
+ Lt Title case letter
+ Lu Upper case letter
+
+ M Mark
+ Mc Spacing mark
+ Me Enclosing mark
+ Mn Non-spacing mark
+
+ N Number
+ Nd Decimal number
+ Nl Letter number
+ No Other number
+
+ P Punctuation
+ Pc Connector punctuation
+ Pd Dash punctuation
+ Pe Close punctuation
+ Pf Final punctuation
+ Pi Initial punctuation
+ Po Other punctuation
+ Ps Open punctuation
+
+ S Symbol
+ Sc Currency symbol
+ Sk Modifier symbol
+ Sm Mathematical symbol
+ So Other symbol
+
+ Z Separator
+ Zl Line separator
+ Zp Paragraph separator
+ Zs Space separator
+</pre>
+Extended properties such as "Greek" or "InMusicalSymbols" are not supported by
+PCRE.
+</P>
+<P>
+Specifying caseless matching does not affect these escape sequences. For
+example, \p{Lu} always matches only upper case letters.
+</P>
+<P>
+The \X escape matches any number of Unicode characters that form an extended
+Unicode sequence. \X is equivalent to
+<pre>
+ (?&#62;\PM\pM*)
+</pre>
+That is, it matches a character without the "mark" property, followed by zero
+or more characters with the "mark" property, and treats the sequence as an
+atomic group
+<a href="#atomicgroup">(see below).</a>
+Characters with the "mark" property are typically accents that affect the
+preceding character.
+</P>
+<P>
+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.
+<a name="smallassertions"></a></P>
+<br><b>
+Simple assertions
+</b><br>
+<P>
+The fourth use of backslash is for certain simple assertions. An assertion
+specifies a condition that has to be met at a particular point in a match,
+without consuming any characters from the subject string. The use of
+subpatterns for more complicated assertions is described
+<a href="#bigassertions">below.</a>
+The backslashed
+assertions are:
+<pre>
+ \b matches at a word boundary
+ \B matches when not at a word boundary
+ \A matches at start of subject
+ \Z matches at end of subject or before newline at end
+ \z matches at end of subject
+ \G matches at first matching position in 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).
+</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.
+</P>
+<P>
+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 assertions 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 <i>startoffset</i>
+argument of <b>pcre_exec()</b> is non-zero, indicating 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 that \Z matches before a newline that is the
+last character of the string as well as at the end of the string, whereas \z
+matches only at the end.
+</P>
+<P>
+The \G assertion is true only when the current matching position is at the
+start point of the match, as specified by the <i>startoffset</i> argument of
+<b>pcre_exec()</b>. It differs from \A when the value of <i>startoffset</i> is
+non-zero. By calling <b>pcre_exec()</b> multiple times with appropriate
+arguments, you can mimic Perl's /g option, and it is in this kind of
+implementation where \G can be useful.
+</P>
+<P>
+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 at a time, it cannot
+reproduce this behaviour.
+</P>
+<P>
+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.
+</P>
+<br><a name="SEC3" href="#TOC1">CIRCUMFLEX AND DOLLAR</a><br>
+<P>
+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 <i>startoffset</i> argument of
+<b>pcre_exec()</b> is non-zero, circumflex can never match if the PCRE_MULTILINE
+option is unset. Inside a character class, circumflex has an entirely different
+meaning
+<a href="#characterclass">(see below).</a>
+</P>
+<P>
+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 subject, it is said to be an
+"anchored" pattern. (There are also other constructs that can cause a pattern
+to be anchored.)
+</P>
+<P>
+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
+character that is the last character in 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 appears.
+Dollar has no special meaning in a character class.
+</P>
+<P>
+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.
+</P>
+<P>
+The meanings of the circumflex and dollar characters are changed if the
+PCRE_MULTILINE option is set. When this is the case, they match immediately
+after and immediately before an internal newline character, respectively, in
+addition to matching at the start and end of the subject string. For example,
+the pattern /^abc$/ matches the subject string "def\nabc" (where \n
+represents a newline character) 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 <i>startoffset</i> argument of <b>pcre_exec()</b>
+is non-zero. The PCRE_DOLLAR_ENDONLY option is ignored if PCRE_MULTILINE is
+set.
+</P>
+<P>
+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 PCRE_MULTILINE is set or not.
+</P>
+<br><a name="SEC4" href="#TOC1">FULL STOP (PERIOD, DOT)</a><br>
+<P>
+Outside a character class, a dot in the pattern matches any one character in
+the subject, including a non-printing character, but not (by default) newline.
+In UTF-8 mode, a dot matches any UTF-8 character, which might be more than one
+byte long, except (by default) newline. If the PCRE_DOTALL option is set,
+dots match newlines as well. The handling of dot is entirely independent of the
+handling of circumflex and dollar, the only relationship being that they both
+involve newline characters. Dot has no special meaning in a character class.
+</P>
+<br><a name="SEC5" href="#TOC1">MATCHING A SINGLE BYTE</a><br>
+<P>
+Outside a character class, the escape sequence \C matches any one byte, both
+in and out of UTF-8 mode. Unlike a dot, it can match a newline. The feature is
+provided in Perl in order to match individual bytes in UTF-8 mode. Because it
+breaks up UTF-8 characters into individual bytes, what remains in the string
+may be a malformed UTF-8 string. For this reason, the \C escape sequence is
+best avoided.
+</P>
+<P>
+PCRE does not allow \C to appear in lookbehind assertions
+<a href="#lookbehind">(described below),</a>
+because in UTF-8 mode this would make it impossible to calculate the length of
+the lookbehind.
+<a name="characterclass"></a></P>
+<br><a name="SEC6" href="#TOC1">SQUARE BRACKETS AND CHARACTER CLASSES</a><br>
+<P>
+An opening square bracket introduces a character class, terminated by a closing
+square bracket. A closing square bracket on its own is not special. 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 present) or
+escaped with a backslash.
+</P>
+<P>
+A character class matches a single character in the subject. In UTF-8 mode, the
+character may occupy more than one byte. A matched character must be in the set
+of characters defined by the class, unless the first character in the class
+definition is a circumflex, in which case the subject character must not be in
+the set defined by the class. If a circumflex is actually required as a member
+of the class, ensure it is not the first character, or escape it with a
+backslash.
+</P>
+<P>
+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 consumes a character from the subject
+string, and therefore it fails if the current pointer is at the end of the
+string.
+</P>
+<P>
+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.
+</P>
+<P>
+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. When running 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.
+</P>
+<P>
+The newline character is never treated in any special way in character classes,
+whatever the setting of the PCRE_DOTALL or PCRE_MULTILINE options is. A class
+such as [^a] will always match a newline.
+</P>
+<P>
+The minus (hyphen) character can be used to specify a range of characters 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.
+</P>
+<P>
+It is not possible to have the literal character "]" as the end character 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 interpreted 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.
+</P>
+<P>
+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}].
+</P>
+<P>
+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 the "fr_FR" 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.
+</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.
+</P>
+<P>
+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.
+</P>
+<br><a name="SEC7" href="#TOC1">POSIX CHARACTER CLASSES</a><br>
+<P>
+Perl supports the POSIX notation for character classes. This uses names
+enclosed by [: and :] within the enclosing square brackets. PCRE also supports
+this notation. For example,
+<pre>
+ [01[:alpha:]%]
+</pre>
+matches "0", "1", any alphabetic character, or "%". The supported class names
+are
+<pre>
+ alnum letters and digits
+ alpha letters
+ ascii character codes 0 - 127
+ blank space or tab only
+ cntrl control characters
+ digit decimal digits (same as \d)
+ graph printing characters, excluding space
+ lower lower case letters
+ print printing characters, including space
+ punct printing characters, excluding letters and digits
+ space white space (not quite the same as \s)
+ upper upper case letters
+ word "word" characters (same as \w)
+ xdigit hexadecimal digits
+</pre>
+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).
+</P>
+<P>
+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,
+<pre>
+ [12[:^digit:]]
+</pre>
+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.
+</P>
+<P>
+In UTF-8 mode, characters with values greater than 128 do not match any of
+the POSIX character classes.
+</P>
+<br><a name="SEC8" href="#TOC1">VERTICAL BAR</a><br>
+<P>
+Vertical bar characters are used to separate alternative patterns. For example,
+the pattern
+<pre>
+ gilbert|sullivan
+</pre>
+matches either "gilbert" or "sullivan". Any number of alternatives may appear,
+and an empty alternative is permitted (matching the empty string).
+The matching process tries each alternative in turn, from left to right,
+and the first one that succeeds is used. If the alternatives are within a
+subpattern
+<a href="#subpattern">(defined below),</a>
+"succeeds" means matching the rest of the main pattern as well as the
+alternative in the subpattern.
+</P>
+<br><a name="SEC9" href="#TOC1">INTERNAL OPTION SETTING</a><br>
+<P>
+The settings of the PCRE_CASELESS, PCRE_MULTILINE, PCRE_DOTALL, and
+PCRE_EXTENDED options can be changed from within the pattern by a sequence of
+Perl option letters enclosed between "(?" and ")". The option letters are
+<pre>
+ i for PCRE_CASELESS
+ m for PCRE_MULTILINE
+ s for PCRE_DOTALL
+ x for PCRE_EXTENDED
+</pre>
+For example, (?im) sets caseless, multiline matching. It is also possible to
+unset these options by preceding the letter with a hyphen, and a combined
+setting and unsetting such as (?im-sx), which sets PCRE_CASELESS and
+PCRE_MULTILINE while unsetting PCRE_DOTALL and PCRE_EXTENDED, is also
+permitted. If a letter appears both before and after the hyphen, the option is
+unset.
+</P>
+<P>
+When an option change occurs at top level (that is, not inside subpattern
+parentheses), the change applies to the remainder of the pattern that follows.
+If the change is placed right at the start of a pattern, PCRE extracts it into
+the global options (and it will therefore show up in data extracted by the
+<b>pcre_fullinfo()</b> function).
+</P>
+<P>
+An option change within a subpattern affects only that part of the current
+pattern that follows it, so
+<pre>
+ (a(?i)b)c
+</pre>
+matches abc and aBc and no other strings (assuming PCRE_CASELESS is not used).
+By this means, options can be made to have different settings in different
+parts of the pattern. Any changes made in one alternative do carry on
+into subsequent branches within the same subpattern. For example,
+<pre>
+ (a(?i)b|c)
+</pre>
+matches "ab", "aB", "c", and "C", even though when matching "C" the first
+branch is abandoned before the option setting. This is because the effects of
+option settings happen at compile time. There would be some very weird
+behaviour otherwise.
+</P>
+<P>
+The PCRE-specific options PCRE_UNGREEDY and PCRE_EXTRA can be changed in the
+same way as the Perl-compatible options by using the characters U and X
+respectively. The (?X) flag setting is special in that it must always occur
+earlier in the pattern than any of the additional features it turns on, even
+when it is at top level. It is best to put it at the start.
+<a name="subpattern"></a></P>
+<br><a name="SEC10" href="#TOC1">SUBPATTERNS</a><br>
+<P>
+Subpatterns are delimited by parentheses (round brackets), which can be nested.
+Turning part of a pattern into a subpattern does two things:
+<br>
+<br>
+1. It localizes a set of alternatives. For example, the pattern
+<pre>
+ cat(aract|erpillar|)
+</pre>
+matches one of the words "cat", "cataract", or "caterpillar". Without the
+parentheses, it would match "cataract", "erpillar" or the empty string.
+<br>
+<br>
+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 <i>ovector</i> argument of
+<b>pcre_exec()</b>. Opening parentheses are counted from left to right (starting
+from 1) to obtain numbers for the capturing subpatterns.
+</P>
+<P>
+For example, if the string "the red king" is matched against the pattern
+<pre>
+ the ((red|white) (king|queen))
+</pre>
+the captured substrings are "red king", "red", and "king", and are numbered 1,
+2, and 3, respectively.
+</P>
+<P>
+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 capturing, 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
+<pre>
+ the ((?:red|white) (king|queen))
+</pre>
+the captured substrings are "white queen" and "queen", and are numbered 1 and
+2. The maximum number of capturing subpatterns is 65535, and the maximum depth
+of nesting of all subpatterns, both capturing and non-capturing, is 200.
+</P>
+<P>
+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
+<pre>
+ (?i:saturday|sunday)
+ (?:(?i)saturday|sunday)
+</pre>
+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 "Saturday".
+</P>
+<br><a name="SEC11" href="#TOC1">NAMED SUBPATTERNS</a><br>
+<P>
+Identifying capturing parentheses by number is simple, but it can be very hard
+to keep track of the numbers in complicated regular expressions. Furthermore,
+if an expression is modified, the numbers may change. To help with this
+difficulty, PCRE supports the naming of subpatterns, something that Perl does
+not provide. The Python syntax (?P&#60;name&#62;...) is used. Names consist of
+alphanumeric characters and underscores, and must be unique within a pattern.
+</P>
+<P>
+Named capturing parentheses are still allocated numbers as well as names. 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. For further details see the
+<a href="pcreapi.html"><b>pcreapi</b></a>
+documentation.
+</P>
+<br><a name="SEC12" href="#TOC1">REPETITION</a><br>
+<P>
+Repetition is specified by quantifiers, which can follow any of the following
+items:
+<pre>
+ a literal data character
+ the . metacharacter
+ the \C escape sequence
+ the \X escape sequence (in UTF-8 mode with Unicode properties)
+ an escape such as \d that matches a single character
+ a character class
+ a back reference (see next section)
+ a parenthesized subpattern (unless it is an assertion)
+</pre>
+The general repetition quantifier specifies a minimum and maximum number 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:
+<pre>
+ z{2,4}
+</pre>
+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
+<pre>
+ [aeiou]{3,}
+</pre>
+matches at least 3 successive vowels, but may match many more, while
+<pre>
+ \d{8}
+</pre>
+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 example, {,6} is not a
+quantifier, but a literal string of four characters.
+</P>
+<P>
+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 characters, 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 may be of different lengths).
+</P>
+<P>
+The quantifier {0} is permitted, causing the expression to behave as if the
+previous item and the quantifier were not present.
+</P>
+<P>
+For convenience (and historical compatibility) the three most common
+quantifiers have single-character abbreviations:
+<pre>
+ * is equivalent to {0,}
+ + is equivalent to {1,}
+ ? is equivalent to {0,1}
+</pre>
+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:
+<pre>
+ (a?)*
+</pre>
+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 broken.
+</P>
+<P>
+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 pattern
+<pre>
+ /\*.*\*/
+</pre>
+to the string
+<pre>
+ /* first comment */ not comment /* second comment */
+</pre>
+fails, because it matches the entire string owing to the greediness of the .*
+item.
+</P>
+<P>
+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
+<pre>
+ /\*.*?\*/
+</pre>
+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
+<pre>
+ \d??\d
+</pre>
+which matches one digit by preference, but can match two if that is the only
+way the rest of the pattern matches.
+</P>
+<P>
+If the PCRE_UNGREEDY option is set (an option which 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.
+</P>
+<P>
+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.
+</P>
+<P>
+If a pattern starts with .* or .{0,} and the PCRE_DOTALL option (equivalent
+to Perl's /s) is set, thus allowing the . 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.
+</P>
+<P>
+In cases where it is known that the subject string contains no newlines, it is
+worth setting PCRE_DOTALL in order to obtain this optimization, or
+alternatively using ^ to indicate anchoring explicitly.
+</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
+elsewhere in the pattern, a match at the start may fail, and a later one
+succeed. Consider, for example:
+<pre>
+ (.*)abc\1
+</pre>
+If the subject is "xyz123abc123" the match point is the fourth character. For
+this reason, such a pattern is not implicitly anchored.
+</P>
+<P>
+When a capturing subpattern is repeated, the value captured is the substring
+that matched the final iteration. For example, after
+<pre>
+ (tweedle[dume]{3}\s*)+
+</pre>
+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 iterations. For
+example, after
+<pre>
+ /(a|(b))+/
+</pre>
+matches "aba" the value of the second captured substring is "b".
+<a name="atomicgroup"></a></P>
+<br><a name="SEC13" href="#TOC1">ATOMIC GROUPING AND POSSESSIVE QUANTIFIERS</a><br>
+<P>
+With both maximizing and minimizing 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.
+</P>
+<P>
+Consider, for example, the pattern \d+foo when applied to the subject line
+<pre>
+ 123456bar
+</pre>
+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 to be re-evaluated in this way.
+</P>
+<P>
+If we use atomic grouping for the previous example, the matcher would give up
+immediately on failing to match "foo" the first time. The notation is a kind of
+special parenthesis, starting with (?&#62; as in this example:
+<pre>
+ (?&#62;\d+)foo
+</pre>
+This kind of parenthesis "locks up" the part of the pattern it contains 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.
+</P>
+<P>
+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.
+</P>
+<P>
+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 prepared to adjust the
+number of digits they match in order to make the rest of the pattern match,
+(?&#62;\d+) can only match an entire sequence of digits.
+</P>
+<P>
+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 this notation, the
+previous example can be rewritten as
+<pre>
+ \d++foo
+</pre>
+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 or processing of a
+possessive quantifier and the equivalent atomic group.
+</P>
+<P>
+The possessive quantifier syntax is an extension to the Perl syntax. It
+originates in Sun's Java package.
+</P>
+<P>
+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
+<pre>
+ (\D+|&#60;\d+&#62;)*[!?]
+</pre>
+matches an unlimited number of substrings that either consist of non-digits, or
+digits enclosed in &#60;&#62;, followed by either ! or ?. When it matches, it runs
+quickly. However, if it is applied to
+<pre>
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+</pre>
+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 character 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:
+<pre>
+ ((?&#62;\D+)|&#60;\d+&#62;)*[!?]
+</pre>
+sequences of non-digits cannot be broken, and failure happens quickly.
+<a name="backreferences"></a></P>
+<br><a name="SEC14" href="#TOC1">BACK REFERENCES</a><br>
+<P>
+Outside a character class, a backslash followed by a digit greater than 0 (and
+possibly further digits) is a back reference to a capturing subpattern earlier
+(that is, to its left) in the pattern, provided there have been that many
+previous capturing left parentheses.
+</P>
+<P>
+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 pattern. In other words, the
+parentheses that are referenced need not be to the left of the reference for
+numbers less than 10. See the subsection entitled "Non-printing characters"
+<a href="#digitsafterbackslash">above</a>
+for further details of the handling of digits following a backslash.
+</P>
+<P>
+A back reference matches whatever actually matched the capturing subpattern in
+the current subject string, rather than anything matching the subpattern
+itself (see
+<a href="#subpatternsassubroutines">"Subpatterns as subroutines"</a>
+below for a way of doing that). So the pattern
+<pre>
+ (sens|respons)e and \1ibility
+</pre>
+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 example,
+<pre>
+ ((?i)rah)\s+\1
+</pre>
+matches "rah rah" and "RAH RAH", but not "RAH rah", even though the original
+capturing subpattern is matched caselessly.
+</P>
+<P>
+Back references to named subpatterns use the Python syntax (?P=name). We could
+rewrite the above example as follows:
+<pre>
+ (?&#60;p1&#62;(?i)rah)\s+(?P=p1)
+</pre>
+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. For example, the pattern
+<pre>
+ (a|(bc))\2
+</pre>
+always fails if it starts to match "a" rather than "bc". Because there may be
+many capturing parentheses in a pattern, all digits following the backslash are
+taken as part of a potential back reference 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 an empty comment (see
+<a href="#comments">"Comments"</a>
+below) can be used.
+</P>
+<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.
+However, such references can be useful inside repeated subpatterns. For
+example, the pattern
+<pre>
+ (a|b\1)+
+</pre>
+matches any number of "a"s and also "aba", "ababbaa" etc. At each iteration 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.
+<a name="bigassertions"></a></P>
+<br><a name="SEC15" href="#TOC1">ASSERTIONS</a><br>
+<P>
+An assertion is a test on the characters following or preceding the current
+matching point that does not actually consume any characters. The simple
+assertions coded as \b, \B, \A, \G, \Z, \z, ^ and $ are described
+<a href="#smallassertions">above.</a>
+</P>
+<P>
+More complicated assertions are coded as subpatterns. There are two kinds:
+those that look ahead of the current position in the subject string, and those
+that look behind it. An assertion subpattern is matched in the normal way,
+except that it does not cause the current matching position to be changed.
+</P>
+<P>
+Assertion subpatterns are not capturing subpatterns, and may not be repeated,
+because it makes no sense to assert the same thing several times. If any kind
+of assertion contains capturing subpatterns within it, these are counted for
+the purposes of numbering the capturing subpatterns in the whole pattern.
+However, substring capturing is carried out only for positive assertions,
+because it does not make sense for negative assertions.
+</P>
+<br><b>
+Lookahead assertions
+</b><br>
+<P>
+Lookahead assertions start
+with (?= for positive assertions and (?! for negative assertions. For example,
+<pre>
+ \w+(?=;)
+</pre>
+matches a word followed by a semicolon, but does not include the semicolon in
+the match, and
+<pre>
+ foo(?!bar)
+</pre>
+matches any occurrence of "foo" that is not followed by "bar". Note that the
+apparently similar pattern
+<pre>
+ (?!foo)bar
+</pre>
+does not find an occurrence of "bar" that is preceded by something other than
+"foo"; it finds any occurrence of "bar" whatsoever, because the assertion
+(?!foo) is always true when the next three characters are "bar". A
+lookbehind assertion is needed to achieve the other effect.
+</P>
+<P>
+If you want to force a matching failure at some point in a pattern, the most
+convenient way to do it is with (?!) because an empty string always matches, so
+an assertion that requires there not to be an empty string must always fail.
+<a name="lookbehind"></a></P>
+<br><b>
+Lookbehind assertions
+</b><br>
+<P>
+Lookbehind assertions start with (?&#60;= for positive assertions and (?&#60;! for
+negative assertions. For example,
+<pre>
+ (?&#60;!foo)bar
+</pre>
+does find an occurrence of "bar" that is not preceded by "foo". The contents of
+a lookbehind assertion are restricted such that all the strings it matches must
+have a fixed length. However, if there are several alternatives, they do not
+all have to have the same fixed length. Thus
+<pre>
+ (?&#60;=bullock|donkey)
+</pre>
+is permitted, but
+<pre>
+ (?&#60;!dogs?|cats?)
+</pre>
+causes an error at compile time. Branches that match different length strings
+are permitted only at the top level of a lookbehind assertion. This is an
+extension compared with Perl (at least for 5.8), which requires all branches to
+match the same length of string. An assertion such as
+<pre>
+ (?&#60;=ab(c|de))
+</pre>
+is not permitted, because its single top-level branch can match two different
+lengths, but it is acceptable if rewritten to use two top-level branches:
+<pre>
+ (?&#60;=abc|abde)
+</pre>
+The implementation of lookbehind assertions is, for each alternative, to
+temporarily move the current position back by the fixed width and then try to
+match. If there are insufficient characters before the current position, the
+match is deemed to fail.
+</P>
+<P>
+PCRE does not allow the \C escape (which matches a single byte in UTF-8 mode)
+to appear in lookbehind assertions, because it makes it impossible to calculate
+the length of the lookbehind. The \X escape, which can match different numbers
+of bytes, is also not permitted.
+</P>
+<P>
+Atomic groups can be used in conjunction with lookbehind assertions to specify
+efficient matching at the end of the subject string. Consider a simple pattern
+such as
+<pre>
+ abcd$
+</pre>
+when applied to a long string that does not match. Because matching proceeds
+from left to right, PCRE will look for each "a" in the subject and then see if
+what follows matches the rest of the pattern. If the pattern is specified as
+<pre>
+ ^.*abcd$
+</pre>
+the initial .* matches the entire string at first, but when this fails (because
+there is no following "a"), it backtracks to match all but the last character,
+then all but the last two characters, and so on. Once again the search for "a"
+covers the entire string, from right to left, so we are no better off. However,
+if the pattern is written as
+<pre>
+ ^(?&#62;.*)(?&#60;=abcd)
+</pre>
+or, equivalently, using the possessive quantifier syntax,
+<pre>
+ ^.*+(?&#60;=abcd)
+</pre>
+there can be no backtracking for the .* item; it can match only the entire
+string. The subsequent lookbehind assertion does a single test on the last four
+characters. If it fails, the match fails immediately. For long strings, this
+approach makes a significant difference to the processing time.
+</P>
+<br><b>
+Using multiple assertions
+</b><br>
+<P>
+Several assertions (of any sort) may occur in succession. For example,
+<pre>
+ (?&#60;=\d{3})(?&#60;!999)foo
+</pre>
+matches "foo" preceded by three digits that are not "999". Notice that each of
+the assertions is applied independently at the same point in the subject
+string. First there is a check that the previous three characters are all
+digits, and then there is a check that the same three characters are not "999".
+This pattern does <i>not</i> match "foo" preceded by six characters, the first
+of which are digits and the last three of which are not "999". For example, it
+doesn't match "123abcfoo". A pattern to do that is
+<pre>
+ (?&#60;=\d{3}...)(?&#60;!999)foo
+</pre>
+This time the first assertion looks at the preceding six characters, checking
+that the first three are digits, and then the second assertion checks that the
+preceding three characters are not "999".
+</P>
+<P>
+Assertions can be nested in any combination. For example,
+<pre>
+ (?&#60;=(?&#60;!foo)bar)baz
+</pre>
+matches an occurrence of "baz" that is preceded by "bar" which in turn is not
+preceded by "foo", while
+<pre>
+ (?&#60;=\d{3}(?!999)...)foo
+</pre>
+is another pattern that matches "foo" preceded by three digits and any three
+characters that are not "999".
+</P>
+<br><a name="SEC16" href="#TOC1">CONDITIONAL SUBPATTERNS</a><br>
+<P>
+It is possible to cause the matching process to obey a subpattern
+conditionally or to choose between two alternative subpatterns, depending on
+the result of an assertion, or whether a previous capturing subpattern matched
+or not. The two possible forms of conditional subpattern are
+<pre>
+ (?(condition)yes-pattern)
+ (?(condition)yes-pattern|no-pattern)
+</pre>
+If the condition is satisfied, the yes-pattern is used; otherwise the
+no-pattern (if present) is used. If there are more than two alternatives in the
+subpattern, a compile-time error occurs.
+</P>
+<P>
+There are three kinds of condition. If the text between the parentheses
+consists of a sequence of digits, the condition is satisfied if the capturing
+subpattern of that number has previously matched. The number must be greater
+than zero. Consider the following pattern, which contains non-significant white
+space to make it more readable (assume the PCRE_EXTENDED option) and to divide
+it into three parts for ease of discussion:
+<pre>
+ ( \( )? [^()]+ (?(1) \) )
+</pre>
+The first part matches an optional opening parenthesis, and if that
+character is present, sets it as the first captured substring. The second part
+matches one or more characters that are not parentheses. The third part is a
+conditional subpattern that tests whether the first set of parentheses matched
+or not. If they did, that is, if subject started with an opening parenthesis,
+the condition is true, and so the yes-pattern is executed and a closing
+parenthesis is required. Otherwise, since no-pattern is not present, the
+subpattern matches nothing. In other words, this pattern matches a sequence of
+non-parentheses, optionally enclosed in parentheses.
+</P>
+<P>
+If the condition is the string (R), it is satisfied if a recursive call to the
+pattern or subpattern has been made. At "top level", the condition is false.
+This is a PCRE extension. Recursive patterns are described in the next section.
+</P>
+<P>
+If the condition is not a sequence of digits or (R), it must be an assertion.
+This may be a positive or negative lookahead or lookbehind assertion. Consider
+this pattern, again containing non-significant white space, and with the two
+alternatives on the second line:
+<pre>
+ (?(?=[^a-z]*[a-z])
+ \d{2}-[a-z]{3}-\d{2} | \d{2}-\d{2}-\d{2} )
+</pre>
+The condition is a positive lookahead assertion that matches an optional
+sequence of non-letters followed by a letter. In other words, it tests for the
+presence of at least one letter in the subject. If a letter is found, the
+subject is matched against the first alternative; otherwise it is matched
+against the second. This pattern matches strings in one of the two forms
+dd-aaa-dd or dd-dd-dd, where aaa are letters and dd are digits.
+<a name="comments"></a></P>
+<br><a name="SEC17" href="#TOC1">COMMENTS</a><br>
+<P>
+The sequence (?# marks the start of a comment that continues up to the next
+closing parenthesis. Nested parentheses are not permitted. The characters
+that make up a comment play no part in the pattern matching at all.
+</P>
+<P>
+If the PCRE_EXTENDED option is set, an unescaped # character outside a
+character class introduces a comment that continues up to the next newline
+character in the pattern.
+</P>
+<br><a name="SEC18" href="#TOC1">RECURSIVE PATTERNS</a><br>
+<P>
+Consider the problem of matching a string in parentheses, allowing for
+unlimited nested parentheses. Without the use of recursion, the best that can
+be done is to use a pattern that matches up to some fixed depth of nesting. It
+is not possible to handle an arbitrary nesting depth. Perl provides a facility
+that allows regular expressions to recurse (amongst other things). It does this
+by interpolating Perl code in the expression at run time, and the code can
+refer to the expression itself. A Perl pattern to solve the parentheses problem
+can be created like this:
+<pre>
+ $re = qr{\( (?: (?&#62;[^()]+) | (?p{$re}) )* \)}x;
+</pre>
+The (?p{...}) item interpolates Perl code at run time, and in this case refers
+recursively to the pattern in which it appears. Obviously, PCRE cannot support
+the interpolation of Perl code. Instead, it supports some special syntax for
+recursion of the entire pattern, and also for individual subpattern recursion.
+</P>
+<P>
+The special item that consists of (? followed by a number greater than zero and
+a closing parenthesis is a recursive call of the subpattern of the given
+number, provided that it occurs inside that subpattern. (If not, it is a
+"subroutine" call, which is described in the next section.) The special item
+(?R) is a recursive call of the entire regular expression.
+</P>
+<P>
+For example, this PCRE pattern solves the nested parentheses problem (assume
+the PCRE_EXTENDED option is set so that white space is ignored):
+<pre>
+ \( ( (?&#62;[^()]+) | (?R) )* \)
+</pre>
+First it matches an opening parenthesis. Then it matches any number of
+substrings which can either be a sequence of non-parentheses, or a recursive
+match of the pattern itself (that is a correctly parenthesized substring).
+Finally there is a closing parenthesis.
+</P>
+<P>
+If this were part of a larger pattern, you would not want to recurse the entire
+pattern, so instead you could use this:
+<pre>
+ ( \( ( (?&#62;[^()]+) | (?1) )* \) )
+</pre>
+We have put the pattern into parentheses, and caused the recursion to refer to
+them instead of the whole pattern. In a larger pattern, keeping track of
+parenthesis numbers can be tricky. It may be more convenient to use named
+parentheses instead. For this, PCRE uses (?P&#62;name), which is an extension to
+the Python syntax that PCRE uses for named parentheses (Perl does not provide
+named parentheses). We could rewrite the above example as follows:
+<pre>
+ (?P&#60;pn&#62; \( ( (?&#62;[^()]+) | (?P&#62;pn) )* \) )
+</pre>
+This particular example pattern contains nested unlimited repeats, and so the
+use of atomic grouping for matching strings of non-parentheses is important
+when applying the pattern to strings that do not match. For example, when this
+pattern is applied to
+<pre>
+ (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()
+</pre>
+it yields "no match" quickly. However, if atomic grouping is not used,
+the match runs for a very long time indeed because there are so many different
+ways the + and * repeats can carve up the subject, and all have to be tested
+before failure can be reported.
+</P>
+<P>
+At the end of a match, the values set for any capturing subpatterns are those
+from the outermost level of the recursion at which the subpattern value is set.
+If you want to obtain intermediate values, a callout function can be used (see
+the next section and the
+<a href="pcrecallout.html"><b>pcrecallout</b></a>
+documentation). If the pattern above is matched against
+<pre>
+ (ab(cd)ef)
+</pre>
+the value for the capturing parentheses is "ef", which is the last value taken
+on at the top level. If additional parentheses are added, giving
+<pre>
+ \( ( ( (?&#62;[^()]+) | (?R) )* ) \)
+ ^ ^
+ ^ ^
+</pre>
+the string they capture is "ab(cd)ef", the contents of the top level
+parentheses. If there are more than 15 capturing parentheses in a pattern, PCRE
+has to obtain extra memory to store data during a recursion, which it does by
+using <b>pcre_malloc</b>, freeing it via <b>pcre_free</b> afterwards. If no
+memory can be obtained, the match fails with the PCRE_ERROR_NOMEMORY error.
+</P>
+<P>
+Do not confuse the (?R) item with the condition (R), which tests for recursion.
+Consider this pattern, which matches text in angle brackets, allowing for
+arbitrary nesting. Only digits are allowed in nested brackets (that is, when
+recursing), whereas any characters are permitted at the outer level.
+<pre>
+ &#60; (?: (?(R) \d++ | [^&#60;&#62;]*+) | (?R)) * &#62;
+</pre>
+In this pattern, (?(R) is the start of a conditional subpattern, with two
+different alternatives for the recursive and non-recursive cases. The (?R) item
+is the actual recursive call.
+<a name="subpatternsassubroutines"></a></P>
+<br><a name="SEC19" href="#TOC1">SUBPATTERNS AS SUBROUTINES</a><br>
+<P>
+If the syntax for a recursive subpattern reference (either by number or by
+name) is used outside the parentheses to which it refers, it operates like a
+subroutine in a programming language. An earlier example pointed out that the
+pattern
+<pre>
+ (sens|respons)e and \1ibility
+</pre>
+matches "sense and sensibility" and "response and responsibility", but not
+"sense and responsibility". If instead the pattern
+<pre>
+ (sens|respons)e and (?1)ibility
+</pre>
+is used, it does match "sense and responsibility" as well as the other two
+strings. Such references must, however, follow the subpattern to which they
+refer.
+</P>
+<br><a name="SEC20" href="#TOC1">CALLOUTS</a><br>
+<P>
+Perl has a feature whereby using the sequence (?{...}) causes arbitrary Perl
+code to be obeyed in the middle of matching a regular expression. This makes it
+possible, amongst other things, to extract different substrings that match the
+same pair of parentheses when there is a repetition.
+</P>
+<P>
+PCRE provides a similar feature, but of course it cannot obey arbitrary Perl
+code. The feature is called "callout". The caller of PCRE provides an external
+function by putting its entry point in the global variable <i>pcre_callout</i>.
+By default, this variable contains NULL, which disables all calling out.
+</P>
+<P>
+Within a regular expression, (?C) indicates the points at which the external
+function is to be called. If you want to identify different callout points, you
+can put a number less than 256 after the letter C. The default value is zero.
+For example, this pattern has two callout points:
+<pre>
+ (?C1)\dabc(?C2)def
+</pre>
+If the PCRE_AUTO_CALLOUT flag is passed to <b>pcre_compile()</b>, callouts are
+automatically installed before each item in the pattern. They are all numbered
+255.
+</P>
+<P>
+During matching, when PCRE reaches a callout point (and <i>pcre_callout</i> is
+set), the external function is called. It is provided with the number of the
+callout, the position in the pattern, and, optionally, one item of data
+originally supplied by the caller of <b>pcre_exec()</b>. The callout function
+may cause matching to proceed, to backtrack, or to fail altogether. A complete
+description of the interface to the callout function is given in the
+<a href="pcrecallout.html"><b>pcrecallout</b></a>
+documentation.
+</P>
+<P>
+Last updated: 09 September 2004
+<br>
+Copyright &copy; 1997-2004 University of Cambridge.
+<p>
+Return to the <a href="index.html">PCRE index page</a>.
+</p>
diff --git a/srclib/pcre/doc/html/pcreperform.html b/srclib/pcre/doc/html/pcreperform.html
new file mode 100644
index 0000000000..f0ffa68188
--- /dev/null
+++ b/srclib/pcre/doc/html/pcreperform.html
@@ -0,0 +1,97 @@
+<html>
+<head>
+<title>pcreperform specification</title>
+</head>
+<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
+<h1>pcreperform man page</h1>
+<p>
+Return to the <a href="index.html">PCRE index page</a>.
+</p>
+<p>
+This page is part of the PCRE HTML documentation. It was generated automatically
+from the original man page. If there is any nonsense in it, please consult the
+man page, in case the conversion went wrong.
+<br>
+<br><b>
+PCRE PERFORMANCE
+</b><br>
+<P>
+Certain items that may appear in regular expression patterns are more efficient
+than others. It is more efficient to use a character class like [aeiou] than a
+set of 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
+observations about PCRE.
+</P>
+<P>
+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.
+</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
+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 newlines, the pattern may match from the character
+immediately following one of them instead of from the very start. For example,
+the pattern
+<pre>
+ .*second
+</pre>
+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.
+</P>
+<P>
+If you are using such a pattern with subject strings that do not contain
+newlines, the best performance is obtained by setting PCRE_DOTALL, or starting
+the pattern with ^.* to indicate explicit anchoring. That saves PCRE from
+having to scan along the subject looking for a newline to restart at.
+</P>
+<P>
+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
+<pre>
+ (a+)*
+</pre>
+This can match "aaaa" in 33 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, 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 extremely long time.
+</P>
+<P>
+An optimization catches some of the more simple cases such as
+<pre>
+ (a+)*b
+</pre>
+where a literal character follows. Before embarking on the standard matching
+procedure, PCRE checks that there is a "b" later in the subject string, and if
+there is not, it fails the match immediately. However, when there is no
+following literal this optimization cannot be used. You can see the difference
+by comparing the behaviour of
+<pre>
+ (a+)*\d
+</pre>
+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.
+</P>
+<P>
+In many cases, the solution to this kind of performance issue is to use an
+atomic group or a possessive quantifier.
+</P>
+<P>
+Last updated: 09 September 2004
+<br>
+Copyright &copy; 1997-2004 University of Cambridge.
+<p>
+Return to the <a href="index.html">PCRE index page</a>.
+</p>
diff --git a/srclib/pcre/doc/html/pcreposix.html b/srclib/pcre/doc/html/pcreposix.html
new file mode 100644
index 0000000000..2f7aaa9d9c
--- /dev/null
+++ b/srclib/pcre/doc/html/pcreposix.html
@@ -0,0 +1,218 @@
+<html>
+<head>
+<title>pcreposix specification</title>
+</head>
+<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
+<h1>pcreposix man page</h1>
+<p>
+Return to the <a href="index.html">PCRE index page</a>.
+</p>
+<p>
+This page is part of the PCRE HTML documentation. It was generated automatically
+from the original man page. If there is any nonsense in it, please consult the
+man page, in case the conversion went wrong.
+<br>
+<ul>
+<li><a name="TOC1" href="#SEC1">SYNOPSIS OF POSIX API</a>
+<li><a name="TOC2" href="#SEC2">DESCRIPTION</a>
+<li><a name="TOC3" href="#SEC3">COMPILING A PATTERN</a>
+<li><a name="TOC4" href="#SEC4">MATCHING NEWLINE CHARACTERS</a>
+<li><a name="TOC5" href="#SEC5">MATCHING A PATTERN</a>
+<li><a name="TOC6" href="#SEC6">ERROR MESSAGES</a>
+<li><a name="TOC7" href="#SEC7">MEMORY USAGE</a>
+<li><a name="TOC8" href="#SEC8">AUTHOR</a>
+</ul>
+<br><a name="SEC1" href="#TOC1">SYNOPSIS OF POSIX API</a><br>
+<P>
+<b>#include &#60;pcreposix.h&#62;</b>
+</P>
+<P>
+<b>int regcomp(regex_t *<i>preg</i>, const char *<i>pattern</i>,</b>
+<b>int <i>cflags</i>);</b>
+</P>
+<P>
+<b>int regexec(regex_t *<i>preg</i>, const char *<i>string</i>,</b>
+<b>size_t <i>nmatch</i>, regmatch_t <i>pmatch</i>[], int <i>eflags</i>);</b>
+</P>
+<P>
+<b>size_t regerror(int <i>errcode</i>, const regex_t *<i>preg</i>,</b>
+<b>char *<i>errbuf</i>, size_t <i>errbuf_size</i>);</b>
+</P>
+<P>
+<b>void regfree(regex_t *<i>preg</i>);</b>
+</P>
+<br><a name="SEC2" href="#TOC1">DESCRIPTION</a><br>
+<P>
+This set of functions provides a POSIX-style API to the PCRE regular expression
+package. See the
+<a href="pcreapi.html"><b>pcreapi</b></a>
+documentation for a description of PCRE's native API, which contains additional
+functionality.
+</P>
+<P>
+The functions described here are just wrapper functions that ultimately call
+the PCRE native API. Their prototypes are defined in the <b>pcreposix.h</b>
+header file, and on Unix systems the library itself is called
+<b>pcreposix.a</b>, so can be accessed by adding <b>-lpcreposix</b> to the
+command for linking an application that uses them. Because the POSIX functions
+call the native ones, it is also necessary to add <b>-lpcre</b>.
+</P>
+<P>
+I have implemented only those option bits that can be reasonably mapped to PCRE
+native options. In addition, the options REG_EXTENDED and REG_NOSUB are defined
+with the value zero. They have no effect, but since programs that are written
+to the POSIX interface often use them, this makes it easier to slot in PCRE as
+a replacement library. Other POSIX options are not even defined.
+</P>
+<P>
+When PCRE is called via these functions, it is only the API that is POSIX-like
+in style. The syntax and semantics of the regular expressions themselves are
+still those of Perl, subject to the setting of various PCRE options, as
+described below. "POSIX-like in style" means that the API approximates to the
+POSIX definition; it is not fully POSIX-compatible, and in multi-byte encoding
+domains it is probably even less compatible.
+</P>
+<P>
+The header for these functions is supplied as <b>pcreposix.h</b> to avoid any
+potential clash with other POSIX libraries. It can, of course, be renamed or
+aliased as <b>regex.h</b>, which is the "correct" name. It provides two
+structure types, <i>regex_t</i> for compiled internal forms, and
+<i>regmatch_t</i> 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>
+<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
+internal form. The pattern is a C string terminated by a binary zero, and
+is passed in the argument <i>pattern</i>. The <i>preg</i> argument is a pointer
+to a <b>regex_t</b> structure that is used as a base for storing information
+about the compiled expression.
+</P>
+<P>
+The argument <i>cflags</i> is either zero, or contains one or more of the bits
+defined by the following macros:
+<pre>
+ REG_ICASE
+</pre>
+The PCRE_CASELESS option is set when the expression is passed for compilation
+to the native function.
+<pre>
+ REG_NEWLINE
+</pre>
+The PCRE_MULTILINE option is set when the expression is passed for compilation
+to the native function. Note that this does <i>not</i> mimic the defined POSIX
+behaviour for REG_NEWLINE (see the following section).
+</P>
+<P>
+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
+<i>some</i> of the effects specified for REG_NEWLINE. It does not affect the way
+newlines are matched by . (they aren't) or by a negative class such as [^a]
+(they are).
+</P>
+<P>
+The yield of <b>regcomp()</b> is zero on success, and non-zero otherwise. The
+<i>preg</i> structure is filled in on success, and one member of the structure
+is public: <i>re_nsub</i> contains the number of capturing subpatterns in
+the regular expression. Various error codes are defined in the header file.
+</P>
+<br><a name="SEC4" href="#TOC1">MATCHING NEWLINE CHARACTERS</a><br>
+<P>
+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 PCRE:
+<pre>
+ Default Change with
+
+ . matches newline no PCRE_DOTALL
+ newline matches [^a] yes not changeable
+ $ matches \n at end yes PCRE_DOLLARENDONLY
+ $ matches \n in middle no PCRE_MULTILINE
+ ^ matches \n in middle no PCRE_MULTILINE
+</pre>
+This is the equivalent table for POSIX:
+<pre>
+ Default Change with
+
+ . matches newline yes REG_NEWLINE
+ newline matches [^a] yes REG_NEWLINE
+ $ matches \n at end no REG_NEWLINE
+ $ matches \n in middle no REG_NEWLINE
+ ^ matches \n in middle no REG_NEWLINE
+</pre>
+PCRE's behaviour is the same as Perl's, except that there is no equivalent for
+PCRE_DOLLAR_ENDONLY in Perl. In both PCRE and Perl, there is no way to stop
+newline from matching [^a].
+</P>
+<P>
+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.
+</P>
+<br><a name="SEC5" href="#TOC1">MATCHING A PATTERN</a><br>
+<P>
+The function <b>regexec()</b> is called to match a compiled pattern <i>preg</i>
+against a given <i>string</i>, which is terminated by a zero byte, subject to
+the options in <i>eflags</i>. These can be:
+<pre>
+ REG_NOTBOL
+</pre>
+The PCRE_NOTBOL option is set when calling the underlying PCRE matching
+function.
+<pre>
+ REG_NOTEOL
+</pre>
+The PCRE_NOTEOL option is set when calling the underlying PCRE matching
+function.
+</P>
+<P>
+The portion of the string that was matched, and also any captured substrings,
+are returned via the <i>pmatch</i> argument, which points to an array of
+<i>nmatch</i> structures of type <i>regmatch_t</i>, containing the members
+<i>rm_so</i> and <i>rm_eo</i>. 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 <i>string</i> 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.
+</P>
+<P>
+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.
+</P>
+<br><a name="SEC6" href="#TOC1">ERROR MESSAGES</a><br>
+<P>
+The <b>regerror()</b> function maps a non-zero errorcode from either
+<b>regcomp()</b> or <b>regexec()</b> to a printable message. If <i>preg</i> is not
+NULL, the error should have arisen from the use of that structure. A message
+terminated by a binary zero is placed in <i>errbuf</i>. The length of the
+message, including the zero, is limited to <i>errbuf_size</i>. The yield of the
+function is the size of buffer needed to hold the whole message.
+</P>
+<br><a name="SEC7" href="#TOC1">MEMORY USAGE</a><br>
+<P>
+Compiling a regular expression causes memory to be allocated and associated
+with the <i>preg</i> structure. The function <b>regfree()</b> frees all such
+memory, after which <i>preg</i> may no longer be used as a compiled expression.
+</P>
+<br><a name="SEC8" href="#TOC1">AUTHOR</a><br>
+<P>
+Philip Hazel &#60;ph10@cam.ac.uk&#62;
+<br>
+University Computing Service,
+<br>
+Cambridge CB2 3QG, England.
+</P>
+<P>
+Last updated: 07 September 2004
+<br>
+Copyright &copy; 1997-2004 University of Cambridge.
+<p>
+Return to the <a href="index.html">PCRE index page</a>.
+</p>
diff --git a/srclib/pcre/doc/html/pcreprecompile.html b/srclib/pcre/doc/html/pcreprecompile.html
new file mode 100644
index 0000000000..f1c109e7c3
--- /dev/null
+++ b/srclib/pcre/doc/html/pcreprecompile.html
@@ -0,0 +1,133 @@
+<html>
+<head>
+<title>pcreprecompile specification</title>
+</head>
+<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
+<h1>pcreprecompile man page</h1>
+<p>
+Return to the <a href="index.html">PCRE index page</a>.
+</p>
+<p>
+This page is part of the PCRE HTML documentation. It was generated automatically
+from the original man page. If there is any nonsense in it, please consult the
+man page, in case the conversion went wrong.
+<br>
+<ul>
+<li><a name="TOC1" href="#SEC1">SAVING AND RE-USING PRECOMPILED PCRE PATTERNS</a>
+<li><a name="TOC2" href="#SEC2">SAVING A COMPILED PATTERN</a>
+<li><a name="TOC3" href="#SEC3">RE-USING A PRECOMPILED PATTERN</a>
+<li><a name="TOC4" href="#SEC4">COMPATIBILITY WITH DIFFERENT PCRE RELEASES</a>
+</ul>
+<br><a name="SEC1" href="#TOC1">SAVING AND RE-USING PRECOMPILED PCRE PATTERNS</a><br>
+<P>
+If you are running an application that uses a large number of regular
+expression patterns, it may be useful to store them in a precompiled form
+instead of having to compile them every time the application is run.
+If you are not using any private character tables (see the
+<a href="pcre_maketables.html"><b>pcre_maketables()</b></a>
+documentation), this is relatively straightforward. If you are using private
+tables, it is a little bit more complicated.
+</P>
+<P>
+If you save compiled patterns to a file, you can copy them to a different host
+and run them there. This works even if the new host has the opposite endianness
+to the one on which the patterns were compiled. There may be a small
+performance penalty, but it should be insignificant.
+</P>
+<br><a name="SEC2" href="#TOC1">SAVING A COMPILED PATTERN</a><br>
+<P>
+The value returned by <b>pcre_compile()</b> points to a single block of memory
+that holds the compiled pattern and associated data. You can find the length of
+this block in bytes by calling <b>pcre_fullinfo()</b> with an argument of
+PCRE_INFO_SIZE. You can then save the data in any appropriate manner. Here is
+sample code that compiles a pattern and writes it to a file. It assumes that
+the variable <i>fd</i> refers to a file that is open for output:
+<pre>
+ int erroroffset, rc, size;
+ char *error;
+ pcre *re;
+
+ re = pcre_compile("my pattern", 0, &error, &erroroffset, NULL);
+ if (re == NULL) { ... handle errors ... }
+ rc = pcre_fullinfo(re, NULL, PCRE_INFO_SIZE, &size);
+ if (rc &#60; 0) { ... handle errors ... }
+ rc = fwrite(re, 1, size, fd);
+ if (rc != size) { ... handle errors ... }
+</pre>
+In this example, the bytes that comprise the compiled pattern are copied
+exactly. Note that this is binary data that may contain any of the 256 possible
+byte values. On systems that make a distinction between binary and non-binary
+data, be sure that the file is opened for binary output.
+</P>
+<P>
+If you want to write more than one pattern to a file, you will have to devise a
+way of separating them. For binary data, preceding each pattern with its length
+is probably the most straightforward approach. Another possibility is to write
+out the data in hexadecimal instead of binary, one pattern to a line.
+</P>
+<P>
+Saving compiled patterns in a file is only one possible way of storing them for
+later use. They could equally well be saved in a database, or in the memory of
+some daemon process that passes them via sockets to the processes that want
+them.
+</P>
+<P>
+If the pattern has been studied, it is also possible to save the study data in
+a similar way to the compiled pattern itself. When studying generates
+additional information, <b>pcre_study()</b> returns a pointer to a
+<b>pcre_extra</b> data block. Its format is defined in the
+<a href="pcreapi.html#extradata">section on matching a pattern</a>
+in the
+<a href="pcreapi.html"><b>pcreapi</b></a>
+documentation. The <i>study_data</i> field points to the binary study data, and
+this is what you must save (not the <b>pcre_extra</b> block itself). The length
+of the study data can be obtained by calling <b>pcre_fullinfo()</b> with an
+argument of PCRE_INFO_STUDYSIZE. Remember to check that <b>pcre_study()</b> did
+return a non-NULL value before trying to save the study data.
+</P>
+<br><a name="SEC3" href="#TOC1">RE-USING A PRECOMPILED PATTERN</a><br>
+<P>
+Re-using a precompiled pattern is straightforward. Having reloaded it into main
+memory, you pass its pointer to <b>pcre_exec()</b> in the usual way. This should
+work even on another host, and even if that host has the opposite endianness to
+the one where the pattern was compiled.
+</P>
+<P>
+However, if you passed a pointer to custom character tables when the pattern
+was compiled (the <i>tableptr</i> argument of <b>pcre_compile()</b>), you must
+now pass a similar pointer to <b>pcre_exec()</b>, because the value saved with
+the compiled pattern will obviously be nonsense. A field in a
+<b>pcre_extra()</b> block is used to pass this data, as described in the
+<a href="pcreapi.html#extradata">section on matching a pattern</a>
+in the
+<a href="pcreapi.html"><b>pcreapi</b></a>
+documentation.
+</P>
+<P>
+If you did not provide custom character tables when the pattern was compiled,
+the pointer in the compiled pattern is NULL, which causes <b>pcre_exec()</b> to
+use PCRE's internal tables. Thus, you do not need to take any special action at
+run time in this case.
+</P>
+<P>
+If you saved study data with the compiled pattern, you need to create your own
+<b>pcre_extra</b> data block and set the <i>study_data</i> field to point to the
+reloaded study data. You must also set the PCRE_EXTRA_STUDY_DATA bit in the
+<i>flags</i> field to indicate that study data is present. Then pass the
+<b>pcre_extra</b> block to <b>pcre_exec()</b> in the usual way.
+</P>
+<br><a name="SEC4" href="#TOC1">COMPATIBILITY WITH DIFFERENT PCRE RELEASES</a><br>
+<P>
+The layout of the control block that is at the start of the data that makes up
+a compiled pattern was changed for release 5.0. If you have any saved patterns
+that were compiled with previous releases (not a facility that was previously
+advertised), you will have to recompile them for release 5.0. However, from now
+on, it should be possible to make changes in a compabible manner.
+</P>
+<P>
+Last updated: 10 September 2004
+<br>
+Copyright &copy; 1997-2004 University of Cambridge.
+<p>
+Return to the <a href="index.html">PCRE index page</a>.
+</p>
diff --git a/srclib/pcre/doc/html/pcresample.html b/srclib/pcre/doc/html/pcresample.html
new file mode 100644
index 0000000000..91cd41137d
--- /dev/null
+++ b/srclib/pcre/doc/html/pcresample.html
@@ -0,0 +1,81 @@
+<html>
+<head>
+<title>pcresample specification</title>
+</head>
+<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
+<h1>pcresample man page</h1>
+<p>
+Return to the <a href="index.html">PCRE index page</a>.
+</p>
+<p>
+This page is part of the PCRE HTML documentation. It was generated automatically
+from the original man page. If there is any nonsense in it, please consult the
+man page, in case the conversion went wrong.
+<br>
+<br><b>
+PCRE SAMPLE PROGRAM
+</b><br>
+<P>
+A simple, complete demonstration program, to get you started with using PCRE,
+is supplied in the file <i>pcredemo.c</i> in the PCRE distribution.
+</P>
+<P>
+The program compiles the regular expression that is its first argument, and
+matches it against the subject string in its second argument. No PCRE options
+are set, and default character tables are used. If matching succeeds, the
+program outputs the portion of the subject that matched, together with the
+contents of any captured substrings.
+</P>
+<P>
+If the -g option is given on the command line, the program then goes on to
+check for further matches of the same regular expression in the same subject
+string. The logic is a little bit tricky because of the possibility of matching
+an empty string. Comments in the code explain what is going on.
+</P>
+<P>
+If PCRE is installed in the standard include and library directories for your
+system, you should be able to compile the demonstration program using this
+command:
+<pre>
+ gcc -o pcredemo pcredemo.c -lpcre
+</pre>
+If PCRE is installed elsewhere, you may need to add additional options to the
+command line. For example, on a Unix-like system that has PCRE installed in
+<i>/usr/local</i>, you can compile the demonstration program using a command
+like this:
+<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:
+<pre>
+ ./pcredemo 'cat|dog' 'the cat sat on the mat'
+ ./pcredemo -g 'cat|dog' 'the dog sat on the cat'
+</pre>
+Note that there is a much more comprehensive test program, called
+<a href="pcretest.html"><b>pcretest</b>,</a>
+which supports many more facilities for testing regular expressions and the
+PCRE library. The <b>pcredemo</b> program is provided as a simple coding
+example.
+</P>
+<P>
+On some operating systems (e.g. Solaris), when PCRE is not installed in the
+standard library directory, you may get an error like this when you try to run
+<b>pcredemo</b>:
+<pre>
+ ld.so.1: a.out: fatal: libpcre.so.0: open failed: No such file or directory
+</pre>
+This is caused by the way shared library support works on those systems. You
+need to add
+<pre>
+ -R/usr/local/lib
+</pre>
+(for example) to the compile command to get round this problem.
+</P>
+<P>
+Last updated: 09 September 2004
+<br>
+Copyright &copy; 1997-2004 University of Cambridge.
+<p>
+Return to the <a href="index.html">PCRE index page</a>.
+</p>
diff --git a/srclib/pcre/doc/html/pcretest.html b/srclib/pcre/doc/html/pcretest.html
new file mode 100644
index 0000000000..d82dfcc6a5
--- /dev/null
+++ b/srclib/pcre/doc/html/pcretest.html
@@ -0,0 +1,495 @@
+<html>
+<head>
+<title>pcretest specification</title>
+</head>
+<body bgcolor="#FFFFFF" text="#00005A" link="#0066FF" alink="#3399FF" vlink="#2222BB">
+<h1>pcretest man page</h1>
+<p>
+Return to the <a href="index.html">PCRE index page</a>.
+</p>
+<p>
+This page is part of the PCRE HTML documentation. It was generated automatically
+from the original man page. If there is any nonsense in it, please consult the
+man page, in case the conversion went wrong.
+<br>
+<ul>
+<li><a name="TOC1" href="#SEC1">SYNOPSIS</a>
+<li><a name="TOC2" href="#SEC2">OPTIONS</a>
+<li><a name="TOC3" href="#SEC3">DESCRIPTION</a>
+<li><a name="TOC4" href="#SEC4">PATTERN MODIFIERS</a>
+<li><a name="TOC5" href="#SEC5">DATA LINES</a>
+<li><a name="TOC6" href="#SEC6">OUTPUT FROM PCRETEST</a>
+<li><a name="TOC7" href="#SEC7">CALLOUTS</a>
+<li><a name="TOC8" href="#SEC8">SAVING AND RELOADING COMPILED PATTERNS</a>
+<li><a name="TOC9" href="#SEC9">AUTHOR</a>
+</ul>
+<br><a name="SEC1" href="#TOC1">SYNOPSIS</a><br>
+<P>
+<b>pcretest [-C] [-d] [-i] [-m] [-o osize] [-p] [-t] [source]</b>
+<b>[destination]</b>
+</P>
+<P>
+<b>pcretest</b> was written as a test program for the PCRE regular expression
+library itself, but it can also be used for experimenting with regular
+expressions. This document describes the features of the test program; for
+details of the regular expressions themselves, see the
+<a href="pcrepattern.html"><b>pcrepattern</b></a>
+documentation. For details of the PCRE library function calls and their
+options, see the
+<a href="pcreapi.html"><b>pcreapi</b></a>
+documentation.
+</P>
+<br><a name="SEC2" href="#TOC1">OPTIONS</a><br>
+<P>
+<b>-C</b>
+Output the version number of the PCRE library, and all available information
+about the optional features that are included, and then exit.
+</P>
+<P>
+<b>-d</b>
+Behave as if each regex had the <b>/D</b> (debug) modifier; the internal
+form is output after compilation.
+</P>
+<P>
+<b>-i</b>
+Behave as if each regex had the <b>/I</b> modifier; information about the
+compiled pattern is given after compilation.
+</P>
+<P>
+<b>-m</b>
+Output the size of each compiled pattern after it has been compiled. This is
+equivalent to adding <b>/M</b> to each regular expression. For compatibility
+with earlier versions of pcretest, <b>-s</b> is a synonym for <b>-m</b>.
+</P>
+<P>
+<b>-o</b> <i>osize</i>
+Set the number of elements in the output vector that is used when calling
+<b>pcre_exec()</b> to be <i>osize</i>. The default value is 45, which is enough
+for 14 capturing subexpressions. The vector size can be changed for individual
+matching calls by including \O in the data line (see below).
+</P>
+<P>
+<b>-p</b>
+Behave as if each regex has <b>/P</b> modifier; the POSIX wrapper API is used
+to call PCRE. None of the other options has any effect when <b>-p</b> is set.
+</P>
+<P>
+<b>-t</b>
+Run each compile, study, and match many times with a timer, and output
+resulting time per compile or match (in milliseconds). Do not set <b>-m</b> with
+<b>-t</b>, because you will then get the size output a zillion times, and the
+timing will be distorted.
+</P>
+<br><a name="SEC3" href="#TOC1">DESCRIPTION</a><br>
+<P>
+If <b>pcretest</b> is given two filename arguments, it reads from the first and
+writes to the second. If it is given only one filename argument, it reads from
+that file and writes to stdout. Otherwise, it reads from stdin and writes to
+stdout, and prompts for each line of input, using "re&#62;" to prompt for regular
+expressions, and "data&#62;" to prompt for data lines.
+</P>
+<P>
+The program handles any number of sets of input on a single input file. Each
+set starts with a regular expression, and continues with any number of data
+lines to be matched against the pattern.
+</P>
+<P>
+Each data line is matched separately and independently. If you want to do
+multiple-line matches, you have to use the \n escape sequence in a single line
+of input to encode the newline characters. The maximum length of data line is
+30,000 characters.
+</P>
+<P>
+An empty line signals the end of the data lines, at which point a new regular
+expression is read. The regular expressions are given enclosed in any
+non-alphanumeric delimiters other than backslash, for example
+<pre>
+ /(a|bc)x+yz/
+</pre>
+White space before the initial delimiter is ignored. A regular expression may
+be continued over several input lines, in which case the newline characters are
+included within it. It is possible to include the delimiter within the pattern
+by escaping it, for example
+<pre>
+ /abc\/def/
+</pre>
+If you do so, the escape and the delimiter form part of the pattern, but since
+delimiters are always non-alphanumeric, this does not affect its interpretation.
+If the terminating delimiter is immediately followed by a backslash, for
+example,
+<pre>
+ /abc/\
+</pre>
+then a backslash is added to the end of the pattern. This is done to provide a
+way of testing the error condition that arises if a pattern finishes with a
+backslash, because
+<pre>
+ /abc\/
+</pre>
+is interpreted as the first line of a pattern that starts with "abc/", causing
+pcretest to read the next line as a continuation of the regular expression.
+</P>
+<br><a name="SEC4" href="#TOC1">PATTERN MODIFIERS</a><br>
+<P>
+A pattern may be followed by any number of modifiers, which are mostly single
+characters. Following Perl usage, these are referred to below as, for example,
+"the <b>/i</b> modifier", even though the delimiter of the pattern need not
+always be a slash, and no slash is used when writing modifiers. Whitespace may
+appear between the final pattern delimiter and the first modifier, and between
+the modifiers themselves.
+</P>
+<P>
+The <b>/i</b>, <b>/m</b>, <b>/s</b>, and <b>/x</b> modifiers set the PCRE_CASELESS,
+PCRE_MULTILINE, PCRE_DOTALL, or PCRE_EXTENDED options, respectively, when
+<b>pcre_compile()</b> is called. These four modifier letters have the same
+effect as they do in Perl. For example:
+<pre>
+ /caseless/i
+</pre>
+The following table shows additional modifiers for setting PCRE options that do
+not correspond to anything in Perl:
+<pre>
+ <b>/A</b> PCRE_ANCHORED
+ <b>/C</b> PCRE_AUTO_CALLOUT
+ <b>/E</b> PCRE_DOLLAR_ENDONLY
+ <b>/N</b> PCRE_NO_AUTO_CAPTURE
+ <b>/U</b> PCRE_UNGREEDY
+ <b>/X</b> PCRE_EXTRA
+</pre>
+Searching for all possible matches within each subject string can be requested
+by the <b>/g</b> or <b>/G</b> modifier. After finding a match, PCRE is called
+again to search the remainder of the subject string. The difference between
+<b>/g</b> and <b>/G</b> is that the former uses the <i>startoffset</i> argument to
+<b>pcre_exec()</b> 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).
+</P>
+<P>
+If any call to <b>pcre_exec()</b> in a <b>/g</b> or <b>/G</b> sequence matches an
+empty string, the next call is done with the PCRE_NOTEMPTY 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, and the normal
+match is retried. This imitates the way Perl handles such cases when using the
+<b>/g</b> modifier or the <b>split()</b> function.
+</P>
+<P>
+There are yet more modifiers for controlling the way <b>pcretest</b>
+operates.
+</P>
+<P>
+The <b>/+</b> 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.
+</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, which also assumes <b>/I</b>.
+It causes the internal form of compiled regular expressions to be output after
+compilation. If the pattern was studied, the information returned is also
+output.
+</P>
+<P>
+The <b>/F</b> modifier causes <b>pcretest</b> 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
+<b>/P</b> pattern modifier is specified. See also the section about saving and
+reloading compiled patterns below.
+</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.
+</P>
+<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.
+</P>
+<br><a name="SEC5" href="#TOC1">DATA LINES</a><br>
+<P>
+Before each data line is passed to <b>pcre_exec()</b>, leading and trailing
+whitespace is removed, and it is then scanned for \ escapes. Some of these are
+pretty esoteric features, intended for checking out some of the more
+complicated features of PCRE. If you are just testing "ordinary" regular
+expressions, you probably don't need any of these. The following escapes are
+recognized:
+<pre>
+ \a alarm (= BEL)
+ \b backspace
+ \e escape
+ \f formfeed
+ \n newline
+ \r carriage return
+ \t tab
+ \v vertical tab
+ \nnn octal character (up to 3 octal digits)
+ \xhh hexadecimal character (up to 2 hex digits)
+ \x{hh...} hexadecimal character, any number of digits in UTF-8 mode
+ \A pass the PCRE_ANCHORED option to <b>pcre_exec()</b>
+ \B pass the PCRE_NOTBOL option to <b>pcre_exec()</b>
+ \Cdd call pcre_copy_substring() for substring dd after a successful match (number less than 32)
+ \Cname call pcre_copy_named_substring() for substring "name" after a successful match (name termin-
+ ated by next non alphanumeric character)
+ \C+ show the current captured substrings at callout time
+ \C- do not supply a callout function
+ \C!n return 1 instead of 0 when callout number n is reached
+ \C!n!m return 1 instead of 0 when callout number n is reached for the nth time
+ \C*n pass the number n (may be negative) as callout data; this is used as the callout return value
+ \Gdd call pcre_get_substring() for substring dd after a successful match (number less than 32)
+ \Gname call pcre_get_named_substring() for substring "name" after a successful match (name termin-
+ ated by next non-alphanumeric character)
+ \L call pcre_get_substringlist() after a successful match
+ \M discover the minimum MATCH_LIMIT setting
+ \N pass the PCRE_NOTEMPTY option to <b>pcre_exec()</b>
+ \Odd set the size of the output vector passed to <b>pcre_exec()</b> to dd (any number of digits)
+ \P pass the PCRE_PARTIAL option to <b>pcre_exec()</b>
+ \S output details of memory get/free calls during matching
+ \Z pass the PCRE_NOTEOL option to <b>pcre_exec()</b>
+ \? pass the PCRE_NO_UTF8_CHECK option to <b>pcre_exec()</b>
+ \&#62;dd start the match at offset dd (any number of digits);
+ this sets the <i>startoffset</i> argument for <b>pcre_exec()</b>
+</pre>
+A backslash followed by anything else just escapes the anything else. If the
+very last character is a backslash, it is ignored. This gives a way of passing
+an empty line as data, since a real empty line terminates the data input.
+</P>
+<P>
+If \M is present, <b>pcretest</b> calls <b>pcre_exec()</b> several times, with
+different values in the <i>match_limit</i> field of the <b>pcre_extra</b> data
+structure, until it finds the minimum number that is needed for
+<b>pcre_exec()</b> to complete. This number is a measure of the amount of
+recursion and backtracking that takes place, and checking it out can be
+instructive. For most simple matches, the number is quite small, but for
+patterns with very large numbers of matching possibilities, it can become large
+very quickly with increasing length of subject string.
+</P>
+<P>
+When \O is used, the value specified may be higher or lower than the size set
+by the <b>-O</b> command line option (or defaulted to 45); \O applies only to
+the call of <b>pcre_exec()</b> for the line in which it appears.
+</P>
+<P>
+If the <b>/P</b> modifier was present on the pattern, causing the POSIX wrapper
+API to be used, only \B and \Z have any effect, causing REG_NOTBOL and
+REG_NOTEOL to be passed to <b>regexec()</b> respectively.
+</P>
+<P>
+The use of \x{hh...} to represent UTF-8 characters is not dependent on the use
+of the <b>/8</b> modifier on the pattern. It is recognized always. There may be
+any number of hexadecimal digits inside the braces. The result is from one to
+six bytes, encoded according to the UTF-8 rules.
+</P>
+<br><a name="SEC6" href="#TOC1">OUTPUT FROM PCRETEST</a><br>
+<P>
+When a match succeeds, pcretest outputs the list of captured substrings that
+<b>pcre_exec()</b> returns, starting with number 0 for the string that matched
+the whole pattern. Otherwise, it outputs "No match" or "Partial match"
+when <b>pcre_exec()</b> returns PCRE_ERROR_NOMATCH or PCRE_ERROR_PARTIAL,
+respectively, and otherwise the PCRE negative error number. Here is an example
+of an interactive pcretest run.
+<pre>
+ $ pcretest
+ PCRE version 5.00 07-Sep-2004
+
+ re&#62; /^abc(\d+)/
+ data&#62; abc123
+ 0: abc123
+ 1: 123
+ data&#62; xyz
+ No match
+</pre>
+If the strings contain any non-printing characters, they are output as \0x
+escapes, or as \x{...} escapes if the <b>/8</b> modifier was present on the
+pattern. If the pattern has the <b>/+</b> modifier, the output for substring 0
+is followed by the the rest of the subject string, identified by "0+" like
+this:
+<pre>
+ re&#62; /cat/+
+ data&#62; cataract
+ 0: cat
+ 0+ aract
+</pre>
+If the pattern has the <b>/g</b> or <b>/G</b> modifier, the results of successive
+matching attempts are output in sequence, like this:
+<pre>
+ re&#62; /\Bi(\w\w)/g
+ data&#62; Mississippi
+ 0: iss
+ 1: ss
+ 0: iss
+ 1: ss
+ 0: ipp
+ 1: pp
+</pre>
+"No match" is output only if the first match attempt fails.
+</P>
+<P>
+If any of the sequences <b>\C</b>, <b>\G</b>, or <b>\L</b> are present in a
+data line that is successfully matched, the substrings extracted by the
+convenience functions are output with C, G, or L after the string number
+instead of a colon. This is in addition to the normal full list. The string
+length (that is, the return from the extraction function) is given in
+parentheses after each string for <b>\C</b> and <b>\G</b>.
+</P>
+<P>
+Note that while patterns can be continued over several lines (a plain "&#62;"
+prompt is used for continuations), data lines may not. However newlines can be
+included in data by means of the \n escape.
+</P>
+<br><a name="SEC7" href="#TOC1">CALLOUTS</a><br>
+<P>
+If the pattern contains any callout requests, <b>pcretest</b>'s callout function
+is called during matching. By default, it displays the callout number, the
+start and current positions in the text at the callout time, and the next
+pattern item to be tested. For example, the output
+<pre>
+ ---&#62;pqrabcdef
+ 0 ^ ^ \d
+</pre>
+indicates that callout number 0 occurred for a match attempt starting at the
+fourth character of the subject string, when the pointer was at the seventh
+character of the data, and when the next pattern item was \d. Just one
+circumflex is output if the start and current positions are the same.
+</P>
+<P>
+Callouts numbered 255 are assumed to be automatic callouts, inserted as a
+result of the <b>/C</b> pattern modifier. In this case, instead of showing the
+callout number, the offset in the pattern, preceded by a plus, is output. For
+example:
+<pre>
+ re&#62; /\d?[A-E]\*/C
+ data&#62; E*
+ ---&#62;E*
+ +0 ^ \d?
+ +3 ^ [A-E]
+ +8 ^^ \*
+ +10 ^ ^
+ 0: E*
+</pre>
+The callout function in <b>pcretest</b> returns zero (carry on matching) by
+default, but you can use an \C item in a data line (as described above) to
+change this.
+</P>
+<P>
+Inserting callouts can be helpful when using <b>pcretest</b> to check
+complicated regular expressions. For further information about callouts, see
+the
+<a href="pcrecallout.html"><b>pcrecallout</b></a>
+documentation.
+</P>
+<br><a name="SEC8" href="#TOC1">SAVING AND RELOADING COMPILED PATTERNS</a><br>
+<P>
+The facilities described in this section are not available when the POSIX
+inteface to PCRE is being used, that is, when the <b>/P</b> pattern modifier is
+specified.
+</P>
+<P>
+When the POSIX interface is not in use, you can cause <b>pcretest</b> to write a
+compiled pattern to a file, by following the modifiers with &#62; and a file name.
+For example:
+<pre>
+ /pattern/im &#62;/some/file
+</pre>
+See the
+<a href="pcreprecompile.html"><b>pcreprecompile</b></a>
+documentation for a discussion about saving and re-using compiled patterns.
+</P>
+<P>
+The data that is written is binary. The first eight bytes are the length of the
+compiled pattern data followed by the length of the optional study data, each
+written as four bytes in big-endian order (most significant byte first). If
+there is no study data (either the pattern was not studied, or studying did not
+return any data), the second length is zero. The lengths are followed by an
+exact copy of the compiled pattern. If there is additional study data, this
+follows immediately after the compiled pattern. After writing the file,
+<b>pcretest</b> expects to read a new pattern.
+</P>
+<P>
+A saved pattern can be reloaded into <b>pcretest</b> by specifing &#60; and a file
+name instead of a pattern. The name of the file must not contain a &#60; character,
+as otherwise <b>pcretest</b> will interpret the line as a pattern delimited by &#60;
+characters.
+For example:
+<pre>
+ re&#62; &#60;/some/file
+ Compiled regex loaded from /some/file
+ No study data
+</pre>
+When the pattern has been loaded, <b>pcretest</b> proceeds to read data lines in
+the usual way.
+</P>
+<P>
+You can copy a file written by <b>pcretest</b> to a different host and reload it
+there, even if the new host has opposite endianness to the one on which the
+pattern was compiled. For example, you can compile on an i86 machine and run on
+a SPARC machine.
+</P>
+<P>
+File names for saving and reloading can be absolute or relative, but note that
+the shell facility of expanding a file name that starts with a tilde (~) is not
+available.
+</P>
+<P>
+The ability to save and reload files in <b>pcretest</b> is intended for testing
+and experimentation. It is not intended for production use because only a
+single pattern can be written to a file. Furthermore, there is no facility for
+supplying custom character tables for use with a reloaded pattern. If the
+original pattern was compiled with custom tables, an attempt to match a subject
+string using a reloaded pattern is likely to cause <b>pcretest</b> to crash.
+Finally, if you attempt to load a file that is not in the correct format, the
+result is undefined.
+</P>
+<br><a name="SEC9" href="#TOC1">AUTHOR</a><br>
+<P>
+Philip Hazel &#60;ph10@cam.ac.uk&#62;
+<br>
+University Computing Service,
+<br>
+Cambridge CB2 3QG, England.
+</P>
+<P>
+Last updated: 10 September 2004
+<br>
+Copyright &copy; 1997-2004 University of Cambridge.
+<p>
+Return to the <a href="index.html">PCRE index page</a>.
+</p>
diff --git a/srclib/pcre/doc/pcre.3 b/srclib/pcre/doc/pcre.3
index 738f76b4a9..54b0c3359b 100644
--- a/srclib/pcre/doc/pcre.3
+++ b/srclib/pcre/doc/pcre.3
@@ -1,1991 +1,204 @@
.TH PCRE 3
.SH NAME
-pcre - Perl-compatible regular expressions.
-.SH SYNOPSIS
-.B #include <pcre.h>
-.PP
-.SM
-.br
-.B pcre *pcre_compile(const char *\fIpattern\fR, int \fIoptions\fR,
-.ti +5n
-.B const char **\fIerrptr\fR, int *\fIerroffset\fR,
-.ti +5n
-.B const unsigned char *\fItableptr\fR);
-.PP
-.br
-.B pcre_extra *pcre_study(const pcre *\fIcode\fR, int \fIoptions\fR,
-.ti +5n
-.B const char **\fIerrptr\fR);
-.PP
-.br
-.B int pcre_exec(const pcre *\fIcode\fR, "const pcre_extra *\fIextra\fR,"
-.ti +5n
-.B "const char *\fIsubject\fR," int \fIlength\fR, int \fIstartoffset\fR,
-.ti +5n
-.B int \fIoptions\fR, int *\fIovector\fR, int \fIovecsize\fR);
-.PP
-.br
-.B int pcre_copy_substring(const char *\fIsubject\fR, int *\fIovector\fR,
-.ti +5n
-.B int \fIstringcount\fR, int \fIstringnumber\fR, char *\fIbuffer\fR,
-.ti +5n
-.B int \fIbuffersize\fR);
-.PP
-.br
-.B int pcre_get_substring(const char *\fIsubject\fR, int *\fIovector\fR,
-.ti +5n
-.B int \fIstringcount\fR, int \fIstringnumber\fR,
-.ti +5n
-.B const char **\fIstringptr\fR);
-.PP
-.br
-.B int pcre_get_substring_list(const char *\fIsubject\fR,
-.ti +5n
-.B int *\fIovector\fR, int \fIstringcount\fR, "const char ***\fIlistptr\fR);"
-.PP
-.br
-.B void pcre_free_substring(const char *\fIstringptr\fR);
-.PP
-.br
-.B void pcre_free_substring_list(const char **\fIstringptr\fR);
-.PP
-.br
-.B const unsigned char *pcre_maketables(void);
-.PP
-.br
-.B int pcre_fullinfo(const pcre *\fIcode\fR, "const pcre_extra *\fIextra\fR,"
-.ti +5n
-.B int \fIwhat\fR, void *\fIwhere\fR);
-.PP
-.br
-.B int pcre_info(const pcre *\fIcode\fR, int *\fIoptptr\fR, int
-.B *\fIfirstcharptr\fR);
-.PP
-.br
-.B char *pcre_version(void);
-.PP
-.br
-.B void *(*pcre_malloc)(size_t);
-.PP
-.br
-.B void (*pcre_free)(void *);
-
-
-
-.SH DESCRIPTION
+PCRE - Perl-compatible regular expressions
+.SH INTRODUCTION
+.rs
+.sp
The PCRE library is a set of functions that implement regular expression
-pattern matching using the same syntax and semantics as Perl 5, with just a few
-differences (see below). The current implementation corresponds to Perl 5.005,
-with some additional features from later versions. This includes some
-experimental, incomplete support for UTF-8 encoded strings. Details of exactly
-what is and what is not supported are given below.
-
-PCRE has its own native API, which is described in this document. There is also
-a set of wrapper functions that correspond to the POSIX regular expression API.
-These are described in the \fBpcreposix\fR documentation.
-
-The native API function prototypes are defined in the header file \fBpcre.h\fR,
-and on Unix systems the library itself is called \fBlibpcre.a\fR, so can be
-accessed by adding \fB-lpcre\fR to the command for linking an application which
-calls it. The header file defines the macros PCRE_MAJOR and PCRE_MINOR to
-contain the major and minor release numbers for the library. Applications can
-use these to include support for different releases.
-
-The functions \fBpcre_compile()\fR, \fBpcre_study()\fR, and \fBpcre_exec()\fR
-are used for compiling and matching regular expressions. A sample program that
-demonstrates the simplest way of using them is given in the file
-\fIpcredemo.c\fR. The last section of this man page describes how to run it.
-
-The functions \fBpcre_copy_substring()\fR, \fBpcre_get_substring()\fR, and
-\fBpcre_get_substring_list()\fR are convenience functions for extracting
-captured substrings from a matched subject string; \fBpcre_free_substring()\fR
-and \fBpcre_free_substring_list()\fR are also provided, to free the memory used
-for extracted strings.
-
-The function \fBpcre_maketables()\fR is used (optionally) to build a set of
-character tables in the current locale for passing to \fBpcre_compile()\fR.
-
-The function \fBpcre_fullinfo()\fR is used to find out information about a
-compiled pattern; \fBpcre_info()\fR is an obsolete version which returns only
-some of the available information, but is retained for backwards compatibility.
-The function \fBpcre_version()\fR returns a pointer to a string containing the
-version of PCRE and its date of release.
-
-The global variables \fBpcre_malloc\fR and \fBpcre_free\fR initially contain
-the entry points of the standard \fBmalloc()\fR and \fBfree()\fR functions
-respectively. PCRE calls the memory management functions via these variables,
-so a calling program can replace them if it wishes to intercept the calls. This
-should be done before calling any PCRE functions.
-
-
-.SH MULTI-THREADING
-The PCRE functions can be used in multi-threading applications, with the
-proviso that the memory management functions pointed to by \fBpcre_malloc\fR
-and \fBpcre_free\fR are shared by all threads.
-
-The compiled form of a regular expression is not altered during matching, so
-the same compiled pattern can safely be used by several threads at once.
-
-
-.SH COMPILING A PATTERN
-The function \fBpcre_compile()\fR is called to compile a pattern into an
-internal form. The pattern is a C string terminated by a binary zero, and
-is passed in the argument \fIpattern\fR. A pointer to a single block of memory
-that is obtained via \fBpcre_malloc\fR is returned. This contains the compiled
-code and related data. The \fBpcre\fR type is defined for the returned block;
-this is a typedef for a structure whose contents are not externally defined. It
-is up to the caller to free the memory when it is no longer required.
-
-Although the compiled code of a PCRE regex is relocatable, that is, it does not
-depend on memory location, the complete \fBpcre\fR data block is not
-fully relocatable, because it contains a copy of the \fItableptr\fR argument,
-which is an address (see below).
-
-The size of a compiled pattern is roughly proportional to the length of the
-pattern string, except that each character class (other than those containing
-just a single character, negated or not) requires 33 bytes, and repeat
-quantifiers with a minimum greater than one or a bounded maximum cause the
-relevant portions of the compiled pattern to be replicated.
-
-The \fIoptions\fR argument contains independent bits that affect the
-compilation. It should be zero if no options are required. Some of the options,
-in particular, those that are compatible with Perl, can also be set and unset
-from within the pattern (see the detailed description of regular expressions
-below). For these options, the contents of the \fIoptions\fR argument specifies
-their initial settings at the start of compilation and execution. The
-PCRE_ANCHORED option can be set at the time of matching as well as at compile
-time.
-
-If \fIerrptr\fR is NULL, \fBpcre_compile()\fR returns NULL immediately.
-Otherwise, if compilation of a pattern fails, \fBpcre_compile()\fR returns
-NULL, and sets the variable pointed to by \fIerrptr\fR to point to a textual
-error message. The offset from the start of the pattern to the character where
-the error was discovered is placed in the variable pointed to by
-\fIerroffset\fR, which must not be NULL. If it is, an immediate error is given.
-
-If the final argument, \fItableptr\fR, is NULL, PCRE uses a default set of
-character tables which are built when it is compiled, using the default C
-locale. Otherwise, \fItableptr\fR must be the result of a call to
-\fBpcre_maketables()\fR. See the section on locale support below.
-
-This code fragment shows a typical straightforward call to \fBpcre_compile()\fR:
-
- pcre *re;
- const char *error;
- int erroffset;
- re = pcre_compile(
- "^A.*Z", /* the pattern */
- 0, /* default options */
- &error, /* for error message */
- &erroffset, /* for error offset */
- NULL); /* use default character tables */
-
-The following option bits are defined in the header file:
-
- PCRE_ANCHORED
-
-If this bit is set, the pattern is forced to be "anchored", that is, it is
-constrained to match only at the start of the string which is being searched
-(the "subject string"). This effect can also be achieved by appropriate
-constructs in the pattern itself, which is the only way to do it in Perl.
-
- PCRE_CASELESS
-
-If this bit is set, letters in the pattern match both upper and lower case
-letters. It is equivalent to Perl's /i option.
-
- PCRE_DOLLAR_ENDONLY
-
-If this bit is set, a dollar metacharacter in the pattern matches only at the
-end of the subject string. Without this option, a dollar also matches
-immediately before the final character if it is a newline (but not before any
-other newlines). The PCRE_DOLLAR_ENDONLY option is ignored if PCRE_MULTILINE is
-set. There is no equivalent to this option in Perl.
-
- PCRE_DOTALL
-
-If this bit is set, a dot metacharater in the pattern matches all characters,
-including newlines. Without it, newlines are excluded. This option is
-equivalent to Perl's /s option. A negative class such as [^a] always matches a
-newline character, independent of the setting of this option.
-
- PCRE_EXTENDED
-
-If this bit is set, whitespace data characters in the pattern are totally
-ignored except when escaped or inside a character class, and characters between
-an unescaped # outside a character class and the next newline character,
-inclusive, are also ignored. This is equivalent to Perl's /x option, and makes
-it possible to include comments inside complicated patterns. Note, however,
-that this applies only to data characters. Whitespace characters may never
-appear within special character sequences in a pattern, for example within the
-sequence (?( which introduces a conditional subpattern.
-
- PCRE_EXTRA
-
-This option was invented in order to turn on additional functionality of PCRE
-that is incompatible with Perl, but it is currently of very little use. When
-set, any backslash in a pattern that is followed by a 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. 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_MULTILINE
-
-By default, PCRE treats the subject string as consisting of a single "line" of
-characters (even if it actually contains several 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 any newline in the subject
-string, respectively, as well as at the very start and end. This is equivalent
-to Perl's /m option. If there are no "\\n" characters in a subject string, or
-no occurrences of ^ or $ in a pattern, setting PCRE_MULTILINE has no
-effect.
-
- 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 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 just byte strings. However, it is available only
-if PCRE has been built to include UTF-8 support. If not, the use of this option
-provokes an error. Support for UTF-8 is new, experimental, and incomplete.
-Details of exactly what it entails are given below.
-
-
-.SH STUDYING A PATTERN
-When a pattern is going to be used several times, it is worth spending more
-time analyzing it in order to speed up the time taken for matching. The
-function \fBpcre_study()\fR takes a pointer to a compiled pattern as its first
-argument, and returns a pointer to a \fBpcre_extra\fR block (another typedef
-for a structure with hidden contents) containing additional information about
-the pattern; this can be passed to \fBpcre_exec()\fR. If no additional
-information is available, NULL is returned.
-
-The second argument contains option bits. At present, no options are defined
-for \fBpcre_study()\fR, and this argument should always be zero.
-
-The third argument for \fBpcre_study()\fR is a pointer to an error message. If
-studying succeeds (even if no data is returned), the variable it points to is
-set to NULL. Otherwise it points to a textual error message.
-
-This is a typical call to \fBpcre_study\fR():
-
- pcre_extra *pe;
- pe = pcre_study(
- re, /* result of pcre_compile() */
- 0, /* no options exist */
- &error); /* set to NULL or points to a message */
-
-At present, studying a pattern is useful only for non-anchored patterns that do
-not have a single fixed starting character. A bitmap of possible starting
-characters is created.
-
-
-.SH LOCALE SUPPORT
-PCRE handles caseless matching, and determines whether characters are letters,
-digits, or whatever, by reference to a set of tables. The library contains a
-default set of tables which is created in the default C locale when PCRE is
-compiled. This is used when the final argument of \fBpcre_compile()\fR is NULL,
-and is sufficient for many applications.
-
-An alternative set of tables can, however, be supplied. Such tables are built
-by calling the \fBpcre_maketables()\fR function, which has no arguments, in the
-relevant locale. The result can then be passed to \fBpcre_compile()\fR as often
-as necessary. For example, to build and use tables that are appropriate for the
-French locale (where accented characters with codes greater than 128 are
-treated as letters), the following code could be used:
-
- setlocale(LC_CTYPE, "fr");
- tables = pcre_maketables();
- re = pcre_compile(..., tables);
-
-The tables are built in memory that is obtained via \fBpcre_malloc\fR. The
-pointer that is passed to \fBpcre_compile\fR is saved with the compiled
-pattern, and the same tables are used via this pointer by \fBpcre_study()\fR
-and \fBpcre_exec()\fR. Thus for any single pattern, compilation, studying and
-matching all happen in the same locale, but different patterns can be compiled
-in different locales. It is the caller's responsibility to ensure that the
-memory containing the tables remains available for as long as it is needed.
-
-
-.SH INFORMATION ABOUT A PATTERN
-The \fBpcre_fullinfo()\fR function returns information about a compiled
-pattern. It replaces the obsolete \fBpcre_info()\fR function, which is
-nevertheless retained for backwards compability (and is documented below).
-
-The first argument for \fBpcre_fullinfo()\fR is a pointer to the compiled
-pattern. The second argument is the result of \fBpcre_study()\fR, or NULL if
-the pattern was not studied. The third argument specifies which piece of
-information is required, while 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 \fIcode\fR was NULL
- the argument \fIwhere\fR was NULL
- PCRE_ERROR_BADMAGIC the "magic number" was not found
- PCRE_ERROR_BADOPTION the value of \fIwhat\fR was invalid
-
-Here is a typical call of \fBpcre_fullinfo()\fR, to obtain the length of the
-compiled pattern:
-
- int rc;
- unsigned long int length;
- rc = pcre_fullinfo(
- re, /* result of pcre_compile() */
- pe, /* result of pcre_study(), or NULL */
- PCRE_INFO_SIZE, /* what is required */
- &length); /* where to put the data */
-
-The possible values for the third argument are defined in \fBpcre.h\fR, and are
-as follows:
-
- PCRE_INFO_OPTIONS
-
-Return a copy of the options with which the pattern was compiled. The fourth
-argument should point to an \fBunsigned long int\fR variable. These option bits
-are those specified in the call to \fBpcre_compile()\fR, modified by any
-top-level option settings within the pattern itself, and with the PCRE_ANCHORED
-bit forcibly set if the form of the pattern implies that it can match only at
-the start of a subject string.
-
- PCRE_INFO_SIZE
-
-Return the size of the compiled pattern, that is, the value that was passed as
-the argument to \fBpcre_malloc()\fR when PCRE was getting memory in which to
-place the compiled data. The fourth argument should point to a \fBsize_t\fR
-variable.
-
- PCRE_INFO_CAPTURECOUNT
-
-Return the number of capturing subpatterns in the pattern. The fourth argument
-should point to an \fbint\fR variable.
-
- PCRE_INFO_BACKREFMAX
-
-Return the number of the highest back reference in the pattern. The fourth
-argument should point to an \fBint\fR variable. Zero is returned if there are
-no back references.
-
- PCRE_INFO_FIRSTCHAR
-
-Return information about the first character of any matched string, for a
-non-anchored pattern. If there is a fixed first character, e.g. from a pattern
-such as (cat|cow|coyote), it is returned in the integer pointed to by
-\fIwhere\fR. Otherwise, if either
-
-(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 "\\n" 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 256-bit
-table indicating a fixed set of characters for the first character in any
-matching string, a pointer to the table is returned. Otherwise NULL is
-returned. The fourth argument should point to an \fBunsigned char *\fR
-variable.
-
- PCRE_INFO_LASTLITERAL
-
-For a non-anchored pattern, return the value of the rightmost literal character
-which must exist in any matched string, other than at its start. The fourth
-argument should point to an \fBint\fR variable. If there is no such character,
-or if the pattern is anchored, -1 is returned. For example, for the pattern
-/a\\d+z\\d+/ the returned value is 'z'.
-
-The \fBpcre_info()\fR function is now obsolete because its interface is too
-restrictive to return all the available data about a compiled pattern. New
-programs should use \fBpcre_fullinfo()\fR instead. The yield of
-\fBpcre_info()\fR is the number of capturing subpatterns, or one of the
-following negative numbers:
-
- PCRE_ERROR_NULL the argument \fIcode\fR was NULL
- PCRE_ERROR_BADMAGIC the "magic number" was not found
-
-If the \fIoptptr\fR 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 \fIfirstcharptr\fR argument is not NULL,
-it is used to pass back information about the first character of any matched
-string (see PCRE_INFO_FIRSTCHAR above).
-
-
-.SH MATCHING A PATTERN
-The function \fBpcre_exec()\fR is called to match a subject string against a
-pre-compiled pattern, which is passed in the \fIcode\fR argument. If the
-pattern has been studied, the result of the study should be passed in the
-\fIextra\fR argument. Otherwise this must be NULL.
-
-Here is an example of a simple call to \fBpcre_exec()\fR:
-
- int rc;
- int ovector[30];
- rc = pcre_exec(
- re, /* result of pcre_compile() */
- NULL, /* we didn't study the pattern */
- "some string", /* the subject string */
- 11, /* the length of the subject string */
- 0, /* start at offset 0 in the subject */
- 0, /* default options */
- ovector, /* vector for substring information */
- 30); /* number of elements in the vector */
-
-The PCRE_ANCHORED option can be passed in the \fIoptions\fR argument, whose
-unused bits must be zero. However, 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.
-
-There are also three further options that can be set only at matching time:
-
- PCRE_NOTBOL
-
-The first character of the 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.
-
- PCRE_NOTEOL
-
-The end of the 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 without PCRE_MULTILINE (at compile time) causes dollar never
-to match.
-
- 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 example, if the pattern
-
- a?b?
-
-is applied to a string not beginning with "a" or "b", it matches the empty
-string at the start of the subject. With PCRE_NOTEMPTY set, this match is not
-valid, so PCRE searches further into the string for occurrences of "a" or "b".
-
-Perl has no direct equivalent of PCRE_NOTEMPTY, but it does make a special case
-of a pattern match of the empty string within its \fBsplit()\fR function, and
-when using the /g modifier. It is possible to emulate Perl's behaviour after
-matching a null string by first trying the match again at the same offset with
-PCRE_NOTEMPTY set, and then if that fails by advancing the starting offset (see
-below) and trying an ordinary match again.
-
-The subject string is passed as a pointer in \fIsubject\fR, a length in
-\fIlength\fR, and a starting offset in \fIstartoffset\fR. Unlike the pattern
-string, the subject may contain binary zero characters. When the starting
-offset is zero, the search for a match starts at the beginning of the subject,
-and this is by far the most common case.
-
-A non-zero starting offset is useful when searching for another match in the
-same subject by calling \fBpcre_exec()\fR again after a previous success.
-Setting \fIstartoffset\fR differs from just passing over a shortened string and
-setting PCRE_NOTBOL in the case of a pattern that begins with any kind of
-lookbehind. For example, consider the pattern
-
- \\Biss\\B
-
-which finds occurrences of "iss" in the middle of words. (\\B matches only if
-the current position in the subject is not a word boundary.) When applied to
-the string "Mississipi" the first call to \fBpcre_exec()\fR finds the first
-occurrence. If \fBpcre_exec()\fR is called again with just the remainder of the
-subject, namely "issipi", it does not match, because \\B is always false at the
-start of the subject, which is deemed to be a word boundary. However, if
-\fBpcre_exec()\fR is passed the entire string again, but with \fIstartoffset\fR
-set to 4, it finds the second occurrence of "iss" because it is able to look
-behind the starting point to discover that it is preceded by a letter.
-
-If a non-zero starting offset is passed when the pattern is anchored, one
-attempt to match at the given offset is tried. This can only succeed if the
-pattern does not require the match to be at the start of the subject.
-
-In general, a pattern matches a certain portion of the subject, and in
-addition, further substrings from the subject may be picked out by parts of the
-pattern. Following the usage in Jeffrey Friedl's book, this is called
-"capturing" in what follows, and the phrase "capturing subpattern" is used for
-a fragment of a pattern that picks out a substring. PCRE supports several other
-kinds of parenthesized subpattern that do not cause substrings to be captured.
-
-Captured substrings are returned to the caller via a vector of integer offsets
-whose address is passed in \fIovector\fR. The number of elements in the vector
-is passed in \fIovecsize\fR. The first two-thirds of the vector is used to pass
-back captured substrings, each substring using a pair of integers. The
-remaining third of the vector is used as workspace by \fBpcre_exec()\fR while
-matching capturing subpatterns, and is not available for passing back
-information. The length passed in \fIovecsize\fR should always be a multiple of
-three. If it is not, it is rounded down.
-
-When a match has been successful, information about captured substrings is
-returned in pairs of integers, starting at the beginning of \fIovector\fR, and
-continuing up to two-thirds of its length at the most. The first element of a
-pair is set to the offset of the first character in a substring, and the second
-is set to the offset of the first character after the end of a substring. The
-first pair, \fIovector[0]\fR and \fIovector[1]\fR, identify the portion of the
-subject string matched by the entire pattern. The next pair is used for the
-first capturing subpattern, and so on. The value returned by \fBpcre_exec()\fR
-is the number of pairs that have been set. If there are no capturing
-subpatterns, the return value from a successful match is 1, indicating that
-just the first pair of offsets has been set.
-
-Some convenience functions are provided for extracting the captured substrings
-as separate strings. These are described in the following section.
-
-It is possible for an capturing subpattern number \fIn+1\fR to match some
-part of the subject when subpattern \fIn\fR has not been used at all. For
-example, if the string "abc" is matched against the pattern (a|(z))(bc)
-subpatterns 1 and 3 are matched, but 2 is not. When this happens, both offset
-values corresponding to the unused subpattern are set to -1.
-
-If a capturing subpattern is matched repeatedly, it is the last portion of the
-string that it matched that gets returned.
-
-If the vector is too small to hold all the captured substrings, it is used as
-far as possible (up to two-thirds of its length), and the function returns a
-value of zero. In particular, if the substring offsets are not of interest,
-\fBpcre_exec()\fR may be called with \fIovector\fR passed as NULL and
-\fIovecsize\fR as zero. However, if the pattern contains back references and
-the \fIovector\fR isn't big enough to remember the related substrings, PCRE has
-to get additional memory for use during matching. Thus it is usually advisable
-to supply an \fIovector\fR.
-
-Note that \fBpcre_info()\fR can be used to find out how many capturing
-subpatterns there are in a compiled pattern. The smallest size for
-\fIovector\fR that will allow for \fIn\fR captured substrings in addition to
-the offsets of the substring matched by the whole pattern is (\fIn\fR+1)*3.
-
-If \fBpcre_exec()\fR fails, it returns a negative number. The following are
-defined in the header file:
-
- PCRE_ERROR_NOMATCH (-1)
-
-The subject string did not match the pattern.
-
- PCRE_ERROR_NULL (-2)
-
-Either \fIcode\fR or \fIsubject\fR was passed as NULL, or \fIovector\fR was
-NULL and \fIovecsize\fR was not zero.
-
- PCRE_ERROR_BADOPTION (-3)
-
-An unrecognized bit was set in the \fIoptions\fR argument.
-
- PCRE_ERROR_BADMAGIC (-4)
-
-PCRE stores a 4-byte "magic number" at the start of the compiled code, to catch
-the case when it is passed a junk pointer. This is the error it gives when the
-magic number isn't present.
-
- PCRE_ERROR_UNKNOWN_NODE (-5)
-
-While running the pattern match, an unknown item was encountered in the
-compiled pattern. This error could be caused by a bug in PCRE or by overwriting
-of the compiled pattern.
-
- PCRE_ERROR_NOMEMORY (-6)
-
-If a pattern contains back references, but the \fIovector\fR that is passed to
-\fBpcre_exec()\fR is not big enough to remember the referenced substrings, PCRE
-gets a block of memory at the start of matching to use for this purpose. If the
-call via \fBpcre_malloc()\fR fails, this error is given. The memory is freed at
-the end of matching.
-
-
-.SH EXTRACTING CAPTURED SUBSTRINGS
-Captured substrings can be accessed directly by using the offsets returned by
-\fBpcre_exec()\fR in \fIovector\fR. For convenience, the functions
-\fBpcre_copy_substring()\fR, \fBpcre_get_substring()\fR, and
-\fBpcre_get_substring_list()\fR are provided for extracting captured substrings
-as new, separate, zero-terminated strings. A substring that contains a binary
-zero is correctly extracted and has a further zero added on the end, but the
-result does not, of course, function as a C string.
-
-The first three arguments are the same for all three functions: \fIsubject\fR
-is the subject string which has just been successfully matched, \fIovector\fR
-is a pointer to the vector of integer offsets that was passed to
-\fBpcre_exec()\fR, and \fIstringcount\fR is the number of substrings that
-were captured by the match, including the substring that matched the entire
-regular expression. This is the value returned by \fBpcre_exec\fR if it
-is greater than zero. If \fBpcre_exec()\fR returned zero, indicating that it
-ran out of space in \fIovector\fR, the value passed as \fIstringcount\fR should
-be the size of the vector divided by three.
-
-The functions \fBpcre_copy_substring()\fR and \fBpcre_get_substring()\fR
-extract a single substring, whose number is given as \fIstringnumber\fR. A
-value of zero extracts the substring that matched the entire pattern, while
-higher values extract the captured substrings. For \fBpcre_copy_substring()\fR,
-the string is placed in \fIbuffer\fR, whose length is given by
-\fIbuffersize\fR, while for \fBpcre_get_substring()\fR a new block of memory is
-obtained via \fBpcre_malloc\fR, and its address is returned via
-\fIstringptr\fR. The yield of the function is the length of the string, not
-including the terminating zero, or one of
-
- PCRE_ERROR_NOMEMORY (-6)
-
-The buffer was too small for \fBpcre_copy_substring()\fR, or the attempt to get
-memory failed for \fBpcre_get_substring()\fR.
-
- PCRE_ERROR_NOSUBSTRING (-7)
-
-There is no substring whose number is \fIstringnumber\fR.
-
-The \fBpcre_get_substring_list()\fR function extracts all available substrings
-and builds a list of pointers to them. All this is done in a single block of
-memory which is obtained via \fBpcre_malloc\fR. The address of the memory block
-is returned via \fIlistptr\fR, which is also the start of the list of string
-pointers. The end of the list is marked by a NULL pointer. The yield of the
-function is zero if all went well, or
-
- PCRE_ERROR_NOMEMORY (-6)
-
-if the attempt to get the memory block failed.
-
-When any of these functions encounter a substring that is unset, which can
-happen when capturing subpattern number \fIn+1\fR matches some part of the
-subject, but subpattern \fIn\fR has not been used at all, they return an empty
-string. This can be distinguished from a genuine zero-length substring by
-inspecting the appropriate offset in \fIovector\fR, which is negative for unset
-substrings.
-
-The two convenience functions \fBpcre_free_substring()\fR and
-\fBpcre_free_substring_list()\fR can be used to free the memory returned by
-a previous call of \fBpcre_get_substring()\fR or
-\fBpcre_get_substring_list()\fR, respectively. They do nothing more than call
-the function pointed to by \fBpcre_free\fR, which of course could be called
-directly from a C program. However, PCRE is used in some situations where it is
-linked via a special interface to another programming language which cannot use
-\fBpcre_free\fR directly; it is for these cases that the functions are
-provided.
-
-
+pattern matching using the same syntax and semantics as Perl, with just a few
+differences. The current implementation of PCRE (release 5.x) corresponds
+approximately with Perl 5.8, including support for UTF-8 encoded strings and
+Unicode general category properties. However, this support has to be explicitly
+enabled; it is not the default.
+.P
+PCRE is written in C and released as a C library. A number of people have
+written wrappers and interfaces of various kinds. A C++ class is included in
+these contributions, which can be found in the \fIContrib\fR directory at the
+primary FTP site, which is:
+.sp
+.\" HTML <a href="ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre">
+.\" </a>
+ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre
+.P
+Details of exactly which Perl regular expression features are and are not
+supported by PCRE are given in separate documents. See the
+.\" HREF
+\fBpcrepattern\fR
+.\"
+and
+.\" HREF
+\fBpcrecompat\fR
+.\"
+pages.
+.P
+Some features of PCRE can be included, excluded, or changed when the library is
+built. The
+.\" HREF
+\fBpcre_config()\fR
+.\"
+function makes it possible for a client to discover which features are
+available. The features themselves are described in the
+.\" HREF
+\fBpcrebuild\fP
+.\"
+page. Documentation about building PCRE for various operating systems can be
+found in the \fBREADME\fP file in the source distribution.
+.
+.
+.SH "USER DOCUMENTATION"
+.rs
+.sp
+The user documentation for PCRE comprises a number of different sections. In
+the "man" format, each of these is a separate "man page". In the HTML format,
+each is a separate page, linked from the index page. In the plain text format,
+all the sections are concatenated, for ease of searching. The sections are as
+follows:
+.sp
+ pcre this document
+ pcreapi details of PCRE's native API
+ pcrebuild options for building PCRE
+ pcrecallout details of the callout feature
+ pcrecompat discussion of Perl compatibility
+ pcregrep description of the \fBpcregrep\fP command
+ pcrepartial details of the partial matching facility
+.\" JOIN
+ pcrepattern syntax and semantics of supported
+ regular expressions
+ pcreperform discussion of performance issues
+ pcreposix the POSIX-compatible API
+ pcreprecompile details of saving and re-using precompiled patterns
+ pcresample discussion of the sample program
+ pcretest description of the \fBpcretest\fP testing command
+.sp
+In addition, in the "man" and HTML formats, there is a short page for each
+library function, listing its arguments and results.
+.
+.
.SH LIMITATIONS
+.rs
+.sp
There are some size limitations in PCRE but it is hoped that they will never in
practice be relevant.
-The maximum length of a compiled pattern is 65539 (sic) bytes.
+.P
+The maximum length of a compiled pattern is 65539 (sic) bytes if PCRE is
+compiled with the default internal linkage size of 2. If you want to process
+regular expressions that are truly enormous, you can compile PCRE with an
+internal linkage size of 3 or 4 (see the \fBREADME\fP file in the source
+distribution and the
+.\" HREF
+\fBpcrebuild\fP
+.\"
+documentation for details). In these cases the limit is substantially larger.
+However, the speed of execution will be slower.
+.P
All values in repeating quantifiers must be less than 65536.
-There maximum number of capturing subpatterns is 65535.
+The maximum number of capturing subpatterns is 65535.
+.P
There is no limit to the number of non-capturing subpatterns, but the maximum
depth of nesting of all kinds of parenthesized subpattern, including capturing
subpatterns, assertions, and other types of subpattern, is 200.
-
+.P
The maximum length of a subject string is the largest positive number that an
integer variable can hold. However, PCRE uses recursion to handle subpatterns
and indefinite repetition. This means that the available stack space may limit
the size of a subject string that can be processed by certain patterns.
-
-
-.SH DIFFERENCES FROM PERL
-The differences described here are with respect to Perl 5.005.
-
-1. By default, a whitespace character is any character that the C library
-function \fBisspace()\fR recognizes, though it is possible to compile PCRE with
-alternative character type tables. Normally \fBisspace()\fR matches space,
-formfeed, newline, carriage return, horizontal tab, and vertical tab. Perl 5
-no longer includes vertical tab in its set of whitespace characters. The \\v
-escape that was in the Perl documentation for a long time was never in fact
-recognized. However, the character itself was treated as whitespace at least
-up to 5.002. In 5.004 and 5.005 it does not match \\s.
-
-2. PCRE does not allow repeat quantifiers on lookahead assertions. Perl permits
-them, but they do not mean what you might think. For example, (?!a){3} does
-not assert that the next three characters are not "a". It just asserts that the
-next character is not "a" three times.
-
-3. Capturing subpatterns that occur inside negative lookahead assertions are
-counted, but their entries in the offsets vector are never set. Perl sets its
-numerical variables from any such patterns that are matched before the
-assertion fails to match something (thereby succeeding), but only if the
-negative lookahead assertion contains just one branch.
-
-4. Though binary zero characters are supported in the subject string, they are
-not allowed in a pattern string because it is passed as a normal C string,
-terminated by zero. The escape sequence "\\0" can be used in the pattern to
-represent a binary zero.
-
-5. The following Perl escape sequences are not supported: \\l, \\u, \\L, \\U,
-\\E, \\Q. In fact these are implemented by Perl's general string-handling and
-are not part of its pattern matching engine.
-
-6. The Perl \\G assertion is not supported as it is not relevant to single
-pattern matches.
-
-7. Fairly obviously, PCRE does not support the (?{code}) and (?p{code})
-constructions. However, there is some experimental support for recursive
-patterns using the non-Perl item (?R).
-
-8. There are at the time of writing some oddities in Perl 5.005_02 concerned
-with the settings of captured strings when part of a pattern is repeated. For
-example, matching "aba" against the pattern /^(a(b)?)+$/ sets $2 to the value
-"b", but matching "aabbaa" against /^(aa(bb)?)+$/ leaves $2 unset. However, if
-the pattern is changed to /^(aa(b(b))?)+$/ then $2 (and $3) are set.
-
-In Perl 5.004 $2 is set in both cases, and that is also true of PCRE. If in the
-future Perl changes to a consistent state that is different, PCRE may change to
-follow.
-
-9. Another as yet unresolved discrepancy is that in Perl 5.005_02 the pattern
-/^(a)?(?(1)a|b)+$/ matches the string "a", whereas in PCRE it does not.
-However, in both Perl and PCRE /^(a)?a/ matched against "a" leaves $1 unset.
-
-10. PCRE provides some extensions to the Perl regular expression facilities:
-
-(a) Although lookbehind assertions must match fixed length strings, each
-alternative branch of a lookbehind assertion can match a different length of
-string. Perl 5.005 requires them all to have the same length.
-
-(b) If PCRE_DOLLAR_ENDONLY is set and PCRE_MULTILINE is not set, the $ meta-
-character matches only at the very end of the string.
-
-(c) If PCRE_EXTRA is set, a backslash followed by a letter with no special
-meaning is faulted.
-
-(d) If PCRE_UNGREEDY is set, the greediness of the repetition quantifiers is
-inverted, that is, by default they are not greedy, but if followed by a
-question mark they are.
-
-(e) PCRE_ANCHORED can be used to force a pattern to be tried only at the start
-of the subject.
-
-(f) The PCRE_NOTBOL, PCRE_NOTEOL, and PCRE_NOTEMPTY options for
-\fBpcre_exec()\fR have no Perl equivalents.
-
-(g) The (?R) construct allows for recursive pattern matching (Perl 5.6 can do
-this using the (?p{code}) construct, which PCRE cannot of course support.)
-
-
-.SH REGULAR EXPRESSION DETAILS
-The syntax and semantics of the regular expressions supported by PCRE are
-described below. Regular expressions are also described in the Perl
-documentation and in a number of other books, some of which have copious
-examples. Jeffrey Friedl's "Mastering Regular Expressions", published by
-O'Reilly (ISBN 1-56592-257), covers them in great detail.
-
-The description here is intended as reference documentation. The basic
-operation of PCRE is on strings of bytes. However, there is the beginnings of
-some support for UTF-8 character strings. To use this support you must
-configure PCRE to include it, and then call \fBpcre_compile()\fR with the
-PCRE_UTF8 option. How this affects the pattern matching is described in the
-final section of this document.
-
-A regular expression is a pattern that is matched against a subject string from
-left to right. Most characters stand for themselves in a pattern, and match the
-corresponding characters in the subject. As a trivial example, the pattern
-
- The quick brown fox
-
-matches a portion of a subject string that is identical to itself. The power of
-regular expressions comes from the ability to include alternatives and
-repetitions in the pattern. These are encoded in the pattern by the use of
-\fImeta-characters\fR, which do not stand for themselves but instead are
-interpreted in some special way.
-
-There are two different sets of meta-characters: those that are recognized
-anywhere in the pattern except within square brackets, and those that are
-recognized in square brackets. Outside square brackets, the meta-characters are
-as follows:
-
- \\ general escape character with several uses
- ^ assert start of subject (or line, in multiline mode)
- $ assert end of subject (or line, in multiline mode)
- . match any character except newline (by default)
- [ start character class definition
- | start of alternative branch
- ( start subpattern
- ) end subpattern
- ? extends the meaning of (
- also 0 or 1 quantifier
- also quantifier minimizer
- * 0 or more quantifier
- + 1 or more quantifier
- { start min/max quantifier
-
-Part of a pattern that is in square brackets is called a "character class". In
-a character class the only meta-characters are:
-
- \\ general escape character
- ^ negate the class, but only if the first character
- - indicates character range
- ] terminates the character class
-
-The following sections describe the use of each of the meta-characters.
-
-
-.SH BACKSLASH
-The backslash character has several uses. Firstly, if it is followed by a
-non-alphameric character, it takes away any special meaning that character may
-have. This use of backslash as an escape character applies both inside and
-outside character classes.
-
-For example, if you want to match a "*" character, you write "\\*" in the
-pattern. This applies whether or not the following character would otherwise be
-interpreted as a meta-character, so it is always safe to precede a
-non-alphameric with "\\" to specify that it stands for itself. In particular,
-if you want to match a backslash, you write "\\\\".
-
-If a pattern is compiled with the PCRE_EXTENDED option, whitespace in the
-pattern (other than in a character class) and characters between a "#" outside
-a character class and the next newline character are ignored. An escaping
-backslash can be used to include a whitespace or "#" character as part of the
-pattern.
-
-A second use of backslash provides a way of encoding non-printing characters
-in patterns in a visible manner. There is no restriction on the appearance of
-non-printing characters, apart from the binary zero that terminates a pattern,
-but when a pattern is being prepared by text editing, it is usually easier to
-use one of the following escape sequences than the binary character it
-represents:
-
- \\a alarm, that is, the BEL character (hex 07)
- \\cx "control-x", where x is any character
- \\e escape (hex 1B)
- \\f formfeed (hex 0C)
- \\n newline (hex 0A)
- \\r carriage return (hex 0D)
- \\t tab (hex 09)
- \\xhh character with hex code hh
- \\ddd character with octal code ddd, or backreference
-
-The precise effect of "\\cx" is as follows: if "x" is a lower case letter, it
-is converted to upper case. Then bit 6 of the character (hex 40) is inverted.
-Thus "\\cz" becomes hex 1A, but "\\c{" becomes hex 3B, while "\\c;" becomes hex
-7B.
-
-After "\\x", up to two hexadecimal digits are read (letters can be in upper or
-lower case).
-
-After "\\0" up to two further octal digits are read. In both cases, if there
-are fewer than two digits, just those that are present are used. Thus the
-sequence "\\0\\x\\07" specifies two binary zeros followed by a BEL character.
-Make sure you supply two digits after the initial zero if the character that
-follows is itself an octal digit.
-
-The handling of a backslash followed by a digit other than 0 is complicated.
-Outside a character class, PCRE reads it and any following digits as a decimal
-number. If the number is less than 10, or if there have been at least that many
-previous capturing left parentheses in the expression, the entire sequence is
-taken as a \fIback reference\fR. A description of how this works is given
-later, following the discussion of parenthesized subpatterns.
-
-Inside a character class, or if the decimal number is greater than 9 and there
-have not been that many capturing subpatterns, PCRE re-reads up to three octal
-digits following the backslash, and generates a single byte from the least
-significant 8 bits of the value. Any subsequent digits stand for themselves.
-For example:
-
- \\040 is another way of writing a space
- \\40 is the same, provided there are fewer than 40
- previous capturing subpatterns
- \\7 is always a back reference
- \\11 might be a back reference, or another way of
- writing a tab
- \\011 is always a tab
- \\0113 is a tab followed by the character "3"
- \\113 is the character with octal code 113 (since there
- can be no more than 99 back references)
- \\377 is a byte consisting entirely of 1 bits
- \\81 is either a back reference, or a binary zero
- followed by the two characters "8" and "1"
-
-Note that octal values of 100 or greater must not be introduced by a leading
-zero, because no more than three octal digits are ever read.
-
-All the sequences that define a single byte 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). Outside a character
-class it has a different meaning (see below).
-
-The third use of backslash is for specifying generic character types:
-
- \\d any decimal digit
- \\D any character that is not a decimal digit
- \\s any whitespace character
- \\S any character that is not a whitespace character
- \\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.
-
-A "word" character is any letter or digit or the underscore character, that is,
-any character which can be part of a Perl "word". The definition of letters and
-digits is controlled by PCRE's character tables, and may vary if locale-
-specific matching is taking place (see "Locale support" above). For example, in
-the "fr" (French) locale, some character codes greater than 128 are used for
-accented letters, and these are matched by \\w.
-
-These character type 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
-there is no character to match.
-
-The fourth use of backslash is for certain simple assertions. An assertion
-specifies a condition that has to be met at a particular point in a match,
-without consuming any characters from the subject string. The use of
-subpatterns for more complicated assertions is described below. The backslashed
-assertions are
-
- \\b word boundary
- \\B not a word boundary
- \\A start of subject (independent of multiline mode)
- \\Z end of subject or newline at end (independent of multiline mode)
- \\z end of subject (independent of multiline mode)
-
-These assertions may not appear in character classes (but note that "\\b" has a
-different meaning, namely the backspace character, inside a character 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.
-
-The \\A, \\Z, and \\z assertions differ from the traditional circumflex and
-dollar (described below) in that they only ever match at the very start and end
-of the subject string, whatever options are set. They are not affected by the
-PCRE_NOTBOL or PCRE_NOTEOL options. If the \fIstartoffset\fR argument of
-\fBpcre_exec()\fR is non-zero, \\A can never match. The difference between \\Z
-and \\z is that \\Z matches before a newline that is the last character of the
-string as well as at the end of the string, whereas \\z matches only at the
-end.
-
-
-.SH CIRCUMFLEX AND DOLLAR
-Outside a character class, in the default matching mode, the circumflex
-character is an assertion which is true only if the current matching point is
-at the start of the subject string. If the \fIstartoffset\fR argument of
-\fBpcre_exec()\fR is non-zero, circumflex can never match. 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 subject, 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 which is true only if the current matching
-point is at the end of the subject string, or immediately before a newline
-character that is the last character in 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 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 compile or matching
-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, they match immediately
-after and immediately before an internal "\\n" character, respectively, in
-addition to matching at the start and end of the subject string. For example,
-the pattern /^abc$/ matches the subject string "def\\nabc" 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 \fIstartoffset\fR argument of
-\fBpcre_exec()\fR 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 PCRE_MULTILINE is set or not.
-
-
-.SH FULL STOP (PERIOD, DOT)
-Outside a character class, a dot in the pattern matches any one character in
-the subject, including a non-printing character, but not (by default) newline.
-If the PCRE_DOTALL option is set, dots match newlines as well. The handling of
-dot is entirely independent of the handling of circumflex and dollar, the only
-relationship being that they both involve newline characters. Dot has no
-special meaning in a character class.
-
-
-.SH SQUARE BRACKETS
-An opening square bracket introduces a character class, terminated by a closing
-square bracket. A closing square bracket on its own is not special. 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 present) or
-escaped with a backslash.
-
-A character class matches a single character in the subject; the character must
-be in the set of characters defined by the class, unless the first character in
-the class 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. Note that a
-circumflex is just a convenient notation for specifying the characters which
-are in the class by enumerating those that are not. It is not an assertion: it
-still consumes a character from the subject string, and fails if the current
-pointer is at the end of the string.
-
-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.
-
-The newline character is never treated in any special way in character classes,
-whatever the setting of the PCRE_DOTALL or PCRE_MULTILINE options is. A class
-such as [^a] will always match a newline.
-
-The minus (hyphen) character can be used to specify a range of characters 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 character 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 interpreted as a single class containing a
-range followed by two separate characters. The octal or hexadecimal
-representation of "]" can also be used to end a range.
-
-Ranges operate in ASCII collating sequence. They can also be used for
-characters specified numerically, for example [\\000-\\037]. 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 if character tables for the "fr" locale are in use,
-[\\xc8-\\xcb] matches accented E characters in both cases.
-
-The character types \\d, \\D, \\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.
-
-All non-alphameric characters other than \\, -, ^ (at the start) and the
-terminating ] are non-special in character classes, but it does no harm if they
-are escaped.
-
-
-.SH POSIX CHARACTER CLASSES
-Perl 5.6 (not yet released at the time of writing) is going to support the
-POSIX notation for character classes, which uses names enclosed by [: and :]
-within the enclosing square brackets. PCRE supports this notation. For example,
-
- [01[:alpha:]%]
-
-matches "0", "1", any alphabetic character, or "%". The supported class names
-are
-
- alnum letters and digits
- alpha letters
- ascii character codes 0 - 127
- cntrl control characters
- digit decimal digits (same as \\d)
- graph printing characters, excluding space
- lower lower case letters
- print printing characters, including space
- punct printing characters, excluding letters and digits
- space white space (same as \\s)
- upper upper case letters
- word "word" characters (same as \\w)
- xdigit hexadecimal digits
-
-The names "ascii" and "word" are Perl extensions. 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 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.
-
-
-.SH VERTICAL BAR
-Vertical bar characters are used to separate alternative patterns. For example,
-the pattern
-
- gilbert|sullivan
-
-matches either "gilbert" or "sullivan". Any number of alternatives may appear,
-and an empty alternative is permitted (matching the empty string).
-The matching process tries each alternative in turn, from left to right,
-and the first one that succeeds is used. If the alternatives are within a
-subpattern (defined below), "succeeds" means matching the rest of the main
-pattern as well as the alternative in the subpattern.
-
-
-.SH INTERNAL OPTION SETTING
-The settings of PCRE_CASELESS, PCRE_MULTILINE, PCRE_DOTALL, and PCRE_EXTENDED
-can be changed from within the pattern by a sequence of Perl option letters
-enclosed between "(?" and ")". The option letters are
-
- i for PCRE_CASELESS
- m for PCRE_MULTILINE
- s for PCRE_DOTALL
- x for PCRE_EXTENDED
-
-For example, (?im) sets caseless, multiline matching. It is also possible to
-unset these options by preceding the letter with a hyphen, and a combined
-setting and unsetting such as (?im-sx), which sets PCRE_CASELESS and
-PCRE_MULTILINE while unsetting PCRE_DOTALL and PCRE_EXTENDED, is also
-permitted. If a letter appears both before and after the hyphen, the option is
-unset.
-
-The scope of these option changes depends on where in the pattern the setting
-occurs. For settings that are outside any subpattern (defined below), the
-effect is the same as if the options were set or unset at the start of
-matching. The following patterns all behave in exactly the same way:
-
- (?i)abc
- a(?i)bc
- ab(?i)c
- abc(?i)
-
-which in turn is the same as compiling the pattern abc with PCRE_CASELESS set.
-In other words, such "top level" settings apply to the whole pattern (unless
-there are other changes inside subpatterns). If there is more than one setting
-of the same option at top level, the rightmost setting is used.
-
-If an option change occurs inside a subpattern, the effect is different. This
-is a change of behaviour in Perl 5.005. An option change inside a subpattern
-affects only that part of the subpattern that follows it, so
-
- (a(?i)b)c
-
-matches abc and aBc and no other strings (assuming PCRE_CASELESS is not used).
-By this means, options can be made to have different settings in different
-parts of the pattern. Any changes made in one alternative do carry on
-into subsequent branches within the same subpattern. For example,
-
- (a(?i)b|c)
-
-matches "ab", "aB", "c", and "C", even though when matching "C" the first
-branch is abandoned before the option setting. This is because the effects of
-option settings happen at compile time. There would be some very weird
-behaviour otherwise.
-
-The PCRE-specific options PCRE_UNGREEDY and PCRE_EXTRA can be changed in the
-same way as the Perl-compatible options by using the characters U and X
-respectively. The (?X) flag setting is special in that it must always occur
-earlier in the pattern than any of the additional features it turns on, even
-when it is at top level. It is best put at the start.
-
-
-.SH SUBPATTERNS
-Subpatterns are delimited by parentheses (round brackets), which can be nested.
-Marking part of a pattern as a subpattern does two things:
-
-1. It localizes a set of alternatives. For example, the pattern
-
- cat(aract|erpillar|)
-
-matches one of the words "cat", "cataract", or "caterpillar". Without the
-parentheses, it would match "cataract", "erpillar" or the empty string.
-
-2. It sets up the subpattern as a capturing subpattern (as defined above).
-When the whole pattern matches, that portion of the subject string that matched
-the subpattern is passed back to the caller via the \fIovector\fR argument of
-\fBpcre_exec()\fR. Opening parentheses are counted from left to right (starting
-from 1) to obtain the numbers of the capturing subpatterns.
-
-For example, if the string "the red king" is matched against the pattern
-
- the ((red|white) (king|queen))
-
-the captured substrings are "red king", "red", and "king", and are numbered 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 "?:", the
-subpattern does not do any capturing, 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))
-
-the captured substrings are "white queen" and "queen", and are numbered 1 and
-2. The maximum number of captured substrings is 99, and the maximum number of
-all subpatterns, both capturing and non-capturing, is 200.
-
-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 "Saturday".
-
-
-.SH REPETITION
-Repetition is specified by quantifiers, which can follow any of the following
-items:
-
- a single character, possibly escaped
- the . metacharacter
- a character class
- a back reference (see next section)
- a parenthesized subpattern (unless it is an assertion - see below)
-
-The general repetition quantifier specifies a minimum and maximum number 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. Thus
-
- [aeiou]{3,}
-
-matches at least 3 successive vowels, but may match many more, while
-
- \\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 example, {,6} is not a
-quantifier, but a literal string of four characters.
-
-The quantifier {0} is permitted, causing the expression to behave as if the
-previous item and the quantifier were not present.
-
-For convenience (and historical compatibility) the three most common
-quantifiers have single-character 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 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 broken.
-
-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 the
-sequences /* and */ and within the sequence, individual * and / characters may
-appear. An attempt to match C comments by applying the pattern
-
- /\\*.*\\*/
-
-to the string
-
- /* first command */ not comment /* second comment */
-
-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 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 appear doubled, as in
-
- \\d??\\d
-
-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 which 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 store 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 (equivalent
-to Perl's /s) is set, thus allowing the . 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 treats such a pattern as
-though it were preceded by \\A. In cases where it is known that the subject
-string contains no newlines, it is worth setting PCRE_DOTALL when the pattern
-begins with .* in order to obtain this optimization, or alternatively using ^
-to indicate anchoring explicitly.
-
-When a capturing subpattern is repeated, the value captured is the substring
-that matched the final iteration. For example, after
-
- (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 iterations. For
-example, after
-
- /(a|(b))+/
-
-matches "aba" the value of the second captured substring is "b".
-
-
-.SH BACK REFERENCES
-Outside a character class, a backslash followed by a digit greater than 0 (and
-possibly further digits) is a back reference to a capturing subpattern earlier
-(i.e. 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 pattern. In other words, the
-parentheses that are referenced need not be to the left of the reference for
-numbers less than 10. See the section entitled "Backslash" above for further
-details of the handling of digits following a backslash.
-
-A back reference matches whatever actually matched the capturing subpattern in
-the current subject string, rather than anything matching the subpattern
-itself. 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 example,
-
- ((?i)rah)\\s+\\1
-
-matches "rah rah" and "RAH RAH", but not "RAH rah", even though the original
-capturing subpattern is matched caselessly.
-
-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. For example, the pattern
-
- (a|(bc))\\2
-
-always fails if it starts to match "a" rather than "bc". Because there may be
-up to 99 back references, all digits following the backslash are taken
-as part of a potential back reference 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 an empty
-comment 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 subpatterns. For
-example, the pattern
-
- (a|b\\1)+
-
-matches any number of "a"s and also "aba", "ababbaa" etc. At each iteration 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.
-
-
-.SH ASSERTIONS
-An assertion is a test on the characters following or preceding the current
-matching point that does not actually consume any characters. The simple
-assertions coded as \\b, \\B, \\A, \\Z, \\z, ^ and $ are described above. More
-complicated assertions are coded as subpatterns. There are two kinds: those
-that look ahead of the current position in the subject string, and those that
-look behind it.
-
-An assertion subpattern is matched in the normal way, except that it does not
-cause the current matching position to be changed. Lookahead assertions start
-with (?= for positive assertions and (?! for negative assertions. For example,
-
- \\w+(?=;)
-
-matches a word followed by a semicolon, but does not include the semicolon in
-the match, and
-
- foo(?!bar)
-
-matches any occurrence of "foo" that is not followed by "bar". Note that the
-apparently similar pattern
-
- (?!foo)bar
-
-does not find an occurrence of "bar" that is preceded by something other than
-"foo"; it finds any occurrence of "bar" whatsoever, because the assertion
-(?!foo) is always true when the next three characters are "bar". A
-lookbehind assertion is needed to achieve this effect.
-
-Lookbehind assertions start with (?<= for positive assertions and (?<! for
-negative assertions. For example,
-
- (?<!foo)bar
-
-does find an occurrence of "bar" that is not preceded by "foo". The contents of
-a lookbehind assertion are restricted such that all the strings it matches must
-have a fixed length. However, if there are several alternatives, they do not
-all have to have the same fixed length. Thus
-
- (?<=bullock|donkey)
-
-is permitted, but
-
- (?<!dogs?|cats?)
-
-causes an error at compile time. Branches that match different length strings
-are permitted only at the top level of a lookbehind assertion. This is an
-extension compared with Perl 5.005, which requires all branches to match the
-same length of string. An assertion such as
-
- (?<=ab(c|de))
-
-is not permitted, because its single top-level branch can match two different
-lengths, but it is acceptable if rewritten to use two top-level branches:
-
- (?<=abc|abde)
-
-The implementation of lookbehind assertions is, for each alternative, to
-temporarily move the current position back by the fixed width and then try to
-match. If there are insufficient characters before the current position, the
-match is deemed to fail. Lookbehinds in conjunction with once-only subpatterns
-can be particularly useful for matching at the ends of strings; an example is
-given at the end of the section on once-only subpatterns.
-
-Several assertions (of any sort) may occur in succession. For example,
-
- (?<=\\d{3})(?<!999)foo
-
-matches "foo" preceded by three digits that are not "999". Notice that each of
-the assertions is applied independently at the same point in the subject
-string. First there is a check that the previous three characters are all
-digits, and then there is a check that the same three characters are not "999".
-This pattern does \fInot\fR match "foo" preceded by six characters, the first
-of which are digits and the last three of which are not "999". For example, it
-doesn't match "123abcfoo". A pattern to do that is
-
- (?<=\\d{3}...)(?<!999)foo
-
-This time the first assertion looks at the preceding six characters, checking
-that the first three are digits, and then the second assertion checks that the
-preceding three characters are not "999".
-
-Assertions can be nested in any combination. For example,
-
- (?<=(?<!foo)bar)baz
-
-matches an occurrence of "baz" that is preceded by "bar" which in turn is not
-preceded by "foo", while
-
- (?<=\\d{3}(?!999)...)foo
-
-is another pattern which matches "foo" preceded by three digits and any three
-characters that are not "999".
-
-Assertion subpatterns are not capturing subpatterns, and may not be repeated,
-because it makes no sense to assert the same thing several times. If any kind
-of assertion contains capturing subpatterns within it, these are counted for
-the purposes of numbering the capturing subpatterns in the whole pattern.
-However, substring capturing is carried out only for positive assertions,
-because it does not make sense for negative assertions.
-
-Assertions count towards the maximum of 200 parenthesized subpatterns.
-
-
-.SH ONCE-ONLY SUBPATTERNS
-With both maximizing and minimizing 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 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. Once-only
-subpatterns provide the means for specifying that once a portion of the pattern
-has matched, it is not to be re-evaluated in this way, so the matcher would
-give up immediately on failing to match "foo" the first time. The notation is
-another kind of special parenthesis, starting with (?> as in this example:
-
- (?>\\d+)bar
-
-This kind of parenthesis "locks up" the part of the pattern it contains 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 match, if anchored at
-the current point in the subject string.
-
-Once-only 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 prepared 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.
-
-This construction can of course contain arbitrarily complicated subpatterns,
-and it can be nested.
-
-Once-only subpatterns can be used in conjunction with lookbehind assertions to
-specify efficient matching at the end of the subject string. Consider a simple
-pattern such as
-
- abcd$
-
-when applied to a long string which does not match. Because matching proceeds
-from left to right, PCRE will look for each "a" in the subject and then see if
-what follows matches the rest of the pattern. If the pattern is specified as
-
- ^.*abcd$
-
-the initial .* matches the entire string at first, but when this fails (because
-there is no following "a"), it backtracks to match all but the last character,
-then all but the last two characters, and so on. Once again the search for "a"
-covers the entire string, from right to left, so we are no better off. However,
-if the pattern is written as
-
- ^(?>.*)(?<=abcd)
-
-there can be no backtracking for the .* item; it can match only the entire
-string. The subsequent lookbehind assertion does a single test on the last four
-characters. If it fails, the match fails immediately. For long strings, this
-approach makes a significant difference to the processing time.
-
-When a pattern contains an unlimited repeat inside a subpattern that can itself
-be repeated an unlimited number of times, the use of a once-only subpattern 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, 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 two repeats in a large number of ways, and all have to
-be tried. (The example used [!?] 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 character that
-is required for a match, and fail early if it is not present in the string.)
-If the pattern is changed to
-
- ((?>\\D+)|<\\d+>)*[!?]
-
-sequences of non-digits cannot be broken, and failure happens quickly.
-
-
-.SH CONDITIONAL SUBPATTERNS
-It is possible to cause the matching process to obey a subpattern
-conditionally or to choose between two alternative subpatterns, depending on
-the result of an assertion, or whether a previous capturing subpattern matched
-or not. The two possible forms of conditional subpattern are
-
- (?(condition)yes-pattern)
- (?(condition)yes-pattern|no-pattern)
-
-If the condition is satisfied, the yes-pattern is used; otherwise the
-no-pattern (if present) is used. If there are more than two alternatives in the
-subpattern, a compile-time error occurs.
-
-There are two kinds of condition. If the text between the parentheses consists
-of a sequence of digits, the condition is satisfied if the capturing subpattern
-of that number has previously matched. The number must be greater than zero.
-Consider the following pattern, which contains non-significant white space to
-make it more readable (assume the PCRE_EXTENDED option) and to divide it into
-three parts for ease of discussion:
-
- ( \\( )? [^()]+ (?(1) \\) )
-
-The first part matches an optional opening parenthesis, and if that
-character is present, sets it as the first captured substring. The second part
-matches one or more characters that are not parentheses. The third part is a
-conditional subpattern that tests whether the first set of parentheses matched
-or not. If they did, that is, if subject started with an opening parenthesis,
-the condition is true, and so the yes-pattern is executed and a closing
-parenthesis is required. Otherwise, since no-pattern is not present, the
-subpattern matches nothing. In other words, this pattern matches a sequence of
-non-parentheses, optionally enclosed in parentheses.
-
-If the condition is not a sequence of digits, it must be an assertion. This may
-be a positive or negative lookahead or lookbehind assertion. Consider this
-pattern, again containing non-significant white space, and with the two
-alternatives on the second line:
-
- (?(?=[^a-z]*[a-z])
- \\d{2}-[a-z]{3}-\\d{2} | \\d{2}-\\d{2}-\\d{2} )
-
-The condition is a positive lookahead assertion that matches an optional
-sequence of non-letters followed by a letter. In other words, it tests for the
-presence of at least one letter in the subject. If a letter is found, the
-subject is matched against the first alternative; otherwise it is matched
-against the second. This pattern matches strings in one of the two forms
-dd-aaa-dd or dd-dd-dd, where aaa are letters and dd are digits.
-
-
-.SH COMMENTS
-The sequence (?# marks the start of a comment which continues up to the next
-closing parenthesis. Nested parentheses are not permitted. The characters
-that make up a comment play no part in the pattern matching at all.
-
-If the PCRE_EXTENDED option is set, an unescaped # character outside a
-character class introduces a comment that continues up to the next newline
-character in the pattern.
-
-
-.SH RECURSIVE PATTERNS
-Consider the problem of matching a string in parentheses, allowing for
-unlimited nested parentheses. Without the use of recursion, the best that can
-be done is to use a pattern that matches up to some fixed depth of nesting. It
-is not possible to handle an arbitrary nesting depth. Perl 5.6 has provided an
-experimental facility that allows regular expressions to recurse (amongst other
-things). It does this by interpolating Perl code in the expression at run time,
-and the code can refer to the expression itself. A Perl pattern to solve the
-parentheses problem can be created like this:
-
- $re = qr{\\( (?: (?>[^()]+) | (?p{$re}) )* \\)}x;
-
-The (?p{...}) item interpolates Perl code at run time, and in this case refers
-recursively to the pattern in which it appears. Obviously, PCRE cannot support
-the interpolation of Perl code. Instead, the special item (?R) is provided for
-the specific case of recursion. This PCRE pattern solves the parentheses
-problem (assume the PCRE_EXTENDED option is set so that white space is
-ignored):
-
- \\( ( (?>[^()]+) | (?R) )* \\)
-
-First it matches an opening parenthesis. Then it matches any number of
-substrings which can either be a sequence of non-parentheses, or a recursive
-match of the pattern itself (i.e. a correctly parenthesized substring). Finally
-there is a closing parenthesis.
-
-This particular example pattern contains nested unlimited repeats, and so the
-use of a once-only subpattern for matching strings of non-parentheses is
-important when applying the pattern to strings that do not match. For example,
-when it is applied to
-
- (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()
-
-it yields "no match" quickly. However, if a once-only subpattern is not used,
-the match runs for a very long time indeed because there are so many different
-ways the + and * repeats can carve up the subject, and all have to be tested
-before failure can be reported.
-
-The values set for any capturing subpatterns are those from the outermost level
-of the recursion at which the subpattern value is set. If the pattern above is
-matched against
-
- (ab(cd)ef)
-
-the value for the capturing parentheses is "ef", which is the last value taken
-on at the top level. If additional parentheses are added, giving
-
- \\( ( ( (?>[^()]+) | (?R) )* ) \\)
- ^ ^
- ^ ^
-the string they capture is "ab(cd)ef", the contents of the top level
-parentheses. If there are more than 15 capturing parentheses in a pattern, PCRE
-has to obtain extra memory to store data during a recursion, which it does by
-using \fBpcre_malloc\fR, freeing it via \fBpcre_free\fR afterwards. If no
-memory can be obtained, it saves data for the first 15 capturing parentheses
-only, as there is no way to give an out-of-memory error from within a
-recursion.
-
-
-.SH PERFORMANCE
-Certain items that may appear in patterns are more efficient than others. It is
-more efficient to use a character class like [aeiou] than a set of 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 discussion about optimizing regular expressions for efficient
-performance.
-
-When a pattern begins with .* 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 newlines, 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 first captured substring being "and". 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 contain
-newlines, the best performance is obtained by setting PCRE_DOTALL, or starting
-the pattern with ^.* to indicate explicit anchoring. 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. Consider the
-pattern fragment
-
- (a+)*
-
-This can match "aaaa" in 33 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, 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 extremely long time.
-
-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 subject string, and if
-there is not, it fails the match immediately. However, 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 takes an
-appreciable time with strings longer than about 20 characters.
-
-
-.SH UTF-8 SUPPORT
-Starting at release 3.3, PCRE has some support for character strings encoded
-in the UTF-8 format. This is incomplete, and is regarded as experimental. In
-order to use it, you must configure PCRE to include UTF-8 support in the code,
-and, in addition, you must call \fBpcre_compile()\fR with the PCRE_UTF8 option
-flag. When you do this, both the pattern and any subject strings that are
-matched against it are treated as UTF-8 strings instead of just strings of
-bytes, but only in the cases that are mentioned below.
-
+.sp
+.\" HTML <a name="utf8support"></a>
+.
+.
+.SH "UTF-8 AND UNICODE PROPERTY SUPPORT"
+.rs
+.sp
+From release 3.3, PCRE has had some support for character strings encoded in
+the UTF-8 format. For release 4.0 this was greatly extended to cover most
+common requirements, and in release 5.0 additional support for Unicode general
+category properties was added.
+.P
+In order process UTF-8 strings, you must build PCRE to include UTF-8 support in
+the code, and, in addition, you must call
+.\" HREF
+\fBpcre_compile()\fP
+.\"
+with the PCRE_UTF8 option flag. When you do this, both the pattern and any
+subject strings that are matched against it are treated as UTF-8 strings
+instead of just strings of bytes.
+.P
If you compile PCRE with UTF-8 support, but do not use it at run time, the
library will be a bit bigger, but the additional run time overhead is limited
to testing the PCRE_UTF8 flag in several places, so should not be very large.
-
-PCRE assumes that the strings it is given contain valid UTF-8 codes. It does
-not diagnose invalid UTF-8 strings. If you pass invalid UTF-8 strings to PCRE,
-the results are undefined.
-
-Running with PCRE_UTF8 set causes these changes in the way PCRE works:
-
-1. In a pattern, the escape sequence \\x{...}, where the contents of the braces
+.P
+If PCRE is built with Unicode character property support (which implies UTF-8
+support), the escape sequences \ep{..}, \eP{..}, and \eX are supported.
+The available properties that can be tested are limited to the general
+category properties such as Lu for an upper case letter or Nd for a decimal
+number. A full list is given in the
+.\" HREF
+\fBpcrepattern\fP
+.\"
+documentation. The PCRE library is increased in size by about 90K when Unicode
+property support is included.
+.P
+The following comments apply when PCRE is running in UTF-8 mode:
+.P
+1. When you set the PCRE_UTF8 flag, the strings passed as patterns and subjects
+are checked for validity on entry to the relevant functions. If an invalid
+UTF-8 string is passed, an error return is given. In some situations, you may
+already know that your strings are valid, and therefore want to skip these
+checks in order to improve performance. If you set the PCRE_NO_UTF8_CHECK flag
+at compile time or at run time, PCRE assumes that the pattern or subject it
+is given (respectively) contains only valid UTF-8 codes. In this case, it does
+not diagnose an invalid UTF-8 string. If you pass an invalid UTF-8 string to
+PCRE when PCRE_NO_UTF8_CHECK is set, the results are undefined. Your program
+may crash.
+.P
+2. In a pattern, the escape sequence \ex{...}, where the contents of the braces
is a string of hexadecimal digits, is interpreted as a UTF-8 character whose
-code number is the given hexadecimal number, for example: \\x{1234}. This
-inserts from one to six literal bytes into the pattern, using the UTF-8
-encoding. If a non-hexadecimal digit appears between the braces, the item is
-not recognized.
-
-2. The original hexadecimal escape sequence, \\xhh, generates a two-byte UTF-8
-character if its value is greater than 127.
-
-3. Repeat quantifiers are NOT correctly handled if they follow a multibyte
-character. For example, \\x{100}* and \\xc3+ do not work. If you want to
-repeat such characters, you must enclose them in non-capturing parentheses,
-for example (?:\\x{100}), at present.
-
-4. The dot metacharacter matches one UTF-8 character instead of a single byte.
-
-5. Unlike literal UTF-8 characters, the dot metacharacter followed by a
-repeat quantifier does operate correctly on UTF-8 characters instead of
-single bytes.
-
-4. Although the \\x{...} escape is permitted in a character class, characters
-whose values are greater than 255 cannot be included in a class.
-
-5. A class is matched against a UTF-8 character instead of just a single byte,
-but it can match only characters whose values are less than 256. Characters
-with greater values always fail to match a class.
-
-6. Repeated classes work correctly on multiple characters.
-
-7. Classes containing just a single character whose value is greater than 127
-(but less than 256), for example, [\\x80] or [^\\x{93}], do not work because
-these are optimized into single byte matches. In the first case, of course,
-the class brackets are just redundant.
-
-8. Lookbehind assertions move backwards in the subject by a fixed number of
-characters instead of a fixed number of bytes. Simple cases have been tested
-to work correctly, but there may be hidden gotchas herein.
-
-9. The character types such as \\d and \\w do not work correctly with UTF-8
-characters. They continue to test a single byte.
-
-10. Anything not explicitly mentioned here continues to work in bytes rather
-than in characters.
-
-The following UTF-8 features of Perl 5.6 are not implemented:
-
-1. The escape sequence \\C to match a single byte.
-
-2. The use of Unicode tables and properties and escapes \\p, \\P, and \\X.
-
-
-.SH SAMPLE PROGRAM
-The code below is a simple, complete demonstration program, to get you started
-with using PCRE. This code is also supplied in the file \fIpcredemo.c\fR in the
-PCRE distribution.
-
-The program compiles the regular expression that is its first argument, and
-matches it against the subject string in its second argument. No options are
-set, and default character tables are used. If matching succeeds, the program
-outputs the portion of the subject that matched, together with the contents of
-any captured substrings.
-
-On a Unix system that has PCRE installed in \fI/usr/local\fR, you can compile
-the demonstration program using a command like this:
-
- gcc -o pcredemo pcredemo.c -I/usr/local/include -L/usr/local/lib -lpcre
-
-Then you can run simple tests like this:
-
- ./pcredemo 'cat|dog' 'the cat sat on the mat'
-
-Note that there is a much more comprehensive test program, called
-\fBpcretest\fR, which supports many more facilities for testing regular
-expressions. The \fBpcredemo\fR program is provided as a simple coding example.
-
-On some operating systems (e.g. Solaris) you may get an error like this when
-you try to run \fBpcredemo\fR:
-
- ld.so.1: a.out: fatal: libpcre.so.0: open failed: No such file or directory
-
-This is caused by the way shared library support works on those systems. You
-need to add
-
- -R/usr/local/lib
-
-to the compile command to get round this problem. Here's the code:
-
- #include <stdio.h>
- #include <string.h>
- #include <pcre.h>
-
- #define OVECCOUNT 30 /* should be a multiple of 3 */
-
- int main(int argc, char **argv)
- {
- pcre *re;
- const char *error;
- int erroffset;
- int ovector[OVECCOUNT];
- int rc, i;
-
- if (argc != 3)
- {
- printf("Two arguments required: a regex and a "
- "subject string\\n");
- return 1;
- }
-
- /* Compile the regular expression in the first argument */
-
- re = pcre_compile(
- argv[1], /* the pattern */
- 0, /* default options */
- &error, /* for error message */
- &erroffset, /* for error offset */
- NULL); /* use default character tables */
-
- /* Compilation failed: print the error message and exit */
-
- if (re == NULL)
- {
- printf("PCRE compilation failed at offset %d: %s\\n",
- erroffset, error);
- return 1;
- }
-
- /* Compilation succeeded: match the subject in the second
- argument */
-
- rc = pcre_exec(
- re, /* the compiled pattern */
- NULL, /* we didn't study the pattern */
- argv[2], /* the subject string */
- (int)strlen(argv[2]), /* the length of the subject */
- 0, /* start at offset 0 in the subject */
- 0, /* default options */
- ovector, /* vector for substring information */
- OVECCOUNT); /* number of elements in the vector */
-
- /* Matching failed: handle error cases */
-
- if (rc < 0)
- {
- switch(rc)
- {
- case PCRE_ERROR_NOMATCH: printf("No match\\n"); break;
- /*
- Handle other special cases if you like
- */
- default: printf("Matching error %d\\n", rc); break;
- }
- return 1;
- }
-
- /* Match succeded */
-
- printf("Match succeeded\\n");
-
- /* The output vector wasn't big enough */
-
- if (rc == 0)
- {
- rc = OVECCOUNT/3;
- printf("ovector only has room for %d captured "
- substrings\\n", rc - 1);
- }
-
- /* Show substrings stored in the output vector */
-
- for (i = 0; i < rc; i++)
- {
- char *substring_start = argv[2] + ovector[2*i];
- int substring_length = ovector[2*i+1] - ovector[2*i];
- printf("%2d: %.*s\\n", i, substring_length,
- substring_start);
- }
-
- return 0;
- }
-
-
+code number is the given hexadecimal number, for example: \ex{1234}. If a
+non-hexadecimal digit appears between the braces, the item is not recognized.
+This escape sequence can be used either as a literal, or within a character
+class.
+.P
+3. The original hexadecimal escape sequence, \exhh, matches a two-byte UTF-8
+character if the value is greater than 127.
+.P
+4. Repeat quantifiers apply to complete UTF-8 characters, not to individual
+bytes, for example: \ex{100}{3}.
+.P
+5. The dot metacharacter matches one UTF-8 character instead of a single byte.
+.P
+6. The escape sequence \eC can be used to match a single byte in UTF-8 mode,
+but its use can lead to some strange effects.
+.P
+7. 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}.
+.P
+8. Similarly, characters that match the POSIX named character classes are all
+low-valued characters.
+.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
+property support is available, PCRE still uses its own character tables when
+checking the case of low-valued characters, so as not to degrade performance.
+The Unicode property information is used only for characters with higher
+values.
+.
.SH AUTHOR
+.rs
+.sp
Philip Hazel <ph10@cam.ac.uk>
.br
University Computing Service,
.br
-New Museums Site,
-.br
Cambridge CB2 3QG, England.
.br
Phone: +44 1223 334714
-
-Last updated: 15 August 2001
+.sp
+.in 0
+Last updated: 09 September 2004
.br
-Copyright (c) 1997-2001 University of Cambridge.
+Copyright (c) 1997-2004 University of Cambridge.
diff --git a/srclib/pcre/doc/pcre.txt b/srclib/pcre/doc/pcre.txt
index 95f148f3de..fdf0d6ff67 100644
--- a/srclib/pcre/doc/pcre.txt
+++ b/srclib/pcre/doc/pcre.txt
@@ -1,2315 +1,3769 @@
+-----------------------------------------------------------------------------
+This file contains a concatenation of the PCRE man pages, converted to plain
+text format for ease of searching with a text editor, or for use on systems
+that do not have a man page processor. The small individual files that give
+synopses of each function in the library have not been included. There are
+separate text files for the pcregrep and pcretest commands.
+-----------------------------------------------------------------------------
+
+PCRE(3) PCRE(3)
+
+
+
NAME
- pcre - Perl-compatible regular expressions.
+ PCRE - Perl-compatible regular expressions
+
+INTRODUCTION
+
+ The PCRE library is a set of functions that implement regular expres-
+ sion pattern matching using the same syntax and semantics as Perl, with
+ just a few differences. The current implementation of PCRE (release
+ 5.x) corresponds approximately with Perl 5.8, including support for
+ UTF-8 encoded strings and Unicode general category properties. However,
+ this support has to be explicitly enabled; it is not the default.
+
+ PCRE is written in C and released as a C library. A number of people
+ have written wrappers and interfaces of various kinds. A C++ class is
+ included in these contributions, which can be found in the Contrib
+ directory at the primary FTP site, which is:
+
+ ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre
+
+ Details of exactly which Perl regular expression features are and are
+ not supported by PCRE are given in separate documents. See the pcrepat-
+ tern and pcrecompat pages.
+
+ Some features of PCRE can be included, excluded, or changed when the
+ library is built. The pcre_config() function makes it possible for a
+ client to discover which features are available. The features them-
+ selves are described in the pcrebuild page. Documentation about build-
+ ing PCRE for various operating systems can be found in the README file
+ in the source distribution.
+
+
+USER DOCUMENTATION
+
+ The user documentation for PCRE comprises a number of different sec-
+ tions. In the "man" format, each of these is a separate "man page". In
+ the HTML format, each is a separate page, linked from the index page.
+ In the plain text format, all the sections are concatenated, for ease
+ of searching. The sections are as follows:
+
+ pcre this document
+ pcreapi details of PCRE's native API
+ pcrebuild options for building PCRE
+ pcrecallout details of the callout feature
+ pcrecompat discussion of Perl compatibility
+ pcregrep description of the pcregrep command
+ pcrepartial details of the partial matching facility
+ pcrepattern syntax and semantics of supported
+ regular expressions
+ pcreperform discussion of performance issues
+ pcreposix the POSIX-compatible API
+ pcreprecompile details of saving and re-using precompiled patterns
+ pcresample discussion of the sample program
+ pcretest description of the pcretest testing command
+
+ In addition, in the "man" and HTML formats, there is a short page for
+ each library function, listing its arguments and results.
+
+
+LIMITATIONS
+ There are some size limitations in PCRE but it is hoped that they will
+ never in practice be relevant.
+
+ The maximum length of a compiled pattern is 65539 (sic) bytes if PCRE
+ is compiled with the default internal linkage size of 2. If you want to
+ process regular expressions that are truly enormous, you can compile
+ PCRE with an internal linkage size of 3 or 4 (see the README file in
+ the source distribution and the pcrebuild documentation for details).
+ In these cases the limit is substantially larger. However, the speed
+ of execution will be slower.
+
+ All values in repeating quantifiers must be less than 65536. The maxi-
+ mum number of capturing subpatterns is 65535.
+
+ There is no limit to the number of non-capturing subpatterns, but the
+ maximum depth of nesting of all kinds of parenthesized subpattern,
+ including capturing subpatterns, assertions, and other types of subpat-
+ tern, is 200.
+
+ The maximum length of a subject string is the largest positive number
+ that an integer variable can hold. However, PCRE uses recursion to han-
+ dle subpatterns and indefinite repetition. This means that the avail-
+ able stack space may limit the size of a subject string that can be
+ processed by certain patterns.
+
+
+UTF-8 AND UNICODE PROPERTY SUPPORT
+
+ From release 3.3, PCRE has had some support for character strings
+ encoded in the UTF-8 format. For release 4.0 this was greatly extended
+ to cover most common requirements, and in release 5.0 additional sup-
+ port for Unicode general category properties was added.
+
+ In order process UTF-8 strings, you must build PCRE to include UTF-8
+ support in the code, and, in addition, you must call pcre_compile()
+ with the PCRE_UTF8 option flag. When you do this, both the pattern and
+ any subject strings that are matched against it are treated as UTF-8
+ strings instead of just strings of bytes.
+
+ If you compile PCRE with UTF-8 support, but do not use it at run time,
+ the library will be a bit bigger, but the additional run time overhead
+ is limited to testing the PCRE_UTF8 flag in several places, so should
+ not be very large.
+
+ If PCRE is built with Unicode character property support (which implies
+ UTF-8 support), the escape sequences \p{..}, \P{..}, and \X are sup-
+ ported. The available properties that can be tested are limited to the
+ general category properties such as Lu for an upper case letter or Nd
+ for a decimal number. A full list is given in the pcrepattern documen-
+ tation. The PCRE library is increased in size by about 90K when Unicode
+ property support is included.
+
+ The following comments apply when PCRE is running in UTF-8 mode:
+
+ 1. When you set the PCRE_UTF8 flag, the strings passed as patterns and
+ subjects are checked for validity on entry to the relevant functions.
+ If an invalid UTF-8 string is passed, an error return is given. In some
+ situations, you may already know that your strings are valid, and
+ therefore want to skip these checks in order to improve performance. If
+ you set the PCRE_NO_UTF8_CHECK flag at compile time or at run time,
+ PCRE assumes that the pattern or subject it is given (respectively)
+ contains only valid UTF-8 codes. In this case, it does not diagnose an
+ invalid UTF-8 string. If you pass an invalid UTF-8 string to PCRE when
+ PCRE_NO_UTF8_CHECK is set, the results are undefined. Your program may
+ crash.
+
+ 2. In a pattern, the escape sequence \x{...}, where the contents of the
+ braces is a string of hexadecimal digits, is interpreted as a UTF-8
+ character whose code number is the given hexadecimal number, for exam-
+ ple: \x{1234}. If a non-hexadecimal digit appears between the braces,
+ the item is not recognized. This escape sequence can be used either as
+ a literal, or within a character class.
+
+ 3. The original hexadecimal escape sequence, \xhh, matches a two-byte
+ UTF-8 character if the value is greater than 127.
+
+ 4. Repeat quantifiers apply to complete UTF-8 characters, not to indi-
+ vidual bytes, for example: \x{100}{3}.
+
+ 5. The dot metacharacter matches one UTF-8 character instead of a sin-
+ gle byte.
+
+ 6. The escape sequence \C can be used to match a single byte in UTF-8
+ mode, but its use can lead to some strange effects.
+
+ 7. 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}.
+
+ 8. Similarly, characters that match the POSIX named character classes
+ are all low-valued characters.
+
+ 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 property support is available, PCRE still uses its
+ own character tables when checking the case of low-valued characters,
+ so as not to degrade performance. The Unicode property information is
+ used only for characters with higher values.
-SYNOPSIS
- #include <pcre.h>
+AUTHOR
- pcre *pcre_compile(const char *pattern, int options,
- const char **errptr, int *erroffset,
- const unsigned char *tableptr);
+ Philip Hazel <ph10@cam.ac.uk>
+ University Computing Service,
+ Cambridge CB2 3QG, England.
+ Phone: +44 1223 334714
- pcre_extra *pcre_study(const pcre *code, int options,
- const char **errptr);
+Last updated: 09 September 2004
+Copyright (c) 1997-2004 University of Cambridge.
+-----------------------------------------------------------------------------
- int pcre_exec(const pcre *code, const pcre_extra *extra,
- const char *subject, int length, int startoffset,
- int options, int *ovector, int ovecsize);
+PCRE(3) PCRE(3)
- int pcre_copy_substring(const char *subject, int *ovector,
- int stringcount, int stringnumber, char *buffer,
- int buffersize);
- int pcre_get_substring(const char *subject, int *ovector,
- int stringcount, int stringnumber,
- const char **stringptr);
- int pcre_get_substring_list(const char *subject,
- int *ovector, int stringcount, const char ***listptr);
+NAME
+ PCRE - Perl-compatible regular expressions
- void pcre_free_substring(const char *stringptr);
+PCRE BUILD-TIME OPTIONS
- void pcre_free_substring_list(const char **stringptr);
+ This document describes the optional features of PCRE that can be
+ selected when the library is compiled. They are all selected, or dese-
+ lected, by providing options to the configure script that is run before
+ the make command. The complete list of options for configure (which
+ includes the standard ones such as the selection of the installation
+ directory) can be obtained by running
- const unsigned char *pcre_maketables(void);
+ ./configure --help
- int pcre_fullinfo(const pcre *code, const pcre_extra *extra,
- int what, void *where);
+ The following sections describe certain options whose names begin with
+ --enable or --disable. These settings specify changes to the defaults
+ for the configure command. Because of the way that configure works,
+ --enable and --disable always come in pairs, so the complementary
+ option always exists as well, but as it specifies the default, it is
+ not described.
- int pcre_info(const pcre *code, int *optptr, *firstcharptr);
- char *pcre_version(void);
+UTF-8 SUPPORT
- void *(*pcre_malloc)(size_t);
+ To build PCRE with support for UTF-8 character strings, add
- void (*pcre_free)(void *);
+ --enable-utf8
+ to the configure command. Of itself, this does not make PCRE treat
+ strings as UTF-8. As well as compiling PCRE with this option, you also
+ have have to set the PCRE_UTF8 option when you call the pcre_compile()
+ function.
+UNICODE CHARACTER PROPERTY SUPPORT
-DESCRIPTION
- The PCRE library is a set of functions that implement regu-
- lar expression pattern matching using the same syntax and
- semantics as Perl 5, with just a few differences (see
-
- below). The current implementation corresponds to Perl
- 5.005, with some additional features from later versions.
- This includes some experimental, incomplete support for
- UTF-8 encoded strings. Details of exactly what is and what
- is not supported are given below.
-
- PCRE has its own native API, which is described in this
- document. There is also a set of wrapper functions that
- correspond to the POSIX regular expression API. These are
- described in the pcreposix documentation.
-
- The native API function prototypes are defined in the header
- file pcre.h, and on Unix systems the library itself is
- called libpcre.a, so can be accessed by adding -lpcre to the
- command for linking an application which calls it. The
- header file defines the macros PCRE_MAJOR and PCRE_MINOR to
- contain the major and minor release numbers for the library.
- Applications can use these to include support for different
- releases.
-
- The functions pcre_compile(), pcre_study(), and pcre_exec()
- are used for compiling and matching regular expressions. A
- sample program that demonstrates the simplest way of using
- them is given in the file pcredemo.c. The last section of
- this man page describes how to run it.
-
- The functions pcre_copy_substring(), pcre_get_substring(),
- and pcre_get_substring_list() are convenience functions for
- extracting captured substrings from a matched subject
- string; pcre_free_substring() and pcre_free_substring_list()
- are also provided, to free the memory used for extracted
- strings.
-
- The function pcre_maketables() is used (optionally) to build
- a set of character tables in the current locale for passing
- to pcre_compile().
-
- The function pcre_fullinfo() is used to find out information
- about a compiled pattern; pcre_info() is an obsolete version
- which returns only some of the available information, but is
- retained for backwards compatibility. The function
- pcre_version() returns a pointer to a string containing the
- version of PCRE and its date of release.
-
- The global variables pcre_malloc and pcre_free initially
- contain the entry points of the standard malloc() and free()
- functions respectively. PCRE calls the memory management
- functions via these variables, so a calling program can
- replace them if it wishes to intercept the calls. This
- should be done before calling any PCRE functions.
-
-
-
-MULTI-THREADING
- The PCRE functions can be used in multi-threading applica-
- tions, with the proviso that the memory management functions
- pointed to by pcre_malloc and pcre_free are shared by all
- threads.
-
- The compiled form of a regular expression is not altered
- during matching, so the same compiled pattern can safely be
- used by several threads at once.
+ UTF-8 support allows PCRE to process character values greater than 255
+ in the strings that it handles. On its own, however, it does not pro-
+ vide any facilities for accessing the properties of such characters. If
+ you want to be able to use the pattern escapes \P, \p, and \X, which
+ refer to Unicode character properties, you must add
+
+ --enable-unicode-properties
+
+ to the configure command. This implies UTF-8 support, even if you have
+ not explicitly requested it.
+
+ Including Unicode property support adds around 90K of tables to the
+ PCRE library, approximately doubling its size. Only the general cate-
+ gory properties such as Lu and Nd are supported. Details are given in
+ the pcrepattern documentation.
+
+
+CODE VALUE OF NEWLINE
+
+ By default, PCRE treats character 10 (linefeed) as the newline charac-
+ ter. This is the normal newline character on Unix-like systems. You can
+ compile PCRE to use character 13 (carriage return) instead by adding
+
+ --enable-newline-is-cr
+
+ to the configure command. For completeness there is also a --enable-
+ newline-is-lf option, which explicitly specifies linefeed as the new-
+ line character.
+
+
+BUILDING SHARED AND STATIC LIBRARIES
+
+ The PCRE building process uses libtool to build both shared and static
+ Unix libraries by default. You can suppress one of these by adding one
+ of
+
+ --disable-shared
+ --disable-static
+
+ to the configure command, as required.
+
+
+POSIX MALLOC USAGE
+
+ When PCRE is called through the POSIX interface (see the pcreposix doc-
+ umentation), additional working storage is required for holding the
+ pointers to capturing substrings, because PCRE requires three integers
+ per substring, whereas the POSIX interface provides only two. If the
+ number of expected substrings is small, the wrapper function uses space
+ on the stack, because this is faster than using malloc() for each call.
+ The default threshold above which the stack is no longer used is 10; it
+ can be changed by adding a setting such as
+
+ --with-posix-malloc-threshold=20
+
+ to the configure command.
+
+
+LIMITING PCRE RESOURCE USAGE
+
+ Internally, PCRE has a function called match(), which it calls repeat-
+ edly (possibly recursively) when matching a pattern. By controlling the
+ maximum number of times this function may be called during a single
+ matching operation, a limit can be placed on the resources used by a
+ single call to pcre_exec(). The limit can be changed at run time, as
+ described in the pcreapi documentation. The default is 10 million, but
+ this can be changed by adding a setting such as
+
+ --with-match-limit=500000
+
+ to the configure command.
+
+
+HANDLING VERY LARGE PATTERNS
+
+ Within a compiled pattern, offset values are used to point from one
+ part to another (for example, from an opening parenthesis to an alter-
+ nation metacharacter). By default, two-byte values are used for these
+ offsets, leading to a maximum size for a compiled pattern of around
+ 64K. This is sufficient to handle all but the most gigantic patterns.
+ Nevertheless, some people do want to process enormous patterns, so it
+ is possible to compile PCRE to use three-byte or four-byte offsets by
+ adding a setting such as
+
+ --with-link-size=3
+
+ to the configure command. The value given must be 2, 3, or 4. Using
+ longer offsets slows down the operation of PCRE because it has to load
+ additional bytes when handling them.
+
+ If you build PCRE with an increased link size, test 2 (and test 5 if
+ you are using UTF-8) will fail. Part of the output of these tests is a
+ representation of the compiled pattern, and this changes with the link
+ size.
+
+
+AVOIDING EXCESSIVE STACK USAGE
+
+ PCRE implements backtracking while matching by making recursive calls
+ to an internal function called match(). In environments where the size
+ of the stack is limited, this can severely limit PCRE's operation. (The
+ Unix environment does not usually suffer from this problem.) An alter-
+ native approach that uses memory from the heap to remember data,
+ instead of using recursive function calls, has been implemented to work
+ round this problem. If you want to build a version of PCRE that works
+ this way, add
+
+ --disable-stack-for-recursion
+
+ to the configure command. With this configuration, PCRE will use the
+ pcre_stack_malloc and pcre_stack_free variables to call memory manage-
+ ment functions. Separate functions are provided because the usage is
+ very predictable: the block sizes requested are always the same, and
+ the blocks are always freed in reverse order. A calling program might
+ be able to implement optimized functions that perform better than the
+ standard malloc() and free() functions. PCRE runs noticeably more
+ slowly when built in this way.
+
+
+USING EBCDIC CODE
+
+ PCRE assumes by default that it will run in an environment where the
+ character code is ASCII (or Unicode, which is a superset of ASCII).
+ PCRE can, however, be compiled to run in an EBCDIC environment by
+ adding
+
+ --enable-ebcdic
+
+ to the configure command.
+
+Last updated: 09 September 2004
+Copyright (c) 1997-2004 University of Cambridge.
+-----------------------------------------------------------------------------
+
+PCRE(3) PCRE(3)
+
+
+
+NAME
+ PCRE - Perl-compatible regular expressions
+
+PCRE NATIVE API
+
+ #include <pcre.h>
+
+ pcre *pcre_compile(const char *pattern, int options,
+ const char **errptr, int *erroffset,
+ const unsigned char *tableptr);
+
+ pcre_extra *pcre_study(const pcre *code, int options,
+ const char **errptr);
+
+ int pcre_exec(const pcre *code, const pcre_extra *extra,
+ const char *subject, int length, int startoffset,
+ int options, int *ovector, int ovecsize);
+
+ int pcre_copy_named_substring(const pcre *code,
+ const char *subject, int *ovector,
+ int stringcount, const char *stringname,
+ char *buffer, int buffersize);
+
+ int pcre_copy_substring(const char *subject, int *ovector,
+ int stringcount, int stringnumber, char *buffer,
+ int buffersize);
+
+ int pcre_get_named_substring(const pcre *code,
+ const char *subject, int *ovector,
+ int stringcount, const char *stringname,
+ const char **stringptr);
+
+ int pcre_get_stringnumber(const pcre *code,
+ const char *name);
+
+ int pcre_get_substring(const char *subject, int *ovector,
+ int stringcount, int stringnumber,
+ const char **stringptr);
+
+ int pcre_get_substring_list(const char *subject,
+ int *ovector, int stringcount, const char ***listptr);
+
+ void pcre_free_substring(const char *stringptr);
+
+ void pcre_free_substring_list(const char **stringptr);
+
+ const unsigned char *pcre_maketables(void);
+
+ int pcre_fullinfo(const pcre *code, const pcre_extra *extra,
+ int what, void *where);
+
+ int pcre_info(const pcre *code, int *optptr, int *firstcharptr);
+
+ int pcre_config(int what, void *where);
+
+ char *pcre_version(void);
+
+ void *(*pcre_malloc)(size_t);
+
+ void (*pcre_free)(void *);
+
+ void *(*pcre_stack_malloc)(size_t);
+
+ void (*pcre_stack_free)(void *);
+
+ int (*pcre_callout)(pcre_callout_block *);
+
+
+PCRE API OVERVIEW
+
+ PCRE has its own native API, which is described in this document. There
+ is also a set of wrapper functions that correspond to the POSIX regular
+ expression API. These are described in the pcreposix documentation.
+
+ The native API function prototypes are defined in the header file
+ pcre.h, and on Unix systems the library itself is called libpcre. It
+ can normally be accessed by adding -lpcre to the command for linking an
+ application that uses PCRE. The header file defines the macros
+ PCRE_MAJOR and PCRE_MINOR to contain the major and minor release num-
+ bers for the library. Applications can use these to include support
+ for different releases of PCRE.
+
+ The functions pcre_compile(), pcre_study(), and pcre_exec() are used
+ for compiling and matching regular expressions. A sample program that
+ demonstrates the simplest way of using them is provided in the file
+ called pcredemo.c in the source distribution. The pcresample documenta-
+ tion describes how to run it.
+
+ In addition to the main compiling and matching functions, there are
+ convenience functions for extracting captured substrings from a matched
+ subject string. They are:
+
+ pcre_copy_substring()
+ pcre_copy_named_substring()
+ pcre_get_substring()
+ pcre_get_named_substring()
+ pcre_get_substring_list()
+ pcre_get_stringnumber()
+
+ pcre_free_substring() and pcre_free_substring_list() are also provided,
+ to free the memory used for extracted strings.
+
+ The function pcre_maketables() is used to build a set of character
+ tables in the current locale for passing to pcre_compile() or
+ pcre_exec(). This is an optional facility that is provided for spe-
+ cialist use. Most commonly, no special tables are passed, in which case
+ internal tables that are generated when PCRE is built are used.
+
+ The function pcre_fullinfo() is used to find out information about a
+ compiled pattern; pcre_info() is an obsolete version that returns only
+ some of the available information, but is retained for backwards com-
+ patibility. The function pcre_version() returns a pointer to a string
+ containing the version of PCRE and its date of release.
+
+ The global variables pcre_malloc and pcre_free initially contain the
+ entry points of the standard malloc() and free() functions, respec-
+ tively. PCRE calls the memory management functions via these variables,
+ so a calling program can replace them if it wishes to intercept the
+ calls. This should be done before calling any PCRE functions.
+
+ The global variables pcre_stack_malloc and pcre_stack_free are also
+ indirections to memory management functions. These special functions
+ are used only when PCRE is compiled to use the heap for remembering
+ data, instead of recursive function calls. This is a non-standard way
+ of building PCRE, for use in environments that have limited stacks.
+ Because of the greater use of memory management, it runs more slowly.
+ Separate functions are provided so that special-purpose external code
+ can be used for this case. When used, these functions are always called
+ in a stack-like manner (last obtained, first freed), and always for
+ memory blocks of the same size.
+
+ The global variable pcre_callout initially contains NULL. It can be set
+ by the caller to a "callout" function, which PCRE will then call at
+ specified points during a matching operation. Details are given in the
+ pcrecallout documentation.
+
+
+MULTITHREADING
+
+ The PCRE functions can be used in multi-threading applications, with
+ the proviso that the memory management functions pointed to by
+ pcre_malloc, pcre_free, pcre_stack_malloc, and pcre_stack_free, and the
+ callout function pointed to by pcre_callout, are shared by all threads.
+
+ The compiled form of a regular expression is not altered during match-
+ ing, so the same compiled pattern can safely be used by several threads
+ at once.
+
+
+SAVING PRECOMPILED PATTERNS FOR LATER USE
+
+ The compiled form of a regular expression can be saved and re-used at a
+ later time, possibly by a different program, and even on a host other
+ than the one on which it was compiled. Details are given in the
+ pcreprecompile documentation.
+
+
+CHECKING BUILD-TIME OPTIONS
+
+ int pcre_config(int what, void *where);
+
+ The function pcre_config() makes it possible for a PCRE client to dis-
+ cover which optional features have been compiled into the PCRE library.
+ The pcrebuild documentation has more details about these optional fea-
+ tures.
+
+ The first argument for pcre_config() is an integer, specifying which
+ information is required; the second argument is a pointer to a variable
+ into which the information is placed. The following information is
+ available:
+
+ PCRE_CONFIG_UTF8
+
+ The output is an integer that is set to one if UTF-8 support is avail-
+ able; otherwise it is set to zero.
+
+ PCRE_CONFIG_UNICODE_PROPERTIES
+
+ The output is an integer that is set to one if support for Unicode
+ character properties is available; otherwise it is set to zero.
+
+ PCRE_CONFIG_NEWLINE
+
+ The output is an integer that is set to the value of the code that is
+ used for the newline character. It is either linefeed (10) or carriage
+ return (13), and should normally be the standard character for your
+ operating system.
+ PCRE_CONFIG_LINK_SIZE
+
+ The output is an integer that contains the number of bytes used for
+ internal linkage in compiled regular expressions. The value is 2, 3, or
+ 4. Larger values allow larger regular expressions to be compiled, at
+ the expense of slower matching. The default value of 2 is sufficient
+ for all but the most massive patterns, since it allows the compiled
+ pattern to be up to 64K in size.
+
+ PCRE_CONFIG_POSIX_MALLOC_THRESHOLD
+
+ The output is an integer that contains the threshold above which the
+ POSIX interface uses malloc() for output vectors. Further details are
+ given in the pcreposix documentation.
+
+ PCRE_CONFIG_MATCH_LIMIT
+
+ The output is an integer that gives the default limit for the number of
+ internal matching function calls in a pcre_exec() execution. Further
+ details are given with pcre_exec() below.
+
+ PCRE_CONFIG_STACKRECURSE
+
+ The output is an integer that is set to one if internal recursion is
+ implemented by recursive function calls that use the stack to remember
+ their state. This is the usual way that PCRE is compiled. The output is
+ zero if PCRE was compiled to use blocks of data on the heap instead of
+ recursive function calls. In this case, pcre_stack_malloc and
+ pcre_stack_free are called to manage memory blocks on the heap, thus
+ avoiding the use of the stack.
COMPILING A PATTERN
- The function pcre_compile() is called to compile a pattern
- into an internal form. The pattern is a C string terminated
- by a binary zero, and is passed in the argument pattern. A
- pointer to a single block of memory that is obtained via
- pcre_malloc is returned. This contains the compiled code and
- related data. The pcre type is defined for the returned
- block; this is a typedef for a structure whose contents are
- not externally defined. It is up to the caller to free the
- memory when it is no longer required.
-
- Although the compiled code of a PCRE regex is relocatable,
- that is, it does not depend on memory location, the complete
- pcre data block is not fully relocatable, because it con-
- tains a copy of the tableptr argument, which is an address
- (see below).
-
- The size of a compiled pattern is roughly proportional to
- the length of the pattern string, except that each character
- class (other than those containing just a single character,
- negated or not) requires 33 bytes, and repeat quantifiers
- with a minimum greater than one or a bounded maximum cause
- the relevant portions of the compiled pattern to be repli-
- cated.
-
- The options argument contains independent bits that affect
- the compilation. It should be zero if no options are
- required. Some of the options, in particular, those that are
- compatible with Perl, can also be set and unset from within
- the pattern (see the detailed description of regular expres-
- sions below). For these options, the contents of the options
- argument specifies their initial settings at the start of
- compilation and execution. The PCRE_ANCHORED option can be
- set at the time of matching as well as at compile time.
-
- If errptr is NULL, pcre_compile() returns NULL immediately.
- Otherwise, if compilation of a pattern fails, pcre_compile()
- returns NULL, and sets the variable pointed to by errptr to
- point to a textual error message. The offset from the start
- of the pattern to the character where the error was
- discovered is placed in the variable pointed to by
- erroffset, which must not be NULL. If it is, an immediate
- error is given.
-
- If the final argument, tableptr, is NULL, PCRE uses a
- default set of character tables which are built when it is
- compiled, using the default C locale. Otherwise, tableptr
- must be the result of a call to pcre_maketables(). See the
- section on locale support below.
-
- This code fragment shows a typical straightforward call to
- pcre_compile():
-
- pcre *re;
- const char *error;
- int erroffset;
- re = pcre_compile(
- "^A.*Z", /* the pattern */
- 0, /* default options */
- &error, /* for error message */
- &erroffset, /* for error offset */
- NULL); /* use default character tables */
-
- The following option bits are defined in the header file:
-
- PCRE_ANCHORED
-
- If this bit is set, the pattern is forced to be "anchored",
- that is, it is constrained to match only at the start of the
- string which is being searched (the "subject string"). This
- effect can also be achieved by appropriate constructs in the
- pattern itself, which is the only way to do it in Perl.
-
- PCRE_CASELESS
-
- If this bit is set, letters in the pattern match both upper
- and lower case letters. It is equivalent to Perl's /i
- option.
-
- PCRE_DOLLAR_ENDONLY
-
- If this bit is set, a dollar metacharacter in the pattern
- matches only at the end of the subject string. Without this
- option, a dollar also matches immediately before the final
- character if it is a newline (but not before any other new-
- lines). The PCRE_DOLLAR_ENDONLY option is ignored if
- PCRE_MULTILINE is set. There is no equivalent to this option
- in Perl.
-
- PCRE_DOTALL
-
- If this bit is set, a dot metacharater in the pattern
- matches all characters, including newlines. Without it, new-
- lines are excluded. This option is equivalent to Perl's /s
- option. A negative class such as [^a] always matches a new-
- line character, independent of the setting of this option.
-
- PCRE_EXTENDED
-
- If this bit is set, whitespace data characters in the pat-
- tern are totally ignored except when escaped or inside a
- character class, and characters between an unescaped # out-
- side a character class and the next newline character,
- inclusive, are also ignored. This is equivalent to Perl's /x
- option, and makes it possible to include comments inside
- complicated patterns. Note, however, that this applies only
- to data characters. Whitespace characters may never appear
- within special character sequences in a pattern, for example
- within the sequence (?( which introduces a conditional sub-
- pattern.
-
- PCRE_EXTRA
-
- This option was invented in order to turn on additional
- functionality of PCRE that is incompatible with Perl, but it
- is currently of very little use. When set, any backslash in
- a pattern that is followed by a 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. 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_MULTILINE
-
- By default, PCRE treats the subject string as consisting of
- a single "line" of characters (even if it actually contains
- several 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 immedi-
- ately before any newline in the subject string, respec-
- tively, as well as at the very start and end. This is
- equivalent to Perl's /m option. If there are no "\n" charac-
- ters in a subject string, or no occurrences of ^ or $ in a
- pattern, setting PCRE_MULTILINE has no effect.
-
- 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 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 just byte
- strings. However, it is available only if PCRE has been
- built to include UTF-8 support. If not, the use of this
- option provokes an error. Support for UTF-8 is new, experi-
- mental, and incomplete. Details of exactly what it entails
- are given below.
+ pcre *pcre_compile(const char *pattern, int options,
+ const char **errptr, int *erroffset,
+ const unsigned char *tableptr);
+
+ The function pcre_compile() is called to compile a pattern into an
+ internal form. The pattern is a C string terminated by a binary zero,
+ and is passed in the pattern argument. A pointer to a single block of
+ memory that is obtained via pcre_malloc is returned. This contains the
+ compiled code and related data. The pcre type is defined for the
+ returned block; this is a typedef for a structure whose contents are
+ not externally defined. It is up to the caller to free the memory when
+ it is no longer required.
+
+ Although the compiled code of a PCRE regex is relocatable, that is, it
+ does not depend on memory location, the complete pcre data block is not
+ fully relocatable, because it may contain a copy of the tableptr argu-
+ ment, which is an address (see below).
+
+ The options argument contains independent bits that affect the compila-
+ tion. It should be zero if no options are required. The available
+ options are described below. Some of them, in particular, those that
+ are compatible with Perl, can also be set and unset from within the
+ pattern (see the detailed description in the pcrepattern documenta-
+ tion). For these options, the contents of the options argument speci-
+ fies their initial settings at the start of compilation and execution.
+ The PCRE_ANCHORED option can be set at the time of matching as well as
+ at compile time.
+
+ If errptr is NULL, pcre_compile() returns NULL immediately. Otherwise,
+ if compilation of a pattern fails, pcre_compile() returns NULL, and
+ sets the variable pointed to by errptr to point to a textual error mes-
+ sage. The offset from the start of the pattern to the character where
+ the error was discovered is placed in the variable pointed to by
+ erroffset, which must not be NULL. If it is, an immediate error is
+ given.
+
+ If the final argument, tableptr, is NULL, PCRE uses a default set of
+ character tables that are built when PCRE is compiled, using the
+ default C locale. Otherwise, tableptr must be an address that is the
+ result of a call to pcre_maketables(). This value is stored with the
+ compiled pattern, and used again by pcre_exec(), unless another table
+ pointer is passed to it. For more discussion, see the section on locale
+ support below.
+
+ This code fragment shows a typical straightforward call to pcre_com-
+ pile():
+
+ pcre *re;
+ const char *error;
+ int erroffset;
+ re = pcre_compile(
+ "^A.*Z", /* the pattern */
+ 0, /* default options */
+ &error, /* for error message */
+ &erroffset, /* for error offset */
+ NULL); /* use default character tables */
+
+ The following names for option bits are defined in the pcre.h header
+ file:
+
+ PCRE_ANCHORED
+
+ If this bit is set, the pattern is forced to be "anchored", that is, it
+ is constrained to match only at the first matching point in the string
+ that is being searched (the "subject string"). This effect can also be
+ achieved by appropriate constructs in the pattern itself, which is the
+ only way to do it in Perl.
+
+ PCRE_AUTO_CALLOUT
+
+ If this bit is set, pcre_compile() automatically inserts callout items,
+ all with number 255, before each pattern item. For discussion of the
+ callout facility, see the pcrecallout documentation.
+
+ PCRE_CASELESS
+
+ If this bit is set, letters in the pattern match both upper and lower
+ case letters. It is equivalent to Perl's /i option, and it can be
+ changed within a pattern by a (?i) option setting. When running in
+ UTF-8 mode, case support for high-valued characters is available only
+ when PCRE is built with Unicode character property support.
+
+ PCRE_DOLLAR_ENDONLY
+
+ If this bit is set, a dollar metacharacter in the pattern matches only
+ at the end of the subject string. Without this option, a dollar also
+ matches immediately before the final character if it is a newline (but
+ not before any other newlines). The PCRE_DOLLAR_ENDONLY option is
+ ignored if PCRE_MULTILINE is set. There is no equivalent to this option
+ in Perl, and no way to set it within a pattern.
+
+ PCRE_DOTALL
+
+ If this bit is set, a dot metacharater in the pattern matches all char-
+ acters, including newlines. Without it, newlines are excluded. This
+ option is equivalent to Perl's /s option, and it can be changed within
+ a pattern by a (?s) option setting. A negative class such as [^a]
+ always matches a newline character, independent of the setting of this
+ option.
+
+ PCRE_EXTENDED
+
+ If this bit is set, whitespace data characters in the pattern are
+ totally ignored except when escaped or inside a character class.
+ Whitespace does not include the VT character (code 11). In addition,
+ characters between an unescaped # outside a character class and the
+ next newline character, inclusive, are also ignored. This is equivalent
+ to Perl's /x option, and it can be changed within a pattern by a (?x)
+ option setting.
+
+ This option makes it possible to include comments inside complicated
+ patterns. Note, however, that this applies only to data characters.
+ Whitespace characters may never appear within special character
+ sequences in a pattern, for example within the sequence (?( which
+ introduces a conditional subpattern.
+
+ PCRE_EXTRA
+
+ This option was invented in order to turn on additional functionality
+ of PCRE that is incompatible with Perl, but it is currently of very
+ little use. When set, any backslash in a pattern that is followed by a
+ 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. 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_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
+ 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 any new-
+ line 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 "\n" charac-
+ ters in a subject string, or no occurrences of ^ or $ in a pattern,
+ setting PCRE_MULTILINE has no effect.
+
+ 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).
+ There is no equivalent of this option in Perl.
+
+ PCRE_UNGREEDY
+
+ This option inverts the "greediness" of the quantifiers so that they
+ are not greedy by default, but become greedy if followed by "?". It is
+ not compatible with Perl. It can also be set by a (?U) option setting
+ 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
+ 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. 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 performance 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(), to suppress the UTF-8 validity checking of subject
+ strings.
STUDYING A PATTERN
- When a pattern is going to be used several times, it is
- worth spending more time analyzing it in order to speed up
- the time taken for matching. The function pcre_study() takes
- a pointer to a compiled pattern as its first argument, and
- returns a pointer to a pcre_extra block (another typedef for
- a structure with hidden contents) containing additional
- information about the pattern; this can be passed to
- pcre_exec(). If no additional information is available, NULL
- is returned.
- The second argument contains option bits. At present, no
- options are defined for pcre_study(), and this argument
- should always be zero.
+ pcre_extra *pcre_study(const pcre *code, int options,
+ const char **errptr);
- The third argument for pcre_study() is a pointer to an error
- message. If studying succeeds (even if no data is returned),
- the variable it points to is set to NULL. Otherwise it
- points to a textual error message.
+ If a compiled pattern is going to be used several times, it is worth
+ spending more time analyzing it in order to speed up the time taken for
+ matching. The function pcre_study() takes a pointer to a compiled pat-
+ tern as its first argument. If studying the pattern produces additional
+ information that will help speed up matching, pcre_study() returns a
+ pointer to a pcre_extra block, in which the study_data field points to
+ the results of the study.
- This is a typical call to pcre_study():
+ The returned value from pcre_study() can be passed directly to
+ pcre_exec(). However, a pcre_extra block also contains other fields
+ that can be set by the caller before the block is passed; these are
+ described below in the section on matching a pattern.
- pcre_extra *pe;
- pe = pcre_study(
- re, /* result of pcre_compile() */
- 0, /* no options exist */
- &error); /* set to NULL or points to a message */
+ If studying the pattern does not produce any additional information,
+ pcre_study() returns NULL. In that circumstance, if the calling program
+ wants to pass any of the other fields to pcre_exec(), it must set up
+ its own pcre_extra block.
- At present, studying a pattern is useful only for non-
- anchored patterns that do not have a single fixed starting
- character. A bitmap of possible starting characters is
- created.
+ The second argument of pcre_study() contains option bits. At present,
+ no options are defined, and this argument should always be zero.
+ The third argument for pcre_study() is a pointer for an error message.
+ If studying succeeds (even if no data is returned), the variable it
+ points to is set to NULL. Otherwise it points to a textual error mes-
+ sage. You should therefore test the error pointer for NULL after call-
+ ing pcre_study(), to be sure that it has run successfully.
+
+ This is a typical call to pcre_study():
+
+ pcre_extra *pe;
+ pe = pcre_study(
+ re, /* result of pcre_compile() */
+ 0, /* no options exist */
+ &error); /* set to NULL or points to a message */
+
+ At present, studying a pattern is useful only for non-anchored patterns
+ that do not have a single fixed starting character. A bitmap of possi-
+ ble starting bytes is created.
LOCALE SUPPORT
- PCRE handles caseless matching, and determines whether char-
- acters are letters, digits, or whatever, by reference to a
- set of tables. The library contains a default set of tables
- which is created in the default C locale when PCRE is com-
- piled. This is used when the final argument of
- pcre_compile() is NULL, and is sufficient for many applica-
- tions.
-
- An alternative set of tables can, however, be supplied. Such
- 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() as often as necessary.
- For example, to build and use tables that are appropriate
- for the French locale (where accented characters with codes
- greater than 128 are treated as letters), the following code
- could be used:
-
- setlocale(LC_CTYPE, "fr");
- tables = pcre_maketables();
- re = pcre_compile(..., tables);
-
- The tables are built in memory that is obtained via
- pcre_malloc. 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() and pcre_exec(). Thus
- for any single pattern, compilation, studying and matching
- all happen in the same locale, but different patterns can be
- compiled in different locales. It is the caller's responsi-
- bility to ensure that the memory containing the tables
- remains available for as long as it is needed.
+ 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.)
+
+ An internal set of tables is created in the default C locale when PCRE
+ is built. This is used when the final argument of pcre_compile() is
+ NULL, and is sufficient for many applications. An alternative set of
+ tables can, however, be supplied. These may be created in a different
+ locale from the default. As more and more applications change to using
+ Unicode, 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
+ treated as letters), the following code could be used:
+
+ setlocale(LC_CTYPE, "fr_FR");
+ tables = pcre_maketables();
+ re = pcre_compile(..., tables);
+
+ 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()
+ 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
+ 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.
INFORMATION ABOUT A PATTERN
- The pcre_fullinfo() function returns information about a
- compiled pattern. It replaces the obsolete pcre_info() func-
- tion, which is nevertheless retained for backwards compabil-
- ity (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, while the fourth argument is a pointer to a vari-
- able 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
- the argument where was NULL
- PCRE_ERROR_BADMAGIC the "magic number" was not found
- PCRE_ERROR_BADOPTION the value of what was invalid
-
- Here is a typical call of pcre_fullinfo(), to obtain the
- length of the compiled pattern:
-
- int rc;
- unsigned long int length;
- rc = pcre_fullinfo(
- re, /* result of pcre_compile() */
- pe, /* result of pcre_study(), or NULL */
- 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 are as follows:
-
- PCRE_INFO_OPTIONS
-
- Return a copy of the options with which the pattern was com-
- piled. 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 within the pattern itself, and with the
- PCRE_ANCHORED bit forcibly set if the form of the pattern
- implies that it can match only at the start of a subject
- string.
-
- PCRE_INFO_SIZE
-
- 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.
-
- PCRE_INFO_CAPTURECOUNT
-
- Return the number of capturing subpatterns in the pattern.
- The fourth argument should point to an int variable.
-
- PCRE_INFO_BACKREFMAX
-
- Return the number of the highest back reference in the pat-
- tern. The fourth argument should point to an int variable.
- Zero is returned if there are no back references.
-
- PCRE_INFO_FIRSTCHAR
-
- Return information about the first character of any matched
- string, for a non-anchored pattern. If there is a fixed
- first character, e.g. from a pattern such as
- (cat|cow|coyote), it is returned in the integer pointed to
- by where. Otherwise, if either
-
- (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 "\n" 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 con-
- struction of a 256-bit table indicating a fixed set of char-
- acters for the first character in any matching string, a
- pointer to the table is returned. Otherwise NULL is
- returned. The fourth argument should point to an unsigned
- char * variable.
-
- PCRE_INFO_LASTLITERAL
-
- For a non-anchored pattern, return the value of the right-
- most literal character which must exist in any matched
- string, other than at its start. The fourth argument should
- point to an int variable. If there is no such character, or
- if the pattern is anchored, -1 is returned. For example, for
- the pattern /a\d+z\d+/ the returned value is 'z'.
-
- The pcre_info() function is now obsolete because its inter-
- face 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 following
- negative numbers:
- PCRE_ERROR_NULL the argument code was NULL
- PCRE_ERROR_BADMAGIC the "magic number" was not found
+ int pcre_fullinfo(const pcre *code, const pcre_extra *extra,
+ int what, void *where);
+
+ 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
+ success, or one of the following negative numbers:
+
+ PCRE_ERROR_NULL the argument code was NULL
+ the argument where was NULL
+ 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
+ pattern:
+
+ int rc;
+ unsigned long int length;
+ rc = pcre_fullinfo(
+ re, /* result of pcre_compile() */
+ pe, /* result of pcre_study(), or NULL */
+ 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
+ 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
+ there are no back references.
+
+ PCRE_INFO_CAPTURECOUNT
+
+ Return the number of capturing subpatterns in the pattern. The fourth
+ argument should point to an int variable.
+
+ PCRE_INFO_DEFAULTTABLES
+
+ 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
+ passing a NULL table pointer.
+
+ PCRE_INFO_FIRSTBYTE
+
+ Return information about the first byte of any matched string, for a
+ non-anchored pattern. (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
+ (cat|cow|coyote), it is returned in the integer pointed to by where.
+ Otherwise, if either
+
+ (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
+ -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
+ 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-
+ able.
+
+ 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
+ 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
+ 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_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-
+ ses, which still acquire numbers. A convenience function called
+ pcre_get_named_substring() is provided for extracting an individual
+ captured substring 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 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
+ first two bytes of each entry are the number of the capturing parenthe-
+ sis, most significant byte first. The rest of the entry is the corre-
+ sponding name, zero terminated. The names are in alphabetical order.
+ For example, consider the following pattern (assume PCRE_EXTENDED is
+ set, so white space - including newlines - is ignored):
+
+ (?P<date> (?P<year>(\d\d)?\d\d) -
+ (?P<month>\d\d) - (?P<day>\d\d) )
- 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).
+ 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 ??:
- 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_FIRSTCHAR above).
+ 00 01 d a t e 00 ??
+ 00 05 d a y 00 ?? ??
+ 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 each entry is likely to
+ be different for each compiled pattern.
+
+ 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
+ option bits are those specified in the call to pcre_compile(), modified
+ by any top-level option settings within the pattern itself.
+
+ 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
+ \A always
+ \G always
+ .* if PCRE_DOTALL is set and there are no back
+ references to the subpattern in which .* appears
+
+ For such patterns, the PCRE_ANCHORED bit is set in the options returned
+ by pcre_fullinfo().
+
+ PCRE_INFO_SIZE
+
+ 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.
+
+ 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
+ pcre_malloc() when PCRE was getting memory into which to place the data
+ created by pcre_study(). The fourth argument should point to a size_t
+ variable.
+
+
+OBSOLETE INFO FUNCTION
+
+ int pcre_info(const pcre *code, int *optptr, int *firstcharptr);
+
+ The pcre_info() function is now obsolete because its interface is too
+ restrictive to return all the available data about a compiled pattern.
+ New programs should use pcre_fullinfo() instead. The yield of
+ pcre_info() is the number of capturing subpatterns, or one of the fol-
+ 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
+ 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
+ any matched string (see PCRE_INFO_FIRSTBYTE above).
MATCHING A PATTERN
- The function pcre_exec() is called to match a subject string
-
-
+ int pcre_exec(const pcre *code, const pcre_extra *extra,
+ 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
+ has been studied, the result of the study should be passed in the extra
+ argument.
+
+ 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
+ discussion about this, see the pcreprecompile documentation.
+
+ Here is an example of a simple call to pcre_exec():
+
+ int rc;
+ int ovector[30];
+ rc = pcre_exec(
+ re, /* result of pcre_compile() */
+ NULL, /* we didn't study the pattern */
+ "some string", /* the subject string */
+ 11, /* the length of the subject string */
+ 0, /* start at offset 0 in the subject */
+ 0, /* default options */
+ ovector, /* vector of integers for substring information */
+ 30); /* number of elements in the vector (NOT size in
+ bytes) */
+
+ 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 fields in a pcre_extra block are as fol-
+ lows:
+
+ unsigned long int flags;
+ void *study_data;
+ unsigned long int match_limit;
+ void *callout_data;
+ const unsigned char *tables;
+
+ The flags field is a bitmap that specifies which of the other fields
+ are set. The flag bits are:
+
+ PCRE_EXTRA_STUDY_DATA
+ PCRE_EXTRA_MATCH_LIMIT
+ PCRE_EXTRA_CALLOUT_DATA
+ PCRE_EXTRA_TABLES
+
+ Other flag bits should be set to zero. The study_data field is set in
+ the pcre_extra block that is returned by pcre_study(), together with
+ 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
+ flag bits.
+
+ The match_limit field provides a means of preventing PCRE from using up
+ a vast amount of resources when running patterns that are not going to
+ match, but which have a very large number of possibilities in their
+ search trees. The classic example is the use of nested unlimited
+ repeats.
+
+ Internally, PCRE uses a function called match() which it calls repeat-
+ edly (sometimes recursively). The limit is imposed on the number of
+ times this function is called during a match, which has the effect of
+ limiting the amount of recursion and backtracking that can take place.
+ For patterns that are not anchored, the count starts from zero for each
+ position in the subject string.
+
+ The default limit for the library can be set when PCRE is built; the
+ default default is 10 million, which handles all but the most extreme
+ cases. You can reduce the default by suppling pcre_exec() with a
+ pcre_extra block in which match_limit is set to a smaller value, and
+ PCRE_EXTRA_MATCH_LIMIT is set in the flags field. If the limit is
+ exceeded, pcre_exec() returns PCRE_ERROR_MATCHLIMIT.
+
+ The pcre_callout field is used in conjunction with the "callout" fea-
+ ture, which is described in the pcrecallout documentation.
+
+ The tables field is used to pass a character tables pointer to
+ pcre_exec(); this overrides the value that is stored with the compiled
+ pattern. A non-NULL value is stored with the compiled pattern only if
+ custom tables were supplied to pcre_compile() via its tableptr argu-
+ 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-
+ tion for a discussion of saving compiled patterns for later use.
+
+ Option bits for pcre_exec()
+
+ The unused bits of the options argument for pcre_exec() must be zero.
+ The only bits that may be set are PCRE_ANCHORED, PCRE_NOTBOL,
+ PCRE_NOTEOL, PCRE_NOTEMPTY, PCRE_NO_UTF8_CHECK and PCRE_PARTIAL.
+
+ PCRE_ANCHORED
+
+ The PCRE_ANCHORED option limits pcre_exec() to matching at the first
+ matching position. If a pattern was compiled with PCRE_ANCHORED, or
+ turned out to be anchored by virtue of its contents, it cannot be made
+ unachored at matching time.
+
+ 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
+ behaviour 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-
+ out PCRE_MULTILINE (at compile time) causes dollar never to match. This
+ 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
+ example, if the pattern
+
+ a?b?
+
+ is applied to a string not beginning with "a" or "b", it matches the
+ empty string at the start of the subject. With PCRE_NOTEMPTY set, this
+ match is not valid, so PCRE searches further into the string for occur-
+ rences of "a" or "b".
+
+ Perl has no direct equivalent of PCRE_NOTEMPTY, but it does make a spe-
+ cial case of a pattern match of the empty string within its split()
+ function, and when using the /g modifier. It is possible to emulate
+ Perl's behaviour after matching a null string by first trying the match
+ again at the same offset with PCRE_NOTEMPTY and PCRE_ANCHORED, and then
+ if that fails by advancing the starting offset (see below) and trying
+ an ordinary match again. There is some code that demonstrates how to do
+ this in the pcredemo.c sample program.
+
+ PCRE_NO_UTF8_CHECK
+
+ When PCRE_UTF8 is set at compile time, the validity of the subject as a
+ UTF-8 string is automatically checked when pcre_exec() is subsequently
+ called. The value of startoffset is also checked to ensure that it
+ points to the start of a UTF-8 character. If an invalid UTF-8 sequence
+ of bytes is found, pcre_exec() returns the error PCRE_ERROR_BADUTF8. If
+ startoffset contains an invalid value, PCRE_ERROR_BADUTF8_OFFSET is
+ returned.
+
+ If you already know that your subject is valid, and you want to skip
+ these checks for performance reasons, you can set the
+ PCRE_NO_UTF8_CHECK option when calling pcre_exec(). You might want to
+ do this for the second and subsequent calls to pcre_exec() if you are
+ making repeated calls to find all the matches in a single subject
+ string. However, you should be sure that the value of startoffset
+ points to the start of a UTF-8 character. When PCRE_NO_UTF8_CHECK is
+ set, the effect of passing an invalid UTF-8 string as a subject, or a
+ value of startoffset that does not point to the start of a UTF-8 char-
+ acter, is undefined. Your program may crash.
+
+ PCRE_PARTIAL
+
+ This option turns on the partial matching feature. If the subject
+ string fails to match the pattern, but at some point during the match-
+ ing process the end of the subject was reached (that is, the subject
+ partially matches the pattern and the failure to match occurred only
+ because there were not enough subject characters), pcre_exec() returns
+ PCRE_ERROR_PARTIAL instead of PCRE_ERROR_NOMATCH. When PCRE_PARTIAL is
+ used, there are restrictions on what may appear in the pattern. These
+ are discussed in the pcrepartial documentation.
+
+ The string to be matched by pcre_exec()
+
+ The subject string is passed to pcre_exec() as a pointer in subject, a
+ length in length, and a starting byte offset in startoffset. In UTF-8
+ mode, the byte offset must point to the start of a UTF-8 character.
+ Unlike the pattern string, the subject may contain binary zero bytes.
+ When the starting offset is zero, the search for a match starts at the
+ beginning of the subject, and this is by far the most common case.
+
+ A non-zero starting offset is useful when searching for another match
+ in the same subject by calling pcre_exec() again after a previous suc-
+ cess. Setting startoffset differs from just passing over a shortened
+ string and setting PCRE_NOTBOL in the case of a pattern that begins
+ with any kind of lookbehind. For example, consider the pattern
+
+ \Biss\B
+
+ which finds occurrences of "iss" in the middle of words. (\B matches
+ only if the current position in the subject is not a word boundary.)
+ When applied to the string "Mississipi" the first call to pcre_exec()
+ finds the first occurrence. If pcre_exec() is called again with just
+ the remainder of the subject, namely "issipi", it does not match,
+ because \B is always false at the start of the subject, which is deemed
+ to be a word boundary. However, if pcre_exec() is passed the entire
+ string again, but with startoffset set to 4, it finds the second occur-
+ rence of "iss" because it is able to look behind the starting point to
+ discover that it is preceded by a letter.
+
+ If a non-zero starting offset is passed when the pattern is anchored,
+ one attempt to match at the given offset is made. This can only succeed
+ if the pattern does not require the match to be at the start of the
+ subject.
+
+ How pcre_exec() returns captured substrings
+
+ In general, a pattern matches a certain portion of the subject, and in
+ addition, further substrings from the subject may be picked out by
+ parts of the pattern. Following the usage in Jeffrey Friedl's book,
+ this is called "capturing" in what follows, and the phrase "capturing
+ subpattern" is used for a fragment of a pattern that picks out a sub-
+ string. PCRE supports several other kinds of parenthesized subpattern
+ that do not cause substrings to be captured.
+
+ Captured substrings are returned to the caller via a vector of integer
+ offsets whose address is passed in ovector. The number of elements in
+ the vector is passed in ovecsize, which must be a non-negative number.
+ Note: this argument is NOT the size of ovector in bytes.
+
+ The first two-thirds of the vector is used to pass back captured sub-
+ strings, each substring using a pair of integers. The remaining third
+ of the vector is used as workspace by pcre_exec() while matching cap-
+ turing subpatterns, and is not available for passing back information.
+ The length passed in ovecsize should always be a multiple of three. If
+ it is not, it is rounded down.
+
+ When a match is successful, information about captured substrings is
+ returned in pairs of integers, starting at the beginning of ovector,
+ and continuing up to two-thirds of its length at the most. The first
+ element of a pair is set to the offset of the first character in a sub-
+ string, and the second is set to the offset of the first character
+ after the end of a substring. The first pair, ovector[0] and ovec-
+ tor[1], identify the portion of the subject string matched by the
+ entire pattern. The next pair is used for the first capturing subpat-
+ tern, and so on. The value returned by pcre_exec() is the number of
+ pairs that have been set. If there are no capturing subpatterns, the
+ return value from a successful match is 1, indicating that just the
+ first pair of offsets has been set.
+
+ Some convenience functions are provided for extracting the captured
+ substrings as separate strings. These are described in the following
+ section.
+
+ It is possible for an capturing subpattern number n+1 to match some
+ part of the subject when subpattern n has not been used at all. For
+ example, if the string "abc" is matched against the pattern (a|(z))(bc)
+ subpatterns 1 and 3 are matched, but 2 is not. When this happens, both
+ offset values corresponding to the unused subpattern are set to -1.
+
+ If a capturing subpattern is matched repeatedly, it is the last portion
+ of the string that it matched that is returned.
+
+ If the vector is too small to hold all the captured substring offsets,
+ it is used as far as possible (up to two-thirds of its length), and the
+ function returns a value of zero. In particular, if the substring off-
+ sets are not of interest, pcre_exec() may be called with ovector passed
+ as NULL and ovecsize as zero. However, if the pattern contains back
+ references and the ovector is not big enough to remember the related
+ substrings, PCRE has to get additional memory for use during matching.
+ Thus it is usually advisable to supply an ovector.
+ Note that pcre_info() can be used to find out how many capturing sub-
+ patterns there are in a compiled pattern. The smallest size for ovector
+ that will allow for n captured substrings, in addition to the offsets
+ of the substring matched by the whole pattern, is (n+1)*3.
-SunOS 5.8 Last change: 9
-
-
-
- against a pre-compiled pattern, which is passed in the code
- argument. If the pattern has been studied, the result of the
- study should be passed in the extra argument. Otherwise this
- must be NULL.
-
- Here is an example of a simple call to pcre_exec():
-
- int rc;
- int ovector[30];
- rc = pcre_exec(
- re, /* result of pcre_compile() */
- NULL, /* we didn't study the pattern */
- "some string", /* the subject string */
- 11, /* the length of the subject string */
- 0, /* start at offset 0 in the subject */
- 0, /* default options */
- ovector, /* vector for substring information */
- 30); /* number of elements in the vector */
-
- The PCRE_ANCHORED option can be passed in the options argu-
- ment, whose unused bits must be zero. However, 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.
-
- There are also three further options that can be set only at
- matching time:
-
- PCRE_NOTBOL
-
- The first character of the 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.
-
- PCRE_NOTEOL
-
- The end of the string is not the end of a line, so the dol-
- lar metacharacter should not match it nor (except in multi-
- line mode) a newline immediately before it. Setting this
- without PCRE_MULTILINE (at compile time) causes dollar never
- to match.
-
- PCRE_NOTEMPTY
-
- An empty string is not considered to be a valid match if
- this option is set. If there are alternatives in the pat-
- tern, they are tried. If all the alternatives match the
- empty string, the entire match fails. For example, if the
- pattern
-
- a?b?
-
- is applied to a string not beginning with "a" or "b", it
- matches the empty string at the start of the subject. With
- PCRE_NOTEMPTY set, this match is not valid, so PCRE searches
- further into the string for occurrences of "a" or "b".
-
- Perl has no direct equivalent of PCRE_NOTEMPTY, 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
- offset with PCRE_NOTEMPTY set, and then if that fails by
- advancing the starting offset (see below) and trying an
- ordinary match again.
-
- The subject string is passed as a pointer in subject, a
- length in length, and a starting offset in startoffset.
- Unlike the pattern string, the subject may contain binary
- zero characters. When the starting offset is zero, the
- search for a match starts at the beginning of the subject,
- and this is by far the most common case.
-
- A non-zero starting offset is useful when searching for
- another match in the same subject by calling pcre_exec()
- again after a previous success. Setting startoffset differs
- from just passing over a shortened string and setting
- PCRE_NOTBOL in the case of a pattern that begins with any
- kind of lookbehind. For example, consider the pattern
-
- \Biss\B
-
- which finds occurrences of "iss" in the middle of words. (\B
- matches only if the current position in the subject is not a
- word boundary.) When applied to the string "Mississipi" the
- first call to pcre_exec() finds the first occurrence. If
- pcre_exec() is called again with just the remainder of the
- subject, namely "issipi", it does not match, because \B is
- always false at the start of the subject, which is deemed to
- be a word boundary. However, if pcre_exec() is passed the
- entire string again, but with startoffset set to 4, it finds
- the second occurrence of "iss" because it is able to look
- behind the starting point to discover that it is preceded by
- a letter.
-
- If a non-zero starting offset is passed when the pattern is
- anchored, one attempt to match at the given offset is tried.
- This can only succeed if the pattern does not require the
- match to be at the start of the subject.
-
- In general, a pattern matches a certain portion of the sub-
- ject, and in addition, further substrings from the subject
- may be picked out by parts of the pattern. Following the
- usage in Jeffrey Friedl's book, this is called "capturing"
- in what follows, and the phrase "capturing subpattern" is
- used for a fragment of a pattern that picks out a substring.
- PCRE supports several other kinds of parenthesized subpat-
- tern that do not cause substrings to be captured.
-
- Captured substrings are returned to the caller via a vector
- of integer offsets whose address is passed in ovector. The
- number of elements in the vector is passed in ovecsize. The
- first two-thirds of the vector is used to pass back captured
- substrings, each substring using a pair of integers. The
- remaining third of the vector is used as workspace by
- pcre_exec() while matching capturing subpatterns, and is not
- available for passing back information. The length passed in
- ovecsize should always be a multiple of three. If it is not,
- it is rounded down.
-
- When a match has been successful, information about captured
- substrings is returned in pairs of integers, starting at the
- beginning of ovector, and continuing up to two-thirds of its
- length at the most. The first element of a pair is set to
- the offset of the first character in a substring, and the
- second is set to the offset of the first character after the
- end of a substring. The first pair, ovector[0] and ovec-
- tor[1], identify the portion of the subject string matched
- by the entire pattern. The next pair is used for the first
- capturing subpattern, and so on. The value returned by
- pcre_exec() is the number of pairs that have been set. If
- there are no capturing subpatterns, the return value from a
- successful match is 1, indicating that just the first pair
- of offsets has been set.
-
- Some convenience functions are provided for extracting the
- captured substrings as separate strings. These are described
- in the following section.
-
- It is possible for an capturing subpattern number n+1 to
- match some part of the subject when subpattern n has not
- been used at all. For example, if the string "abc" is
- matched against the pattern (a|(z))(bc) subpatterns 1 and 3
- are matched, but 2 is not. When this happens, both offset
- values corresponding to the unused subpattern are set to -1.
-
- If a capturing subpattern is matched repeatedly, it is the
- last portion of the string that it matched that gets
- returned.
-
- If the vector is too small to hold all the captured sub-
- strings, it is used as far as possible (up to two-thirds of
- its length), and the function returns a value of zero. In
- particular, if the substring offsets are not of interest,
- pcre_exec() may be called with ovector passed as NULL and
- ovecsize as zero. However, if the pattern contains back
- references and the ovector isn't big enough to remember the
- related substrings, PCRE has to get additional memory for
- use during matching. Thus it is usually advisable to supply
- an ovector.
-
- Note that pcre_info() can be used to find out how many cap-
- turing subpatterns there are in a compiled pattern. The
- smallest size for ovector that will allow for n captured
- substrings in addition to the offsets of the substring
- matched by the whole pattern is (n+1)*3.
-
- If pcre_exec() fails, it returns a negative number. The fol-
- lowing are defined in the header file:
-
- PCRE_ERROR_NOMATCH (-1)
-
- The subject string did not match the pattern.
-
- PCRE_ERROR_NULL (-2)
-
- Either code or subject was passed as NULL, or ovector was
- NULL and ovecsize was not zero.
-
- PCRE_ERROR_BADOPTION (-3)
-
- An unrecognized bit was set in the options argument.
-
- PCRE_ERROR_BADMAGIC (-4)
-
- PCRE stores a 4-byte "magic number" at the start of the com-
- piled code, to catch the case when it is passed a junk
- pointer. This is the error it gives when the magic number
- isn't present.
-
- PCRE_ERROR_UNKNOWN_NODE (-5)
-
- While running the pattern match, an unknown item was encoun-
- tered in the compiled pattern. This error could be caused by
- a bug in PCRE or by overwriting of the compiled pattern.
-
- PCRE_ERROR_NOMEMORY (-6)
-
- If a pattern contains back references, but the ovector that
- is passed to pcre_exec() is not big enough to remember the
- referenced substrings, PCRE gets a block of memory at the
- start of matching to use for this purpose. If the call via
- pcre_malloc() fails, this error is given. The memory is
- freed at the end of matching.
-
-
-
-
-EXTRACTING CAPTURED SUBSTRINGS
- Captured substrings can be accessed directly by using the
- offsets returned by pcre_exec() in ovector. For convenience,
- the functions pcre_copy_substring(), pcre_get_substring(),
- and pcre_get_substring_list() are provided for extracting
- captured substrings as new, separate, zero-terminated
- strings. A substring that contains a binary zero is
- correctly extracted and has a further zero added on the end,
- but the result does not, of course, function as a C string.
-
- The first three arguments are the same for all three func-
- tions: subject is the subject string which has just been
- successfully matched, ovector is a pointer to the vector of
- integer offsets that was passed to pcre_exec(), and
- stringcount is the number of substrings that were captured
- by the match, including the substring that matched the
- entire regular expression. This is the value returned by
- pcre_exec if it is greater than zero. If pcre_exec()
- returned zero, indicating that it ran out of space in ovec-
- tor, the value passed as stringcount should be the size of
- the vector divided by three.
-
- The functions pcre_copy_substring() and pcre_get_substring()
- extract a single substring, whose number is given as string-
- number. A value of zero extracts the substring that matched
- the entire pattern, while higher values extract the captured
- substrings. For pcre_copy_substring(), the string is placed
- in buffer, whose length is given by buffersize, while for
- pcre_get_substring() a new block of memory is obtained via
- pcre_malloc, and its address is returned via stringptr. The
- yield of the function is the length of the string, not
- including the terminating zero, or one of
-
- PCRE_ERROR_NOMEMORY (-6)
-
- The buffer was too small for pcre_copy_substring(), or the
- attempt to get memory failed for pcre_get_substring().
+ Return values from pcre_exec()
- PCRE_ERROR_NOSUBSTRING (-7)
-
- There is no substring whose number is stringnumber.
+ If pcre_exec() fails, it returns a negative number. The following are
+ defined in the header file:
- The pcre_get_substring_list() function extracts all avail-
- able substrings and builds a list of pointers to them. All
- this is done in a single block of memory which is obtained
- via pcre_malloc. The address of the memory block is returned
- via listptr, which is also the start of the list of string
- pointers. The end of the list is marked by a NULL pointer.
- The yield of the function is zero if all went well, or
+ PCRE_ERROR_NOMATCH (-1)
- PCRE_ERROR_NOMEMORY (-6)
+ The subject string did not match the pattern.
- if the attempt to get the memory block failed.
+ PCRE_ERROR_NULL (-2)
- When any of these functions encounter a substring that is
- unset, which can happen when capturing subpattern number n+1
- matches some part of the subject, but subpattern n has not
- been used at all, they return an empty string. This can be
- distinguished from a genuine zero-length substring by
- inspecting the appropriate offset in ovector, which is nega-
- tive for unset substrings.
+ Either code or subject was passed as NULL, or ovector was NULL and
+ ovecsize was not zero.
- The two convenience functions pcre_free_substring() and
- pcre_free_substring_list() can be used to free the memory
- returned by a previous call of pcre_get_substring() or
- pcre_get_substring_list(), respectively. They do nothing
- more than call the function pointed to by pcre_free, which
- of course could be called directly from a C program. How-
- ever, PCRE is used in some situations where it is linked via
- a special interface to another programming language which
- cannot use pcre_free directly; it is for these cases that
- the functions are provided.
+ PCRE_ERROR_BADOPTION (-3)
+ An unrecognized bit was set in the options argument.
+ PCRE_ERROR_BADMAGIC (-4)
-LIMITATIONS
- There are some size limitations in PCRE but it is hoped that
- they will never in practice be relevant. The maximum length
- of a compiled pattern is 65539 (sic) bytes. All values in
- repeating quantifiers must be less than 65536. There max-
- imum number of capturing subpatterns is 65535. There is no
- limit to the number of non-capturing subpatterns, but the
- maximum depth of nesting of all kinds of parenthesized sub-
- pattern, including capturing subpatterns, assertions, and
- other types of subpattern, is 200.
-
- The maximum length of a subject string is the largest posi-
- tive number that an integer variable can hold. However, PCRE
- uses recursion to handle subpatterns and indefinite repeti-
- tion. This means that the available stack space may limit
- the size of a subject string that can be processed by cer-
- tain patterns.
-
-
-
-DIFFERENCES FROM PERL
- The differences described here are with respect to Perl
- 5.005.
-
- 1. By default, a whitespace character is any character that
- the C library function isspace() recognizes, though it is
- possible to compile PCRE with alternative character type
- tables. Normally isspace() matches space, formfeed, newline,
- carriage return, horizontal tab, and vertical tab. Perl 5 no
- longer includes vertical tab in its set of whitespace char-
- acters. The \v escape that was in the Perl documentation for
- a long time was never in fact recognized. However, the char-
- acter itself was treated as whitespace at least up to 5.002.
- In 5.004 and 5.005 it does not match \s.
-
- 2. PCRE does not allow repeat quantifiers on lookahead
- assertions. Perl permits them, but they do not mean what you
- might think. For example, (?!a){3} does not assert that the
- next three characters are not "a". It just asserts that the
- next character is not "a" three times.
-
- 3. Capturing subpatterns that occur inside negative looka-
- head assertions are counted, but their entries in the
- offsets vector are never set. Perl sets its numerical vari-
- ables from any such patterns that are matched before the
- assertion fails to match something (thereby succeeding), but
- only if the negative lookahead assertion contains just one
- branch.
-
- 4. Though binary zero characters are supported in the sub-
- ject string, they are not allowed in a pattern string
- because it is passed as a normal C string, terminated by
- zero. The escape sequence "\0" can be used in the pattern to
- represent a binary zero.
-
- 5. The following Perl escape sequences are not supported:
- \l, \u, \L, \U, \E, \Q. In fact these are implemented by
- Perl's general string-handling and are not part of its pat-
- tern matching engine.
-
- 6. The Perl \G assertion is not supported as it is not
- relevant to single pattern matches.
-
- 7. Fairly obviously, PCRE does not support the (?{code}) and
- (?p{code}) constructions. However, there is some experimen-
- tal support for recursive patterns using the non-Perl item
- (?R).
-
- 8. There are at the time of writing some oddities in Perl
- 5.005_02 concerned with the settings of captured strings
- when part of a pattern is repeated. For example, matching
- "aba" against the pattern /^(a(b)?)+$/ sets $2 to the value
- "b", but matching "aabbaa" against /^(aa(bb)?)+$/ leaves $2
- unset. However, if the pattern is changed to
- /^(aa(b(b))?)+$/ then $2 (and $3) are set.
-
- In Perl 5.004 $2 is set in both cases, and that is also true
- of PCRE. If in the future Perl changes to a consistent state
- that is different, PCRE may change to follow.
-
- 9. Another as yet unresolved discrepancy is that in Perl
- 5.005_02 the pattern /^(a)?(?(1)a|b)+$/ matches the string
- "a", whereas in PCRE it does not. However, in both Perl and
- PCRE /^(a)?a/ matched against "a" leaves $1 unset.
-
- 10. PCRE provides some extensions to the Perl regular
- expression facilities:
-
- (a) Although lookbehind assertions must match fixed length
- strings, each alternative branch of a lookbehind assertion
- can match a different length of string. Perl 5.005 requires
- them all to have the same length.
-
- (b) If PCRE_DOLLAR_ENDONLY is set and PCRE_MULTILINE is not
- set, the $ meta- character matches only at the very end of
- the string.
-
- (c) If PCRE_EXTRA is set, a backslash followed by a letter
- with no special meaning is faulted.
-
- (d) If PCRE_UNGREEDY is set, the greediness of the repeti-
- tion quantifiers is inverted, that is, by default they are
- not greedy, but if followed by a question mark they are.
-
- (e) PCRE_ANCHORED can be used to force a pattern to be tried
- only at the start of the subject.
-
- (f) The PCRE_NOTBOL, PCRE_NOTEOL, and PCRE_NOTEMPTY options
- for pcre_exec() have no Perl equivalents.
-
- (g) The (?R) construct allows for recursive pattern matching
- (Perl 5.6 can do this using the (?p{code}) construct, which
- PCRE cannot of course support.)
-
-
-
-REGULAR EXPRESSION DETAILS
- The syntax and semantics of the regular expressions sup-
- ported by PCRE are described below. Regular expressions are
- also described in the Perl documentation and in a number of
- other books, some of which have copious examples. Jeffrey
- Friedl's "Mastering Regular Expressions", published by
- O'Reilly (ISBN 1-56592-257), covers them in great detail.
-
- The description here is intended as reference documentation.
- The basic operation of PCRE is on strings of bytes. However,
- there is the beginnings of some support for UTF-8 character
- strings. To use this support you must configure PCRE to
- include it, and then call pcre_compile() with the PCRE_UTF8
- option. How this affects the pattern matching is described
- in the final section of this document.
-
- A regular expression is a pattern that is matched against a
- subject string from left to right. Most characters stand for
- themselves in a pattern, and match the corresponding charac-
- ters in the subject. As a trivial example, the pattern
-
- The quick brown fox
-
- matches a portion of a subject string that is identical to
- itself. The power of regular expressions comes from the
- ability to include alternatives and repetitions in the pat-
- tern. These are encoded in the pattern by the use of meta-
- characters, which do not stand for themselves but instead
- are interpreted in some special way.
-
- There are two different sets of meta-characters: those that
- are recognized anywhere in the pattern except within square
- brackets, and those that are recognized in square brackets.
- Outside square brackets, the meta-characters are as follows:
-
- \ general escape character with several uses
- ^ assert start of subject (or line, in multiline
- mode)
- $ assert end of subject (or line, in multiline mode)
- . match any character except newline (by default)
- [ start character class definition
- | start of alternative branch
- ( start subpattern
- ) end subpattern
- ? extends the meaning of (
- also 0 or 1 quantifier
- also quantifier minimizer
- * 0 or more quantifier
- + 1 or more quantifier
- { start min/max quantifier
-
- Part of a pattern that is in square brackets is called a
- "character class". In a character class the only meta-
- characters are:
-
- \ general escape character
- ^ negate the class, but only if the first character
- - indicates character range
- ] terminates the character class
-
- The following sections describe the use of each of the
- meta-characters.
+ PCRE stores a 4-byte "magic number" at the start of the compiled code,
+ to catch the case when it is passed a junk pointer and to detect when a
+ pattern that was compiled in an environment of one endianness is run in
+ an environment with the other endianness. This is the error that PCRE
+ gives when the magic number is not present.
+
+ PCRE_ERROR_UNKNOWN_NODE (-5)
+
+ While running the pattern match, an unknown item was encountered in the
+ compiled pattern. This error could be caused by a bug in PCRE or by
+ overwriting of the compiled pattern.
+
+ PCRE_ERROR_NOMEMORY (-6)
+
+ If a pattern contains back references, but the ovector that is passed
+ to pcre_exec() is not big enough to remember the referenced substrings,
+ PCRE gets a block of memory at the start of matching to use for this
+ purpose. If the call via pcre_malloc() fails, this error is given. The
+ memory is automatically freed at the end of matching.
+
+ PCRE_ERROR_NOSUBSTRING (-7)
+
+ This error is used by the pcre_copy_substring(), pcre_get_substring(),
+ and pcre_get_substring_list() functions (see below). It is never
+ returned by pcre_exec().
+
+ PCRE_ERROR_MATCHLIMIT (-8)
+
+ The recursion and backtracking limit, as specified by the match_limit
+ field in a pcre_extra structure (or defaulted) was reached. See the
+ description above.
+
+ PCRE_ERROR_CALLOUT (-9)
+
+ This error is never generated by pcre_exec() itself. It is provided for
+ use by callout functions that want to yield a distinctive error code.
+ See the pcrecallout documentation for details.
+
+ PCRE_ERROR_BADUTF8 (-10)
+
+ A string that contains an invalid UTF-8 byte sequence was passed as a
+ subject.
+
+ PCRE_ERROR_BADUTF8_OFFSET (-11)
+
+ The UTF-8 byte sequence that was passed as a subject was valid, but the
+ value of startoffset did not point to the beginning of a UTF-8 charac-
+ ter.
+
+ PCRE_ERROR_PARTIAL (-12)
+
+ The subject string did not match, but it did match partially. See the
+ pcrepartial documentation for details of partial matching.
+
+ PCRE_ERROR_BAD_PARTIAL (-13)
+
+ The PCRE_PARTIAL option was used with a compiled pattern containing
+ items that are not supported for partial matching. See the pcrepartial
+ documentation for details of partial matching.
+
+ PCRE_ERROR_INTERNAL (-14)
+
+ An unexpected internal error has occurred. This error could be caused
+ by a bug in PCRE or by overwriting of the compiled pattern.
+
+ PCRE_ERROR_BADCOUNT (-15)
+
+ This error is given if the value of the ovecsize argument is negative.
+
+
+EXTRACTING CAPTURED SUBSTRINGS BY NUMBER
+
+ int pcre_copy_substring(const char *subject, int *ovector,
+ int stringcount, int stringnumber, char *buffer,
+ int buffersize);
+
+ int pcre_get_substring(const char *subject, int *ovector,
+ int stringcount, int stringnumber,
+ const char **stringptr);
+
+ int pcre_get_substring_list(const char *subject,
+ int *ovector, int stringcount, const char ***listptr);
+
+ Captured substrings can be accessed directly by using the offsets
+ returned by pcre_exec() in ovector. For convenience, the functions
+ pcre_copy_substring(), pcre_get_substring(), and pcre_get_sub-
+ string_list() are provided for extracting captured substrings as new,
+ separate, zero-terminated strings. These functions identify substrings
+ by number. The next section describes functions for extracting named
+ substrings. A substring that contains a binary zero is correctly
+ extracted and has a further zero added on the end, but the result is
+ not, of course, a C string.
+
+ The first three arguments are the same for all three of these func-
+ tions: subject is the subject string that has just been successfully
+ matched, ovector is a pointer to the vector of integer offsets that was
+ passed to pcre_exec(), and stringcount is the number of substrings that
+ were captured by the match, including the substring that matched the
+ entire regular expression. This is the value returned by pcre_exec() if
+ it is greater than zero. If pcre_exec() returned zero, indicating that
+ it ran out of space in ovector, the value passed as stringcount should
+ be the number of elements in the vector divided by three.
+
+ The functions pcre_copy_substring() and pcre_get_substring() extract a
+ single substring, whose number is given as stringnumber. A value of
+ zero extracts the substring that matched the entire pattern, whereas
+ higher values extract the captured substrings. For pcre_copy_sub-
+ string(), the string is placed in buffer, whose length is given by
+ buffersize, while for pcre_get_substring() a new block of memory is
+ obtained via pcre_malloc, and its address is returned via stringptr.
+ The yield of the function is the length of the string, not including
+ the terminating zero, or one of
+
+ PCRE_ERROR_NOMEMORY (-6)
+
+ The buffer was too small for pcre_copy_substring(), or the attempt to
+ get memory failed for pcre_get_substring().
+
+ PCRE_ERROR_NOSUBSTRING (-7)
+
+ There is no substring whose number is stringnumber.
+
+ The pcre_get_substring_list() function extracts all available sub-
+ strings and builds a list of pointers to them. All this is done in a
+ single block of memory that is obtained via pcre_malloc. The address of
+ the memory block is returned via listptr, which is also the start of
+ the list of string pointers. The end of the list is marked by a NULL
+ pointer. The yield of the function is zero if all went well, or
+
+ PCRE_ERROR_NOMEMORY (-6)
+
+ if the attempt to get the memory block failed.
+
+ When any of these functions encounter a substring that is unset, which
+ can happen when capturing subpattern number n+1 matches some part of
+ the subject, but subpattern n has not been used at all, they return an
+ empty string. This can be distinguished from a genuine zero-length sub-
+ string by inspecting the appropriate offset in ovector, which is nega-
+ tive for unset substrings.
+
+ The two convenience functions pcre_free_substring() and pcre_free_sub-
+ string_list() can be used to free the memory returned by a previous
+ call of pcre_get_substring() or pcre_get_substring_list(), respec-
+ tively. They do nothing more than call the function pointed to by
+ pcre_free, which of course could be called directly from a C program.
+ However, PCRE is used in some situations where it is linked via a spe-
+ cial interface to another programming language which cannot use
+ pcre_free directly; it is for these cases that the functions are
+ provided.
+
+
+EXTRACTING CAPTURED SUBSTRINGS BY NAME
+
+ int pcre_get_stringnumber(const pcre *code,
+ const char *name);
+
+ int pcre_copy_named_substring(const pcre *code,
+ const char *subject, int *ovector,
+ int stringcount, const char *stringname,
+ char *buffer, int buffersize);
+
+ int pcre_get_named_substring(const pcre *code,
+ const char *subject, int *ovector,
+ int stringcount, const char *stringname,
+ const char **stringptr);
+
+ To extract a substring by name, you first have to find associated num-
+ ber. For example, for this pattern
+
+ (a+)b(?<xxx>\d+)...
+
+ the number of the subpattern called "xxx" is 2. You can find the number
+ from the name by calling pcre_get_stringnumber(). The first argument is
+ the compiled pattern, and the second is the name. The yield of the
+ function is the subpattern number, or PCRE_ERROR_NOSUBSTRING (-7) if
+ there is no subpattern of that name.
+
+ Given the number, you can extract the substring directly, or use one of
+ the functions described in the previous section. For convenience, there
+ are also two functions that do the whole job.
+
+ Most of the arguments of pcre_copy_named_substring() and
+ pcre_get_named_substring() are the same as those for the similarly
+ named functions that extract by number. As these are described in the
+ previous section, they are not re-described here. There are just two
+ differences:
+
+ First, instead of a substring number, a substring name is given. Sec-
+ ond, there is an extra argument, given at the start, which is a pointer
+ to the compiled pattern. This is needed in order to gain access to the
+ name-to-number translation table.
+
+ These functions call pcre_get_stringnumber(), and if it succeeds, they
+ then call pcre_copy_substring() or pcre_get_substring(), as appropri-
+ ate.
+
+Last updated: 09 September 2004
+Copyright (c) 1997-2004 University of Cambridge.
+-----------------------------------------------------------------------------
+
+PCRE(3) PCRE(3)
+
+
+
+NAME
+ PCRE - Perl-compatible regular expressions
+
+PCRE CALLOUTS
+
+ int (*pcre_callout)(pcre_callout_block *);
+
+ PCRE provides a feature called "callout", which is a means of temporar-
+ ily passing control to the caller of PCRE in the middle of pattern
+ matching. The caller of PCRE provides an external function by putting
+ its entry point in the global variable pcre_callout. By default, this
+ variable contains NULL, which disables all calling out.
+
+ Within a regular expression, (?C) indicates the points at which the
+ external function is to be called. Different callout points can be
+ identified by putting a number less than 256 after the letter C. The
+ default value is zero. For example, this pattern has two callout
+ points:
+
+ (?C1)eabc(?C2)def
+
+ If the PCRE_AUTO_CALLOUT option bit is set when pcre_compile() is
+ called, PCRE automatically inserts callouts, all with number 255,
+ before each item in the pattern. For example, if PCRE_AUTO_CALLOUT is
+ used with the pattern
+
+ A(\d{2}|--)
+
+ it is processed as if it were
+
+ (?C255)A(?C255)((?C255)\d{2}(?C255)|(?C255)-(?C255)-(?C255))(?C255)
+
+ Notice that there is a callout before and after each parenthesis and
+ alternation bar. Automatic callouts can be used for tracking the
+ progress of pattern matching. The pcretest command has an option that
+ sets automatic callouts; when it is used, the output indicates how the
+ pattern is matched. This is useful information when you are trying to
+ optimize the performance of a particular pattern.
+
+
+MISSING CALLOUTS
+
+ You should be aware that, because of optimizations in the way PCRE
+ matches patterns, callouts sometimes do not happen. For example, if the
+ pattern is
+
+ ab(?C4)cd
+
+ PCRE knows that any matching string must contain the letter "d". If the
+ subject string is "abyz", the lack of "d" means that matching doesn't
+ ever start, and the callout is never reached. However, with "abyd",
+ though the result is still no match, the callout is obeyed.
+
+
+THE CALLOUT INTERFACE
+
+ During matching, when PCRE reaches a callout point, the external func-
+ tion defined by pcre_callout is called (if it is set). The only argu-
+ ment is a pointer to a pcre_callout block. This structure contains the
+ following fields:
+
+ int version;
+ int callout_number;
+ int *offset_vector;
+ const char *subject;
+ int subject_length;
+ int start_match;
+ int current_position;
+ int capture_top;
+ int capture_last;
+ void *callout_data;
+ int pattern_position;
+ int next_item_length;
+
+ The version field is an integer containing the version number of the
+ block format. The initial version was 0; the current version is 1. The
+ version number will change again in future if additional fields are
+ added, but the intention is never to remove any of the existing fields.
+
+ The callout_number field contains the number of the callout, as com-
+ piled into the pattern (that is, the number after ?C for manual call-
+ outs, and 255 for automatically generated callouts).
+
+ The offset_vector field is a pointer to the vector of offsets that was
+ passed by the caller to pcre_exec(). The contents can be inspected in
+ order to extract substrings that have been matched so far, in the same
+ way as for extracting substrings after a match has completed.
+
+ The subject and subject_length fields contain copies of the values that
+ were passed to pcre_exec().
+
+ The start_match field contains the offset within the subject at which
+ the current match attempt started. If the pattern is not anchored, the
+ callout function may be called several times from the same point in the
+ pattern for different starting points in the subject.
+
+ The current_position field contains the offset within the subject of
+ the current match pointer.
+
+ The capture_top field contains one more than the number of the highest
+ numbered captured substring so far. If no substrings have been cap-
+ tured, the value of capture_top is one.
+
+ The capture_last field contains the number of the most recently cap-
+ tured substring. If no substrings have been captured, its value is -1.
+
+ The callout_data field contains a value that is passed to pcre_exec()
+ by the caller specifically so that it can be passed back in callouts.
+ It is passed in the pcre_callout field of the pcre_extra data struc-
+ ture. If no such data was passed, the value of callout_data in a
+ pcre_callout block is NULL. There is a description of the pcre_extra
+ structure in the pcreapi documentation.
+
+ The pattern_position field is present from version 1 of the pcre_call-
+ out structure. It contains the offset to the next item to be matched in
+ the pattern string.
+
+ The next_item_length field is present from version 1 of the pcre_call-
+ out structure. It contains the length of the next item to be matched in
+ the pattern string. When the callout immediately precedes an alterna-
+ tion bar, a closing parenthesis, or the end of the pattern, the length
+ is zero. When the callout precedes an opening parenthesis, the length
+ is that of the entire subpattern.
+ The pattern_position and next_item_length fields are intended to help
+ in distinguishing between different automatic callouts, which all have
+ the same callout number. However, they are set for all callouts.
+
+
+RETURN VALUES
+
+ The external callout function returns an integer to PCRE. If the value
+ is zero, matching proceeds as normal. If the value is greater than
+ zero, matching fails at the current point, but backtracking to test
+ other matching possibilities goes ahead, just as if a lookahead asser-
+ tion had failed. If the value is less than zero, the match is aban-
+ doned, and pcre_exec() returns the negative value.
+
+ Negative values should normally be chosen from the set of
+ PCRE_ERROR_xxx values. In particular, PCRE_ERROR_NOMATCH forces a stan-
+ dard "no match" failure. The error number PCRE_ERROR_CALLOUT is
+ reserved for use by callout functions; it will never be used by PCRE
+ itself.
+
+Last updated: 09 September 2004
+Copyright (c) 1997-2004 University of Cambridge.
+-----------------------------------------------------------------------------
+
+PCRE(3) PCRE(3)
+
+
+
+NAME
+ PCRE - Perl-compatible regular expressions
+
+DIFFERENCES BETWEEN PCRE AND PERL
+
+ 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.8.
+
+ 1. PCRE does not have full UTF-8 support. Details of what it does have
+ are given in the section on UTF-8 support in the main pcre page.
+
+ 2. PCRE does not allow repeat quantifiers on lookahead assertions. Perl
+ permits them, but they do not mean what you might think. For example,
+ (?!a){3} does not assert that the next three characters are not "a". It
+ just asserts that the next character is not "a" three times.
+
+ 3. Capturing subpatterns that occur inside negative lookahead asser-
+ tions are counted, but their entries in the offsets vector are never
+ set. Perl sets its numerical variables from any such patterns that are
+ matched before the assertion fails to match something (thereby succeed-
+ ing), but only if the negative lookahead assertion contains just one
+ branch.
+
+ 4. Though binary zero characters are supported in the subject string,
+ they are not allowed in a pattern string because it is passed as a nor-
+ mal C string, terminated by zero. The escape sequence \0 can be used in
+ the pattern to represent a binary zero.
+
+ 5. The following Perl escape sequences are not supported: \l, \u, \L,
+ \U, and \N. In fact these are implemented by Perl's general string-han-
+ dling and are not part of its pattern matching engine. If any of these
+ are encountered by PCRE, an error is generated.
+
+ 6. The Perl escape sequences \p, \P, and \X are supported only if PCRE
+ is built with Unicode character property support. The properties that
+ can be tested with \p and \P are limited to the general category prop-
+ erties such as Lu and Nd.
+
+ 7. PCRE does support the \Q...\E escape for quoting substrings. Charac-
+ ters in between are treated as literals. This is slightly different
+ from Perl in that $ and @ are also handled as literals inside the
+ quotes. In Perl, they cause variable interpolation (but of course PCRE
+ does not have variables). Note the following examples:
+
+ Pattern PCRE matches Perl matches
+
+ \Qabc$xyz\E abc$xyz abc followed by the
+ contents of $xyz
+ \Qabc\$xyz\E abc\$xyz abc\$xyz
+ \Qabc\E\$\Qxyz\E abc$xyz abc$xyz
+
+ The \Q...\E sequence is recognized both inside and outside character
+ classes.
+
+ 8. Fairly obviously, PCRE does not support the (?{code}) and (?p{code})
+ constructions. However, there is support for recursive patterns using
+ the non-Perl items (?R), (?number), and (?P>name). Also, the PCRE
+ "callout" feature allows an external function to be called during pat-
+ tern matching. See the pcrecallout documentation for details.
+
+ 9. There are some differences that are concerned with the settings of
+ captured 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".
+
+ 10. PCRE provides some extensions to the Perl regular expression facil-
+ ities:
+
+ (a) Although lookbehind assertions must match fixed length strings,
+ each alternative branch of a lookbehind assertion can match a different
+ length of string. Perl requires them all to have the same length.
+
+ (b) If PCRE_DOLLAR_ENDONLY is set and PCRE_MULTILINE is not set, the $
+ meta-character matches only at the very end of the string.
+
+ (c) If PCRE_EXTRA is set, a backslash followed by a letter with no spe-
+ cial meaning is faulted.
+
+ (d) If PCRE_UNGREEDY is set, the greediness of the repetition quanti-
+ fiers is inverted, that is, by default they are not greedy, but if fol-
+ lowed by a question mark they are.
+
+ (e) PCRE_ANCHORED can be used at matching time to force a pattern to be
+ tried only at the first matching position in the subject string.
+
+ (f) The PCRE_NOTBOL, PCRE_NOTEOL, PCRE_NOTEMPTY, and PCRE_NO_AUTO_CAP-
+ TURE options for pcre_exec() have no Perl equivalents.
+
+ (g) The (?R), (?number), and (?P>name) constructs allows for recursive
+ pattern matching (Perl can do this using the (?p{code}) construct,
+ which PCRE cannot support.)
+
+ (h) PCRE supports named capturing substrings, using the Python syntax.
+
+ (i) PCRE supports the possessive quantifier "++" syntax, taken from
+ Sun's Java package.
+
+ (j) The (R) condition, for testing recursion, is a PCRE extension.
+
+ (k) The callout facility is PCRE-specific.
+
+ (l) The partial matching facility is PCRE-specific.
+
+ (m) Patterns compiled by PCRE can be saved and re-used at a later time,
+ even on different hosts that have the other endianness.
+
+Last updated: 09 September 2004
+Copyright (c) 1997-2004 University of Cambridge.
+-----------------------------------------------------------------------------
+
+PCRE(3) PCRE(3)
+
+
+
+NAME
+ PCRE - Perl-compatible regular expressions
+
+PCRE REGULAR EXPRESSION DETAILS
+
+ The syntax and semantics of the regular expressions supported by PCRE
+ are described below. Regular expressions are also described in the Perl
+ documentation and in a number of books, some of which have copious
+ examples. Jeffrey Friedl's "Mastering Regular Expressions", published
+ by O'Reilly, covers regular expressions in great detail. This descrip-
+ tion of PCRE's regular expressions is intended as reference material.
+
+ The original operation of PCRE was on strings of one-byte characters.
+ However, there is now also support for UTF-8 character strings. To use
+ this, you must build PCRE to include UTF-8 support, and then call
+ pcre_compile() with the PCRE_UTF8 option. How this affects pattern
+ matching is mentioned in several places below. There is also a summary
+ of UTF-8 features in the section on UTF-8 support in the main pcre
+ page.
+
+ A regular expression is a pattern that is matched against a subject
+ string from left to right. Most characters stand for themselves in a
+ pattern, and match the corresponding characters in the subject. As a
+ trivial example, the pattern
+
+ The quick brown fox
+
+ matches a portion of a subject string that is identical to itself. The
+ power of regular expressions comes from the ability to include alterna-
+ tives and repetitions in the pattern. These are encoded in the pattern
+ by the use of metacharacters, which do not stand for themselves but
+ instead are interpreted in some special way.
+
+ There are two different sets of metacharacters: those that are recog-
+ nized anywhere in the pattern except within square brackets, and those
+ that are recognized in square brackets. Outside square brackets, the
+ metacharacters are as follows:
+
+ \ general escape character with several uses
+ ^ assert start of string (or line, in multiline mode)
+ $ assert end of string (or line, in multiline mode)
+ . match any character except newline (by default)
+ [ start character class definition
+ | start of alternative branch
+ ( start subpattern
+ ) end subpattern
+ ? extends the meaning of (
+ also 0 or 1 quantifier
+ also quantifier minimizer
+ * 0 or more quantifier
+ + 1 or more quantifier
+ also "possessive quantifier"
+ { start min/max quantifier
+
+ Part of a pattern that is in square brackets is called a "character
+ class". In a character class the only metacharacters are:
+
+ \ general escape character
+ ^ negate the class, but only if the first character
+ - indicates character range
+ [ POSIX character class (only if followed by POSIX
+ syntax)
+ ] terminates the character class
+
+ The following sections describe the use of each of the metacharacters.
BACKSLASH
- The backslash character has several uses. Firstly, if it is
- followed by a non-alphameric character, it takes away any
- special meaning that character may have. This use of
-
- backslash as an escape character applies both inside and
- outside character classes.
-
- For example, if you want to match a "*" character, you write
- "\*" in the pattern. This applies whether or not the follow-
- ing character would otherwise be interpreted as a meta-
- character, so it is always safe to precede a non-alphameric
- with "\" to specify that it stands for itself. In particu-
- lar, if you want to match a backslash, you write "\\".
-
- If a pattern is compiled with the PCRE_EXTENDED option, whi-
- tespace in the pattern (other than in a character class) and
- characters between a "#" outside a character class and the
- next newline character are ignored. An escaping backslash
- can be used to include a whitespace or "#" character as part
- of the pattern.
-
- A second use of backslash provides a way of encoding non-
- printing characters in patterns in a visible manner. There
- is no restriction on the appearance of non-printing charac-
- ters, apart from the binary zero that terminates a pattern,
- but when a pattern is being prepared by text editing, it is
- usually easier to use one of the following escape sequences
- than the binary character it represents:
-
- \a alarm, that is, the BEL character (hex 07)
- \cx "control-x", where x is any character
- \e escape (hex 1B)
- \f formfeed (hex 0C)
- \n newline (hex 0A)
- \r carriage return (hex 0D)
- \t tab (hex 09)
- \xhh character with hex code hh
- \ddd character with octal code ddd, or backreference
-
- The precise effect of "\cx" is as follows: if "x" is a lower
- case letter, it is converted to upper case. Then bit 6 of
- the character (hex 40) is inverted. Thus "\cz" becomes hex
- 1A, but "\c{" becomes hex 3B, while "\c;" becomes hex 7B.
-
- After "\x", up to two hexadecimal digits are read (letters
- can be in upper or lower case).
-
- After "\0" up to two further octal digits are read. In both
- cases, if there are fewer than two digits, just those that
- are present are used. Thus the sequence "\0\x\07" specifies
- two binary zeros followed by a BEL character. Make sure you
- supply two digits after the initial zero if the character
- that follows is itself an octal digit.
-
- The handling of a backslash followed by a digit other than 0
- is complicated. Outside a character class, PCRE reads it
- and any following digits as a decimal number. If the number
- is less than 10, or if there have been at least that many
- previous capturing left parentheses in the expression, the
- entire sequence is taken as a back reference. A description
- of how this works is given later, following the discussion
- of parenthesized subpatterns.
-
- Inside a character class, or if the decimal number is
- greater than 9 and there have not been that many capturing
- subpatterns, PCRE re-reads up to three octal digits follow-
- ing the backslash, and generates a single byte from the
- least significant 8 bits of the value. Any subsequent digits
- stand for themselves. For example:
-
- \040 is another way of writing a space
- \40 is the same, provided there are fewer than 40
- previous capturing subpatterns
- \7 is always a back reference
- \11 might be a back reference, or another way of
- writing a tab
- \011 is always a tab
- \0113 is a tab followed by the character "3"
- \113 is the character with octal code 113 (since there
- can be no more than 99 back references)
- \377 is a byte consisting entirely of 1 bits
- \81 is either a back reference, or a binary zero
- followed by the two characters "8" and "1"
-
- Note that octal values of 100 or greater must not be intro-
- duced by a leading zero, because no more than three octal
- digits are ever read.
-
- All the sequences that define a single byte 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). Outside a character
- class it has a different meaning (see below).
-
- The third use of backslash is for specifying generic charac-
- ter types:
-
- \d any decimal digit
- \D any character that is not a decimal digit
- \s any whitespace character
- \S any character that is not a whitespace character
- \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.
-
- A "word" character is any letter or digit or the underscore
- character, that is, any character which can be part of a
- Perl "word". The definition of letters and digits is con-
- trolled by PCRE's character tables, and may vary if locale-
- specific matching is taking place (see "Locale support"
- above). For example, in the "fr" (French) locale, some char-
- acter codes greater than 128 are used for accented letters,
- and these are matched by \w.
-
- These character type 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 there
- is no character to match.
-
- The fourth use of backslash is for certain simple asser-
- tions. An assertion specifies a condition that has to be met
- at a particular point in a match, without consuming any
- characters from the subject string. The use of subpatterns
- for more complicated assertions is described below. The
- backslashed assertions are
-
- \b word boundary
- \B not a word boundary
- \A start of subject (independent of multiline mode)
- \Z end of subject or newline at end (independent of
- multiline mode)
- \z end of subject (independent of multiline mode)
-
- These assertions may not appear in character classes (but
- note that "\b" has a different meaning, namely the backspace
- character, inside a character 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.
-
- The \A, \Z, and \z assertions differ from the traditional
- circumflex and dollar (described below) in that they only
- ever match at the very start and end of the subject string,
- whatever options are set. They are not affected by the
- PCRE_NOTBOL or PCRE_NOTEOL options. If the startoffset argu-
- ment of pcre_exec() is non-zero, \A can never match. The
- difference between \Z and \z is that \Z matches before a
- newline that is the last character of the string as well as
- at the end of the string, whereas \z matches only at the
- end.
+ The backslash character has several uses. Firstly, if it is followed by
+ a non-alphanumeric character, it takes away any special meaning that
+ character may have. This use of backslash as an escape character
+ applies both inside and outside character classes.
+
+ For example, if you want to match a * character, you write \* in the
+ pattern. This escaping action applies whether or not the following
+ character would otherwise be interpreted as a metacharacter, so it is
+ always safe to precede a non-alphanumeric with backslash to specify
+ that it stands for itself. In particular, if you want to match a back-
+ slash, you write \\.
+
+ If a pattern is compiled with the PCRE_EXTENDED option, whitespace in
+ the pattern (other than in a character class) and characters between a
+ # outside a character class and the next newline character are ignored.
+ An escaping backslash can be used to include a whitespace or # charac-
+ ter as part of the pattern.
+
+ If you want to remove the special meaning from a sequence of charac-
+ ters, you can do so by putting them between \Q and \E. This is differ-
+ ent from Perl in that $ and @ are handled as literals in \Q...\E
+ sequences in PCRE, whereas in Perl, $ and @ cause variable interpola-
+ tion. Note the following examples:
+
+ Pattern PCRE matches Perl matches
+
+ \Qabc$xyz\E abc$xyz abc followed by the
+ contents of $xyz
+ \Qabc\$xyz\E abc\$xyz abc\$xyz
+ \Qabc\E\$\Qxyz\E abc$xyz abc$xyz
+
+ The \Q...\E sequence is recognized both inside and outside character
+ classes.
+
+ Non-printing characters
+
+ A second use of backslash provides a way of encoding non-printing char-
+ acters in patterns in a visible manner. There is no restriction on the
+ appearance of non-printing characters, apart from the binary zero that
+ terminates a pattern, but when a pattern is being prepared by text
+ editing, it is usually easier to use one of the following escape
+ sequences than the binary character it represents:
+
+ \a alarm, that is, the BEL character (hex 07)
+ \cx "control-x", where x is any character
+ \e escape (hex 1B)
+ \f formfeed (hex 0C)
+ \n newline (hex 0A)
+ \r carriage return (hex 0D)
+ \t tab (hex 09)
+ \ddd character with octal code ddd, or backreference
+ \xhh character with hex code hh
+ \x{hhh..} character with hex code hhh... (UTF-8 mode only)
+
+ The precise effect of \cx is as follows: if x is a lower case letter,
+ it is converted to upper case. Then bit 6 of the character (hex 40) is
+ inverted. Thus \cz becomes hex 1A, but \c{ becomes hex 3B, while \c;
+ becomes hex 7B.
+
+ After \x, from zero to two hexadecimal digits are read (letters can be
+ in upper or lower case). In UTF-8 mode, any number of hexadecimal dig-
+ its may appear between \x{ and }, but the value of the character code
+ must be less than 2**31 (that is, the maximum hexadecimal value is
+ 7FFFFFFF). If characters other than hexadecimal digits appear between
+ \x{ and }, or if there is no terminating }, this form of escape is not
+ recognized. Instead, the initial \x will be interpreted as a basic hex-
+ adecimal escape, with no following digits, giving a character whose
+ value is zero.
+
+ Characters whose value is less than 256 can be defined by either of the
+ two syntaxes for \x when PCRE is in UTF-8 mode. There is no difference
+ in the way they are handled. For example, \xdc is exactly the same as
+ \x{dc}.
+
+ After \0 up to two further octal digits are read. In both cases, if
+ there are fewer than two digits, just those that are present are used.
+ Thus the sequence \0\x\07 specifies two binary zeros followed by a BEL
+ character (code value 7). Make sure you supply two digits after the
+ initial zero if the pattern character that follows is itself an octal
+ digit.
+
+ The handling of a backslash followed by a digit other than 0 is compli-
+ cated. Outside a character class, PCRE reads it and any following dig-
+ its as a decimal number. If the number is less than 10, or if there
+ have been at least that many previous capturing left parentheses in the
+ expression, the entire sequence is taken as a back reference. A
+ description of how this works is given later, following the discussion
+ of parenthesized subpatterns.
+
+ Inside a character class, or if the decimal number is greater than 9
+ and there have not been that many capturing subpatterns, PCRE re-reads
+ up to three octal digits following the backslash, and generates a sin-
+ gle byte from the least significant 8 bits of the value. Any subsequent
+ digits stand for themselves. For example:
+
+ \040 is another way of writing a space
+ \40 is the same, provided there are fewer than 40
+ previous capturing subpatterns
+ \7 is always a back reference
+ \11 might be a back reference, or another way of
+ writing a tab
+ \011 is always a tab
+ \0113 is a tab followed by the character "3"
+ \113 might be a back reference, otherwise the
+ character with octal code 113
+ \377 might be a back reference, otherwise
+ the byte consisting entirely of 1 bits
+ \81 is either a back reference, or a binary zero
+ followed by the two characters "8" and "1"
+
+ Note that octal values of 100 or greater must not be introduced by a
+ leading zero, because no more than three octal digits are ever read.
+
+ All the sequences that define a single byte value or a single UTF-8
+ character (in UTF-8 mode) 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 sequence \X is
+ interpreted as the character "X". Outside a character class, these
+ sequences have different meanings (see below).
+
+ Generic character types
+
+ The third use of backslash is for specifying generic character types.
+ The following are always recognized:
+
+ \d any decimal digit
+ \D any character that is not a decimal digit
+ \s any whitespace character
+ \S any character that is not a whitespace character
+ \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.
+
+ For compatibility with Perl, \s does not match the VT character (code
+ 11). This makes it different from the the POSIX "space" class. The \s
+ characters are HT (9), LF (10), FF (12), CR (13), and space (32).
+
+ 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 the "fr_FR" (French) locale, some character
+ codes greater than 128 are used for accented letters, and these are
+ matched by \w.
+
+ 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.
+
+ Unicode character properties
+
+ When PCRE is built with Unicode character property support, three addi-
+ tional escape sequences to match generic character types are available
+ when UTF-8 mode is selected. They 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
+ general category properties. Each character has exactly one such prop-
+ erty, 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}.
+
+ If only one letter is specified with \p or \P, it includes all the
+ properties that start with that letter. In this case, in the absence of
+ negation, the curly brackets in the escape sequence are optional; these
+ two examples have the same effect:
+
+ \p{L}
+ \pL
+
+ The following property codes are supported:
+
+ C Other
+ Cc Control
+ Cf Format
+ Cn Unassigned
+ Co Private use
+ Cs Surrogate
+
+ L Letter
+ Ll Lower case letter
+ Lm Modifier letter
+ Lo Other letter
+ Lt Title case letter
+ Lu Upper case letter
+
+ M Mark
+ Mc Spacing mark
+ Me Enclosing mark
+ Mn Non-spacing mark
+
+ N Number
+ Nd Decimal number
+ Nl Letter number
+ No Other number
+
+ P Punctuation
+ Pc Connector punctuation
+ Pd Dash punctuation
+ Pe Close punctuation
+ Pf Final punctuation
+ Pi Initial punctuation
+ Po Other punctuation
+ Ps Open punctuation
+
+ S Symbol
+ Sc Currency symbol
+ Sk Modifier symbol
+ Sm Mathematical symbol
+ So Other symbol
+
+ Z Separator
+ Zl Line separator
+ Zp Paragraph separator
+ Zs Space separator
+
+ Extended properties such as "Greek" or "InMusicalSymbols" are not sup-
+ ported by PCRE.
+
+ Specifying caseless matching does not affect these escape sequences.
+ For example, \p{Lu} always matches only upper case letters.
+
+ The \X escape matches any number of Unicode characters that form an
+ extended Unicode sequence. \X is equivalent to
+
+ (?>\PM\pM*)
+
+ That is, it matches a character without the "mark" property, followed
+ by zero or more characters with the "mark" property, and treats the
+ sequence as an atomic group (see below). Characters with the "mark"
+ property are typically accents that affect the preceding character.
+
+ 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.
+
+ Simple assertions
+
+ The fourth use of backslash is for certain simple assertions. An asser-
+ tion specifies a condition that has to be met at a particular point in
+ a match, without consuming any characters from the subject string. The
+ use of subpatterns for more complicated assertions is described below.
+ The backslashed assertions are:
+
+ \b matches at a word boundary
+ \B matches when not at a word boundary
+ \A matches at start of subject
+ \Z matches at end of subject or before newline at end
+ \z matches at end of subject
+ \G matches at first matching position in 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.
+
+ 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-
+ 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-
+ 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
+ that \Z matches before a newline that is the last character of the
+ string as well as at the end of the string, 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-
+ 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
+ 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
+ at a time, it cannot reproduce this behaviour.
+
+ 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.
CIRCUMFLEX AND DOLLAR
- Outside a character class, in the default matching mode, the
- circumflex character is an assertion which is true only if
- the current matching point is at the start of the subject
- string. If the startoffset argument of pcre_exec() is non-
- zero, circumflex can never match. 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 alter-
- natives start with a circumflex, that is, if the pattern is
- constrained to match only at the start of the subject, it is
- said to be an "anchored" pattern. (There are also other con-
- structs that can cause a pattern to be anchored.)
-
- A dollar character is an assertion which is true only if the
- current matching point is at the end of the subject string,
- or immediately before a newline character that is the last
- character in 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 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 compile or matching 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, they match immediately after and immediately
- before an internal "\n" character, respectively, in addition
- to matching at the start and end of the subject string. For
- example, the pattern /^abc$/ matches the subject string
- "def\nabc" in multiline mode, but not otherwise. Conse-
- quently, patterns that are anchored in single line mode
- because all branches start with "^" are not anchored in mul-
- tiline 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 PCRE_MULTILINE is set or not.
+ 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
+ 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
+ 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
+ before a newline character that is the last character in 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 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
+ 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, they match immedi-
+ ately after and immediately before an internal newline character,
+ respectively, in addition to matching at the start and end of the sub-
+ ject string. For example, the pattern /^abc$/ matches the subject
+ string "def\nabc" (where \n represents a newline character) in multi-
+ line 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_DOL-
+ LAR_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 PCRE_MULTILINE is set or
+ not.
FULL STOP (PERIOD, DOT)
- Outside a character class, a dot in the pattern matches any
- one character in the subject, including a non-printing char-
- acter, but not (by default) newline. If the PCRE_DOTALL
- option is set, dots match newlines as well. The handling of
- dot is entirely independent of the handling of circumflex
- and dollar, the only relationship being that they both
- involve newline characters. Dot has no special meaning in a
- character class.
-
-
-
-SQUARE BRACKETS
- An opening square bracket introduces a character class, ter-
- minated by a closing square bracket. A closing square
- bracket on its own is not special. 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 cir-
- cumflex, if present) or escaped with a backslash.
-
- A character class matches a single character in the subject;
- the character must be in the set of characters defined by
- the class, unless the first character in the class is a cir-
- cumflex, 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. Note that a circumflex is just a con-
- venient notation for specifying the characters which are in
- the class by enumerating those that are not. It is not an
- assertion: it still consumes a character from the subject
- string, and fails if the current pointer is at the end of
- the string.
-
- 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 case-
- ful version would.
-
- The newline character is never treated in any special way in
- character classes, whatever the setting of the PCRE_DOTALL
- or PCRE_MULTILINE options is. A class such as [^a] will
- always match a newline.
-
- The minus (hyphen) character can be used to specify a range
- of characters 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 inter-
- preted 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 character of a range. A pattern such as [W-]46] is
- interpreted as a class of two characters ("W" and "-") fol-
- lowed 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 single class containing a range followed by two
- separate characters. The octal or hexadecimal representation
- of "]" can also be used to end a range.
-
- Ranges operate in ASCII collating sequence. They can also be
- used for characters specified numerically, for example
- [\000-\037]. 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 if character tables for the "fr"
- locale are in use, [\xc8-\xcb] matches accented E characters
- in both cases.
-
- The character types \d, \D, \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 res-
- tricted set of characters than the matching lower case type.
- For example, the class [^\W_] matches any letter or digit,
- but not underscore.
-
- All non-alphameric characters other than \, -, ^ (at the
- start) and the terminating ] are non-special in character
- classes, but it does no harm if they are escaped.
+ Outside a character class, a dot in the pattern matches any one charac-
+ ter in the subject, including a non-printing character, but not (by
+ default) newline. In UTF-8 mode, a dot matches any UTF-8 character,
+ which might be more than one byte long, except (by default) newline. If
+ the PCRE_DOTALL option is set, dots match newlines as well. The han-
+ dling of dot is entirely independent of the handling of circumflex and
+ dollar, the only relationship being that they both involve newline
+ characters. Dot has no special meaning in a character class.
+
+
+MATCHING A SINGLE BYTE
+
+ Outside a character class, the escape sequence \C matches any one byte,
+ both in and out of UTF-8 mode. Unlike a dot, it can match a newline.
+ The feature is provided in Perl in order to match individual bytes in
+ UTF-8 mode. Because it breaks up UTF-8 characters into individual
+ bytes, what remains in the string may be a malformed 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-
+ late the length of the lookbehind.
+
+
+SQUARE BRACKETS AND CHARACTER CLASSES
+
+ An opening square bracket introduces a character class, terminated by a
+ closing square bracket. A closing square bracket on its own is not spe-
+ cial. If a closing square bracket is required as a member of the class,
+ it should be the first data character in the class (after an initial
+ circumflex, if present) or escaped with a backslash.
+
+ A character class matches a single character in the subject. In UTF-8
+ mode, the character may occupy more than one byte. A matched character
+ 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
+ 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.
+ 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
+ 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
+ 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. When running 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 newline character is never treated in any special way in character
+ classes, whatever the setting of the PCRE_DOTALL or PCRE_MULTILINE
+ options is. A class such as [^a] will always match a newline.
+
+ 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
+ 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
+ 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 the "fr_FR" 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,
+ escaping other non-alphanumeric characters does no harm.
POSIX CHARACTER CLASSES
- Perl 5.6 (not yet released at the time of writing) is going
- to support the POSIX notation for character classes, which
- uses names enclosed by [: and :] within the enclosing
- square brackets. PCRE supports this notation. For example,
- [01[:alpha:]%]
+ Perl supports the POSIX notation for character classes. This uses names
+ 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
- matches "0", "1", any alphabetic character, or "%". The sup-
- ported class names are
+ alnum letters and digits
+ alpha letters
+ ascii character codes 0 - 127
+ blank space or tab only
+ cntrl control characters
+ digit decimal digits (same as \d)
+ graph printing characters, excluding space
+ lower lower case letters
+ print printing characters, including space
+ punct printing characters, excluding letters and digits
+ space white space (not quite the same as \s)
+ upper upper case letters
+ word "word" characters (same as \w)
+ xdigit hexadecimal digits
- alnum letters and digits
- alpha letters
- ascii character codes 0 - 127
- cntrl control characters
- digit decimal digits (same as \d)
- graph printing characters, excluding space
- lower lower case letters
- print printing characters, including space
- punct printing characters, excluding letters and digits
- space white space (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
+ 11). This makes "space" different to \s, which does not include VT (for
+ Perl compatibility).
- The names "ascii" and "word" are Perl extensions. Another
- Perl extension is negation, which is indicated by a ^ char-
- acter after the colon. For example,
+ 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:]]
+ [12[:^digit:]]
- 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.
+ 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.
VERTICAL BAR
- Vertical bar characters are used to separate alternative
- patterns. For example, the pattern
- gilbert|sullivan
+ Vertical bar characters are used to separate alternative patterns. For
+ example, the pattern
- matches either "gilbert" or "sullivan". Any number of alter-
- natives may appear, and an empty alternative is permitted
- (matching the empty string). The matching process tries
- each alternative in turn, from left to right, and the first
- one that succeeds is used. If the alternatives are within a
- subpattern (defined below), "succeeds" means matching the
- rest of the main pattern as well as the alternative in the
- subpattern.
+ gilbert|sullivan
+ matches either "gilbert" or "sullivan". Any number of alternatives may
+ appear, and an empty alternative is permitted (matching the empty
+ string). The matching process tries each alternative in turn, from
+ left to right, and the first one that succeeds is used. If the alterna-
+ tives are within a subpattern (defined below), "succeeds" means match-
+ ing the rest of the main pattern as well as the alternative in the sub-
+ pattern.
INTERNAL OPTION SETTING
- The settings of PCRE_CASELESS, PCRE_MULTILINE, PCRE_DOTALL,
- and PCRE_EXTENDED can be changed from within the pattern by
- a sequence of Perl option letters enclosed between "(?" and
- ")". The option letters are
-
- i for PCRE_CASELESS
- m for PCRE_MULTILINE
- s for PCRE_DOTALL
- x for PCRE_EXTENDED
-
- For example, (?im) sets caseless, multiline matching. It is
- also possible to unset these options by preceding the letter
- with a hyphen, and a combined setting and unsetting such as
- (?im-sx), which sets PCRE_CASELESS and PCRE_MULTILINE while
- unsetting PCRE_DOTALL and PCRE_EXTENDED, is also permitted.
- If a letter appears both before and after the hyphen, the
- option is unset.
-
- The scope of these option changes depends on where in the
- pattern the setting occurs. For settings that are outside
- any subpattern (defined below), the effect is the same as if
- the options were set or unset at the start of matching. The
- following patterns all behave in exactly the same way:
-
- (?i)abc
- a(?i)bc
- ab(?i)c
- abc(?i)
-
- which in turn is the same as compiling the pattern abc with
- PCRE_CASELESS set. In other words, such "top level" set-
- tings apply to the whole pattern (unless there are other
- changes inside subpatterns). If there is more than one set-
- ting of the same option at top level, the rightmost setting
- is used.
-
- If an option change occurs inside a subpattern, the effect
- is different. This is a change of behaviour in Perl 5.005.
- An option change inside a subpattern affects only that part
- of the subpattern that follows it, so
-
- (a(?i)b)c
-
- matches abc and aBc and no other strings (assuming
- PCRE_CASELESS is not used). By this means, options can be
- made to have different settings in different parts of the
- pattern. Any changes made in one alternative do carry on
- into subsequent branches within the same subpattern. For
- example,
-
- (a(?i)b|c)
-
- matches "ab", "aB", "c", and "C", even though when matching
- "C" the first branch is abandoned before the option setting.
- This is because the effects of option settings happen at
- compile time. There would be some very weird behaviour oth-
- erwise.
-
- The PCRE-specific options PCRE_UNGREEDY and PCRE_EXTRA can
- be changed in the same way as the Perl-compatible options by
- using the characters U and X respectively. The (?X) flag
- setting is special in that it must always occur earlier in
- the pattern than any of the additional features it turns on,
- even when it is at top level. It is best put at the start.
+ The settings of the PCRE_CASELESS, PCRE_MULTILINE, PCRE_DOTALL, and
+ PCRE_EXTENDED options can be changed from within the pattern by a
+ sequence of Perl option letters enclosed between "(?" and ")". The
+ option letters are
+
+ i for PCRE_CASELESS
+ m for PCRE_MULTILINE
+ s for PCRE_DOTALL
+ x for PCRE_EXTENDED
+
+ For example, (?im) sets caseless, multiline matching. It is also possi-
+ ble to unset these options by preceding the letter with a hyphen, and a
+ combined setting and unsetting such as (?im-sx), which sets PCRE_CASE-
+ LESS and PCRE_MULTILINE while unsetting PCRE_DOTALL and PCRE_EXTENDED,
+ is also permitted. If a letter appears both before and after the
+ hyphen, the option is unset.
+
+ When an option change occurs at top level (that is, not inside subpat-
+ tern parentheses), the change applies to the remainder of the pattern
+ that follows. If the change is placed right at the start of a pattern,
+ PCRE extracts it into the global options (and it will therefore show up
+ in data extracted by the pcre_fullinfo() function).
+
+ An option change within a subpattern affects only that part of the cur-
+ rent pattern that follows it, so
+
+ (a(?i)b)c
+
+ matches abc and aBc and no other strings (assuming PCRE_CASELESS is not
+ used). By this means, options can be made to have different settings
+ in different parts of the pattern. Any changes made in one alternative
+ do carry on into subsequent branches within the same subpattern. For
+ example,
+
+ (a(?i)b|c)
+
+ matches "ab", "aB", "c", and "C", even though when matching "C" the
+ first branch is abandoned before the option setting. This is because
+ the effects of option settings happen at compile time. There would be
+ some very weird behaviour otherwise.
+
+ The PCRE-specific options PCRE_UNGREEDY and PCRE_EXTRA can be changed
+ in the same way as the Perl-compatible options by using the characters
+ U and X respectively. The (?X) flag setting is special in that it must
+ always occur earlier in the pattern than any of the additional features
+ it turns on, even when it is at top level. It is best to put it at the
+ start.
SUBPATTERNS
- Subpatterns are delimited by parentheses (round brackets),
- which can be nested. Marking part of a pattern as a subpat-
- tern does two things:
- 1. It localizes a set of alternatives. For example, the pat-
- tern
+ Subpatterns are delimited by parentheses (round brackets), which can be
+ nested. Turning part of a pattern into a subpattern does two things:
+
+ 1. It localizes a set of alternatives. For example, the pattern
- cat(aract|erpillar|)
+ cat(aract|erpillar|)
- matches one of the words "cat", "cataract", or "caterpil-
- lar". Without the parentheses, it would match "cataract",
- "erpillar" or the empty string.
+ matches one of the words "cat", "cataract", or "caterpillar". Without
+ the parentheses, it would match "cataract", "erpillar" or the empty
+ string.
- 2. It sets up the subpattern as a capturing subpattern (as
- defined above). When the whole pattern matches, that por-
- tion 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 the numbers of the captur-
- ing subpatterns.
+ 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
+ subpatterns.
- For example, if the string "the red king" is matched against
- the pattern
+ For example, if the string "the red king" is matched against the pat-
+ tern
- the ((red|white) (king|queen))
+ the ((red|white) (king|queen))
- the captured substrings are "red king", "red", and "king",
- and are numbered 1, 2, and 3, respectively.
+ 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 sub-
- pattern is required without a capturing requirement. If an
- opening parenthesis is followed by "?:", the subpattern does
- not do any capturing, 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 pat-
- tern
+ 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))
+ the ((?:red|white) (king|queen))
- the captured substrings are "white queen" and "queen", and
- are numbered 1 and 2. The maximum number of captured sub-
- strings is 99, and the maximum number of all subpatterns,
- both capturing and non-capturing, is 200.
+ the captured substrings are "white queen" and "queen", and are numbered
+ 1 and 2. The maximum number of capturing subpatterns is 65535, and the
+ maximum depth of nesting of all subpatterns, both capturing and non-
+ capturing, is 200.
- 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
+ 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)
+ (?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 "Saturday".
+ 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
+ "Saturday".
+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-
+ patterns, something that Perl does not provide. The Python syntax
+ (?P<name>...) is used. Names consist of alphanumeric characters and
+ underscores, and must be unique within a pattern.
+
+ Named capturing parentheses are still allocated numbers as well as
+ names. The PCRE API provides function calls for extracting the name-to-
+ number translation table from a compiled pattern. There is also a con-
+ venience function for extracting a captured substring by name. For fur-
+ ther details see the pcreapi documentation.
+
REPETITION
- Repetition is specified by quantifiers, which can follow any
- of the following items:
- a single character, possibly escaped
- the . metacharacter
- a character class
- a back reference (see next section)
- a parenthesized subpattern (unless it is an assertion -
- see below)
-
- The general repetition quantifier specifies a minimum and
- maximum number 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. Thus
-
- [aeiou]{3,}
-
- matches at least 3 successive vowels, but may match many
- more, while
-
- \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 example, {,6} is not a quantif-
- ier, but a literal string of four characters.
- The quantifier {0} is permitted, causing the expression to
- behave as if the previous item and the quantifier were not
- present.
+ Repetition is specified by quantifiers, which can follow any of the
+ following items:
- For convenience (and historical compatibility) the three
- most common quantifiers have single-character abbreviations:
+ a literal data character
+ the . metacharacter
+ the \C escape sequence
+ the \X escape sequence (in UTF-8 mode with Unicode properties)
+ an escape such as \d that matches a single character
+ a character class
+ a back reference (see next section)
+ a parenthesized subpattern (unless it is an assertion)
- * is equivalent to {0,}
- + is equivalent to {1,}
- ? is equivalent to {0,1}
+ 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:
- 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:
+ z{2,4}
- (a?)*
+ 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
- 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 broken.
+ [aeiou]{3,}
- By default, the quantifiers are "greedy", that is, they
- match as much as possible (up to the maximum number of per-
- mitted 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
- the sequences /* and */ and within the sequence, individual
- * and / characters may appear. An attempt to match C com-
- ments by applying the pattern
+ matches at least 3 successive vowels, but may match many more, while
- /\*.*\*/
+ \d{8}
- to the string
+ 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.
- /* first command */ not comment /* second comment */
+ 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
+ may be of different lengths).
- fails, because it matches the entire string owing to the
- greediness of the .* item.
+ The quantifier {0} is permitted, causing the expression to behave as if
+ the previous item and the quantifier were not present.
- 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
+ For convenience (and historical compatibility) the three most common
+ quantifiers have single-character abbreviations:
- /\*.*?\*/
+ * is equivalent to {0,}
+ + is equivalent to {1,}
+ ? is equivalent to {0,1}
- does the right thing with the C comments. The meaning of the
- various quantifiers is not otherwise changed, just the pre-
- ferred number of matches. Do not confuse this use of ques-
- tion mark with its use as a quantifier in its own right.
- Because it has two uses, it can sometimes appear doubled, as
- in
+ 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:
- \d??\d
+ (a?)*
- which matches one digit by preference, but can match two if
- that is the only way the rest of the pattern matches.
+ 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-
+ ken.
- If the PCRE_UNGREEDY option is set (an option which 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.
+ 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
+ pattern
- When a parenthesized subpattern is quantified with a minimum
- repeat count that is greater than 1 or with a limited max-
- imum, more store 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 (equivalent to Perl's /s) is set, thus allowing the .
- to match newlines, the pattern is implicitly anchored,
- because whatever follows will be tried against every charac-
- ter position in the subject string, so there is no point in
- retrying the overall match at any position after the first.
- PCRE treats such a pattern as though it were preceded by \A.
- In cases where it is known that the subject string contains
- no newlines, it is worth setting PCRE_DOTALL when the pat-
- tern begins with .* in order to obtain this optimization, or
- alternatively using ^ to indicate anchoring explicitly.
+ to the string
- When a capturing subpattern is repeated, the value captured
- is the substring that matched the final iteration. For exam-
- ple, after
+ /* first comment */ not comment /* second comment */
- (tweedle[dume]{3}\s*)+
+ fails, because it matches the entire string owing to the greediness of
+ the .* item.
- has matched "tweedledum tweedledee" the value of the cap-
- tured substring is "tweedledee". However, if there are
- nested capturing subpatterns, the corresponding captured
- values may have been set in previous iterations. For exam-
- ple, after
+ 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
- /(a|(b))+/
+ /\*.*?\*/
- matches "aba" the value of the second captured substring is
- "b".
+ 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
+ which matches one digit by preference, but can match two if that is the
+ only way the rest of the pattern matches.
-BACK REFERENCES
- Outside a character class, a backslash followed by a digit
- greater than 0 (and possibly further digits) is a back
+ If the PCRE_UNGREEDY option is set (an option which 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
+ 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 . 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-
+ mization, or alternatively using ^ to indicate anchoring explicitly.
-SunOS 5.8 Last change: 30
+ 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,
+ and a later one succeed. Consider, for example:
+ (.*)abc\1
+ If the subject is "xyz123abc123" the match point is the fourth charac-
+ ter. For this reason, such a pattern is not implicitly anchored.
- reference to a capturing subpattern earlier (i.e. to its
- left) in the pattern, provided there have been that many
- previous capturing left parentheses.
+ When a capturing subpattern is repeated, the value captured is the sub-
+ string that matched the final iteration. For example, after
- 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 pattern. In other words, the
- parentheses that are referenced need not be to the left of
- the reference for numbers less than 10. See the section
- entitled "Backslash" above for further details of the han-
- dling of digits following a backslash.
+ (tweedle[dume]{3}\s*)+
- A back reference matches whatever actually matched the cap-
- turing subpattern in the current subject string, rather than
- anything matching the subpattern itself. So the pattern
+ 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-
+ tions. For example, after
- (sens|respons)e and \1ibility
+ /(a|(b))+/
- matches "sense and sensibility" and "response and responsi-
- bility", 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 example,
+ matches "aba" the value of the second captured substring is "b".
- ((?i)rah)\s+\1
- matches "rah rah" and "RAH RAH", but not "RAH rah", even
- though the original capturing subpattern is matched case-
- lessly.
+ATOMIC GROUPING AND POSSESSIVE QUANTIFIERS
- There may be more than one back reference to the same sub-
- pattern. If a subpattern has not actually been used in a
- particular match, any back references to it always fail. For
- example, the pattern
+ With both maximizing and minimizing repetition, failure of what follows
+ normally causes the repeated item to be re-evaluated to see if a dif-
+ ferent number of repeats allows the rest of the pattern to match. Some-
+ times 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.
- (a|(bc))\2
+ Consider, for example, the pattern \d+foo when applied to the subject
+ line
- always fails if it starts to match "a" rather than "bc".
- Because there may be up to 99 back references, all digits
- following the backslash are taken as part of a potential
- back reference 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 an empty comment can be used.
+ 123456bar
- 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 subpatterns. For example, the pat-
- tern
+ 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
+ to be re-evaluated in this way.
- (a|b\1)+
+ If we use atomic grouping for the previous example, the matcher would
+ give up immediately on failing to match "foo" the first time. The nota-
+ tion is a kind of special parenthesis, starting with (?> as in this
+ example:
- matches any number of "a"s and also "aba", "ababbaa" etc. At
- each iteration of the subpattern, the back reference matches
- the character string corresponding to the previous itera-
- tion. 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.
+ (?>\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
+ 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
+ match, if anchored at the current point in the subject string.
-ASSERTIONS
- An assertion is a test on the characters following or
- preceding the current matching point that does not actually
- consume any characters. The simple assertions coded as \b,
- \B, \A, \Z, \z, ^ and $ are described above. More compli-
- cated assertions are coded as subpatterns. There are two
- kinds: those that look ahead of the current position in the
- subject string, and those that look behind it.
+ 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
+ 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 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
+ this notation, the previous example can be rewritten as
+
+ \d++foo
+
+ 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 or processing of a possessive quantifier and the equivalent
+ atomic group.
+
+ The possessive quantifier syntax is an extension to the Perl syntax. It
+ originates in Sun's Java package.
+
+ 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, 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
+ group, like this:
- An assertion subpattern is matched in the normal way, except
- that it does not cause the current matching position to be
- changed. Lookahead assertions start with (?= for positive
- assertions and (?! for negative assertions. For example,
+ ((?>\D+)|<\d+>)*[!?]
- \w+(?=;)
+ sequences of non-digits cannot be broken, and failure happens quickly.
- matches a word followed by a semicolon, but does not include
- the semicolon in the match, and
- foo(?!bar)
+BACK REFERENCES
+
+ 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
+ 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. See the subsec-
+ tion entitled "Non-printing characters" above for further details of
+ the handling of digits following a backslash.
+
+ 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-
+ ple,
+
+ ((?i)rah)\s+\1
- matches any occurrence of "foo" that is not followed by
- "bar". Note that the apparently similar pattern
+ matches "rah rah" and "RAH RAH", but not "RAH rah", even though the
+ original capturing subpattern is matched caselessly.
- (?!foo)bar
+ Back references to named subpatterns use the Python syntax (?P=name).
+ We could rewrite the above example as follows:
- does not find an occurrence of "bar" that is preceded by
- something other than "foo"; it finds any occurrence of "bar"
- whatsoever, because the assertion (?!foo) is always true
- when the next three characters are "bar". A lookbehind
- assertion is needed to achieve this effect.
+ (?<p1>(?i)rah)\s+(?P=p1)
- Lookbehind assertions start with (?<= for positive asser-
- tions and (?<! for negative assertions. For example,
+ 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. For example, the pattern
- (?<!foo)bar
+ (a|(bc))\2
+
+ always fails if it starts to match "a" rather than "bc". Because there
+ may be many capturing parentheses in a pattern, all digits following
+ the backslash are taken as part of a potential back reference 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 an empty comment (see "Com-
+ ments" 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-
+ 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
+ the example above, or by a quantifier with a minimum of zero.
+
+
+ASSERTIONS
- does find an occurrence of "bar" that is not preceded by
- "foo". The contents of a lookbehind assertion are restricted
- such that all the strings it matches must have a fixed
- length. However, if there are several alternatives, they do
- not all have to have the same fixed length. Thus
+ An assertion is a test on the characters following or preceding the
+ current matching point that does not actually consume any characters.
+ The simple assertions coded as \b, \B, \A, \G, \Z, \z, ^ and $ are
+ described above.
- (?<=bullock|donkey)
+ More complicated assertions are coded as subpatterns. There are two
+ kinds: those that look ahead of the current position in the subject
+ string, and those that look behind it. An assertion subpattern is
+ matched in the normal way, except that it does not cause the current
+ matching position to be changed.
- is permitted, but
+ Assertion subpatterns are not capturing subpatterns, and may not be
+ repeated, because it makes no sense to assert the same thing several
+ times. If any kind of assertion contains capturing subpatterns within
+ it, these are counted for the purposes of numbering the capturing sub-
+ patterns in the whole pattern. However, substring capturing is carried
+ out only for positive assertions, because it does not make sense for
+ negative assertions.
- (?<!dogs?|cats?)
+ Lookahead assertions
- causes an error at compile time. Branches that match dif-
- ferent length strings are permitted only at the top level of
- a lookbehind assertion. This is an extension compared with
- Perl 5.005, which requires all branches to match the same
- length of string. An assertion such as
+ Lookahead assertions start with (?= for positive assertions and (?! for
+ negative assertions. For example,
- (?<=ab(c|de))
+ \w+(?=;)
- is not permitted, because its single top-level branch can
- match two different lengths, but it is acceptable if rewrit-
- ten to use two top-level branches:
+ matches a word followed by a semicolon, but does not include the semi-
+ colon in the match, and
- (?<=abc|abde)
+ foo(?!bar)
- The implementation of lookbehind assertions is, for each
- alternative, to temporarily move the current position back
- by the fixed width and then try to match. If there are
- insufficient characters before the current position, the
- match is deemed to fail. Lookbehinds in conjunction with
- once-only subpatterns can be particularly useful for match-
- ing at the ends of strings; an example is given at the end
- of the section on once-only subpatterns.
+ matches any occurrence of "foo" that is not followed by "bar". Note
+ that the apparently similar pattern
- Several assertions (of any sort) may occur in succession.
- For example,
+ (?!foo)bar
- (?<=\d{3})(?<!999)foo
+ does not find an occurrence of "bar" that is preceded by something
+ other than "foo"; it finds any occurrence of "bar" whatsoever, because
+ the assertion (?!foo) is always true when the next three characters are
+ "bar". A lookbehind assertion is needed to achieve the other effect.
- matches "foo" preceded by three digits that are not "999".
- Notice that each of the assertions is applied independently
- at the same point in the subject string. First there is a
- check that the previous three characters are all digits, and
- then there is a check that the same three characters are not
- "999". This pattern does not match "foo" preceded by six
- characters, the first of which are digits and the last three
- of which are not "999". For example, it doesn't match
- "123abcfoo". A pattern to do that is
+ If you want to force a matching failure at some point in a pattern, the
+ most convenient way to do it is with (?!) because an empty string
+ always matches, so an assertion that requires there not to be an empty
+ string must always fail.
- (?<=\d{3}...)(?<!999)foo
+ Lookbehind assertions
- This time the first assertion looks at the preceding six
- characters, checking that the first three are digits, and
- then the second assertion checks that the preceding three
- characters are not "999".
+ Lookbehind assertions start with (?<= for positive assertions and (?<!
+ for negative assertions. For example,
- Assertions can be nested in any combination. For example,
+ (?<!foo)bar
- (?<=(?<!foo)bar)baz
+ does find an occurrence of "bar" that is not preceded by "foo". The
+ contents of a lookbehind assertion are restricted such that all the
+ strings it matches must have a fixed length. However, if there are sev-
+ eral alternatives, they do not all have to have the same fixed length.
+ Thus
- matches an occurrence of "baz" that is preceded by "bar"
- which in turn is not preceded by "foo", while
-
- (?<=\d{3}(?!999)...)foo
+ (?<=bullock|donkey)
- is another pattern which matches "foo" preceded by three
- digits and any three characters that are not "999".
+ is permitted, but
- Assertion subpatterns are not capturing subpatterns, and may
- not be repeated, because it makes no sense to assert the
- same thing several times. If any kind of assertion contains
- capturing subpatterns within it, these are counted for the
- purposes of numbering the capturing subpatterns in the whole
- pattern. However, substring capturing is carried out only
- for positive assertions, because it does not make sense for
- negative assertions.
+ (?<!dogs?|cats?)
- Assertions count towards the maximum of 200 parenthesized
- subpatterns.
+ causes an error at compile time. Branches that match different length
+ strings are permitted only at the top level of a lookbehind assertion.
+ This is an extension compared with Perl (at least for 5.8), which
+ requires all branches to match the same length of string. An assertion
+ such as
+ (?<=ab(c|de))
+ is not permitted, because its single top-level branch can match two
+ different lengths, but it is acceptable if rewritten to use two top-
+ level branches:
-ONCE-ONLY SUBPATTERNS
- With both maximizing and minimizing 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 line
+ (?<=abc|abde)
- 123456bar
+ The implementation of lookbehind assertions is, for each alternative,
+ to temporarily move the current position back by the fixed width and
+ then try to match. If there are insufficient characters before the cur-
+ rent position, the match is deemed to fail.
- 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. Once-only subpatterns provide the
- means for specifying that once a portion of the pattern has
- matched, it is not to be re-evaluated in this way, so the
- matcher would give up immediately on failing to match "foo"
- the first time. The notation is another kind of special
- parenthesis, starting with (?> as in this example:
+ PCRE does not allow the \C escape (which matches a single byte in UTF-8
+ mode) to appear in lookbehind assertions, because it makes it impossi-
+ ble to calculate the length of the lookbehind. The \X escape, which can
+ match different numbers of bytes, is also not permitted.
- (?>\d+)bar
+ Atomic groups can be used in conjunction with lookbehind assertions to
+ specify efficient matching at the end of the subject string. Consider a
+ simple pattern such as
- This kind of parenthesis "locks up" the part of the pattern
- it contains once it has matched, and a failure further into
- the pattern is prevented from backtracking into it. Back-
- tracking past it to previous items, however, works as nor-
- mal.
+ abcd$
- An alternative description is that a subpattern of this type
- matches the string of characters that an identical stan-
- dalone pattern would match, if anchored at the current point
- in the subject string.
+ when applied to a long string that does not match. Because matching
+ proceeds from left to right, PCRE will look for each "a" in the subject
+ and then see if what follows matches the rest of the pattern. If the
+ pattern is specified as
- Once-only subpatterns are not capturing subpatterns. Simple
- cases such as the above example can be thought of as a max-
- imizing repeat that must swallow everything it can. So,
- while both \d+ and \d+? are prepared 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.
-
- This construction can of course contain arbitrarily compli-
- cated subpatterns, and it can be nested.
+ ^.*abcd$
- Once-only subpatterns can be used in conjunction with look-
- behind assertions to specify efficient matching at the end
- of the subject string. Consider a simple pattern such as
+ the initial .* matches the entire string at first, but when this fails
+ (because there is no following "a"), it backtracks to match all but the
+ last character, then all but the last two characters, and so on. Once
+ again the search for "a" covers the entire string, from right to left,
+ so we are no better off. However, if the pattern is written as
- abcd$
+ ^(?>.*)(?<=abcd)
- when applied to a long string which does not match. Because
- matching proceeds from left to right, PCRE will look for
- each "a" in the subject and then see if what follows matches
- the rest of the pattern. If the pattern is specified as
+ or, equivalently, using the possessive quantifier syntax,
- ^.*abcd$
+ ^.*+(?<=abcd)
- the initial .* matches the entire string at first, but when
- this fails (because there is no following "a"), it back-
- tracks to match all but the last character, then all but the
- last two characters, and so on. Once again the search for
- "a" covers the entire string, from right to left, so we are
- no better off. However, if the pattern is written as
+ there can be no backtracking for the .* item; it can match only the
+ entire string. The subsequent lookbehind assertion does a single test
+ on the last four characters. If it fails, the match fails immediately.
+ For long strings, this approach makes a significant difference to the
+ processing time.
- ^(?>.*)(?<=abcd)
+ Using multiple assertions
- there can be no backtracking for the .* item; it can match
- only the entire string. The subsequent lookbehind assertion
- does a single test on the last four characters. If it fails,
- the match fails immediately. For long strings, this approach
- makes a significant difference to the processing time.
+ Several assertions (of any sort) may occur in succession. For example,
- When a pattern contains an unlimited repeat inside a subpat-
- tern that can itself be repeated an unlimited number of
- times, the use of a once-only subpattern is the only way to
- avoid some failing matches taking a very long time indeed.
- The pattern
+ (?<=\d{3})(?<!999)foo
- (\D+|<\d+>)*[!?]
-
- matches an unlimited number of substrings that either con-
- sist of non-digits, or digits enclosed in <>, followed by
- either ! or ?. When it matches, it runs quickly. However, if
- it is applied to
-
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ matches "foo" preceded by three digits that are not "999". Notice that
+ each of the assertions is applied independently at the same point in
+ the subject string. First there is a check that the previous three
+ characters are all digits, and then there is a check that the same
+ three characters are not "999". This pattern does not match "foo" pre-
+ ceded by six characters, the first of which are digits and the last
+ three of which are not "999". For example, it doesn't match "123abc-
+ foo". A pattern to do that is
- it takes a long time before reporting failure. This is
- because the string can be divided between the two repeats in
- a large number of ways, and all have to be tried. (The exam-
- ple used [!?] 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 character that is required for a
- match, and fail early if it is not present in the string.)
- If the pattern is changed to
-
- ((?>\D+)|<\d+>)*[!?]
-
- sequences of non-digits cannot be broken, and failure hap-
- pens quickly.
+ (?<=\d{3}...)(?<!999)foo
+ This time the first assertion looks at the preceding six characters,
+ checking that the first three are digits, and then the second assertion
+ checks that the preceding three characters are not "999".
+
+ Assertions can be nested in any combination. For example,
+
+ (?<=(?<!foo)bar)baz
+
+ matches an occurrence of "baz" that is preceded by "bar" which in turn
+ is not preceded by "foo", while
+
+ (?<=\d{3}(?!999)...)foo
+
+ is another pattern that matches "foo" preceded by three digits and any
+ three characters that are not "999".
CONDITIONAL SUBPATTERNS
- It is possible to cause the matching process to obey a sub-
- pattern conditionally or to choose between two alternative
- subpatterns, depending on the result of an assertion, or
- whether a previous capturing subpattern matched or not. The
- two possible forms of conditional subpattern are
-
- (?(condition)yes-pattern)
- (?(condition)yes-pattern|no-pattern)
-
- If the condition is satisfied, the yes-pattern is used; oth-
- erwise the no-pattern (if present) is used. If there are
- more than two alternatives in the subpattern, a compile-time
- error occurs.
-
- There are two kinds of condition. If the text between the
- parentheses consists of a sequence of digits, the condition
- is satisfied if the capturing subpattern of that number has
- previously matched. The number must be greater than zero.
- Consider the following pattern, which contains non-
- significant white space to make it more readable (assume the
- PCRE_EXTENDED option) and to divide it into three parts for
- ease of discussion:
-
- ( \( )? [^()]+ (?(1) \) )
-
- The first part matches an optional opening parenthesis, and
- if that character is present, sets it as the first captured
- substring. The second part matches one or more characters
- that are not parentheses. The third part is a conditional
- subpattern that tests whether the first set of parentheses
- matched or not. If they did, that is, if subject started
- with an opening parenthesis, the condition is true, and so
- the yes-pattern is executed and a closing parenthesis is
- required. Otherwise, since no-pattern is not present, the
- subpattern matches nothing. In other words, this pattern
- matches a sequence of non-parentheses, optionally enclosed
- in parentheses.
-
- If the condition is not a sequence of digits, it must be an
- assertion. This may be a positive or negative lookahead or
- lookbehind assertion. Consider this pattern, again contain-
- ing non-significant white space, and with the two alterna-
- tives on the second line:
-
- (?(?=[^a-z]*[a-z])
- \d{2}-[a-z]{3}-\d{2} | \d{2}-\d{2}-\d{2} )
-
- The condition is a positive lookahead assertion that matches
- an optional sequence of non-letters followed by a letter. In
- other words, it tests for the presence of at least one
- letter in the subject. If a letter is found, the subject is
- matched against the first alternative; otherwise it is
- matched against the second. This pattern matches strings in
- one of the two forms dd-aaa-dd or dd-dd-dd, where aaa are
- letters and dd are digits.
+ It is possible to cause the matching process to obey a subpattern con-
+ ditionally or to choose between two alternative subpatterns, depending
+ on the result of an assertion, or whether a previous capturing subpat-
+ tern matched or not. The two possible forms of conditional subpattern
+ are
+
+ (?(condition)yes-pattern)
+ (?(condition)yes-pattern|no-pattern)
+
+ If the condition is satisfied, the yes-pattern is used; otherwise the
+ no-pattern (if present) is used. If there are more than two alterna-
+ tives in the subpattern, a compile-time error occurs.
+
+ There are three kinds of condition. If the text between the parentheses
+ consists of a sequence of digits, the condition is satisfied if the
+ capturing subpattern of that number has previously matched. The number
+ must be greater than zero. Consider the following pattern, which con-
+ tains non-significant white space to make it more readable (assume the
+ PCRE_EXTENDED option) and to divide it into three parts for ease of
+ discussion:
+
+ ( \( )? [^()]+ (?(1) \) )
+
+ The first part matches an optional opening parenthesis, and if that
+ character is present, sets it as the first captured substring. The sec-
+ ond part matches one or more characters that are not parentheses. The
+ third part is a conditional subpattern that tests whether the first set
+ of parentheses matched or not. If they did, that is, if subject started
+ with an opening parenthesis, the condition is true, and so the yes-pat-
+ tern is executed and a closing parenthesis is required. Otherwise,
+ since no-pattern is not present, the subpattern matches nothing. In
+ other words, this pattern matches a sequence of non-parentheses,
+ optionally enclosed in parentheses.
+
+ If the condition is the string (R), it is satisfied if a recursive call
+ to the pattern or subpattern has been made. At "top level", the condi-
+ tion is false. This is a PCRE extension. Recursive patterns are
+ described in the next section.
+
+ If the condition is not a sequence of digits or (R), it must be an
+ assertion. This may be a positive or negative lookahead or lookbehind
+ assertion. Consider this pattern, again containing non-significant
+ white space, and with the two alternatives on the second line:
+
+ (?(?=[^a-z]*[a-z])
+ \d{2}-[a-z]{3}-\d{2} | \d{2}-\d{2}-\d{2} )
+
+ The condition is a positive lookahead assertion that matches an
+ optional sequence of non-letters followed by a letter. In other words,
+ it tests for the presence of at least one letter in the subject. If a
+ letter is found, the subject is matched against the first alternative;
+ otherwise it is matched against the second. This pattern matches
+ strings in one of the two forms dd-aaa-dd or dd-dd-dd, where aaa are
+ letters and dd are digits.
COMMENTS
- The sequence (?# marks the start of a comment which contin-
- ues up to the next closing parenthesis. Nested parentheses
- are not permitted. The characters that make up a comment
- play no part in the pattern matching at all.
- If the PCRE_EXTENDED option is set, an unescaped # character
- outside a character class introduces a comment that contin-
- ues up to the next newline character in the pattern.
+ The sequence (?# marks the start of a comment that continues up to the
+ next closing parenthesis. Nested parentheses are not permitted. The
+ characters that make up a comment play no part in the pattern matching
+ at all.
+ If the PCRE_EXTENDED option is set, an unescaped # character outside a
+ character class introduces a comment that continues up to the next new-
+ line character in the pattern.
RECURSIVE PATTERNS
- Consider the problem of matching a string in parentheses,
- allowing for unlimited nested parentheses. Without the use
- of recursion, the best that can be done is to use a pattern
- that matches up to some fixed depth of nesting. It is not
- possible to handle an arbitrary nesting depth. Perl 5.6 has
- provided an experimental facility that allows regular
- expressions to recurse (amongst other things). It does this
- by interpolating Perl code in the expression at run time,
- and the code can refer to the expression itself. A Perl pat-
- tern to solve the parentheses problem can be created like
- this:
-
- $re = qr{\( (?: (?>[^()]+) | (?p{$re}) )* \)}x;
-
- The (?p{...}) item interpolates Perl code at run time, and
- in this case refers recursively to the pattern in which it
- appears. Obviously, PCRE cannot support the interpolation of
- Perl code. Instead, the special item (?R) is provided for
- the specific case of recursion. This PCRE pattern solves the
- parentheses problem (assume the PCRE_EXTENDED option is set
- so that white space is ignored):
-
- \( ( (?>[^()]+) | (?R) )* \)
-
- First it matches an opening parenthesis. Then it matches any
- number of substrings which can either be a sequence of non-
- parentheses, or a recursive match of the pattern itself
- (i.e. a correctly parenthesized substring). Finally there is
- a closing parenthesis.
-
- This particular example pattern contains nested unlimited
- repeats, and so the use of a once-only subpattern for match-
- ing strings of non-parentheses is important when applying
- the pattern to strings that do not match. For example, when
- it is applied to
-
- (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()
-
- it yields "no match" quickly. However, if a once-only sub-
- pattern is not used, the match runs for a very long time
- indeed because there are so many different ways the + and *
- repeats can carve up the subject, and all have to be tested
- before failure can be reported.
-
- The values set for any capturing subpatterns are those from
- the outermost level of the recursion at which the subpattern
- value is set. If the pattern above is matched against
-
- (ab(cd)ef)
-
- the value for the capturing parentheses is "ef", which is
- the last value taken on at the top level. If additional
- parentheses are added, giving
-
- \( ( ( (?>[^()]+) | (?R) )* ) \)
- ^ ^
- ^ ^ the string they capture is
- "ab(cd)ef", the contents of the top level parentheses. If
- there are more than 15 capturing parentheses in a pattern,
- PCRE has to obtain extra memory to store data during a
- recursion, which it does by using pcre_malloc, freeing it
- via pcre_free afterwards. If no memory can be obtained, it
- saves data for the first 15 capturing parentheses only, as
- there is no way to give an out-of-memory error from within a
- recursion.
-
-
-
-PERFORMANCE
- Certain items that may appear in patterns are more efficient
- than others. It is more efficient to use a character class
- like [aeiou] than a set of 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 discussion about optimizing
- regular expressions for efficient performance.
-
- When a pattern begins with .* 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 newlines, 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 first captured substring being
- "and". 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 contain newlines, the best performance is obtained by
- setting PCRE_DOTALL, or starting the pattern with ^.* to
- indicate explicit anchoring. 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. Consider the pattern fragment
-
- (a+)*
-
- This can match "aaaa" in 33 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, 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 princi-
- ple to try every possible variation, and this can take an
- extremely long time.
-
- 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 subject string, and if there is not, it fails
- the match immediately. However, 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 takes an appreciable time with strings
- longer than about 20 characters.
+ Consider the problem of matching a string in parentheses, allowing for
+ unlimited nested parentheses. Without the use of recursion, the best
+ that can be done is to use a pattern that matches up to some fixed
+ depth of nesting. It is not possible to handle an arbitrary nesting
+ depth. Perl provides a facility that allows regular expressions to
+ recurse (amongst other things). It does this by interpolating Perl code
+ in the expression at run time, and the code can refer to the expression
+ itself. A Perl pattern to solve the parentheses problem can be created
+ like this:
+ $re = qr{\( (?: (?>[^()]+) | (?p{$re}) )* \)}x;
-UTF-8 SUPPORT
- Starting at release 3.3, PCRE has some support for character
- strings encoded in the UTF-8 format. This is incomplete, and
- is regarded as experimental. In order to use it, you must
- configure PCRE to include UTF-8 support in the code, and, in
- addition, you must call pcre_compile() with the PCRE_UTF8
- option flag. When you do this, both the pattern and any sub-
- ject strings that are matched against it are treated as
- UTF-8 strings instead of just strings of bytes, but only in
- the cases that are mentioned below.
+ The (?p{...}) item interpolates Perl code at run time, and in this case
+ refers recursively to the pattern in which it appears. Obviously, PCRE
+ cannot support the interpolation of Perl code. Instead, it supports
+ some special syntax for recursion of the entire pattern, and also for
+ individual subpattern recursion.
- If you compile PCRE with UTF-8 support, but do not use it at
- run time, the library will be a bit bigger, but the addi-
- tional run time overhead is limited to testing the PCRE_UTF8
- flag in several places, so should not be very large.
+ The special item that consists of (? followed by a number greater than
+ zero and a closing parenthesis is a recursive call of the subpattern of
+ the given number, provided that it occurs inside that subpattern. (If
+ not, it is a "subroutine" call, which is described in the next sec-
+ tion.) The special item (?R) is a recursive call of the entire regular
+ expression.
- PCRE assumes that the strings it is given contain valid
- UTF-8 codes. It does not diagnose invalid UTF-8 strings. If
- you pass invalid UTF-8 strings to PCRE, the results are
- undefined.
+ For example, this PCRE pattern solves the nested parentheses problem
+ (assume the PCRE_EXTENDED option is set so that white space is
+ ignored):
- Running with PCRE_UTF8 set causes these changes in the way
- PCRE works:
+ \( ( (?>[^()]+) | (?R) )* \)
- 1. In a pattern, the escape sequence \x{...}, where the
- contents of the braces is a string of hexadecimal digits, is
- interpreted as a UTF-8 character whose code number is the
- given hexadecimal number, for example: \x{1234}. This
- inserts from one to six literal bytes into the pattern,
- using the UTF-8 encoding. If a non-hexadecimal digit appears
- between the braces, the item is not recognized.
+ First it matches an opening parenthesis. Then it matches any number of
+ substrings which can either be a sequence of non-parentheses, or a
+ recursive match of the pattern itself (that is a correctly parenthe-
+ sized substring). Finally there is a closing parenthesis.
- 2. The original hexadecimal escape sequence, \xhh, generates
- a two-byte UTF-8 character if its value is greater than 127.
+ If this were part of a larger pattern, you would not want to recurse
+ the entire pattern, so instead you could use this:
- 3. Repeat quantifiers are NOT correctly handled if they fol-
- low a multibyte character. For example, \x{100}* and \xc3+
- do not work. If you want to repeat such characters, you must
- enclose them in non-capturing parentheses, for example
- (?:\x{100}), at present.
+ ( \( ( (?>[^()]+) | (?1) )* \) )
- 4. The dot metacharacter matches one UTF-8 character instead
- of a single byte.
+ We have put the pattern into parentheses, and caused the recursion to
+ refer to them instead of the whole pattern. In a larger pattern, keep-
+ ing track of parenthesis numbers can be tricky. It may be more conve-
+ nient to use named parentheses instead. For this, PCRE uses (?P>name),
+ which is an extension to the Python syntax that PCRE uses for named
+ parentheses (Perl does not provide named parentheses). We could rewrite
+ the above example as follows:
- 5. Unlike literal UTF-8 characters, the dot metacharacter
- followed by a repeat quantifier does operate correctly on
- UTF-8 characters instead of single bytes.
+ (?P<pn> \( ( (?>[^()]+) | (?P>pn) )* \) )
+
+ This particular example pattern contains nested unlimited repeats, and
+ so the use of atomic grouping for matching strings of non-parentheses
+ is important when applying the pattern to strings that do not match.
+ For example, when this pattern is applied to
- 4. Although the \x{...} escape is permitted in a character
- class, characters whose values are greater than 255 cannot
- be included in a class.
+ (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()
- 5. A class is matched against a UTF-8 character instead of
- just a single byte, but it can match only characters whose
- values are less than 256. Characters with greater values
- always fail to match a class.
+ it yields "no match" quickly. However, if atomic grouping is not used,
+ the match runs for a very long time indeed because there are so many
+ different ways the + and * repeats can carve up the subject, and all
+ have to be tested before failure can be reported.
- 6. Repeated classes work correctly on multiple characters.
+ At the end of a match, the values set for any capturing subpatterns are
+ those from the outermost level of the recursion at which the subpattern
+ value is set. If you want to obtain intermediate values, a callout
+ function can be used (see the next section and the pcrecallout documen-
+ tation). If the pattern above is matched against
- 7. Classes containing just a single character whose value is
- greater than 127 (but less than 256), for example, [\x80] or
- [^\x{93}], do not work because these are optimized into sin-
- gle byte matches. In the first case, of course, the class
- brackets are just redundant.
+ (ab(cd)ef)
- 8. Lookbehind assertions move backwards in the subject by a
- fixed number of characters instead of a fixed number of
- bytes. Simple cases have been tested to work correctly, but
- there may be hidden gotchas herein.
+ the value for the capturing parentheses is "ef", which is the last
+ value taken on at the top level. If additional parentheses are added,
+ giving
- 9. The character types such as \d and \w do not work
- correctly with UTF-8 characters. They continue to test a
- single byte.
+ \( ( ( (?>[^()]+) | (?R) )* ) \)
+ ^ ^
+ ^ ^
- 10. Anything not explicitly mentioned here continues to work
- in bytes rather than in characters.
+ the string they capture is "ab(cd)ef", the contents of the top level
+ parentheses. If there are more than 15 capturing parentheses in a pat-
+ tern, PCRE has to obtain extra memory to store data during a recursion,
+ which it does by using pcre_malloc, freeing it via pcre_free after-
+ wards. If no memory can be obtained, the match fails with the
+ PCRE_ERROR_NOMEMORY error.
- The following UTF-8 features of Perl 5.6 are not imple-
- mented:
+ Do not confuse the (?R) item with the condition (R), which tests for
+ recursion. Consider this pattern, which matches text in angle brack-
+ ets, allowing for arbitrary nesting. Only digits are allowed in nested
+ brackets (that is, when recursing), whereas any characters are permit-
+ ted at the outer level.
- 1. The escape sequence \C to match a single byte.
+ < (?: (?(R) \d++ | [^<>]*+) | (?R)) * >
- 2. The use of Unicode tables and properties and escapes \p,
- \P, and \X.
+ In this pattern, (?(R) is the start of a conditional subpattern, with
+ two different alternatives for the recursive and non-recursive cases.
+ The (?R) item is the actual recursive call.
+SUBPATTERNS AS SUBROUTINES
-SAMPLE PROGRAM
- The code below is a simple, complete demonstration program,
- to get you started with using PCRE. This code is also sup-
- plied in the file pcredemo.c in the PCRE distribution.
+ If the syntax for a recursive subpattern reference (either by number or
+ by name) is used outside the parentheses to which it refers, it oper-
+ ates like a subroutine in a programming language. An earlier example
+ pointed out that the pattern
- The program compiles the regular expression that is its
- first argument, and matches it against the subject string in
- its second argument. No options are set, and default charac-
- ter tables are used. If matching succeeds, the program out-
- puts the portion of the subject that matched, together with
- the contents of any captured substrings.
+ (sens|respons)e and \1ibility
- On a Unix system that has PCRE installed in /usr/local, you
- can compile the demonstration program using a command like
- this:
+ matches "sense and sensibility" and "response and responsibility", but
+ not "sense and responsibility". If instead the pattern
- gcc -o pcredemo pcredemo.c -I/usr/local/include
- -L/usr/local/lib -lpcre
+ (sens|respons)e and (?1)ibility
- Then you can run simple tests like this:
+ is used, it does match "sense and responsibility" as well as the other
+ two strings. Such references must, however, follow the subpattern to
+ which they refer.
- ./pcredemo 'cat|dog' 'the cat sat on the mat'
- Note that there is a much more comprehensive test program,
- called pcretest, which supports many more facilities for
- testing regular expressions. The pcredemo program is pro-
- vided as a simple coding example.
+CALLOUTS
- On some operating systems (e.g. Solaris) you may get an
- error like this when you try to run pcredemo:
+ Perl has a feature whereby using the sequence (?{...}) causes arbitrary
+ Perl code to be obeyed in the middle of matching a regular expression.
+ This makes it possible, amongst other things, to extract different sub-
+ strings that match the same pair of parentheses when there is a repeti-
+ tion.
- ld.so.1: a.out: fatal: libpcre.so.0: open failed: No such
- file or directory
+ PCRE provides a similar feature, but of course it cannot obey arbitrary
+ Perl code. The feature is called "callout". The caller of PCRE provides
+ an external function by putting its entry point in the global variable
+ pcre_callout. By default, this variable contains NULL, which disables
+ all calling out.
- This is caused by the way shared library support works on
- those systems. You need to add
+ Within a regular expression, (?C) indicates the points at which the
+ external function is to be called. If you want to identify different
+ callout points, you can put a number less than 256 after the letter C.
+ The default value is zero. For example, this pattern has two callout
+ points:
- -R/usr/local/lib
+ (?C1)abc(?C2)def
- to the compile command to get round this problem. Here's the
- code:
+ If the PCRE_AUTO_CALLOUT flag is passed to pcre_compile(), callouts are
+ automatically installed before each item in the pattern. They are all
+ numbered 255.
- #include <stdio.h>
- #include <string.h>
- #include <pcre.h>
+ During matching, when PCRE reaches a callout point (and pcre_callout is
+ set), the external function is called. It is provided with the number
+ of the callout, the position in the pattern, and, optionally, one item
+ of data originally supplied by the caller of pcre_exec(). The callout
+ function may cause matching to proceed, to backtrack, or to fail alto-
+ gether. A complete description of the interface to the callout function
+ is given in the pcrecallout documentation.
+
+Last updated: 09 September 2004
+Copyright (c) 1997-2004 University of Cambridge.
+-----------------------------------------------------------------------------
+
+PCRE(3) PCRE(3)
+
+
+
+NAME
+ PCRE - Perl-compatible regular expressions
+
+PARTIAL MATCHING IN PCRE
+
+ In normal use of PCRE, if the subject string that is passed to
+ pcre_exec() matches as far as it goes, but is too short to match the
+ entire pattern, PCRE_ERROR_NOMATCH is returned. There are circumstances
+ where it might be helpful to distinguish this case from other cases in
+ which there is no match.
+
+ Consider, for example, an application where a human is required to type
+ in data for a field with specific formatting requirements. An example
+ might be a date in the form ddmmmyy, defined by this pattern:
+
+ ^\d?\d(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\d\d$
+
+ If the application sees the user's keystrokes one by one, and can check
+ that what has been typed so far is potentially valid, it is able to
+ raise an error as soon as a mistake is made, possibly beeping and not
+ reflecting the character that has been typed. This immediate feedback
+ is likely to be a better user interface than a check that is delayed
+ until the entire string has been entered.
+
+ PCRE supports the concept of partial matching by means of the PCRE_PAR-
+ TIAL option, which can be set when calling pcre_exec(). When this is
+ done, the return code PCRE_ERROR_NOMATCH is converted into
+ PCRE_ERROR_PARTIAL if at any time during the matching process the
+ entire subject string matched part of the pattern. No captured data is
+ set when this occurs.
+
+ Using PCRE_PARTIAL disables one of PCRE's optimizations. PCRE remembers
+ the last literal byte in a pattern, and abandons matching immediately
+ if such a byte is not present in the subject string. This optimization
+ cannot be used for a subject string that might match only partially.
+
+
+RESTRICTED PATTERNS FOR PCRE_PARTIAL
+
+ Because of the way certain internal optimizations are implemented in
+ PCRE, the PCRE_PARTIAL option cannot be used with all patterns.
+ Repeated single characters such as
+
+ a{2,4}
+
+ and repeated single metasequences such as
+
+ \d+
+
+ are not permitted if the maximum number of occurrences is greater than
+ one. Optional items such as \d? (where the maximum is one) are permit-
+ ted. Quantifiers with any values are permitted after parentheses, so
+ the invalid examples above can be coded thus:
- #define OVECCOUNT 30 /* should be a multiple of 3 */
-
- int main(int argc, char **argv)
- {
- pcre *re;
- const char *error;
- int erroffset;
- int ovector[OVECCOUNT];
- int rc, i;
-
- if (argc != 3)
- {
- printf("Two arguments required: a regex and a "
- "subject string\n");
- return 1;
- }
-
- /* Compile the regular expression in the first argument */
-
- re = pcre_compile(
- argv[1], /* the pattern */
- 0, /* default options */
- &error, /* for error message */
- &erroffset, /* for error offset */
- NULL); /* use default character tables */
-
- /* Compilation failed: print the error message and exit */
-
- if (re == NULL)
- {
- printf("PCRE compilation failed at offset %d: %s\n",
- erroffset, error);
- return 1;
- }
-
- /* Compilation succeeded: match the subject in the second
- argument */
-
- rc = pcre_exec(
- re, /* the compiled pattern */
- NULL, /* we didn't study the pattern */
- argv[2], /* the subject string */
- (int)strlen(argv[2]), /* the length of the subject */
- 0, /* start at offset 0 in the subject */
- 0, /* default options */
- ovector, /* vector for substring information */
- OVECCOUNT); /* number of elements in the vector */
-
- /* Matching failed: handle error cases */
-
- if (rc < 0)
- {
- switch(rc)
- {
- case PCRE_ERROR_NOMATCH: printf("No match\n"); break;
- /*
- Handle other special cases if you like
- */
- default: printf("Matching error %d\n", rc); break;
- }
- return 1;
- }
-
- /* Match succeded */
-
- printf("Match succeeded\n");
-
- /* The output vector wasn't big enough */
-
- if (rc == 0)
- {
- rc = OVECCOUNT/3;
- printf("ovector only has room for %d captured "
- substrings\n", rc - 1);
- }
-
- /* Show substrings stored in the output vector */
-
- for (i = 0; i < rc; i++)
- {
- char *substring_start = argv[2] + ovector[2*i];
- int substring_length = ovector[2*i+1] - ovector[2*i];
- printf("%2d: %.*s\n", i, substring_length,
- substring_start);
- }
-
- return 0;
- }
+ (a){2,4}
+ (\d)+
+ These constructions run more slowly, but for the kinds of application
+ that are envisaged for this facility, this is not felt to be a major
+ restriction.
+
+ If PCRE_PARTIAL is set for a pattern that does not conform to the
+ restrictions, pcre_exec() returns the error code PCRE_ERROR_BADPARTIAL
+ (-13).
+
+
+EXAMPLE OF PARTIAL MATCHING USING PCRETEST
+
+ If the escape sequence \P is present in a pcretest data line, the
+ PCRE_PARTIAL flag is used for the match. Here is a run of pcretest that
+ uses the date example quoted above:
+
+ re> /^\d?\d(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\d\d$/
+ data> 25jun04P
+ 0: 25jun04
+ 1: jun
+ data> 25dec3P
+ Partial match
+ data> 3juP
+ Partial match
+ data> 3jujP
+ No match
+ data> jP
+ No match
+
+ The first data string is matched completely, so pcretest shows the
+ matched substrings. The remaining four strings do not match the com-
+ plete pattern, but the first two are partial matches.
+
+Last updated: 08 September 2004
+Copyright (c) 1997-2004 University of Cambridge.
+-----------------------------------------------------------------------------
+
+PCRE(3) PCRE(3)
+
+
+
+NAME
+ PCRE - Perl-compatible regular expressions
+
+SAVING AND RE-USING PRECOMPILED PCRE PATTERNS
+
+ If you are running an application that uses a large number of regular
+ expression patterns, it may be useful to store them in a precompiled
+ form instead of having to compile them every time the application is
+ run. If you are not using any private character tables (see the
+ pcre_maketables() documentation), this is relatively straightforward.
+ If you are using private tables, it is a little bit more complicated.
+
+ If you save compiled patterns to a file, you can copy them to a differ-
+ ent host and run them there. This works even if the new host has the
+ opposite endianness to the one on which the patterns were compiled.
+ There may be a small performance penalty, but it should be insignifi-
+ cant.
+
+
+SAVING A COMPILED PATTERN
+ The value returned by pcre_compile() points to a single block of memory
+ that holds the compiled pattern and associated data. You can find the
+ length of this block in bytes by calling pcre_fullinfo() with an argu-
+ ment of PCRE_INFO_SIZE. You can then save the data in any appropriate
+ manner. Here is sample code that compiles a pattern and writes it to a
+ file. It assumes that the variable fd refers to a file that is open for
+ output:
+
+ int erroroffset, rc, size;
+ char *error;
+ pcre *re;
+
+ re = pcre_compile("my pattern", 0, &error, &erroroffset, NULL);
+ if (re == NULL) { ... handle errors ... }
+ rc = pcre_fullinfo(re, NULL, PCRE_INFO_SIZE, &size);
+ if (rc < 0) { ... handle errors ... }
+ rc = fwrite(re, 1, size, fd);
+ if (rc != size) { ... handle errors ... }
+
+ In this example, the bytes that comprise the compiled pattern are
+ copied exactly. Note that this is binary data that may contain any of
+ the 256 possible byte values. On systems that make a distinction
+ between binary and non-binary data, be sure that the file is opened for
+ binary output.
+
+ If you want to write more than one pattern to a file, you will have to
+ devise a way of separating them. For binary data, preceding each pat-
+ tern with its length is probably the most straightforward approach.
+ Another possibility is to write out the data in hexadecimal instead of
+ binary, one pattern to a line.
+
+ Saving compiled patterns in a file is only one possible way of storing
+ them for later use. They could equally well be saved in a database, or
+ in the memory of some daemon process that passes them via sockets to
+ the processes that want them.
+
+ If the pattern has been studied, it is also possible to save the study
+ data in a similar way to the compiled pattern itself. When studying
+ generates additional information, pcre_study() returns a pointer to a
+ pcre_extra data block. Its format is defined in the section on matching
+ a pattern in the pcreapi documentation. The study_data field points to
+ the binary study data, and this is what you must save (not the
+ pcre_extra block itself). The length of the study data can be obtained
+ by calling pcre_fullinfo() with an argument of PCRE_INFO_STUDYSIZE.
+ Remember to check that pcre_study() did return a non-NULL value before
+ trying to save the study data.
+
+
+RE-USING A PRECOMPILED PATTERN
+
+ Re-using a precompiled pattern is straightforward. Having reloaded it
+ into main memory, you pass its pointer to pcre_exec() in the usual way.
+ This should work even on another host, and even if that host has the
+ opposite endianness to the one where the pattern was compiled.
+
+ However, if you passed a pointer to custom character tables when the
+ pattern was compiled (the tableptr argument of pcre_compile()), you
+ must now pass a similar pointer to pcre_exec(), because the value saved
+ with the compiled pattern will obviously be nonsense. A field in a
+ pcre_extra() block is used to pass this data, as described in the sec-
+ tion on matching a pattern in the pcreapi documentation.
+
+ If you did not provide custom character tables when the pattern was
+ compiled, the pointer in the compiled pattern is NULL, which causes
+ pcre_exec() to use PCRE's internal tables. Thus, you do not need to
+ take any special action at run time in this case.
+
+ If you saved study data with the compiled pattern, you need to create
+ your own pcre_extra data block and set the study_data field to point to
+ the reloaded study data. You must also set the PCRE_EXTRA_STUDY_DATA
+ bit in the flags field to indicate that study data is present. Then
+ pass the pcre_extra block to pcre_exec() in the usual way.
+
+
+COMPATIBILITY WITH DIFFERENT PCRE RELEASES
+
+ The layout of the control block that is at the start of the data that
+ makes up a compiled pattern was changed for release 5.0. If you have
+ any saved patterns that were compiled with previous releases (not a
+ facility that was previously advertised), you will have to recompile
+ them for release 5.0. However, from now on, it should be possible to
+ make changes in a compabible manner.
+
+Last updated: 10 September 2004
+Copyright (c) 1997-2004 University of Cambridge.
+-----------------------------------------------------------------------------
+
+PCRE(3) PCRE(3)
+
+
+
+NAME
+ PCRE - Perl-compatible regular expressions
+
+PCRE PERFORMANCE
+
+ Certain items that may appear in regular expression patterns are more
+ efficient than others. It is more efficient to use a character class
+ like [aeiou] than a set of alternatives such as (a|e|i|o|u). In gen-
+ eral, 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 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
+ properties, it will probably be faster.
+
+ 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
+ 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
+ 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-
+ tain newlines, the best performance is obtained by setting PCRE_DOTALL,
+ or starting the pattern with ^.* to indicate explicit anchoring. 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.
+ Consider the pattern fragment
+
+ (a+)*
+
+ This can match "aaaa" in 33 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, 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
+ extremely long time.
+
+ 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
+ subject string, and if there is not, it fails the match immediately.
+ However, 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
+ 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
+ an atomic group or a possessive quantifier.
+
+Last updated: 09 September 2004
+Copyright (c) 1997-2004 University of Cambridge.
+-----------------------------------------------------------------------------
+
+PCRE(3) PCRE(3)
+
+
+
+NAME
+ PCRE - Perl-compatible regular expressions.
+
+SYNOPSIS OF POSIX API
+
+ #include <pcreposix.h>
+
+ int regcomp(regex_t *preg, const char *pattern,
+ int cflags);
+
+ int regexec(regex_t *preg, const char *string,
+ size_t nmatch, regmatch_t pmatch[], int eflags);
+
+ size_t regerror(int errcode, const regex_t *preg,
+ char *errbuf, size_t errbuf_size);
+
+ void regfree(regex_t *preg);
+
+
+DESCRIPTION
+
+ This set of functions provides a POSIX-style API to the PCRE regular
+ expression package. See the pcreapi documentation for a description of
+ PCRE's native API, which contains additional functionality.
+
+ The functions described here are just wrapper functions that ultimately
+ call the PCRE native API. Their prototypes are defined in the
+ pcreposix.h header file, and on Unix systems the library itself is
+ called pcreposix.a, so can be accessed by adding -lpcreposix to the
+ command for linking an application that uses them. Because the POSIX
+ functions call the native ones, it is also necessary to add -lpcre.
+
+ I have implemented only those option bits that can be reasonably mapped
+ to PCRE native options. In addition, the options REG_EXTENDED and
+ REG_NOSUB are defined with the value zero. They have no effect, but
+ since programs that are written to the POSIX interface often use them,
+ this makes it easier to slot in PCRE as a replacement library. Other
+ POSIX options are not even defined.
+
+ When PCRE is called via these functions, it is only the API that is
+ POSIX-like in style. The syntax and semantics of the regular expres-
+ sions themselves are still those of Perl, subject to the setting of
+ various PCRE options, as described below. "POSIX-like in style" means
+ that the API approximates to the POSIX definition; it is not fully
+ POSIX-compatible, and in multi-byte encoding domains it is probably
+ even less compatible.
+
+ The header for these functions is supplied as pcreposix.h to avoid any
+ potential clash with other POSIX libraries. It can, of course, be
+ renamed or aliased as regex.h, which is the "correct" name. It provides
+ two structure types, regex_t for compiled internal forms, and reg-
+ match_t for returning captured substrings. It also defines some con-
+ stants whose names start with "REG_"; these are used for setting
+ options and identifying error codes.
+
+
+COMPILING A PATTERN
+
+ The function regcomp() is called to compile a pattern into an internal
+ form. The pattern is a C string terminated by a binary zero, and is
+ passed in the argument pattern. The preg argument is a pointer to a
+ regex_t structure that is used as a base for storing information about
+ the compiled expression.
+
+ The argument cflags is either zero, or contains one or more of the bits
+ defined by the following macros:
+
+ REG_ICASE
+
+ The PCRE_CASELESS option is set when the expression is passed for com-
+ pilation to the native function.
+
+ REG_NEWLINE
+
+ The PCRE_MULTILINE option is set when the expression is passed for com-
+ pilation to the native function. Note that this does not mimic the
+ defined POSIX behaviour for REG_NEWLINE (see the following section).
+
+ 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 aren't) or
+ by a negative class such as [^a] (they are).
+
+ 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
+ regular expression. Various error codes are defined in the header file.
+
+
+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
+ PCRE:
+
+ Default Change with
+
+ . matches newline no PCRE_DOTALL
+ newline matches [^a] yes not changeable
+ $ matches \n at end yes PCRE_DOLLARENDONLY
+ $ matches \n in middle no PCRE_MULTILINE
+ ^ matches \n in middle no PCRE_MULTILINE
+
+ This is the equivalent table for POSIX:
+
+ Default Change with
+
+ . matches newline yes REG_NEWLINE
+ newline matches [^a] yes REG_NEWLINE
+ $ matches \n at end no REG_NEWLINE
+ $ matches \n in middle no REG_NEWLINE
+ ^ 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
+ 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
+ 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 terminated by a zero byte, subject to
+ the options in eflags. These can be:
+
+ REG_NOTBOL
+
+ The PCRE_NOTBOL option is set when calling the underlying PCRE matching
+ function.
+
+ REG_NOTEOL
+
+ The PCRE_NOTEOL option is set when calling the underlying PCRE matching
+ function.
+
+ The portion of the string that was matched, and also any captured sub-
+ strings, are returned via the pmatch argument, which points to an array
+ of nmatch structures of type regmatch_t, containing the members rm_so
+ and rm_eo. These contain the offset to the first character of each sub-
+ string and the offset to the first character after the end of each sub-
+ string, 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"
+ 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
+ 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-
+ 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-
+ sion.
AUTHOR
- Philip Hazel <ph10@cam.ac.uk>
- University Computing Service,
- New Museums Site,
- Cambridge CB2 3QG, England.
- Phone: +44 1223 334714
-
- Last updated: 15 August 2001
- Copyright (c) 1997-2001 University of Cambridge.
+
+ Philip Hazel <ph10@cam.ac.uk>
+ University Computing Service,
+ Cambridge CB2 3QG, England.
+
+Last updated: 07 September 2004
+Copyright (c) 1997-2004 University of Cambridge.
+-----------------------------------------------------------------------------
+
+PCRE(3) PCRE(3)
+
+
+
+NAME
+ PCRE - Perl-compatible regular expressions
+
+PCRE SAMPLE PROGRAM
+
+ A simple, complete demonstration program, to get you started with using
+ PCRE, is supplied in the file pcredemo.c in the PCRE distribution.
+
+ The program compiles the regular expression that is its first argument,
+ and matches it against the subject string in its second argument. No
+ PCRE options are set, and default character tables are used. If match-
+ ing succeeds, the program outputs the portion of the subject that
+ matched, together with the contents of any captured substrings.
+
+ If the -g option is given on the command line, the program then goes on
+ to check for further matches of the same regular expression in the same
+ subject string. The logic is a little bit tricky because of the possi-
+ bility of matching an empty string. Comments in the code explain what
+ is going on.
+
+ If PCRE is installed in the standard include and library directories
+ for your system, you should be able to compile the demonstration pro-
+ gram using this command:
+
+ gcc -o pcredemo pcredemo.c -lpcre
+
+ If PCRE is installed elsewhere, you may need to add additional options
+ to the command line. For example, on a Unix-like system that has PCRE
+ installed in /usr/local, you can compile the demonstration program
+ using a command like this:
+
+ 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:
+
+ ./pcredemo 'cat|dog' 'the cat sat on the mat'
+ ./pcredemo -g 'cat|dog' 'the dog sat on the cat'
+
+ Note that there is a much more comprehensive test program, called
+ pcretest, which supports many more facilities for testing regular
+ expressions and the PCRE library. The pcredemo program is provided as a
+ simple coding example.
+
+ On some operating systems (e.g. Solaris), when PCRE is not installed in
+ the standard library directory, you may get an error like this when you
+ try to run pcredemo:
+
+ ld.so.1: a.out: fatal: libpcre.so.0: open failed: No such file or
+ directory
+
+ This is caused by the way shared library support works on those sys-
+ tems. You need to add
+
+ -R/usr/local/lib
+
+ (for example) to the compile command to get round this problem.
+
+Last updated: 09 September 2004
+Copyright (c) 1997-2004 University of Cambridge.
+-----------------------------------------------------------------------------
+
diff --git a/srclib/pcre/doc/pcre_compile.3 b/srclib/pcre/doc/pcre_compile.3
new file mode 100644
index 0000000000..37a5f2d936
--- /dev/null
+++ b/srclib/pcre/doc/pcre_compile.3
@@ -0,0 +1,64 @@
+.TH PCRE 3
+.SH NAME
+PCRE - Perl-compatible regular expressions
+.SH SYNOPSIS
+.rs
+.sp
+.B #include <pcre.h>
+.PP
+.SM
+.br
+.B pcre *pcre_compile(const char *\fIpattern\fP, int \fIoptions\fP,
+.ti +5n
+.B const char **\fIerrptr\fP, int *\fIerroffset\fP,
+.ti +5n
+.B const unsigned char *\fItableptr\fP);
+.
+.SH DESCRIPTION
+.rs
+.sp
+This function compiles a regular expression into an internal form. Its
+arguments are:
+.sp
+ \fIpattern\fR A zero-terminated string containing the
+ regular expression to be compiled
+ \fIoptions\fR Zero or more option bits
+ \fIerrptr\fR Where to put an error message
+ \fIerroffset\fR Offset in pattern where error was found
+ \fItableptr\fR Pointer to character tables, or NULL to
+ use the built-in default
+.sp
+The option bits are:
+.sp
+ PCRE_ANCHORED Force pattern anchoring
+ PCRE_AUTO_CALLOUT Compile automatic callouts
+ PCRE_CASELESS Do caseless matching
+ PCRE_DOLLAR_ENDONLY $ not to match newline at end
+ PCRE_DOTALL . matches anything including NL
+ PCRE_EXTENDED Ignore whitespace and # comments
+ PCRE_EXTRA PCRE extra features
+ (not much use currently)
+ PCRE_MULTILINE ^ and $ match newlines within data
+ PCRE_NO_AUTO_CAPTURE Disable numbered capturing paren-
+ theses (named ones available)
+ PCRE_UNGREEDY Invert greediness of quantifiers
+ PCRE_UTF8 Run in UTF-8 mode
+ PCRE_NO_UTF8_CHECK Do not check the pattern for UTF-8
+ validity (only relevant if
+ PCRE_UTF8 is set)
+.sp
+PCRE must be built with UTF-8 support in order to use PCRE_UTF8 and
+PCRE_NO_UTF8_CHECK.
+.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.
+.P
+There is a complete description of the PCRE native API in the
+.\" HREF
+\fBpcreapi\fR
+.\"
+page and a description of the POSIX API in the
+.\" HREF
+\fBpcreposix\fR
+.\"
+page.
diff --git a/srclib/pcre/doc/pcre_config.3 b/srclib/pcre/doc/pcre_config.3
new file mode 100644
index 0000000000..1ba934435a
--- /dev/null
+++ b/srclib/pcre/doc/pcre_config.3
@@ -0,0 +1,48 @@
+.TH PCRE 3
+.SH NAME
+PCRE - Perl-compatible regular expressions
+.SH SYNOPSIS
+.rs
+.sp
+.B #include <pcre.h>
+.PP
+.SM
+.br
+.B int pcre_config(int \fIwhat\fP, void *\fIwhere\fP);
+.
+.SH DESCRIPTION
+.rs
+.sp
+This function makes it possible for a client program to find out which optional
+features are available in the version of the PCRE library it is using. Its
+arguments are as follows:
+.sp
+ \fIwhat\fR A code specifying what information is required
+ \fIwhere\fR Points to where to put the data
+.sp
+The available codes are:
+.sp
+ PCRE_CONFIG_LINK_SIZE Internal link size: 2, 3, or 4
+ PCRE_CONFIG_MATCH_LIMIT Internal resource limit
+ PCRE_CONFIG_NEWLINE Value of the newline character
+ PCRE_CONFIG_POSIX_MALLOC_THRESHOLD
+ Threshold of return slots, above
+ which \fBmalloc()\fR is used by
+ the POSIX API
+ PCRE_CONFIG_STACKRECURSE Recursion implementation (1=stack 0=heap)
+ PCRE_CONFIG_UTF8 Availability of UTF-8 support (1=yes 0=no)
+ PCRE_CONFIG_UNICODE_PROPERTIES
+ Availability of Unicode property support
+ (1=yes 0=no)
+.sp
+The function yields 0 on success or PCRE_ERROR_BADOPTION otherwise.
+.P
+There is a complete description of the PCRE native API in the
+.\" HREF
+\fBpcreapi\fR
+.\"
+page and a description of the POSIX API in the
+.\" HREF
+\fBpcreposix\fR
+.\"
+page.
diff --git a/srclib/pcre/doc/pcre_copy_named_substring.3 b/srclib/pcre/doc/pcre_copy_named_substring.3
new file mode 100644
index 0000000000..92e47bee20
--- /dev/null
+++ b/srclib/pcre/doc/pcre_copy_named_substring.3
@@ -0,0 +1,44 @@
+.TH PCRE 3
+.SH NAME
+PCRE - Perl-compatible regular expressions
+.SH SYNOPSIS
+.rs
+.sp
+.B #include <pcre.h>
+.PP
+.SM
+.br
+.B int pcre_copy_named_substring(const pcre *\fIcode\fP,
+.ti +5n
+.B const char *\fIsubject\fP, int *\fIovector\fP,
+.ti +5n
+.B int \fIstringcount\fP, const char *\fIstringname\fP,
+.ti +5n
+.B char *\fIbuffer\fP, int \fIbuffersize\fP);
+.
+.SH DESCRIPTION
+.rs
+.sp
+This is a convenience function for extracting a captured substring, identified
+by name, into a given buffer. The arguments are:
+.sp
+ \fIcode\fP Pattern that was successfully matched
+ \fIsubject\fP Subject that has been successfully matched
+ \fIovector\fP Offset vector that \fBpcre_exec()\fP used
+ \fIstringcount\fP Value returned by \fBpcre_exec()\fP
+ \fIstringname\fP Name of the required substring
+ \fIbuffer\fP Buffer to receive the string
+ \fIbuffersize\fP Size of buffer
+.sp
+The yield is the length of the substring, PCRE_ERROR_NOMEMORY if the buffer was
+too small, or PCRE_ERROR_NOSUBSTRING if the string name is invalid.
+.P
+There is a complete description of the PCRE native API in the
+.\" HREF
+\fBpcreapi\fP
+.\"
+page and a description of the POSIX API in the
+.\" HREF
+\fBpcreposix\fP
+.\"
+page.
diff --git a/srclib/pcre/doc/pcre_copy_substring.3 b/srclib/pcre/doc/pcre_copy_substring.3
new file mode 100644
index 0000000000..c467b502d1
--- /dev/null
+++ b/srclib/pcre/doc/pcre_copy_substring.3
@@ -0,0 +1,41 @@
+.TH PCRE 3
+.SH NAME
+PCRE - Perl-compatible regular expressions
+.SH SYNOPSIS
+.rs
+.sp
+.B #include <pcre.h>
+.PP
+.SM
+.br
+.B int pcre_copy_substring(const char *\fIsubject\fP, int *\fIovector\fP,
+.ti +5n
+.B int \fIstringcount\fP, int \fIstringnumber\fP, char *\fIbuffer\fP,
+.ti +5n
+.B int \fIbuffersize\fP);
+.
+.SH DESCRIPTION
+.rs
+.sp
+This is a convenience function for extracting a captured substring into a given
+buffer. The arguments are:
+.sp
+ \fIsubject\fP Subject that has been successfully matched
+ \fIovector\fP Offset vector that \fBpcre_exec()\fP used
+ \fIstringcount\fP Value returned by \fBpcre_exec()\fP
+ \fIstringnumber\fP Number of the required substring
+ \fIbuffer\fP Buffer to receive the string
+ \fIbuffersize\fP Size of buffer
+.sp
+The yield is the legnth of the string, PCRE_ERROR_NOMEMORY if the buffer was
+too small, or PCRE_ERROR_NOSUBSTRING if the string number is invalid.
+.P
+There is a complete description of the PCRE native API in the
+.\" HREF
+\fBpcreapi\fP
+.\"
+page and a description of the POSIX API in the
+.\" HREF
+\fBpcreposix\fP
+.\"
+page.
diff --git a/srclib/pcre/doc/pcre_exec.3 b/srclib/pcre/doc/pcre_exec.3
new file mode 100644
index 0000000000..7e071a9be6
--- /dev/null
+++ b/srclib/pcre/doc/pcre_exec.3
@@ -0,0 +1,67 @@
+.TH PCRE 3
+.SH NAME
+PCRE - Perl-compatible regular expressions
+.SH SYNOPSIS
+.rs
+.sp
+.B #include <pcre.h>
+.PP
+.SM
+.br
+.B int pcre_exec(const pcre *\fIcode\fP, "const pcre_extra *\fIextra\fP,"
+.ti +5n
+.B "const char *\fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP,
+.ti +5n
+.B int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP);
+.
+.SH DESCRIPTION
+.rs
+.sp
+This function matches a compiled regular expression against a given subject
+string, and returns offsets to capturing subexpressions. Its arguments are:
+.sp
+ \fIcode\fP Points to the compiled pattern
+ \fIextra\fP Points to an associated \fBpcre_extra\fP structure,
+ or is NULL
+ \fIsubject\fP Points to the subject string
+ \fIlength\fP Length of the subject string, in bytes
+ \fIstartoffset\fP Offset in bytes in the subject at which to
+ start matching
+ \fIoptions\fP Option bits
+ \fIovector\fP Points to a vector of ints for result offsets
+ \fIovecsize\fP Number of elements in the vector (a multiple of 3)
+.sp
+The options are:
+.sp
+ PCRE_ANCHORED Match only at the first position
+ PCRE_NOTBOL Subject is not the beginning of a line
+ PCRE_NOTEOL Subject is not the end of a line
+ PCRE_NOTEMPTY An empty string is not a valid match
+ PCRE_NO_UTF8_CHECK Do not check the subject for UTF-8
+ validity (only relevant if PCRE_UTF8
+ was set at compile time)
+ PCRE_PARTIAL Return PCRE_ERROR_PARTIAL for a partial match
+.sp
+There are restrictions on what may appear in a pattern when partial matching is
+requested.
+.P
+A \fBpcre_extra\fP structure contains the following fields:
+.sp
+ \fIflags\fP Bits indicating which fields are set
+ \fIstudy_data\fP Opaque data from \fBpcre_study()\fP
+ \fImatch_limit\fP Limit on internal recursion
+ \fIcallout_data\fP Opaque data passed back to callouts
+ \fItables\fP Points to character tables or is NULL
+.sp
+The flag bits are PCRE_EXTRA_STUDY_DATA, PCRE_EXTRA_MATCH_LIMIT,
+PCRE_EXTRA_CALLOUT_DATA, and PCRE_EXTRA_TABLES.
+.P
+There is a complete description of the PCRE native API in the
+.\" HREF
+\fBpcreapi\fP
+.\"
+page and a description of the POSIX API in the
+.\" HREF
+\fBpcreposix\fP
+.\"
+page.
diff --git a/srclib/pcre/doc/pcre_free_substring.3 b/srclib/pcre/doc/pcre_free_substring.3
new file mode 100644
index 0000000000..1aafd877bf
--- /dev/null
+++ b/srclib/pcre/doc/pcre_free_substring.3
@@ -0,0 +1,28 @@
+.TH PCRE 3
+.SH NAME
+PCRE - Perl-compatible regular expressions
+.SH SYNOPSIS
+.rs
+.sp
+.B #include <pcre.h>
+.PP
+.SM
+.br
+.B void pcre_free_substring(const char *\fIstringptr\fP);
+.
+.SH DESCRIPTION
+.rs
+.sp
+This is a convenience function for freeing the store obtained by a previous
+call to \fBpcre_get_substring()\fP or \fBpcre_get_named_substring()\fP. Its
+only argument is a pointer to the string.
+.P
+There is a complete description of the PCRE native API in the
+.\" HREF
+\fBpcreapi\fP
+.\"
+page and a description of the POSIX API in the
+.\" HREF
+\fBpcreposix\fP
+.\"
+page.
diff --git a/srclib/pcre/doc/pcre_free_substring_list.3 b/srclib/pcre/doc/pcre_free_substring_list.3
new file mode 100644
index 0000000000..d68c3a10bb
--- /dev/null
+++ b/srclib/pcre/doc/pcre_free_substring_list.3
@@ -0,0 +1,28 @@
+.TH PCRE 3
+.SH NAME
+PCRE - Perl-compatible regular expressions
+.SH SYNOPSIS
+.rs
+.sp
+.B #include <pcre.h>
+.PP
+.SM
+.br
+.B void pcre_free_substring_list(const char **\fIstringptr\fP);
+.
+.SH DESCRIPTION
+.rs
+.sp
+This is a convenience function for freeing the store obtained by a previous
+call to \fBpcre_get_substring_list()\fP. Its only argument is a pointer to the
+list of string pointers.
+.P
+There is a complete description of the PCRE native API in the
+.\" HREF
+\fBpcreapi\fP
+.\"
+page and a description of the POSIX API in the
+.\" HREF
+\fBpcreposix\fP
+.\"
+page.
diff --git a/srclib/pcre/doc/pcre_fullinfo.3 b/srclib/pcre/doc/pcre_fullinfo.3
new file mode 100644
index 0000000000..4738127df0
--- /dev/null
+++ b/srclib/pcre/doc/pcre_fullinfo.3
@@ -0,0 +1,59 @@
+.TH PCRE 3
+.SH NAME
+PCRE - Perl-compatible regular expressions
+.SH SYNOPSIS
+.rs
+.sp
+.B #include <pcre.h>
+.PP
+.SM
+.br
+.B int pcre_fullinfo(const pcre *\fIcode\fP, "const pcre_extra *\fIextra\fP,"
+.ti +5n
+.B int \fIwhat\fP, void *\fIwhere\fP);
+.
+.SH DESCRIPTION
+.rs
+.sp
+This function returns information about a compiled pattern. Its arguments are:
+.sp
+ \fIcode\fP Compiled regular expression
+ \fIextra\fP Result of \fBpcre_study()\fP or NULL
+ \fIwhat\fP What information is required
+ \fIwhere\fP Where to put the information
+.sp
+The following information is available:
+.sp
+ PCRE_INFO_BACKREFMAX Number of highest back reference
+ PCRE_INFO_CAPTURECOUNT Number of capturing subpatterns
+ PCRE_INFO_DEFAULT_TABLES Pointer to default tables
+ PCRE_INFO_FIRSTBYTE Fixed first byte for a match, or
+ -1 for start of string
+ or after newline, or
+ -2 otherwise
+ PCRE_INFO_FIRSTTABLE Table of first bytes
+ (after studying)
+ PCRE_INFO_LASTLITERAL Literal last byte required
+ PCRE_INFO_NAMECOUNT Number of named subpatterns
+ PCRE_INFO_NAMEENTRYSIZE Size of name table entry
+ PCRE_INFO_NAMETABLE Pointer to name table
+ PCRE_INFO_OPTIONS Options used for compilation
+ PCRE_INFO_SIZE Size of compiled pattern
+ PCRE_INFO_STUDYSIZE Size of study data
+.sp
+The yield of the function is zero on success or:
+.sp
+ PCRE_ERROR_NULL the argument \fIcode\fP was NULL
+ the argument \fIwhere\fP was NULL
+ PCRE_ERROR_BADMAGIC the "magic number" was not found
+ PCRE_ERROR_BADOPTION the value of \fIwhat\fP was invalid
+.P
+There is a complete description of the PCRE native API in the
+.\" HREF
+\fBpcreapi\fP
+.\"
+page and a description of the POSIX API in the
+.\" HREF
+\fBpcreposix\fP
+.\"
+page.
diff --git a/srclib/pcre/doc/pcre_get_named_substring.3 b/srclib/pcre/doc/pcre_get_named_substring.3
new file mode 100644
index 0000000000..9ce27ba39e
--- /dev/null
+++ b/srclib/pcre/doc/pcre_get_named_substring.3
@@ -0,0 +1,45 @@
+.TH PCRE 3
+.SH NAME
+PCRE - Perl-compatible regular expressions
+.SH SYNOPSIS
+.rs
+.sp
+.B #include <pcre.h>
+.PP
+.SM
+.br
+.B int pcre_get_named_substring(const pcre *\fIcode\fP,
+.ti +5n
+.B const char *\fIsubject\fP, int *\fIovector\fP,
+.ti +5n
+.B int \fIstringcount\fP, const char *\fIstringname\fP,
+.ti +5n
+.B const char **\fIstringptr\fP);
+.
+.SH DESCRIPTION
+.rs
+.sp
+This is a convenience function for extracting a captured substring by name. The
+arguments are:
+.sp
+ \fIcode\fP Compiled pattern
+ \fIsubject\fP Subject that has been successfully matched
+ \fIovector\fP Offset vector that \fBpcre_exec()\fP used
+ \fIstringcount\fP Value returned by \fBpcre_exec()\fP
+ \fIstringname\fP Name of the required substring
+ \fIstringptr\fP Where to put the string pointer
+.sp
+The memory in which the substring is placed is obtained by calling
+\fBpcre_malloc()\fP. The yield of the function is the length of the extracted
+substring, PCRE_ERROR_NOMEMORY if sufficient memory could not be obtained, or
+PCRE_ERROR_NOSUBSTRING if the string name is invalid.
+.P
+There is a complete description of the PCRE native API in the
+.\" HREF
+\fBpcreapi\fP
+.\"
+page and a description of the POSIX API in the
+.\" HREF
+\fBpcreposix\fP
+.\"
+page.
diff --git a/srclib/pcre/doc/pcre_get_stringnumber.3 b/srclib/pcre/doc/pcre_get_stringnumber.3
new file mode 100644
index 0000000000..8c7289474d
--- /dev/null
+++ b/srclib/pcre/doc/pcre_get_stringnumber.3
@@ -0,0 +1,35 @@
+.TH PCRE 3
+.SH NAME
+PCRE - Perl-compatible regular expressions
+.SH SYNOPSIS
+.rs
+.sp
+.B #include <pcre.h>
+.PP
+.SM
+.br
+.B int pcre_get_stringnumber(const pcre *\fIcode\fP,
+.ti +5n
+.B const char *\fIname\fP);
+.
+.SH DESCRIPTION
+.rs
+.sp
+This convenience function finds the number of a named substring capturing
+parenthesis in a compiled pattern. Its arguments are:
+.sp
+ \fIcode\fP Compiled regular expression
+ \fIname\fP Name whose number is required
+.sp
+The yield of the function is the number of the parenthesis if the name is
+found, or PCRE_ERROR_NOSUBSTRING otherwise.
+.P
+There is a complete description of the PCRE native API in the
+.\" HREF
+\fBpcreapi\fP
+.\"
+page and a description of the POSIX API in the
+.\" HREF
+\fBpcreposix\fP
+.\"
+page.
diff --git a/srclib/pcre/doc/pcre_get_substring.3 b/srclib/pcre/doc/pcre_get_substring.3
new file mode 100644
index 0000000000..9bef5d3abd
--- /dev/null
+++ b/srclib/pcre/doc/pcre_get_substring.3
@@ -0,0 +1,42 @@
+.TH PCRE 3
+.SH NAME
+PCRE - Perl-compatible regular expressions
+.SH SYNOPSIS
+.rs
+.sp
+.B #include <pcre.h>
+.PP
+.SM
+.br
+.B int pcre_get_substring(const char *\fIsubject\fP, int *\fIovector\fP,
+.ti +5n
+.B int \fIstringcount\fP, int \fIstringnumber\fP,
+.ti +5n
+.B const char **\fIstringptr\fP);
+.
+.SH DESCRIPTION
+.rs
+.sp
+This is a convenience function for extracting a captured substring. The
+arguments are:
+.sp
+ \fIsubject\fP Subject that has been successfully matched
+ \fIovector\fP Offset vector that \fBpcre_exec()\fP used
+ \fIstringcount\fP Value returned by \fBpcre_exec()\fP
+ \fIstringnumber\fP Number of the required substring
+ \fIstringptr\fP Where to put the string pointer
+.sp
+The memory in which the substring is placed is obtained by calling
+\fBpcre_malloc()\fP. The yield of the function is the length of the substring,
+PCRE_ERROR_NOMEMORY if sufficient memory could not be obtained, or
+PCRE_ERROR_NOSUBSTRING if the string number is invalid.
+.P
+There is a complete description of the PCRE native API in the
+.\" HREF
+\fBpcreapi\fP
+.\"
+page and a description of the POSIX API in the
+.\" HREF
+\fBpcreposix\fP
+.\"
+page.
diff --git a/srclib/pcre/doc/pcre_get_substring_list.3 b/srclib/pcre/doc/pcre_get_substring_list.3
new file mode 100644
index 0000000000..29ae4420f3
--- /dev/null
+++ b/srclib/pcre/doc/pcre_get_substring_list.3
@@ -0,0 +1,40 @@
+.TH PCRE 3
+.SH NAME
+PCRE - Perl-compatible regular expressions
+.SH SYNOPSIS
+.rs
+.sp
+.B #include <pcre.h>
+.PP
+.SM
+.br
+.B int pcre_get_substring_list(const char *\fIsubject\fP,
+.ti +5n
+.B int *\fIovector\fP, int \fIstringcount\fP, "const char ***\fIlistptr\fP);"
+.
+.SH DESCRIPTION
+.rs
+.sp
+This is a convenience function for extracting a list of all the captured
+substrings. The arguments are:
+.sp
+ \fIsubject\fP Subject that has been successfully matched
+ \fIovector\fP Offset vector that \fBpcre_exec\fP used
+ \fIstringcount\fP Value returned by \fBpcre_exec\fP
+ \fIlistptr\fP Where to put a pointer to the list
+.sp
+The memory in which the substrings and the list are placed is obtained by
+calling \fBpcre_malloc()\fP. A pointer to a list of pointers is put in
+the variable whose address is in \fIlistptr\fP. The list is terminated by a
+NULL pointer. The yield of the function is zero on success or
+PCRE_ERROR_NOMEMORY if sufficient memory could not be obtained.
+.P
+There is a complete description of the PCRE native API in the
+.\" HREF
+\fBpcreapi\fP
+.\"
+page and a description of the POSIX API in the
+.\" HREF
+\fBpcreposix\fP
+.\"
+page.
diff --git a/srclib/pcre/doc/pcre_info.3 b/srclib/pcre/doc/pcre_info.3
new file mode 100644
index 0000000000..540c152822
--- /dev/null
+++ b/srclib/pcre/doc/pcre_info.3
@@ -0,0 +1,27 @@
+.TH PCRE 3
+.SH NAME
+PCRE - Perl-compatible regular expressions
+.SH SYNOPSIS
+.rs
+.sp
+.B #include <pcre.h>
+.PP
+.SM
+.br
+.B int pcre_info(const pcre *\fIcode\fP, int *\fIoptptr\fP, int
+.B *\fIfirstcharptr\fP);
+.
+.SH DESCRIPTION
+.rs
+.sp
+This function is obsolete. You should be using \fBpcre_fullinfo()\fP instead.
+.P
+There is a complete description of the PCRE native API in the
+.\" HREF
+\fBpcreapi\fP
+.\"
+page and a description of the POSIX API in the
+.\" HREF
+\fBpcreposix\fP
+.\"
+page.
diff --git a/srclib/pcre/doc/pcre_maketables.3 b/srclib/pcre/doc/pcre_maketables.3
new file mode 100644
index 0000000000..fdc5914e5c
--- /dev/null
+++ b/srclib/pcre/doc/pcre_maketables.3
@@ -0,0 +1,30 @@
+.TH PCRE 3
+.SH NAME
+PCRE - Perl-compatible regular expressions
+.SH SYNOPSIS
+.rs
+.sp
+.B #include <pcre.h>
+.PP
+.SM
+.br
+.B const unsigned char *pcre_maketables(void);
+.
+.SH DESCRIPTION
+.rs
+.sp
+This function builds a set of character tables for character values less than
+256. These can be passed to \fBpcre_compile()\fP to override PCRE's internal,
+built-in tables (which were made by \fBpcre_maketables()\fP when PCRE was
+compiled). You might want to do this if you are using a non-standard locale.
+The function yields a pointer to the tables.
+.P
+There is a complete description of the PCRE native API in the
+.\" HREF
+\fBpcreapi\fP
+.\"
+page and a description of the POSIX API in the
+.\" HREF
+\fBpcreposix\fP
+.\"
+page.
diff --git a/srclib/pcre/doc/pcre_study.3 b/srclib/pcre/doc/pcre_study.3
new file mode 100644
index 0000000000..df428d0afc
--- /dev/null
+++ b/srclib/pcre/doc/pcre_study.3
@@ -0,0 +1,43 @@
+.TH PCRE 3
+.SH NAME
+PCRE - Perl-compatible regular expressions
+.SH SYNOPSIS
+.rs
+.sp
+.B #include <pcre.h>
+.PP
+.SM
+.br
+.B pcre_extra *pcre_study(const pcre *\fIcode\fP, int \fIoptions\fP,
+.ti +5n
+.B const char **\fIerrptr\fP);
+.
+.SH DESCRIPTION
+.rs
+.sp
+This function studies a compiled pattern, to see if additional information can
+be extracted that might speed up matching. Its arguments are:
+.sp
+ \fIcode\fP A compiled regular expression
+ \fIoptions\fP Options for \fBpcre_study()\fP
+ \fIerrptr\fP Where to put an error message
+.sp
+If the function succeeds, it returns a value that can be passed to
+\fBpcre_exec()\fP via its \fIextra\fP argument.
+.P
+If the function returns NULL, either it could not find any additional
+information, or there was an error. You can tell the difference by looking at
+the error value. It is NULL in first case.
+.P
+There are currently no options defined; the value of the second argument should
+always be zero.
+.P
+There is a complete description of the PCRE native API in the
+.\" HREF
+\fBpcreapi\fP
+.\"
+page and a description of the POSIX API in the
+.\" HREF
+\fBpcreposix\fP
+.\"
+page.
diff --git a/srclib/pcre/doc/pcre_version.3 b/srclib/pcre/doc/pcre_version.3
new file mode 100644
index 0000000000..9b07407a42
--- /dev/null
+++ b/srclib/pcre/doc/pcre_version.3
@@ -0,0 +1,27 @@
+.TH PCRE 3
+.SH NAME
+PCRE - Perl-compatible regular expressions
+.SH SYNOPSIS
+.rs
+.sp
+.B #include <pcre.h>
+.PP
+.SM
+.br
+.B char *pcre_version(void);
+.
+.SH DESCRIPTION
+.rs
+.sp
+This function returns a character string that gives the version number of the
+PCRE library and the date of its release.
+.P
+There is a complete description of the PCRE native API in the
+.\" HREF
+\fBpcreapi\fP
+.\"
+page and a description of the POSIX API in the
+.\" HREF
+\fBpcreposix\fP
+.\"
+page.
diff --git a/srclib/pcre/doc/pcreapi.3 b/srclib/pcre/doc/pcreapi.3
new file mode 100644
index 0000000000..42a4e59c96
--- /dev/null
+++ b/srclib/pcre/doc/pcreapi.3
@@ -0,0 +1,1288 @@
+.TH PCRE 3
+.SH NAME
+PCRE - Perl-compatible regular expressions
+.SH "PCRE NATIVE API"
+.rs
+.sp
+.B #include <pcre.h>
+.PP
+.SM
+.br
+.B pcre *pcre_compile(const char *\fIpattern\fP, int \fIoptions\fP,
+.ti +5n
+.B const char **\fIerrptr\fP, int *\fIerroffset\fP,
+.ti +5n
+.B const unsigned char *\fItableptr\fP);
+.PP
+.br
+.B pcre_extra *pcre_study(const pcre *\fIcode\fP, int \fIoptions\fP,
+.ti +5n
+.B const char **\fIerrptr\fP);
+.PP
+.br
+.B int pcre_exec(const pcre *\fIcode\fP, "const pcre_extra *\fIextra\fP,"
+.ti +5n
+.B "const char *\fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP,
+.ti +5n
+.B int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP);
+.PP
+.br
+.B int pcre_copy_named_substring(const pcre *\fIcode\fP,
+.ti +5n
+.B const char *\fIsubject\fP, int *\fIovector\fP,
+.ti +5n
+.B int \fIstringcount\fP, const char *\fIstringname\fP,
+.ti +5n
+.B char *\fIbuffer\fP, int \fIbuffersize\fP);
+.PP
+.br
+.B int pcre_copy_substring(const char *\fIsubject\fP, int *\fIovector\fP,
+.ti +5n
+.B int \fIstringcount\fP, int \fIstringnumber\fP, char *\fIbuffer\fP,
+.ti +5n
+.B int \fIbuffersize\fP);
+.PP
+.br
+.B int pcre_get_named_substring(const pcre *\fIcode\fP,
+.ti +5n
+.B const char *\fIsubject\fP, int *\fIovector\fP,
+.ti +5n
+.B int \fIstringcount\fP, const char *\fIstringname\fP,
+.ti +5n
+.B const char **\fIstringptr\fP);
+.PP
+.br
+.B int pcre_get_stringnumber(const pcre *\fIcode\fP,
+.ti +5n
+.B const char *\fIname\fP);
+.PP
+.br
+.B int pcre_get_substring(const char *\fIsubject\fP, int *\fIovector\fP,
+.ti +5n
+.B int \fIstringcount\fP, int \fIstringnumber\fP,
+.ti +5n
+.B const char **\fIstringptr\fP);
+.PP
+.br
+.B int pcre_get_substring_list(const char *\fIsubject\fP,
+.ti +5n
+.B int *\fIovector\fP, int \fIstringcount\fP, "const char ***\fIlistptr\fP);"
+.PP
+.br
+.B void pcre_free_substring(const char *\fIstringptr\fP);
+.PP
+.br
+.B void pcre_free_substring_list(const char **\fIstringptr\fP);
+.PP
+.br
+.B const unsigned char *pcre_maketables(void);
+.PP
+.br
+.B int pcre_fullinfo(const pcre *\fIcode\fP, "const pcre_extra *\fIextra\fP,"
+.ti +5n
+.B int \fIwhat\fP, void *\fIwhere\fP);
+.PP
+.br
+.B int pcre_info(const pcre *\fIcode\fP, int *\fIoptptr\fP, int
+.B *\fIfirstcharptr\fP);
+.PP
+.br
+.B int pcre_config(int \fIwhat\fP, void *\fIwhere\fP);
+.PP
+.br
+.B char *pcre_version(void);
+.PP
+.br
+.B void *(*pcre_malloc)(size_t);
+.PP
+.br
+.B void (*pcre_free)(void *);
+.PP
+.br
+.B void *(*pcre_stack_malloc)(size_t);
+.PP
+.br
+.B void (*pcre_stack_free)(void *);
+.PP
+.br
+.B int (*pcre_callout)(pcre_callout_block *);
+.
+.
+.SH "PCRE API OVERVIEW"
+.rs
+.sp
+PCRE has its own native API, which is described in this document. There is also
+a set of wrapper functions that correspond to the POSIX regular expression API.
+These are described in the
+.\" HREF
+\fBpcreposix\fP
+.\"
+documentation.
+.P
+The native API function prototypes are defined in the header file \fBpcre.h\fP,
+and on Unix systems the library itself is called \fBlibpcre\fP. It can
+normally be accessed by adding \fB-lpcre\fP to the command for linking an
+application that uses PCRE. The header file defines the macros PCRE_MAJOR 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
+The functions \fBpcre_compile()\fP, \fBpcre_study()\fP, and \fBpcre_exec()\fP
+are used for compiling and matching regular expressions. A sample program that
+demonstrates the simplest way of using them is provided in the file called
+\fIpcredemo.c\fP in the source distribution. The
+.\" HREF
+\fBpcresample\fP
+.\"
+documentation describes how to run it.
+.P
+In addition to the main compiling and matching functions, there are convenience
+functions for extracting captured substrings from a matched subject string.
+They are:
+.sp
+ \fBpcre_copy_substring()\fP
+ \fBpcre_copy_named_substring()\fP
+ \fBpcre_get_substring()\fP
+ \fBpcre_get_named_substring()\fP
+ \fBpcre_get_substring_list()\fP
+ \fBpcre_get_stringnumber()\fP
+.sp
+\fBpcre_free_substring()\fP and \fBpcre_free_substring_list()\fP are also
+provided, to free the memory used for extracted strings.
+.P
+The function \fBpcre_maketables()\fP is used to build a set of character tables
+in the current locale for passing to \fBpcre_compile()\fP or \fBpcre_exec()\fP.
+This is an optional facility that is provided for specialist use. Most
+commonly, no special tables are passed, in which case internal tables that are
+generated when PCRE is built are used.
+.P
+The function \fBpcre_fullinfo()\fP is used to find out information about a
+compiled pattern; \fBpcre_info()\fP is an obsolete version that returns only
+some of the available information, but is retained for backwards compatibility.
+The function \fBpcre_version()\fP returns a pointer to a string containing the
+version of PCRE and its date of release.
+.P
+The global variables \fBpcre_malloc\fP and \fBpcre_free\fP initially contain
+the entry points of the standard \fBmalloc()\fP and \fBfree()\fP functions,
+respectively. PCRE calls the memory management functions via these variables,
+so a calling program can replace them if it wishes to intercept the calls. This
+should be done before calling any PCRE functions.
+.P
+The global variables \fBpcre_stack_malloc\fP and \fBpcre_stack_free\fP are also
+indirections to memory management functions. These special functions are used
+only when PCRE is compiled to use the heap for remembering data, instead of
+recursive function calls. This is a non-standard way of building PCRE, for use
+in environments that have limited stacks. Because of the greater use of memory
+management, it runs more slowly. Separate functions are provided so that
+special-purpose external code can be used for this case. When used, these
+functions are always called in a stack-like manner (last obtained, first
+freed), and always for memory blocks of the same size.
+.P
+The global variable \fBpcre_callout\fP initially contains NULL. It can be set
+by the caller to a "callout" function, which PCRE will then call at specified
+points during a matching operation. Details are given in the
+.\" HREF
+\fBpcrecallout\fP
+.\"
+documentation.
+.
+.
+.SH MULTITHREADING
+.rs
+.sp
+The PCRE functions can be used in multi-threading applications, with the
+proviso that the memory management functions pointed to by \fBpcre_malloc\fP,
+\fBpcre_free\fP, \fBpcre_stack_malloc\fP, and \fBpcre_stack_free\fP, and the
+callout function pointed to by \fBpcre_callout\fP, are shared by all threads.
+.P
+The compiled form of a regular expression is not altered during matching, so
+the same compiled pattern can safely be used by several threads at once.
+.
+.
+.SH "SAVING PRECOMPILED PATTERNS FOR LATER USE"
+.rs
+.sp
+The compiled form of a regular expression can be saved and re-used at a later
+time, possibly by a different program, and even on a host other than the one on
+which it was compiled. Details are given in the
+.\" HREF
+\fBpcreprecompile\fP
+.\"
+documentation.
+.
+.
+.SH "CHECKING BUILD-TIME OPTIONS"
+.rs
+.sp
+.B int pcre_config(int \fIwhat\fP, void *\fIwhere\fP);
+.PP
+The function \fBpcre_config()\fP makes it possible for a PCRE client to
+discover which optional features have been compiled into the PCRE library. The
+.\" HREF
+\fBpcrebuild\fP
+.\"
+documentation has more details about these optional features.
+.P
+The first argument for \fBpcre_config()\fP is an integer, specifying which
+information is required; the second argument is a pointer to a variable into
+which the information is placed. The following information is available:
+.sp
+ PCRE_CONFIG_UTF8
+.sp
+The output is an integer that is set to one if UTF-8 support is available;
+otherwise it is set to zero.
+.sp
+ PCRE_CONFIG_UNICODE_PROPERTIES
+.sp
+The output is an integer that is set to one if support for Unicode character
+properties is available; otherwise it is set to zero.
+.sp
+ PCRE_CONFIG_NEWLINE
+.sp
+The output is an integer that is set to the value of the code that is used for
+the newline character. It is either linefeed (10) or carriage return (13), and
+should normally be the standard character for your operating system.
+.sp
+ PCRE_CONFIG_LINK_SIZE
+.sp
+The output is an integer that contains the number of bytes used for internal
+linkage in compiled regular expressions. The value is 2, 3, or 4. Larger values
+allow larger regular expressions to be compiled, at the expense of slower
+matching. The default value of 2 is sufficient for all but the most massive
+patterns, since it allows the compiled pattern to be up to 64K in size.
+.sp
+ PCRE_CONFIG_POSIX_MALLOC_THRESHOLD
+.sp
+The output is an integer that contains the threshold above which the POSIX
+interface uses \fBmalloc()\fP for output vectors. Further details are given in
+the
+.\" HREF
+\fBpcreposix\fP
+.\"
+documentation.
+.sp
+ PCRE_CONFIG_MATCH_LIMIT
+.sp
+The output is an integer that gives the default limit for the number of
+internal matching function calls in a \fBpcre_exec()\fP execution. Further
+details are given with \fBpcre_exec()\fP below.
+.sp
+ PCRE_CONFIG_STACKRECURSE
+.sp
+The output is an integer that is set to one if internal recursion is
+implemented by recursive function calls that use the stack to remember their
+state. This is the usual way that PCRE is compiled. The output is zero if PCRE
+was compiled to use blocks of data on the heap instead of recursive function
+calls. In this case, \fBpcre_stack_malloc\fP and \fBpcre_stack_free\fP are
+called to manage memory blocks on the heap, thus avoiding the use of the stack.
+.
+.
+.SH "COMPILING A PATTERN"
+.rs
+.sp
+.B pcre *pcre_compile(const char *\fIpattern\fP, int \fIoptions\fP,
+.ti +5n
+.B const char **\fIerrptr\fP, int *\fIerroffset\fP,
+.ti +5n
+.B const unsigned char *\fItableptr\fP);
+.P
+The function \fBpcre_compile()\fP is called to compile a pattern into an
+internal form. The pattern is a C string terminated by a binary zero, and
+is passed in the \fIpattern\fP argument. A pointer to a single block of memory
+that is obtained via \fBpcre_malloc\fP is returned. This contains the compiled
+code and related data. The \fBpcre\fP type is defined for the returned block;
+this is a typedef for a structure whose contents are not externally defined. It
+is up to the caller to free the memory when it is no longer required.
+.P
+Although the compiled code of a PCRE regex is relocatable, that is, it does not
+depend on memory location, the complete \fBpcre\fP data block is not
+fully relocatable, because it may contain a copy of the \fItableptr\fP
+argument, which is an address (see below).
+.P
+The \fIoptions\fP argument contains independent bits that affect the
+compilation. It should be zero if no options are required. The available
+options are described below. Some of them, in particular, those that are
+compatible with Perl, can also be set and unset from within the pattern (see
+the detailed description in the
+.\" HREF
+\fBpcrepattern\fP
+.\"
+documentation). For these options, the contents of the \fIoptions\fP argument
+specifies their initial settings at the start of compilation and execution. The
+PCRE_ANCHORED option can be set at the time of matching as well as at compile
+time.
+.P
+If \fIerrptr\fP is NULL, \fBpcre_compile()\fP returns NULL immediately.
+Otherwise, if compilation of a pattern fails, \fBpcre_compile()\fP returns
+NULL, and sets the variable pointed to by \fIerrptr\fP to point to a textual
+error message. The offset from the start of the pattern to the character where
+the error was discovered is placed in the variable pointed to by
+\fIerroffset\fP, which must not be NULL. If it is, an immediate error is given.
+.P
+If the final argument, \fItableptr\fP, is NULL, PCRE uses a default set of
+character tables that are built when PCRE is compiled, using the default C
+locale. Otherwise, \fItableptr\fP must be an address that is the result of a
+call to \fBpcre_maketables()\fP. This value is stored with the compiled
+pattern, and used again by \fBpcre_exec()\fP, unless another table pointer is
+passed to it. For more discussion, see the section on locale support below.
+.P
+This code fragment shows a typical straightforward call to \fBpcre_compile()\fP:
+.sp
+ pcre *re;
+ const char *error;
+ int erroffset;
+ re = pcre_compile(
+ "^A.*Z", /* the pattern */
+ 0, /* default options */
+ &error, /* for error message */
+ &erroffset, /* for error offset */
+ NULL); /* use default character tables */
+.sp
+The following names for option bits are defined in the \fBpcre.h\fP header
+file:
+.sp
+ PCRE_ANCHORED
+.sp
+If this bit is set, the pattern is forced to be "anchored", that is, it is
+constrained to match only at the first matching point in the string that is
+being searched (the "subject string"). This effect can also be achieved by
+appropriate constructs in the pattern itself, which is the only way to do it in
+Perl.
+.sp
+ PCRE_AUTO_CALLOUT
+.sp
+If this bit is set, \fBpcre_compile()\fP automatically inserts callout items,
+all with number 255, before each pattern item. For discussion of the callout
+facility, see the
+.\" HREF
+\fBpcrecallout\fP
+.\"
+documentation.
+.sp
+ PCRE_CASELESS
+.sp
+If this bit is set, letters in the pattern match both upper and lower case
+letters. It is equivalent to Perl's /i option, and it can be changed within a
+pattern by a (?i) option setting. When running in UTF-8 mode, case support for
+high-valued characters is available only when PCRE is built with Unicode
+character property support.
+.sp
+ PCRE_DOLLAR_ENDONLY
+.sp
+If this bit is set, a dollar metacharacter in the pattern matches only at the
+end of the subject string. Without this option, a dollar also matches
+immediately before the final character if it is a newline (but not before any
+other newlines). The PCRE_DOLLAR_ENDONLY option is ignored if PCRE_MULTILINE is
+set. There is no equivalent to this option in Perl, and no way to set it within
+a pattern.
+.sp
+ PCRE_DOTALL
+.sp
+If this bit is set, a dot metacharater in the pattern matches all characters,
+including newlines. Without it, newlines are excluded. This option is
+equivalent to Perl's /s option, and it can be changed within a pattern by a
+(?s) option setting. A negative class such as [^a] always matches a newline
+character, independent of the setting of this option.
+.sp
+ PCRE_EXTENDED
+.sp
+If this bit is set, whitespace data characters in the pattern are totally
+ignored except when escaped or inside a character class. Whitespace does not
+include the VT character (code 11). In addition, characters between an
+unescaped # outside a character class and the next newline character,
+inclusive, are also ignored. This is equivalent to Perl's /x option, and it can
+be changed within a pattern by a (?x) option setting.
+.P
+This option makes it possible to include comments inside complicated patterns.
+Note, however, that this applies only to data characters. Whitespace characters
+may never appear within special character sequences in a pattern, for example
+within the sequence (?( which introduces a conditional subpattern.
+.sp
+ PCRE_EXTRA
+.sp
+This option was invented in order to turn on additional functionality of PCRE
+that is incompatible with Perl, but it is currently of very little use. When
+set, any backslash in a pattern that is followed by a 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. 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_MULTILINE
+.sp
+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.
+.P
+When PCRE_MULTILINE it is set, the "start of line" and "end of line" constructs
+match immediately following or immediately before any newline 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 "\en" characters in a subject string, or no
+occurrences of ^ or $ in a pattern, setting PCRE_MULTILINE has no effect.
+.sp
+ PCRE_NO_AUTO_CAPTURE
+.sp
+If this option is set, it disables the use of numbered capturing parentheses 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.
+.sp
+ PCRE_UNGREEDY
+.sp
+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.
+.sp
+ PCRE_UTF8
+.sp
+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 support. If not, the use
+of this option provokes an error. Details of how this option changes the
+behaviour of PCRE are given in the
+.\" HTML <a href="pcre.html#utf8support">
+.\" </a>
+section on UTF-8 support
+.\"
+in the main
+.\" HREF
+\fBpcre\fP
+.\"
+page.
+.sp
+ PCRE_NO_UTF8_CHECK
+.sp
+When PCRE_UTF8 is set, the validity of the pattern as a UTF-8 string is
+automatically checked. If an invalid UTF-8 sequence of bytes is found,
+\fBpcre_compile()\fP returns an error. If you already know that your pattern is
+valid, and you want to skip this check for performance 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 \fBpcre_exec()\fP, to suppress the
+UTF-8 validity checking of subject strings.
+.
+.
+.SH "STUDYING A PATTERN"
+.rs
+.sp
+.B pcre_extra *pcre_study(const pcre *\fIcode\fP, int \fIoptions\fP,
+.ti +5n
+.B const char **\fIerrptr\fP);
+.PP
+If a compiled pattern is going to be used several times, it is worth spending
+more time analyzing it in order to speed up the time taken for matching. The
+function \fBpcre_study()\fP takes a pointer to a compiled pattern as its first
+argument. If studying the pattern produces additional information that will
+help speed up matching, \fBpcre_study()\fP returns a pointer to a
+\fBpcre_extra\fP block, in which the \fIstudy_data\fP field points to the
+results of the study.
+.P
+The returned value from \fBpcre_study()\fP can be passed directly to
+\fBpcre_exec()\fP. However, a \fBpcre_extra\fP block also contains other
+fields that can be set by the caller before the block is passed; these are
+described
+.\" HTML <a href="#extradata">
+.\" </a>
+below
+.\"
+in the section on matching a pattern.
+.P
+If studying the pattern does not produce any additional information,
+\fBpcre_study()\fP returns NULL. In that circumstance, if the calling program
+wants to pass any of the other fields to \fBpcre_exec()\fP, it must set up its
+own \fBpcre_extra\fP block.
+.P
+The second argument of \fBpcre_study()\fP contains option bits. At present, no
+options are defined, and this argument should always be zero.
+.P
+The third argument for \fBpcre_study()\fP is a pointer for an error message. If
+studying succeeds (even if no data is returned), the variable it points to is
+set to NULL. Otherwise it points to a textual error message. You should
+therefore test the error pointer for NULL after calling \fBpcre_study()\fP, to
+be sure that it has run successfully.
+.P
+This is a typical call to \fBpcre_study\fP():
+.sp
+ pcre_extra *pe;
+ pe = pcre_study(
+ re, /* result of pcre_compile() */
+ 0, /* no options exist */
+ &error); /* set to NULL or points to a message */
+.sp
+At present, studying a pattern is useful only for non-anchored patterns that do
+not have a single fixed starting character. A bitmap of possible starting
+bytes is created.
+.
+.
+.\" HTML <a name="localesupport"></a>
+.SH "LOCALE SUPPORT"
+.rs
+.sp
+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.)
+.P
+An internal set of tables is created in the default C locale when PCRE is
+built. This is used when the final argument of \fBpcre_compile()\fP is NULL,
+and is sufficient for many applications. An alternative set of tables can,
+however, be supplied. These may be created in a different locale from the
+default. As more and more applications change to using Unicode, the need for
+this locale support is expected to die away.
+.P
+External tables are built by calling the \fBpcre_maketables()\fP function,
+which has no arguments, in the relevant locale. The result can then be passed
+to \fBpcre_compile()\fP or \fBpcre_exec()\fP 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:
+.sp
+ setlocale(LC_CTYPE, "fr_FR");
+ tables = pcre_maketables();
+ re = pcre_compile(..., tables);
+.sp
+When \fBpcre_maketables()\fP runs, the tables are built in memory that is
+obtained via \fBpcre_malloc\fP. It is the caller's responsibility to ensure
+that the memory containing the tables remains available for as long as it is
+needed.
+.P
+The pointer that is passed to \fBpcre_compile()\fP is saved with the compiled
+pattern, and the same tables are used via this pointer by \fBpcre_study()\fP
+and normally also by \fBpcre_exec()\fP. Thus, by default, for any single
+pattern, compilation, studying and matching all happen in the same locale, but
+different patterns can be compiled in different locales.
+.P
+It is possible to pass a table pointer or NULL (indicating the use of the
+internal tables) to \fBpcre_exec()\fP. 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.
+.
+.
+.SH "INFORMATION ABOUT A PATTERN"
+.rs
+.sp
+.B int pcre_fullinfo(const pcre *\fIcode\fP, "const pcre_extra *\fIextra\fP,"
+.ti +5n
+.B int \fIwhat\fP, void *\fIwhere\fP);
+.PP
+The \fBpcre_fullinfo()\fP function returns information about a compiled
+pattern. It replaces the obsolete \fBpcre_info()\fP function, which is
+nevertheless retained for backwards compability (and is documented below).
+.P
+The first argument for \fBpcre_fullinfo()\fP is a pointer to the compiled
+pattern. The second argument is the result of \fBpcre_study()\fP, 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:
+.sp
+ PCRE_ERROR_NULL the argument \fIcode\fP was NULL
+ the argument \fIwhere\fP was NULL
+ PCRE_ERROR_BADMAGIC the "magic number" was not found
+ PCRE_ERROR_BADOPTION the value of \fIwhat\fP was invalid
+.sp
+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
+\fBpcre_fullinfo()\fP, to obtain the length of the compiled pattern:
+.sp
+ int rc;
+ unsigned long int length;
+ rc = pcre_fullinfo(
+ re, /* result of pcre_compile() */
+ pe, /* result of pcre_study(), or NULL */
+ PCRE_INFO_SIZE, /* what is required */
+ &length); /* where to put the data */
+.sp
+The possible values for the third argument are defined in \fBpcre.h\fP, and are
+as follows:
+.sp
+ PCRE_INFO_BACKREFMAX
+.sp
+Return the number of the highest back reference in the pattern. The fourth
+argument should point to an \fBint\fP variable. Zero is returned if there are
+no back references.
+.sp
+ PCRE_INFO_CAPTURECOUNT
+.sp
+Return the number of capturing subpatterns in the pattern. The fourth argument
+should point to an \fBint\fP variable.
+.sp
+ PCRE_INFO_DEFAULTTABLES
+.sp
+Return a pointer to the internal default character tables within PCRE. The
+fourth argument should point to an \fBunsigned char *\fP variable. This
+information call is provided for internal use by the \fBpcre_study()\fP
+function. External callers can cause PCRE to use its internal tables by passing
+a NULL table pointer.
+.sp
+ PCRE_INFO_FIRSTBYTE
+.sp
+Return information about the first byte of any matched string, for a
+non-anchored pattern. (This option used to be called PCRE_INFO_FIRSTCHAR; the
+old name is still recognized for backwards compatibility.)
+.P
+If there is a fixed first byte, for example, from a pattern such as
+(cat|cow|coyote), it is returned in the integer pointed to by \fIwhere\fP.
+Otherwise, if either
+.sp
+(a) the pattern was compiled with the PCRE_MULTILINE option, and every branch
+starts with "^", or
+.sp
+(b) every branch of the pattern starts with ".*" and PCRE_DOTALL is not set
+(if it were set, the pattern would be anchored),
+.sp
+-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.
+.sp
+ PCRE_INFO_FIRSTTABLE
+.sp
+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 \fBunsigned char *\fP variable.
+.sp
+ PCRE_INFO_LASTLITERAL
+.sp
+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 \fBint\fP 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 example, for the pattern
+/^a\ed+z\ed+/ the returned value is "z", but for /^a\edz\ed/ the returned value
+is -1.
+.sp
+ PCRE_INFO_NAMECOUNT
+ PCRE_INFO_NAMEENTRYSIZE
+ PCRE_INFO_NAMETABLE
+.sp
+PCRE supports the use of named as well as numbered capturing parentheses. The
+names are just an additional way of identifying the parentheses, which still
+acquire numbers. A convenience function called \fBpcre_get_named_substring()\fP
+is provided for extracting an individual captured substring 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
+\fBpcre_exec()\fP below). To do the conversion, you need to use the
+name-to-number map, which is described by these three values.
+.P
+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 \fBint\fP 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 \fBchar\fP). The first two bytes of each entry
+are the number of the capturing parenthesis, most significant byte first. The
+rest of the entry is the corresponding name, zero terminated. The names are in
+alphabetical order. For example, consider the following pattern (assume
+PCRE_EXTENDED is set, so white space - including newlines - is ignored):
+.sp
+.\" JOIN
+ (?P<date> (?P<year>(\ed\ed)?\ed\ed) -
+ (?P<month>\ed\ed) - (?P<day>\ed\ed) )
+.sp
+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 ??:
+.sp
+ 00 01 d a t e 00 ??
+ 00 05 d a y 00 ?? ??
+ 00 04 m o n t h 00
+ 00 02 y e a r 00 ??
+.sp
+When writing code to extract data from named subpatterns using the
+name-to-number map, remember that the length of each entry is likely to be
+different for each compiled pattern.
+.sp
+ PCRE_INFO_OPTIONS
+.sp
+Return a copy of the options with which the pattern was compiled. The fourth
+argument should point to an \fBunsigned long int\fP variable. These option bits
+are those specified in the call to \fBpcre_compile()\fP, modified by any
+top-level option settings within the pattern itself.
+.P
+A pattern is automatically anchored by PCRE if all of its top-level
+alternatives begin with one of the following:
+.sp
+ ^ unless PCRE_MULTILINE is set
+ \eA always
+ \eG always
+.\" JOIN
+ .* if PCRE_DOTALL is set and there are no back
+ references to the subpattern in which .* appears
+.sp
+For such patterns, the PCRE_ANCHORED bit is set in the options returned by
+\fBpcre_fullinfo()\fP.
+.sp
+ PCRE_INFO_SIZE
+.sp
+Return the size of the compiled pattern, that is, the value that was passed as
+the argument to \fBpcre_malloc()\fP when PCRE was getting memory in which to
+place the compiled data. The fourth argument should point to a \fBsize_t\fP
+variable.
+.sp
+ PCRE_INFO_STUDYSIZE
+.sp
+Return the size of the data block pointed to by the \fIstudy_data\fP field in
+a \fBpcre_extra\fP block. That is, it is the value that was passed to
+\fBpcre_malloc()\fP when PCRE was getting memory into which to place the data
+created by \fBpcre_study()\fP. The fourth argument should point to a
+\fBsize_t\fP variable.
+.
+.
+.SH "OBSOLETE INFO FUNCTION"
+.rs
+.sp
+.B int pcre_info(const pcre *\fIcode\fP, int *\fIoptptr\fP, int
+.B *\fIfirstcharptr\fP);
+.PP
+The \fBpcre_info()\fP function is now obsolete because its interface is too
+restrictive to return all the available data about a compiled pattern. New
+programs should use \fBpcre_fullinfo()\fP instead. The yield of
+\fBpcre_info()\fP is the number of capturing subpatterns, or one of the
+following negative numbers:
+.sp
+ PCRE_ERROR_NULL the argument \fIcode\fP was NULL
+ PCRE_ERROR_BADMAGIC the "magic number" was not found
+.sp
+If the \fIoptptr\fP 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).
+.P
+If the pattern is not anchored and the \fIfirstcharptr\fP argument is not NULL,
+it is used to pass back information about the first character of any matched
+string (see PCRE_INFO_FIRSTBYTE above).
+.
+.
+.SH "MATCHING A PATTERN"
+.rs
+.sp
+.B int pcre_exec(const pcre *\fIcode\fP, "const pcre_extra *\fIextra\fP,"
+.ti +5n
+.B "const char *\fIsubject\fP," int \fIlength\fP, int \fIstartoffset\fP,
+.ti +5n
+.B int \fIoptions\fP, int *\fIovector\fP, int \fIovecsize\fP);
+.P
+The function \fBpcre_exec()\fP is called to match a subject string against a
+compiled pattern, which is passed in the \fIcode\fP argument. If the
+pattern has been studied, the result of the study should be passed in the
+\fIextra\fP argument.
+.P
+In most applications, the pattern will have been compiled (and optionally
+studied) in the same process that calls \fBpcre_exec()\fP. 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 discussion
+about this, see the
+.\" HREF
+\fBpcreprecompile\fP
+.\"
+documentation.
+.P
+Here is an example of a simple call to \fBpcre_exec()\fP:
+.sp
+ int rc;
+ int ovector[30];
+ rc = pcre_exec(
+ re, /* result of pcre_compile() */
+ NULL, /* we didn't study the pattern */
+ "some string", /* the subject string */
+ 11, /* the length of the subject string */
+ 0, /* start at offset 0 in the subject */
+ 0, /* default options */
+ ovector, /* vector of integers for substring information */
+ 30); /* number of elements in the vector (NOT size in bytes) */
+.
+.\" HTML <a name="extradata"></a>
+.SS "Extra data for \fBpcre_exec()\fR"
+.rs
+.sp
+If the \fIextra\fP argument is not NULL, it must point to a \fBpcre_extra\fP
+data block. The \fBpcre_study()\fP function returns such a block (when it
+doesn't return NULL), but you can also create one for yourself, and pass
+additional information in it. The fields in a \fBpcre_extra\fP block are as
+follows:
+.sp
+ unsigned long int \fIflags\fP;
+ void *\fIstudy_data\fP;
+ unsigned long int \fImatch_limit\fP;
+ void *\fIcallout_data\fP;
+ const unsigned char *\fItables\fP;
+.sp
+The \fIflags\fP field is a bitmap that specifies which of the other fields
+are set. The flag bits are:
+.sp
+ PCRE_EXTRA_STUDY_DATA
+ PCRE_EXTRA_MATCH_LIMIT
+ PCRE_EXTRA_CALLOUT_DATA
+ PCRE_EXTRA_TABLES
+.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
+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 flag bits.
+.P
+The \fImatch_limit\fP field provides a means of preventing PCRE from using up a
+vast amount of resources when running patterns that are not going to match,
+but which have a very large number of possibilities in their search trees. The
+classic example is the use of nested unlimited repeats.
+.P
+Internally, PCRE uses a function called \fBmatch()\fP which it calls repeatedly
+(sometimes recursively). The limit is imposed on the number of times this
+function is called during a match, which has the effect of limiting the amount
+of recursion and backtracking that can take place. For patterns that are not
+anchored, the count starts from zero for each position in the subject string.
+.P
+The default limit for the library can be set when PCRE is built; the default
+default is 10 million, which handles all but the most extreme cases. You can
+reduce the default by suppling \fBpcre_exec()\fP with a \fBpcre_extra\fP block
+in which \fImatch_limit\fP is set to a smaller value, and
+PCRE_EXTRA_MATCH_LIMIT is set in the \fIflags\fP field. If the limit is
+exceeded, \fBpcre_exec()\fP returns PCRE_ERROR_MATCHLIMIT.
+.P
+The \fIpcre_callout\fP field is used in conjunction with the "callout" feature,
+which is described in the
+.\" HREF
+\fBpcrecallout\fP
+.\"
+documentation.
+.P
+The \fItables\fP field is used to pass a character tables pointer to
+\fBpcre_exec()\fP; 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 \fBpcre_compile()\fP via its \fItableptr\fP argument.
+If NULL is passed to \fBpcre_exec()\fP 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 \fBpcre_exec()\fP is
+called. See the
+.\" HREF
+\fBpcreprecompile\fP
+.\"
+documentation for a discussion of saving compiled patterns for later use.
+.
+.SS "Option bits for \fBpcre_exec()\fP"
+.rs
+.sp
+The unused bits of the \fIoptions\fP argument for \fBpcre_exec()\fP must be
+zero. The only bits that may be set are PCRE_ANCHORED, PCRE_NOTBOL,
+PCRE_NOTEOL, PCRE_NOTEMPTY, PCRE_NO_UTF8_CHECK and PCRE_PARTIAL.
+.sp
+ PCRE_ANCHORED
+.sp
+The PCRE_ANCHORED option limits \fBpcre_exec()\fP 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.
+.sp
+ PCRE_NOTBOL
+.sp
+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 behaviour of the circumflex
+metacharacter. It does not affect \eA.
+.sp
+ PCRE_NOTEOL
+.sp
+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 without PCRE_MULTILINE (at
+compile time) causes dollar never to match. This option affects only the
+behaviour of the dollar metacharacter. It does not affect \eZ or \ez.
+.sp
+ PCRE_NOTEMPTY
+.sp
+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 example, if the pattern
+.sp
+ a?b?
+.sp
+is applied to a string not beginning with "a" or "b", it matches the empty
+string at the start of the subject. With PCRE_NOTEMPTY set, this match is not
+valid, so PCRE searches further into the string for occurrences of "a" or "b".
+.P
+Perl has no direct equivalent of PCRE_NOTEMPTY, but it does make a special case
+of a pattern match of the empty string within its \fBsplit()\fP function, and
+when using the /g modifier. It is possible to emulate Perl's behaviour after
+matching a null string by first trying the match again at the same offset with
+PCRE_NOTEMPTY and PCRE_ANCHORED, and then if that fails by advancing the
+starting offset (see below) and trying an ordinary match again. There is some
+code that demonstrates how to do this in the \fIpcredemo.c\fP sample program.
+.sp
+ PCRE_NO_UTF8_CHECK
+.sp
+When PCRE_UTF8 is set at compile time, the validity of the subject as a UTF-8
+string is automatically checked when \fBpcre_exec()\fP is subsequently called.
+The value of \fIstartoffset\fP is also checked to ensure that it points to the
+start of a UTF-8 character. If an invalid UTF-8 sequence of bytes is found,
+\fBpcre_exec()\fP returns the error PCRE_ERROR_BADUTF8. If \fIstartoffset\fP
+contains an invalid value, PCRE_ERROR_BADUTF8_OFFSET is returned.
+.P
+If you already know that your subject is valid, and you want to skip these
+checks for performance reasons, you can set the PCRE_NO_UTF8_CHECK option when
+calling \fBpcre_exec()\fP. You might want to do this for the second and
+subsequent calls to \fBpcre_exec()\fP if you are making repeated calls to find
+all the matches in a single subject string. However, you should be sure that
+the value of \fIstartoffset\fP points to the start of a UTF-8 character. When
+PCRE_NO_UTF8_CHECK is set, the effect of passing an invalid UTF-8 string as a
+subject, or a value of \fIstartoffset\fP that does not point to the start of a
+UTF-8 character, is undefined. Your program may crash.
+.sp
+ PCRE_PARTIAL
+.sp
+This option turns on the partial matching feature. If the subject string fails
+to match the pattern, but at some point during the matching process the end of
+the subject was reached (that is, the subject partially matches the pattern and
+the failure to match occurred only because there were not enough subject
+characters), \fBpcre_exec()\fP returns PCRE_ERROR_PARTIAL instead of
+PCRE_ERROR_NOMATCH. When PCRE_PARTIAL is used, there are restrictions on what
+may appear in the pattern. These are discussed in the
+.\" HREF
+\fBpcrepartial\fP
+.\"
+documentation.
+.
+.SS "The string to be matched by \fBpcre_exec()\fP"
+.rs
+.sp
+The subject string is passed to \fBpcre_exec()\fP as a pointer in
+\fIsubject\fP, a length in \fIlength\fP, and a starting byte offset in
+\fIstartoffset\fP. In UTF-8 mode, the byte offset must point to the start of a
+UTF-8 character. Unlike the pattern string, the subject may contain binary zero
+bytes. When the starting offset is zero, the search for a match starts at the
+beginning of the subject, and this is by far the most common case.
+.P
+A non-zero starting offset is useful when searching for another match in the
+same subject by calling \fBpcre_exec()\fP again after a previous success.
+Setting \fIstartoffset\fP differs from just passing over a shortened string and
+setting PCRE_NOTBOL in the case of a pattern that begins with any kind of
+lookbehind. For example, consider the pattern
+.sp
+ \eBiss\eB
+.sp
+which finds occurrences of "iss" in the middle of words. (\eB matches only if
+the current position in the subject is not a word boundary.) When applied to
+the string "Mississipi" the first call to \fBpcre_exec()\fP finds the first
+occurrence. If \fBpcre_exec()\fP is called again with just the remainder of the
+subject, namely "issipi", it does not match, because \eB is always false at the
+start of the subject, which is deemed to be a word boundary. However, if
+\fBpcre_exec()\fP is passed the entire string again, but with \fIstartoffset\fP
+set to 4, it finds the second occurrence of "iss" because it is able to look
+behind the starting point to discover that it is preceded by a letter.
+.P
+If a non-zero starting offset is passed when the pattern is anchored, one
+attempt to match at the given offset is made. This can only succeed if the
+pattern does not require the match to be at the start of the subject.
+.
+.SS "How \fBpcre_exec()\fP returns captured substrings"
+.rs
+.sp
+In general, a pattern matches a certain portion of the subject, and in
+addition, further substrings from the subject may be picked out by parts of the
+pattern. Following the usage in Jeffrey Friedl's book, this is called
+"capturing" in what follows, and the phrase "capturing subpattern" is used for
+a fragment of a pattern that picks out a substring. PCRE supports several other
+kinds of parenthesized subpattern that do not cause substrings to be captured.
+.P
+Captured substrings are returned to the caller via a vector of integer offsets
+whose address is passed in \fIovector\fP. The number of elements in the vector
+is passed in \fIovecsize\fP, which must be a non-negative number. \fBNote\fP:
+this argument is NOT the size of \fIovector\fP in bytes.
+.P
+The first two-thirds of the vector is used to pass back captured substrings,
+each substring using a pair of integers. The remaining third of the vector is
+used as workspace by \fBpcre_exec()\fP while matching capturing subpatterns,
+and is not available for passing back information. The length passed in
+\fIovecsize\fP should always be a multiple of three. If it is not, it is
+rounded down.
+.P
+When a match is successful, information about captured substrings is returned
+in pairs of integers, starting at the beginning of \fIovector\fP, and
+continuing up to two-thirds of its length at the most. The first element of a
+pair is set to the offset of the first character in a substring, and the second
+is set to the offset of the first character after the end of a substring. The
+first pair, \fIovector[0]\fP and \fIovector[1]\fP, identify the portion of the
+subject string matched by the entire pattern. The next pair is used for the
+first capturing subpattern, and so on. The value returned by \fBpcre_exec()\fP
+is the number of pairs that have been set. If there are no capturing
+subpatterns, the return value from a successful match is 1, indicating that
+just the first pair of offsets has been set.
+.P
+Some convenience functions are provided for extracting the captured substrings
+as separate strings. These are described in the following section.
+.P
+It is possible for an capturing subpattern number \fIn+1\fP to match some
+part of the subject when subpattern \fIn\fP has not been used at all. For
+example, if the string "abc" is matched against the pattern (a|(z))(bc)
+subpatterns 1 and 3 are matched, but 2 is not. When this happens, both offset
+values corresponding to the unused subpattern are set to -1.
+.P
+If a capturing subpattern is matched repeatedly, it is the last portion of the
+string that it matched that is returned.
+.P
+If the vector is too small to hold all the captured substring offsets, it is
+used as far as possible (up to two-thirds of its length), and the function
+returns a value of zero. In particular, if the substring offsets are not of
+interest, \fBpcre_exec()\fP may be called with \fIovector\fP passed as NULL and
+\fIovecsize\fP as zero. However, if the pattern contains back references and
+the \fIovector\fP is not big enough to remember the related substrings, PCRE
+has to get additional memory for use during matching. Thus it is usually
+advisable to supply an \fIovector\fP.
+.P
+Note that \fBpcre_info()\fP can be used to find out how many capturing
+subpatterns there are in a compiled pattern. The smallest size for
+\fIovector\fP that will allow for \fIn\fP captured substrings, in addition to
+the offsets of the substring matched by the whole pattern, is (\fIn\fP+1)*3.
+.
+.SS "Return values from \fBpcre_exec()\fP"
+.rs
+.sp
+If \fBpcre_exec()\fP fails, it returns a negative number. The following are
+defined in the header file:
+.sp
+ PCRE_ERROR_NOMATCH (-1)
+.sp
+The subject string did not match the pattern.
+.sp
+ PCRE_ERROR_NULL (-2)
+.sp
+Either \fIcode\fP or \fIsubject\fP was passed as NULL, or \fIovector\fP was
+NULL and \fIovecsize\fP was not zero.
+.sp
+ PCRE_ERROR_BADOPTION (-3)
+.sp
+An unrecognized bit was set in the \fIoptions\fP argument.
+.sp
+ PCRE_ERROR_BADMAGIC (-4)
+.sp
+PCRE stores a 4-byte "magic number" at the start of the compiled code, to catch
+the case when it is passed a junk pointer and to detect when a pattern that was
+compiled in an environment of one endianness is run in an environment with the
+other endianness. This is the error that PCRE gives when the magic number is
+not present.
+.sp
+ PCRE_ERROR_UNKNOWN_NODE (-5)
+.sp
+While running the pattern match, an unknown item was encountered in the
+compiled pattern. This error could be caused by a bug in PCRE or by overwriting
+of the compiled pattern.
+.sp
+ PCRE_ERROR_NOMEMORY (-6)
+.sp
+If a pattern contains back references, but the \fIovector\fP that is passed to
+\fBpcre_exec()\fP is not big enough to remember the referenced substrings, PCRE
+gets a block of memory at the start of matching to use for this purpose. If the
+call via \fBpcre_malloc()\fP fails, this error is given. The memory is
+automatically freed at the end of matching.
+.sp
+ PCRE_ERROR_NOSUBSTRING (-7)
+.sp
+This error is used by the \fBpcre_copy_substring()\fP,
+\fBpcre_get_substring()\fP, and \fBpcre_get_substring_list()\fP functions (see
+below). It is never returned by \fBpcre_exec()\fP.
+.sp
+ PCRE_ERROR_MATCHLIMIT (-8)
+.sp
+The recursion and backtracking limit, as specified by the \fImatch_limit\fP
+field in a \fBpcre_extra\fP structure (or defaulted) was reached. See the
+description above.
+.sp
+ PCRE_ERROR_CALLOUT (-9)
+.sp
+This error is never generated by \fBpcre_exec()\fP itself. It is provided for
+use by callout functions that want to yield a distinctive error code. See the
+.\" HREF
+\fBpcrecallout\fP
+.\"
+documentation for details.
+.sp
+ PCRE_ERROR_BADUTF8 (-10)
+.sp
+A string that contains an invalid UTF-8 byte sequence was passed as a subject.
+.sp
+ PCRE_ERROR_BADUTF8_OFFSET (-11)
+.sp
+The UTF-8 byte sequence that was passed as a subject was valid, but the value
+of \fIstartoffset\fP did not point to the beginning of a UTF-8 character.
+.sp
+ PCRE_ERROR_PARTIAL (-12)
+.sp
+The subject string did not match, but it did match partially. See the
+.\" HREF
+\fBpcrepartial\fP
+.\"
+documentation for details of partial matching.
+.sp
+ PCRE_ERROR_BAD_PARTIAL (-13)
+.sp
+The PCRE_PARTIAL option was used with a compiled pattern containing items that
+are not supported for partial matching. See the
+.\" HREF
+\fBpcrepartial\fP
+.\"
+documentation for details of partial matching.
+.sp
+ PCRE_ERROR_INTERNAL (-14)
+.sp
+An unexpected internal error has occurred. This error could be caused by a bug
+in PCRE or by overwriting of the compiled pattern.
+.sp
+ PCRE_ERROR_BADCOUNT (-15)
+.sp
+This error is given if the value of the \fIovecsize\fP argument is negative.
+.
+.
+.SH "EXTRACTING CAPTURED SUBSTRINGS BY NUMBER"
+.rs
+.sp
+.B int pcre_copy_substring(const char *\fIsubject\fP, int *\fIovector\fP,
+.ti +5n
+.B int \fIstringcount\fP, int \fIstringnumber\fP, char *\fIbuffer\fP,
+.ti +5n
+.B int \fIbuffersize\fP);
+.PP
+.br
+.B int pcre_get_substring(const char *\fIsubject\fP, int *\fIovector\fP,
+.ti +5n
+.B int \fIstringcount\fP, int \fIstringnumber\fP,
+.ti +5n
+.B const char **\fIstringptr\fP);
+.PP
+.br
+.B int pcre_get_substring_list(const char *\fIsubject\fP,
+.ti +5n
+.B int *\fIovector\fP, int \fIstringcount\fP, "const char ***\fIlistptr\fP);"
+.PP
+Captured substrings can be accessed directly by using the offsets returned by
+\fBpcre_exec()\fP in \fIovector\fP. For convenience, the functions
+\fBpcre_copy_substring()\fP, \fBpcre_get_substring()\fP, and
+\fBpcre_get_substring_list()\fP are provided for extracting captured substrings
+as new, separate, zero-terminated strings. These functions identify substrings
+by number. The next section describes functions for extracting named
+substrings. A substring that contains a binary zero is correctly extracted and
+has a further zero added on the end, but the result is not, of course,
+a C string.
+.P
+The first three arguments are the same for all three of these functions:
+\fIsubject\fP is the subject string that has just been successfully matched,
+\fIovector\fP is a pointer to the vector of integer offsets that was passed to
+\fBpcre_exec()\fP, and \fIstringcount\fP is the number of substrings that were
+captured by the match, including the substring that matched the entire regular
+expression. This is the value returned by \fBpcre_exec()\fP if it is greater
+than zero. If \fBpcre_exec()\fP returned zero, indicating that it ran out of
+space in \fIovector\fP, the value passed as \fIstringcount\fP should be the
+number of elements in the vector divided by three.
+.P
+The functions \fBpcre_copy_substring()\fP and \fBpcre_get_substring()\fP
+extract a single substring, whose number is given as \fIstringnumber\fP. A
+value of zero extracts the substring that matched the entire pattern, whereas
+higher values extract the captured substrings. For \fBpcre_copy_substring()\fP,
+the string is placed in \fIbuffer\fP, whose length is given by
+\fIbuffersize\fP, while for \fBpcre_get_substring()\fP a new block of memory is
+obtained via \fBpcre_malloc\fP, and its address is returned via
+\fIstringptr\fP. The yield of the function is the length of the string, not
+including the terminating zero, or one of
+.sp
+ PCRE_ERROR_NOMEMORY (-6)
+.sp
+The buffer was too small for \fBpcre_copy_substring()\fP, or the attempt to get
+memory failed for \fBpcre_get_substring()\fP.
+.sp
+ PCRE_ERROR_NOSUBSTRING (-7)
+.sp
+There is no substring whose number is \fIstringnumber\fP.
+.P
+The \fBpcre_get_substring_list()\fP function extracts all available substrings
+and builds a list of pointers to them. All this is done in a single block of
+memory that is obtained via \fBpcre_malloc\fP. The address of the memory block
+is returned via \fIlistptr\fP, which is also the start of the list of string
+pointers. The end of the list is marked by a NULL pointer. The yield of the
+function is zero if all went well, or
+.sp
+ PCRE_ERROR_NOMEMORY (-6)
+.sp
+if the attempt to get the memory block failed.
+.P
+When any of these functions encounter a substring that is unset, which can
+happen when capturing subpattern number \fIn+1\fP matches some part of the
+subject, but subpattern \fIn\fP has not been used at all, they return an empty
+string. This can be distinguished from a genuine zero-length substring by
+inspecting the appropriate offset in \fIovector\fP, which is negative for unset
+substrings.
+.P
+The two convenience functions \fBpcre_free_substring()\fP and
+\fBpcre_free_substring_list()\fP can be used to free the memory returned by
+a previous call of \fBpcre_get_substring()\fP or
+\fBpcre_get_substring_list()\fP, respectively. They do nothing more than call
+the function pointed to by \fBpcre_free\fP, which of course could be called
+directly from a C program. However, PCRE is used in some situations where it is
+linked via a special interface to another programming language which cannot use
+\fBpcre_free\fP directly; it is for these cases that the functions are
+provided.
+.
+.
+.SH "EXTRACTING CAPTURED SUBSTRINGS BY NAME"
+.rs
+.sp
+.B int pcre_get_stringnumber(const pcre *\fIcode\fP,
+.ti +5n
+.B const char *\fIname\fP);
+.PP
+.br
+.B int pcre_copy_named_substring(const pcre *\fIcode\fP,
+.ti +5n
+.B const char *\fIsubject\fP, int *\fIovector\fP,
+.ti +5n
+.B int \fIstringcount\fP, const char *\fIstringname\fP,
+.ti +5n
+.B char *\fIbuffer\fP, int \fIbuffersize\fP);
+.PP
+.br
+.B int pcre_get_named_substring(const pcre *\fIcode\fP,
+.ti +5n
+.B const char *\fIsubject\fP, int *\fIovector\fP,
+.ti +5n
+.B int \fIstringcount\fP, const char *\fIstringname\fP,
+.ti +5n
+.B const char **\fIstringptr\fP);
+.PP
+To extract a substring by name, you first have to find associated number.
+For example, for this pattern
+.sp
+ (a+)b(?<xxx>\ed+)...
+.sp
+the number of the subpattern called "xxx" is 2. You can find the number from
+the name by calling \fBpcre_get_stringnumber()\fP. The first argument is the
+compiled pattern, and the second is the name. The yield of the function is the
+subpattern number, or PCRE_ERROR_NOSUBSTRING (-7) if there is no subpattern of
+that name.
+.P
+Given the number, you can extract the substring directly, or use one of the
+functions described in the previous section. For convenience, there are also
+two functions that do the whole job.
+.P
+Most of the arguments of \fIpcre_copy_named_substring()\fP and
+\fIpcre_get_named_substring()\fP are the same as those for the similarly named
+functions that extract by number. As these are described in the previous
+section, they are not re-described here. There are just two differences:
+.P
+First, instead of a substring number, a substring name is given. Second, there
+is an extra argument, given at the start, which is a pointer to the compiled
+pattern. This is needed in order to gain access to the name-to-number
+translation table.
+.P
+These functions call \fBpcre_get_stringnumber()\fP, and if it succeeds, they
+then call \fIpcre_copy_substring()\fP or \fIpcre_get_substring()\fP, as
+appropriate.
+.P
+.in 0
+Last updated: 09 September 2004
+.br
+Copyright (c) 1997-2004 University of Cambridge.
diff --git a/srclib/pcre/doc/pcrebuild.3 b/srclib/pcre/doc/pcrebuild.3
new file mode 100644
index 0000000000..8ac588281d
--- /dev/null
+++ b/srclib/pcre/doc/pcrebuild.3
@@ -0,0 +1,174 @@
+.TH PCRE 3
+.SH NAME
+PCRE - Perl-compatible regular expressions
+.SH "PCRE BUILD-TIME OPTIONS"
+.rs
+.sp
+This document describes the optional features of PCRE that can be selected when
+the library is compiled. They are all selected, or deselected, by providing
+options to the \fBconfigure\fP script that is run before the \fBmake\fP
+command. The complete list of options for \fBconfigure\fP (which includes the
+standard ones such as the selection of the installation directory) can be
+obtained by running
+.sp
+ ./configure --help
+.sp
+The following sections describe certain options whose names begin with --enable
+or --disable. These settings specify changes to the defaults for the
+\fBconfigure\fP command. Because of the way that \fBconfigure\fP works,
+--enable and --disable always come in pairs, so the complementary option always
+exists as well, but as it specifies the default, it is not described.
+.
+.SH "UTF-8 SUPPORT"
+.rs
+.sp
+To build PCRE with support for UTF-8 character strings, add
+.sp
+ --enable-utf8
+.sp
+to the \fBconfigure\fP command. Of itself, this does not make PCRE treat
+strings as UTF-8. As well as compiling PCRE with this option, you also have
+have to set the PCRE_UTF8 option when you call the \fBpcre_compile()\fP
+function.
+.
+.SH "UNICODE CHARACTER PROPERTY SUPPORT"
+.rs
+.sp
+UTF-8 support allows PCRE to process character values greater than 255 in the
+strings that it handles. On its own, however, it does not provide any
+facilities for accessing the properties of such characters. If you want to be
+able to use the pattern escapes \eP, \ep, and \eX, which refer to Unicode
+character properties, you must add
+.sp
+ --enable-unicode-properties
+.sp
+to the \fBconfigure\fP command. This implies UTF-8 support, even if you have
+not explicitly requested it.
+.P
+Including Unicode property support adds around 90K of tables to the PCRE
+library, approximately doubling its size. Only the general category properties
+such as \fILu\fP and \fINd\fP are supported. Details are given in the
+.\" HREF
+\fBpcrepattern\fP
+.\"
+documentation.
+.
+.SH "CODE VALUE OF NEWLINE"
+.rs
+.sp
+By default, PCRE treats character 10 (linefeed) as the newline character. This
+is the normal newline character on Unix-like systems. You can compile PCRE to
+use character 13 (carriage return) instead by adding
+.sp
+ --enable-newline-is-cr
+.sp
+to the \fBconfigure\fP command. For completeness there is also a
+--enable-newline-is-lf option, which explicitly specifies linefeed as the
+newline character.
+.
+.SH "BUILDING SHARED AND STATIC LIBRARIES"
+.rs
+.sp
+The PCRE building process uses \fBlibtool\fP to build both shared and static
+Unix libraries by default. You can suppress one of these by adding one of
+.sp
+ --disable-shared
+ --disable-static
+.sp
+to the \fBconfigure\fP command, as required.
+.
+.SH "POSIX MALLOC USAGE"
+.rs
+.sp
+When PCRE is called through the POSIX interface (see the
+.\" HREF
+\fBpcreposix\fP
+.\"
+documentation), additional working storage is required for holding the pointers
+to capturing substrings, because PCRE requires three integers per substring,
+whereas the POSIX interface provides only two. If the number of expected
+substrings is small, the wrapper function uses space on the stack, because this
+is faster than using \fBmalloc()\fP for each call. The default threshold above
+which the stack is no longer used is 10; it can be changed by adding a setting
+such as
+.sp
+ --with-posix-malloc-threshold=20
+.sp
+to the \fBconfigure\fP command.
+.
+.SH "LIMITING PCRE RESOURCE USAGE"
+.rs
+.sp
+Internally, PCRE has a function called \fBmatch()\fP, which it calls repeatedly
+(possibly recursively) when matching a pattern. By controlling the maximum
+number of times this function may be called during a single matching operation,
+a limit can be placed on the resources used by a single call to
+\fBpcre_exec()\fP. The limit can be changed at run time, as described in the
+.\" HREF
+\fBpcreapi\fP
+.\"
+documentation. The default is 10 million, but this can be changed by adding a
+setting such as
+.sp
+ --with-match-limit=500000
+.sp
+to the \fBconfigure\fP command.
+.
+.SH "HANDLING VERY LARGE PATTERNS"
+.rs
+.sp
+Within a compiled pattern, offset values are used to point from one part to
+another (for example, from an opening parenthesis to an alternation
+metacharacter). By default, two-byte values are used for these offsets, leading
+to a maximum size for a compiled pattern of around 64K. This is sufficient to
+handle all but the most gigantic patterns. Nevertheless, some people do want to
+process enormous patterns, so it is possible to compile PCRE to use three-byte
+or four-byte offsets by adding a setting such as
+.sp
+ --with-link-size=3
+.sp
+to the \fBconfigure\fP command. The value given must be 2, 3, or 4. Using
+longer offsets slows down the operation of PCRE because it has to load
+additional bytes when handling them.
+.P
+If you build PCRE with an increased link size, test 2 (and test 5 if you are
+using UTF-8) will fail. Part of the output of these tests is a representation
+of the compiled pattern, and this changes with the link size.
+.
+.SH "AVOIDING EXCESSIVE STACK USAGE"
+.rs
+.sp
+PCRE implements backtracking while matching by making recursive calls to an
+internal function called \fBmatch()\fP. In environments where the size of the
+stack is limited, this can severely limit PCRE's operation. (The Unix
+environment does not usually suffer from this problem.) An alternative approach
+that uses memory from the heap to remember data, instead of using recursive
+function calls, has been implemented to work round this problem. If you want to
+build a version of PCRE that works this way, add
+.sp
+ --disable-stack-for-recursion
+.sp
+to the \fBconfigure\fP command. With this configuration, PCRE will use the
+\fBpcre_stack_malloc\fP and \fBpcre_stack_free\fP variables to call memory
+management functions. Separate functions are provided because the usage is very
+predictable: the block sizes requested are always the same, and the blocks are
+always freed in reverse order. A calling program might be able to implement
+optimized functions that perform better than the standard \fBmalloc()\fP and
+\fBfree()\fP functions. PCRE runs noticeably more slowly when built in this
+way.
+.
+.SH "USING EBCDIC CODE"
+.rs
+.sp
+PCRE assumes by default that it will run in an environment where the character
+code is ASCII (or Unicode, which is a superset of ASCII). PCRE can, however, be
+compiled to run in an EBCDIC environment by adding
+.sp
+ --enable-ebcdic
+.sp
+to the \fBconfigure\fP command.
+.P
+.in 0
+Last updated: 09 September 2004
+.br
+Copyright (c) 1997-2004 University of Cambridge.
diff --git a/srclib/pcre/doc/pcrecallout.3 b/srclib/pcre/doc/pcrecallout.3
new file mode 100644
index 0000000000..5fd8ff8712
--- /dev/null
+++ b/srclib/pcre/doc/pcrecallout.3
@@ -0,0 +1,155 @@
+.TH PCRE 3
+.SH NAME
+PCRE - Perl-compatible regular expressions
+.SH "PCRE CALLOUTS"
+.rs
+.sp
+.B int (*pcre_callout)(pcre_callout_block *);
+.PP
+PCRE provides a feature called "callout", which is a means of temporarily
+passing control to the caller of PCRE in the middle of pattern matching. The
+caller of PCRE provides an external function by putting its entry point in the
+global variable \fIpcre_callout\fP. By default, this variable contains NULL,
+which disables all calling out.
+.P
+Within a regular expression, (?C) indicates the points at which the external
+function is to be called. Different callout points can be identified by putting
+a number less than 256 after the letter C. The default value is zero.
+For example, this pattern has two callout points:
+.sp
+ (?C1)\deabc(?C2)def
+.sp
+If the PCRE_AUTO_CALLOUT option bit is set when \fBpcre_compile()\fP is called,
+PCRE automatically inserts callouts, all with number 255, before each item in
+the pattern. For example, if PCRE_AUTO_CALLOUT is used with the pattern
+.sp
+ A(\ed{2}|--)
+.sp
+it is processed as if it were
+.sp
+(?C255)A(?C255)((?C255)\ed{2}(?C255)|(?C255)-(?C255)-(?C255))(?C255)
+.sp
+Notice that there is a callout before and after each parenthesis and
+alternation bar. Automatic callouts can be used for tracking the progress of
+pattern matching. The
+.\" HREF
+\fBpcretest\fP
+.\"
+command has an option that sets automatic callouts; when it is used, the output
+indicates how the pattern is matched. This is useful information when you are
+trying to optimize the performance of a particular pattern.
+.
+.
+.SH "MISSING CALLOUTS"
+.rs
+.sp
+You should be aware that, because of optimizations in the way PCRE matches
+patterns, callouts sometimes do not happen. For example, if the pattern is
+.sp
+ ab(?C4)cd
+.sp
+PCRE knows that any matching string must contain the letter "d". If the subject
+string is "abyz", the lack of "d" means that matching doesn't ever start, and
+the callout is never reached. However, with "abyd", though the result is still
+no match, the callout is obeyed.
+.
+.
+.SH "THE CALLOUT INTERFACE"
+.rs
+.sp
+During matching, when PCRE reaches a callout point, the external function
+defined by \fIpcre_callout\fP is called (if it is set). The only argument is a
+pointer to a \fBpcre_callout\fP block. This structure contains the following
+fields:
+.sp
+ int \fIversion\fP;
+ int \fIcallout_number\fP;
+ int *\fIoffset_vector\fP;
+ const char *\fIsubject\fP;
+ int \fIsubject_length\fP;
+ int \fIstart_match\fP;
+ int \fIcurrent_position\fP;
+ int \fIcapture_top\fP;
+ int \fIcapture_last\fP;
+ void *\fIcallout_data\fP;
+ int \fIpattern_position\fP;
+ int \fInext_item_length\fP;
+.sp
+The \fIversion\fP field is an integer containing the version number of the
+block format. The initial version was 0; the current version is 1. The version
+number will change again in future if additional fields are added, but the
+intention is never to remove any of the existing fields.
+.P
+The \fIcallout_number\fP field contains the number of the callout, as compiled
+into the pattern (that is, the number after ?C for manual callouts, and 255 for
+automatically generated callouts).
+.P
+The \fIoffset_vector\fP field is a pointer to the vector of offsets that was
+passed by the caller to \fBpcre_exec()\fP. The contents can be inspected in
+order to extract substrings that have been matched so far, in the same way as
+for extracting substrings after a match has completed.
+.P
+The \fIsubject\fP and \fIsubject_length\fP fields contain copies of the values
+that were passed to \fBpcre_exec()\fP.
+.P
+The \fIstart_match\fP field contains the offset within the subject at which the
+current match attempt started. If the pattern is not anchored, the callout
+function may be called several times from the same point in the pattern for
+different starting points in the subject.
+.P
+The \fIcurrent_position\fP field contains the offset within the subject of the
+current match pointer.
+.P
+The \fIcapture_top\fP field contains one more than the number of the highest
+numbered captured substring so far. If no substrings have been captured,
+the value of \fIcapture_top\fP is one.
+.P
+The \fIcapture_last\fP field contains the number of the most recently captured
+substring. If no substrings have been captured, its value is -1.
+.P
+The \fIcallout_data\fP field contains a value that is passed to
+\fBpcre_exec()\fP by the caller specifically so that it can be passed back in
+callouts. It is passed in the \fIpcre_callout\fP field of the \fBpcre_extra\fP
+data structure. If no such data was passed, the value of \fIcallout_data\fP in
+a \fBpcre_callout\fP block is NULL. There is a description of the
+\fBpcre_extra\fP structure in the
+.\" HREF
+\fBpcreapi\fP
+.\"
+documentation.
+.P
+The \fIpattern_position\fP field is present from version 1 of the
+\fIpcre_callout\fP structure. It contains the offset to the next item to be
+matched in the pattern string.
+.P
+The \fInext_item_length\fP field is present from version 1 of the
+\fIpcre_callout\fP structure. It contains the length of the next item to be
+matched in the pattern string. When the callout immediately precedes an
+alternation bar, a closing parenthesis, or the end of the pattern, the length
+is zero. When the callout precedes an opening parenthesis, the length is that
+of the entire subpattern.
+.P
+The \fIpattern_position\fP and \fInext_item_length\fP fields are intended to
+help in distinguishing between different automatic callouts, which all have the
+same callout number. However, they are set for all callouts.
+.
+.
+.SH "RETURN VALUES"
+.rs
+.sp
+The external callout function returns an integer to PCRE. If the value is zero,
+matching proceeds as normal. If the value is greater than zero, matching fails
+at the current point, but backtracking to test other matching possibilities
+goes ahead, just as if a lookahead assertion had failed. If the value is less
+than zero, the match is abandoned, and \fBpcre_exec()\fP returns the negative
+value.
+.P
+Negative values should normally be chosen from the set of PCRE_ERROR_xxx
+values. In particular, PCRE_ERROR_NOMATCH forces a standard "no match" failure.
+The error number PCRE_ERROR_CALLOUT is reserved for use by callout functions;
+it will never be used by PCRE itself.
+.P
+.in 0
+Last updated: 09 September 2004
+.br
+Copyright (c) 1997-2004 University of Cambridge.
diff --git a/srclib/pcre/doc/pcrecompat.3 b/srclib/pcre/doc/pcrecompat.3
new file mode 100644
index 0000000000..6a853e072a
--- /dev/null
+++ b/srclib/pcre/doc/pcrecompat.3
@@ -0,0 +1,121 @@
+.TH PCRE 3
+.SH NAME
+PCRE - Perl-compatible regular expressions
+.SH "DIFFERENCES BETWEEN PCRE AND PERL"
+.rs
+.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.8.
+.P
+1. PCRE does not have full UTF-8 support. Details of what it does have are
+given in the
+.\" HTML <a href="pcre.html#utf8support">
+.\" </a>
+section on UTF-8 support
+.\"
+in the main
+.\" HREF
+\fBpcre\fP
+.\"
+page.
+.P
+2. PCRE does not allow repeat quantifiers on lookahead assertions. Perl permits
+them, but they do not mean what you might think. For example, (?!a){3} does
+not assert that the next three characters are not "a". It just asserts that the
+next character is not "a" three times.
+.P
+3. Capturing subpatterns that occur inside negative lookahead assertions are
+counted, but their entries in the offsets vector are never set. Perl sets its
+numerical variables from any such patterns that are matched before the
+assertion fails to match something (thereby succeeding), but only if the
+negative lookahead assertion contains just one branch.
+.P
+4. Though binary zero characters are supported in the subject string, they are
+not allowed in a pattern string because it is passed as a normal C string,
+terminated by zero. The escape sequence \e0 can be used in the pattern to
+represent a binary zero.
+.P
+5. The following Perl escape sequences are not supported: \el, \eu, \eL,
+\eU, and \eN. In fact these are implemented by Perl's general string-handling
+and are not part of its pattern matching engine. If any of these are
+encountered by PCRE, an error is generated.
+.P
+6. The Perl escape sequences \ep, \eP, and \eX are supported only if PCRE is
+built with Unicode character property support. The properties that can be
+tested with \ep and \eP are limited to the general category properties such as
+Lu and Nd.
+.P
+7. PCRE does support the \eQ...\eE escape for quoting substrings. Characters in
+between are treated as literals. This is slightly different from Perl in that $
+and @ are also handled as literals inside the quotes. In Perl, they cause
+variable interpolation (but of course PCRE does not have variables). Note the
+following examples:
+.sp
+ Pattern PCRE matches Perl matches
+.sp
+.\" JOIN
+ \eQabc$xyz\eE abc$xyz abc followed by the
+ contents of $xyz
+ \eQabc\e$xyz\eE abc\e$xyz abc\e$xyz
+ \eQabc\eE\e$\eQxyz\eE abc$xyz abc$xyz
+.sp
+The \eQ...\eE sequence is recognized both inside and outside character classes.
+.P
+8. Fairly obviously, PCRE does not support the (?{code}) and (?p{code})
+constructions. However, there is support for recursive patterns using the
+non-Perl items (?R), (?number), and (?P>name). Also, the PCRE "callout" feature
+allows an external function to be called during pattern matching. See the
+.\" HREF
+\fBpcrecallout\fP
+.\"
+documentation for details.
+.P
+9. There are some differences that are concerned with the settings of captured
+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
+10. PCRE provides some extensions to the Perl regular expression facilities:
+.sp
+(a) Although lookbehind assertions must match fixed length strings, each
+alternative branch of a lookbehind assertion can match a different length of
+string. Perl requires them all to have the same length.
+.sp
+(b) If PCRE_DOLLAR_ENDONLY is set and PCRE_MULTILINE is not set, the $
+meta-character matches only at the very end of the string.
+.sp
+(c) If PCRE_EXTRA is set, a backslash followed by a letter with no special
+meaning is faulted.
+.sp
+(d) If PCRE_UNGREEDY is set, the greediness of the repetition quantifiers is
+inverted, that is, by default they are not greedy, but if followed by a
+question mark they are.
+.sp
+(e) PCRE_ANCHORED can be used at matching time to force a pattern to be tried
+only at the first matching position in the subject string.
+.sp
+(f) The PCRE_NOTBOL, PCRE_NOTEOL, PCRE_NOTEMPTY, and PCRE_NO_AUTO_CAPTURE
+options for \fBpcre_exec()\fP have no Perl equivalents.
+.sp
+(g) The (?R), (?number), and (?P>name) constructs allows for recursive pattern
+matching (Perl can do this using the (?p{code}) construct, which PCRE cannot
+support.)
+.sp
+(h) PCRE supports named capturing substrings, using the Python syntax.
+.sp
+(i) PCRE supports the possessive quantifier "++" syntax, taken from Sun's Java
+package.
+.sp
+(j) The (R) condition, for testing recursion, is a PCRE extension.
+.sp
+(k) The callout facility is PCRE-specific.
+.sp
+(l) The partial matching facility is PCRE-specific.
+.sp
+(m) Patterns compiled by PCRE can be saved and re-used at a later time, even on
+different hosts that have the other endianness.
+.P
+.in 0
+Last updated: 09 September 2004
+.br
+Copyright (c) 1997-2004 University of Cambridge.
diff --git a/srclib/pcre/doc/pcregrep.1 b/srclib/pcre/doc/pcregrep.1
index 5d3151e867..56c37d8725 100644
--- a/srclib/pcre/doc/pcregrep.1
+++ b/srclib/pcre/doc/pcregrep.1
@@ -2,87 +2,129 @@
.SH NAME
pcregrep - a grep with Perl-compatible regular expressions.
.SH SYNOPSIS
-.B pcregrep [-Vcfhilnrsvx] pattern [file] ...
-
-
+.B pcregrep [-Vcfhilnrsuvx] [long options] [pattern] [file1 file2 ...]
+.
.SH DESCRIPTION
-\fBpcregrep\fR searches files for character patterns, in the same way as other
+.rs
+.sp
+\fBpcregrep\fP searches files for character patterns, in the same way as other
grep commands do, but it uses the PCRE regular expression library to support
patterns that are compatible with the regular expressions of Perl 5. See
-\fBpcre(3)\fR for a full description of syntax and semantics.
-
-If no files are specified, \fBpcregrep\fR reads the standard input. By default,
+.\" HREF
+\fBpcrepattern\fP
+.\"
+for a full description of syntax and semantics of the regular expressions that
+PCRE supports.
+.P
+A pattern must be specified on the command line unless the \fB-f\fP option is
+used (see below).
+.P
+If no files are specified, \fBpcregrep\fP reads the standard input. By default,
each line that matches the pattern is copied to the standard output, and if
there is more than one file, the file name is printed before each line of
-output. However, there are options that can change how \fBpcregrep\fR behaves.
-
-Lines are limited to BUFSIZ characters. BUFSIZ is defined in \fB<stdio.h>\fR.
+output. However, there are options that can change how \fBpcregrep\fP behaves.
+.P
+Lines are limited to BUFSIZ characters. BUFSIZ is defined in \fB<stdio.h>\fP.
The newline character is removed from the end of each line before it is matched
against the pattern.
-
-
+.
.SH OPTIONS
+.rs
+.sp
.TP 10
-\fB-V\fR
+\fB-V\fP
Write the version number of the PCRE library being used to the standard error
stream.
.TP
-\fB-c\fR
+\fB-c\fP
Do not print individual lines; instead just print a count of the number of
lines that would otherwise have been printed. If several files are given, a
count is printed for each of them.
.TP
-\fB-f\fIfilename\fR
-Read patterns from the file, one per line, and match all patterns against each
-line. There is a maximum of 100 patterns. Trailing white space is removed, and
-blank lines are ignored. An empty file contains no patterns and therefore
-matches nothing.
+\fB-f\fP\fIfilename\fP
+Read a number of patterns from the file, one per line, and match all of them
+against each line of input. A line is output if any of the patterns match it.
+When \fB-f\fP is used, no pattern is taken from the command line; all arguments
+are treated as file names. There is a maximum of 100 patterns. Trailing white
+space is removed, and blank lines are ignored. An empty file contains no
+patterns and therefore matches nothing.
.TP
-\fB-h\fR
+\fB-h\fP
Suppress printing of filenames when searching multiple files.
.TP
-\fB-i\fR
+\fB-i\fP
Ignore upper/lower case distinctions during comparisons.
.TP
-\fB-l\fR
+\fB-l\fP
Instead of printing lines from the files, just print the names of the files
containing lines that would have been printed. Each file name is printed
once, on a separate line.
.TP
-\fB-n\fR
+\fB-n\fP
Precede each line by its line number in the file.
.TP
-\fB-r\fR
+\fB-r\fP
If any file is a directory, recursively scan the files it contains. Without
-\fB-r\fR a directory is scanned as a normal file.
+\fB-r\fP a directory is scanned as a normal file.
.TP
-\fB-s\fR
+\fB-s\fP
Work silently, that is, display nothing except error messages.
The exit status indicates whether any matches were found.
.TP
-\fB-v\fR
-Invert the sense of the match, so that lines which do \fInot\fR match the
+\fB-u\fP
+Operate in UTF-8 mode. This option is available only if PCRE has been compiled
+with UTF-8 support. Both the pattern and each subject line must be valid
+strings of UTF-8 characters.
+.TP
+\fB-v\fP
+Invert the sense of the match, so that lines which do \fInot\fP match the
pattern are now the ones that are found.
.TP
-\fB-x\fR
+\fB-x\fP
Force the pattern to be anchored (it must start matching at the beginning of
the line) and in addition, require it to match the entire line. This is
equivalent to having ^ and $ characters at the start and end of each
alternative branch in the regular expression.
-
-
-.SH SEE ALSO
-\fBpcre(3)\fR, Perl 5 documentation
-
-
+.
+.SH "LONG OPTIONS"
+.rs
+.sp
+Long forms of all the options are available, as in GNU grep. They are shown in
+the following table:
+.sp
+ -c --count
+ -h --no-filename
+ -i --ignore-case
+ -l --files-with-matches
+ -n --line-number
+ -r --recursive
+ -s --no-messages
+ -u --utf-8
+ -V --version
+ -v --invert-match
+ -x --line-regex
+ -x --line-regexp
+.sp
+In addition, --file=\fIfilename\fP is equivalent to -f\fIfilename\fP, and
+--help shows the list of options and then exits.
+.
.SH DIAGNOSTICS
+.rs
+.sp
Exit status is 0 if any matches were found, 1 if no matches were found, and 2
for syntax errors or inacessible files (even if matches were found).
-
-
+.
+.
.SH AUTHOR
+.rs
+.sp
Philip Hazel <ph10@cam.ac.uk>
-
-Last updated: 15 August 2001
.br
-Copyright (c) 1997-2001 University of Cambridge.
+University Computing Service
+.br
+Cambridge CB2 3QG, England.
+.P
+.in 0
+Last updated: 09 September 2004
+.br
+Copyright (c) 1997-2004 University of Cambridge.
diff --git a/srclib/pcre/doc/pcregrep.txt b/srclib/pcre/doc/pcregrep.txt
index 1600228402..1dca003c8b 100644
--- a/srclib/pcre/doc/pcregrep.txt
+++ b/srclib/pcre/doc/pcregrep.txt
@@ -1,101 +1,122 @@
-NAME
- pcregrep - a grep with Perl-compatible regular expressions.
+PCREGREP(1) PCREGREP(1)
-SYNOPSIS
- pcregrep [-Vcfhilnrsvx] pattern [file] ...
+NAME
+ pcregrep - a grep with Perl-compatible regular expressions.
+SYNOPSIS
+ pcregrep [-Vcfhilnrsuvx] [long options] [pattern] [file1 file2 ...]
DESCRIPTION
- pcregrep searches files for character patterns, in the same
- way as other grep commands do, but it uses the PCRE regular
- expression library to support patterns that are compatible
- with the regular expressions of Perl 5. See pcre(3) for a
- full description of syntax and semantics.
- If no files are specified, pcregrep reads the standard
- input. By default, each line that matches the pattern is
- copied to the standard output, and if there is more than one
- file, the file name is printed before each line of output.
- However, there are options that can change how pcregrep
- behaves.
+ pcregrep searches files for character patterns, in the same way as
+ other grep commands do, but it uses the PCRE regular expression library
+ to support patterns that are compatible with the regular expressions of
+ Perl 5. See pcrepattern for a full description of syntax and semantics
+ of the regular expressions that PCRE supports.
- Lines are limited to BUFSIZ characters. BUFSIZ is defined in
- <stdio.h>. The newline character is removed from the end of
- each line before it is matched against the pattern.
+ A pattern must be specified on the command line unless the -f option is
+ used (see below).
+ If no files are specified, pcregrep reads the standard input. By
+ default, each line that matches the pattern is copied to the standard
+ output, and if there is more than one file, the file name is printed
+ before each line of output. However, there are options that can change
+ how pcregrep behaves.
+
+ Lines are limited to BUFSIZ characters. BUFSIZ is defined in <stdio.h>.
+ The newline character is removed from the end of each line before it is
+ matched against the pattern.
OPTIONS
- -V Write the version number of the PCRE library being
- used to the standard error stream.
- -c Do not print individual lines; instead just print
- a count of the number of lines that would other-
- wise have been printed. If several files are
- given, a count is printed for each of them.
- -ffilename
- Read patterns from the file, one per line, and
- match all patterns against each line. There is a
- maximum of 100 patterns. Trailing white space is
- removed, and blank lines are ignored. An empty
- file contains no patterns and therefore matches
- nothing.
+ -V Write the version number of the PCRE library being used to
+ the standard error stream.
+
+ -c Do not print individual lines; instead just print a count of
+ the number of lines that would otherwise have been printed.
+ If several files are given, a count is printed for each of
+ them.
- -h Suppress printing of filenames when searching mul-
- tiple files.
+ -ffilename
+ Read a number of patterns from the file, one per line, and
+ match all of them against each line of input. A line is out-
+ put if any of the patterns match it. When -f is used, no
+ pattern is taken from the command line; all arguments are
+ treated as file names. There is a maximum of 100 patterns.
+ Trailing white space is removed, and blank lines are ignored.
+ An empty file contains no patterns and therefore matches
+ nothing.
- -i Ignore upper/lower case distinctions during com-
- parisons.
+ -h Suppress printing of filenames when searching multiple files.
- -l Instead of printing lines from the files, just
+ -i Ignore upper/lower case distinctions during comparisons.
- print the names of the files containing lines that
- would have been printed. Each file name is printed
- once, on a separate line.
+ -l Instead of printing lines from the files, just print the
+ names of the files containing lines that would have been
+ printed. Each file name is printed once, on a separate line.
- -n Precede each line by its line number in the file.
+ -n Precede each line by its line number in the file.
- -r If any file is a directory, recursively scan the
- files it contains. Without -r a directory is
- scanned as a normal file.
+ -r If any file is a directory, recursively scan the files it
+ contains. Without -r a directory is scanned as a normal file.
- -s Work silently, that is, display nothing except
- error messages. The exit status indicates whether
- any matches were found.
+ -s Work silently, that is, display nothing except error mes-
+ sages. The exit status indicates whether any matches were
+ found.
- -v Invert the sense of the match, so that lines which
- do not match the pattern are now the ones that are
- found.
+ -u Operate in UTF-8 mode. This option is available only if PCRE
+ has been compiled with UTF-8 support. Both the pattern and
+ each subject line must be valid strings of UTF-8 characters.
- -x Force the pattern to be anchored (it must start
- matching at the beginning of the line) and in
- addition, require it to match the entire line.
- This is equivalent to having ^ and $ characters at
- the start and end of each alternative branch in
- the regular expression.
+ -v Invert the sense of the match, so that lines which do not
+ match the pattern are now the ones that are found.
+ -x Force the pattern to be anchored (it must start matching at
+ the beginning of the line) and in addition, require it to
+ match the entire line. This is equivalent to having ^ and $
+ characters at the start and end of each alternative branch in
+ the regular expression.
-SEE ALSO
- pcre(3), Perl 5 documentation
+LONG OPTIONS
+ Long forms of all the options are available, as in GNU grep. They are
+ shown in the following table:
+ -c --count
+ -h --no-filename
+ -i --ignore-case
+ -l --files-with-matches
+ -n --line-number
+ -r --recursive
+ -s --no-messages
+ -u --utf-8
+ -V --version
+ -v --invert-match
+ -x --line-regex
+ -x --line-regexp
+ In addition, --file=filename is equivalent to -ffilename, and --help
+ shows the list of options and then exits.
DIAGNOSTICS
- Exit status is 0 if any matches were found, 1 if no matches
- were found, and 2 for syntax errors or inacessible files
- (even if matches were found).
+ Exit status is 0 if any matches were found, 1 if no matches were found,
+ and 2 for syntax errors or inacessible files (even if matches were
+ found).
AUTHOR
- Philip Hazel <ph10@cam.ac.uk>
- Last updated: 15 August 2001
- Copyright (c) 1997-2001 University of Cambridge.
+ Philip Hazel <ph10@cam.ac.uk>
+ University Computing Service
+ Cambridge CB2 3QG, England.
+
+Last updated: 09 September 2004
+Copyright (c) 1997-2004 University of Cambridge.
diff --git a/srclib/pcre/doc/pcrepartial.3 b/srclib/pcre/doc/pcrepartial.3
new file mode 100644
index 0000000000..3489c18195
--- /dev/null
+++ b/srclib/pcre/doc/pcrepartial.3
@@ -0,0 +1,95 @@
+.TH PCRE 3
+.SH NAME
+PCRE - Perl-compatible regular expressions
+.SH "PARTIAL MATCHING IN PCRE"
+.rs
+.sp
+In normal use of PCRE, if the subject string that is passed to
+\fBpcre_exec()\fP matches as far as it goes, but is too short to match the
+entire pattern, PCRE_ERROR_NOMATCH is returned. There are circumstances where
+it might be helpful to distinguish this case from other cases in which there is
+no match.
+.P
+Consider, for example, an application where a human is required to type in data
+for a field with specific formatting requirements. An example might be a date
+in the form \fIddmmmyy\fP, defined by this pattern:
+.sp
+ ^\ed?\ed(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\ed\ed$
+.sp
+If the application sees the user's keystrokes one by one, and can check that
+what has been typed so far is potentially valid, it is able to raise an error
+as soon as a mistake is made, possibly beeping and not reflecting the
+character that has been typed. This immediate feedback is likely to be a better
+user interface than a check that is delayed until the entire string has been
+entered.
+.P
+PCRE supports the concept of partial matching by means of the PCRE_PARTIAL
+option, which can be set when calling \fBpcre_exec()\fP. When this is done, the
+return code PCRE_ERROR_NOMATCH is converted into PCRE_ERROR_PARTIAL if at any
+time during the matching process the entire subject string matched part of the
+pattern. No captured data is set when this occurs.
+.P
+Using PCRE_PARTIAL disables one of PCRE's optimizations. PCRE remembers the
+last literal byte in a pattern, and abandons matching immediately if such a
+byte is not present in the subject string. This optimization cannot be used
+for a subject string that might match only partially.
+.
+.
+.SH "RESTRICTED PATTERNS FOR PCRE_PARTIAL"
+.rs
+.sp
+Because of the way certain internal optimizations are implemented in PCRE, the
+PCRE_PARTIAL option cannot be used with all patterns. Repeated single
+characters such as
+.sp
+ a{2,4}
+.sp
+and repeated single metasequences such as
+.sp
+ \ed+
+.sp
+are not permitted if the maximum number of occurrences is greater than one.
+Optional items such as \ed? (where the maximum is one) are permitted.
+Quantifiers with any values are permitted after parentheses, so the invalid
+examples above can be coded thus:
+.sp
+ (a){2,4}
+ (\ed)+
+.sp
+These constructions run more slowly, but for the kinds of application that are
+envisaged for this facility, this is not felt to be a major restriction.
+.P
+If PCRE_PARTIAL is set for a pattern that does not conform to the restrictions,
+\fBpcre_exec()\fP returns the error code PCRE_ERROR_BADPARTIAL (-13).
+.
+.
+.SH "EXAMPLE OF PARTIAL MATCHING USING PCRETEST"
+.rs
+.sp
+If the escape sequence \eP is present in a \fBpcretest\fP data line, the
+PCRE_PARTIAL flag is used for the match. Here is a run of \fBpcretest\fP that
+uses the date example quoted above:
+.sp
+ re> /^\ed?\ed(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\ed\ed$/
+ data> 25jun04\P
+ 0: 25jun04
+ 1: jun
+ data> 25dec3\P
+ Partial match
+ data> 3ju\P
+ Partial match
+ data> 3juj\P
+ No match
+ data> j\P
+ No match
+.sp
+The first data string is matched completely, so \fBpcretest\fP shows the
+matched substrings. The remaining four strings do not match the complete
+pattern, but the first two are partial matches.
+.
+.
+.P
+.in 0
+Last updated: 08 September 2004
+.br
+Copyright (c) 1997-2004 University of Cambridge.
diff --git a/srclib/pcre/doc/pcrepattern.3 b/srclib/pcre/doc/pcrepattern.3
new file mode 100644
index 0000000000..6f6a21ab1a
--- /dev/null
+++ b/srclib/pcre/doc/pcrepattern.3
@@ -0,0 +1,1456 @@
+.TH PCRE 3
+.SH NAME
+PCRE - Perl-compatible regular expressions
+.SH "PCRE REGULAR EXPRESSION DETAILS"
+.rs
+.sp
+The syntax and semantics of the regular expressions supported by PCRE are
+described below. Regular expressions are also described in the Perl
+documentation and in a number of books, some of which have copious examples.
+Jeffrey Friedl's "Mastering Regular Expressions", published by O'Reilly, covers
+regular expressions in great detail. This description of PCRE's regular
+expressions is intended as reference material.
+.P
+The original operation of PCRE was on strings of one-byte characters. However,
+there is now also support for UTF-8 character strings. To use this, you must
+build PCRE to include UTF-8 support, and then call \fBpcre_compile()\fP with
+the PCRE_UTF8 option. How this affects pattern matching is mentioned in several
+places below. There is also a summary of UTF-8 features in the
+.\" HTML <a href="pcre.html#utf8support">
+.\" </a>
+section on UTF-8 support
+.\"
+in the main
+.\" HREF
+\fBpcre\fP
+.\"
+page.
+.P
+A regular expression is a pattern that is matched against a subject string from
+left to right. Most characters stand for themselves in a pattern, and match the
+corresponding characters in the subject. As a trivial example, the pattern
+.sp
+ The quick brown fox
+.sp
+matches a portion of a subject string that is identical to itself. The power of
+regular expressions comes from the ability to include alternatives and
+repetitions in the pattern. These are encoded in the pattern by the use of
+\fImetacharacters\fP, which do not stand for themselves but instead are
+interpreted in some special way.
+.P
+There are two different sets of metacharacters: those that are recognized
+anywhere in the pattern except within square brackets, and those that are
+recognized in square brackets. Outside square brackets, the metacharacters are
+as follows:
+.sp
+ \e general escape character with several uses
+ ^ assert start of string (or line, in multiline mode)
+ $ assert end of string (or line, in multiline mode)
+ . match any character except newline (by default)
+ [ start character class definition
+ | start of alternative branch
+ ( start subpattern
+ ) end subpattern
+ ? extends the meaning of (
+ also 0 or 1 quantifier
+ also quantifier minimizer
+ * 0 or more quantifier
+ + 1 or more quantifier
+ also "possessive quantifier"
+ { start min/max quantifier
+.sp
+Part of a pattern that is in square brackets is called a "character class". In
+a character class the only metacharacters are:
+.sp
+ \e general escape character
+ ^ negate the class, but only if the first character
+ - indicates character range
+.\" JOIN
+ [ POSIX character class (only if followed by POSIX
+ syntax)
+ ] terminates the character class
+.sp
+The following sections describe the use of each of the metacharacters.
+.
+.SH BACKSLASH
+.rs
+.sp
+The backslash character has several uses. Firstly, if it is followed by a
+non-alphanumeric character, it takes away any special meaning that character may
+have. This use of backslash as an escape character applies both inside and
+outside character classes.
+.P
+For example, if you want to match a * character, you write \e* in the pattern.
+This escaping action applies whether or not the following character would
+otherwise be interpreted as a metacharacter, so it is always safe to precede a
+non-alphanumeric with backslash to specify that it stands for itself. In
+particular, if you want to match a backslash, you write \e\e.
+.P
+If a pattern is compiled with the PCRE_EXTENDED option, whitespace in the
+pattern (other than in a character class) and characters between a # outside
+a character class and the next newline character are ignored. An escaping
+backslash can be used to include a whitespace or # character as part of the
+pattern.
+.P
+If you want to remove the special meaning from a sequence of characters, you
+can do so by putting them between \eQ and \eE. This is different from Perl in
+that $ and @ are handled as literals in \eQ...\eE sequences in PCRE, whereas in
+Perl, $ and @ cause variable interpolation. Note the following examples:
+.sp
+ Pattern PCRE matches Perl matches
+.sp
+.\" JOIN
+ \eQabc$xyz\eE abc$xyz abc followed by the
+ contents of $xyz
+ \eQabc\e$xyz\eE abc\e$xyz abc\e$xyz
+ \eQabc\eE\e$\eQxyz\eE abc$xyz abc$xyz
+.sp
+The \eQ...\eE sequence is recognized both inside and outside character classes.
+.
+.
+.\" HTML <a name="digitsafterbackslash"></a>
+.SS "Non-printing characters"
+.rs
+.sp
+A second use of backslash provides a way of encoding non-printing characters
+in patterns in a visible manner. There is no restriction on the appearance of
+non-printing characters, apart from the binary zero that terminates a pattern,
+but when a pattern is being prepared by text editing, it is usually easier to
+use one of the following escape sequences than the binary character it
+represents:
+.sp
+ \ea alarm, that is, the BEL character (hex 07)
+ \ecx "control-x", where x is any character
+ \ee escape (hex 1B)
+ \ef formfeed (hex 0C)
+ \en newline (hex 0A)
+ \er carriage return (hex 0D)
+ \et tab (hex 09)
+ \eddd character with octal code ddd, or backreference
+ \exhh character with hex code hh
+ \ex{hhh..} character with hex code hhh... (UTF-8 mode only)
+.sp
+The precise effect of \ecx is as follows: if x is a lower case letter, it
+is converted to upper case. Then bit 6 of the character (hex 40) is inverted.
+Thus \ecz becomes hex 1A, but \ec{ becomes hex 3B, while \ec; becomes hex
+7B.
+.P
+After \ex, from zero to two hexadecimal digits are read (letters can be in
+upper or lower case). In UTF-8 mode, any number of hexadecimal digits may
+appear between \ex{ and }, but the value of the character code must be less
+than 2**31 (that is, the maximum hexadecimal value is 7FFFFFFF). If characters
+other than hexadecimal digits appear between \ex{ and }, or if there is no
+terminating }, this form of escape is not recognized. Instead, the initial
+\ex will be interpreted as a basic hexadecimal escape, with no following
+digits, giving a character whose value is zero.
+.P
+Characters whose value is less than 256 can be defined by either of the two
+syntaxes for \ex when PCRE is in UTF-8 mode. There is no difference in the
+way they are handled. For example, \exdc is exactly the same as \ex{dc}.
+.P
+After \e0 up to two further octal digits are read. In both cases, if there
+are fewer than two digits, just those that are present are used. Thus the
+sequence \e0\ex\e07 specifies two binary zeros followed by a BEL character
+(code value 7). Make sure you supply two digits after the initial zero if the
+pattern character that follows is itself an octal digit.
+.P
+The handling of a backslash followed by a digit other than 0 is complicated.
+Outside a character class, PCRE reads it and any following digits as a decimal
+number. If the number is less than 10, or if there have been at least that many
+previous capturing left parentheses in the expression, the entire sequence is
+taken as a \fIback reference\fP. A description of how this works is given
+.\" HTML <a href="#backreferences">
+.\" </a>
+later,
+.\"
+following the discussion of
+.\" HTML <a href="#subpattern">
+.\" </a>
+parenthesized subpatterns.
+.\"
+.P
+Inside a character class, or if the decimal number is greater than 9 and there
+have not been that many capturing subpatterns, PCRE re-reads up to three octal
+digits following the backslash, and generates a single byte from the least
+significant 8 bits of the value. Any subsequent digits stand for themselves.
+For example:
+.sp
+ \e040 is another way of writing a space
+.\" JOIN
+ \e40 is the same, provided there are fewer than 40
+ previous capturing subpatterns
+ \e7 is always a back reference
+.\" JOIN
+ \e11 might be a back reference, or another way of
+ writing a tab
+ \e011 is always a tab
+ \e0113 is a tab followed by the character "3"
+.\" JOIN
+ \e113 might be a back reference, otherwise the
+ character with octal code 113
+.\" JOIN
+ \e377 might be a back reference, otherwise
+ the byte consisting entirely of 1 bits
+.\" JOIN
+ \e81 is either a back reference, or a binary zero
+ followed by the two characters "8" and "1"
+.sp
+Note that octal values of 100 or greater must not be introduced by a leading
+zero, because no more than three octal digits are ever read.
+.P
+All the sequences that define a single byte value or a single UTF-8 character
+(in UTF-8 mode) 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 sequence \eX is interpreted as the
+character "X". Outside a character class, these sequences have different
+meanings
+.\" HTML <a href="#uniextseq">
+.\" </a>
+(see below).
+.\"
+.
+.
+.SS "Generic character types"
+.rs
+.sp
+The third use of backslash is for specifying generic character types. The
+following are always recognized:
+.sp
+ \ed any decimal digit
+ \eD any character that is not a decimal digit
+ \es any whitespace character
+ \eS any character that is not a whitespace character
+ \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.
+.P
+These character type 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
+there is no character to match.
+.P
+For compatibility with Perl, \es does not match the VT character (code 11).
+This makes it different from the the POSIX "space" class. The \es characters
+are HT (9), LF (10), FF (12), CR (13), and space (32).
+.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 the "fr_FR" (French) locale, some character codes
+greater than 128 are used for accented letters, and these are matched by \ew.
+.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.
+.
+.
+.\" HTML <a name="uniextseq"></a>
+.SS Unicode character properties
+.rs
+.sp
+When PCRE is built with Unicode character property support, three additional
+escape sequences to match generic character types are available when UTF-8 mode
+is selected. They are:
+.sp
+ \ep{\fIxx\fP} a character with the \fIxx\fP property
+ \eP{\fIxx\fP} a character without the \fIxx\fP property
+ \eX an extended Unicode sequence
+.sp
+The property names represented by \fIxx\fP above are limited to the
+Unicode general category properties. Each character has exactly one such
+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 properties
+that start with that letter. In this case, in the absence of negation, the
+curly brackets in the escape sequence are optional; these two examples have
+the same effect:
+.sp
+ \ep{L}
+ \epL
+.sp
+The following property codes are supported:
+.sp
+ C Other
+ Cc Control
+ Cf Format
+ Cn Unassigned
+ Co Private use
+ Cs Surrogate
+.sp
+ L Letter
+ Ll Lower case letter
+ Lm Modifier letter
+ Lo Other letter
+ Lt Title case letter
+ Lu Upper case letter
+.sp
+ M Mark
+ Mc Spacing mark
+ Me Enclosing mark
+ Mn Non-spacing mark
+.sp
+ N Number
+ Nd Decimal number
+ Nl Letter number
+ No Other number
+.sp
+ P Punctuation
+ Pc Connector punctuation
+ Pd Dash punctuation
+ Pe Close punctuation
+ Pf Final punctuation
+ Pi Initial punctuation
+ Po Other punctuation
+ Ps Open punctuation
+.sp
+ S Symbol
+ Sc Currency symbol
+ Sk Modifier symbol
+ Sm Mathematical symbol
+ So Other symbol
+.sp
+ Z Separator
+ Zl Line separator
+ Zp Paragraph separator
+ Zs Space separator
+.sp
+Extended properties such as "Greek" or "InMusicalSymbols" are not supported by
+PCRE.
+.P
+Specifying caseless matching does not affect these escape sequences. For
+example, \ep{Lu} always matches only upper case letters.
+.P
+The \eX escape matches any number of Unicode characters that form an extended
+Unicode sequence. \eX is equivalent to
+.sp
+ (?>\ePM\epM*)
+.sp
+That is, it matches a character without the "mark" property, followed by zero
+or more characters with the "mark" property, and treats the sequence as an
+atomic group
+.\" HTML <a href="#atomicgroup">
+.\" </a>
+(see below).
+.\"
+Characters with the "mark" property are typically accents that affect the
+preceding character.
+.P
+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.
+.
+.
+.\" HTML <a name="smallassertions"></a>
+.SS "Simple assertions"
+.rs
+.sp
+The fourth use of backslash is for certain simple assertions. An assertion
+specifies a condition that has to be met at a particular point in a match,
+without consuming any characters from the subject string. The use of
+subpatterns for more complicated assertions is described
+.\" HTML <a href="#bigassertions">
+.\" </a>
+below.
+.\"
+The backslashed
+assertions are:
+.sp
+ \eb matches at a word boundary
+ \eB matches when not at a word boundary
+ \eA matches at start of subject
+ \eZ matches at end of subject or before newline at end
+ \ez matches at end of subject
+ \eG matches at first matching position in 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).
+.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.
+.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
+start and end of the subject string, whatever options are set. Thus, they are
+independent of multiline mode. These three assertions 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 \fIstartoffset\fP
+argument of \fBpcre_exec()\fP is non-zero, indicating that matching is to start
+at a point other than the beginning of the subject, \eA can never match. The
+difference between \eZ and \ez is that \eZ matches before a newline that is the
+last character of the string as well as at the end of the string, whereas \ez
+matches only at the end.
+.P
+The \eG assertion is true only when the current matching position is at the
+start point of the match, as specified by the \fIstartoffset\fP argument of
+\fBpcre_exec()\fP. It differs from \eA when the value of \fIstartoffset\fP is
+non-zero. By calling \fBpcre_exec()\fP multiple times with appropriate
+arguments, you can mimic Perl's /g option, and it is in this kind of
+implementation where \eG can be useful.
+.P
+Note, however, that PCRE's interpretation of \eG, 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 at a time, it cannot
+reproduce this behaviour.
+.P
+If all the alternatives of a pattern begin with \eG, the expression is anchored
+to the starting match position, and the "anchored" flag is set in the compiled
+regular expression.
+.
+.
+.SH "CIRCUMFLEX AND DOLLAR"
+.rs
+.sp
+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 \fIstartoffset\fP argument of
+\fBpcre_exec()\fP is non-zero, circumflex can never match if the PCRE_MULTILINE
+option is unset. Inside a character class, circumflex has an entirely different
+meaning
+.\" HTML <a href="#characterclass">
+.\" </a>
+(see below).
+.\"
+.P
+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 subject, it is said to be an
+"anchored" pattern. (There are also other constructs that can cause a pattern
+to be anchored.)
+.P
+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
+character that is the last character in 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 appears.
+Dollar has no special meaning in a character class.
+.P
+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 \eZ assertion.
+.P
+The meanings of the circumflex and dollar characters are changed if the
+PCRE_MULTILINE option is set. When this is the case, they match immediately
+after and immediately before an internal newline character, respectively, in
+addition to matching at the start and end of the subject string. For example,
+the pattern /^abc$/ matches the subject string "def\enabc" (where \en
+represents a newline character) 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 \fIstartoffset\fP argument of \fBpcre_exec()\fP
+is non-zero. The PCRE_DOLLAR_ENDONLY option is ignored if PCRE_MULTILINE is
+set.
+.P
+Note that the sequences \eA, \eZ, and \ez can be used to match the start and
+end of the subject in both modes, and if all branches of a pattern start with
+\eA it is always anchored, whether PCRE_MULTILINE is set or not.
+.
+.
+.SH "FULL STOP (PERIOD, DOT)"
+.rs
+.sp
+Outside a character class, a dot in the pattern matches any one character in
+the subject, including a non-printing character, but not (by default) newline.
+In UTF-8 mode, a dot matches any UTF-8 character, which might be more than one
+byte long, except (by default) newline. If the PCRE_DOTALL option is set,
+dots match newlines as well. The handling of dot is entirely independent of the
+handling of circumflex and dollar, the only relationship being that they both
+involve newline characters. Dot has no special meaning in a character class.
+.
+.
+.SH "MATCHING A SINGLE BYTE"
+.rs
+.sp
+Outside a character class, the escape sequence \eC matches any one byte, both
+in and out of UTF-8 mode. Unlike a dot, it can match a newline. The feature is
+provided in Perl in order to match individual bytes in UTF-8 mode. Because it
+breaks up UTF-8 characters into individual bytes, what remains in the string
+may be a malformed UTF-8 string. For this reason, the \eC escape sequence is
+best avoided.
+.P
+PCRE does not allow \eC to appear in lookbehind assertions
+.\" HTML <a href="#lookbehind">
+.\" </a>
+(described below),
+.\"
+because in UTF-8 mode this would make it impossible to calculate the length of
+the lookbehind.
+.
+.
+.\" HTML <a name="characterclass"></a>
+.SH "SQUARE BRACKETS AND CHARACTER CLASSES"
+.rs
+.sp
+An opening square bracket introduces a character class, terminated by a closing
+square bracket. A closing square bracket on its own is not special. 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 present) or
+escaped with a backslash.
+.P
+A character class matches a single character in the subject. In UTF-8 mode, the
+character may occupy more than one byte. A matched character must be in the set
+of characters defined by the class, unless the first character in the class
+definition is a circumflex, in which case the subject character must not be in
+the set defined by the class. If a circumflex is actually required as a member
+of the class, ensure it is not the first character, or escape it with a
+backslash.
+.P
+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 consumes a character from the subject
+string, and therefore it fails if the current pointer is at the end of the
+string.
+.P
+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 \ex{ escaping mechanism.
+.P
+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. When running 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.
+.P
+The newline character is never treated in any special way in character classes,
+whatever the setting of the PCRE_DOTALL or PCRE_MULTILINE options is. A class
+such as [^a] will always match a newline.
+.P
+The minus (hyphen) character can be used to specify a range of characters 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.
+.P
+It is not possible to have the literal character "]" as the end character 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-\e]46] is interpreted 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.
+.P
+Ranges operate in the collating sequence of character values. They can also be
+used for characters specified numerically, for example [\e000-\e037]. In UTF-8
+mode, ranges can include characters whose values are greater than 255, for
+example [\ex{100}-\ex{2ff}].
+.P
+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
+[][\e\e^_`wxyzabc], matched caselessly, and in non-UTF-8 mode, if character
+tables for the "fr_FR" locale are in use, [\exc8-\excb] 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.
+.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.
+.P
+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.
+.
+.
+.SH "POSIX CHARACTER CLASSES"
+.rs
+.sp
+Perl supports the POSIX notation for character classes. This uses names
+enclosed by [: and :] within the enclosing square brackets. PCRE also supports
+this notation. For example,
+.sp
+ [01[:alpha:]%]
+.sp
+matches "0", "1", any alphabetic character, or "%". The supported class names
+are
+.sp
+ alnum letters and digits
+ alpha letters
+ ascii character codes 0 - 127
+ blank space or tab only
+ cntrl control characters
+ digit decimal digits (same as \ed)
+ graph printing characters, excluding space
+ lower lower case letters
+ print printing characters, including space
+ punct printing characters, excluding letters and digits
+ space white space (not quite the same as \es)
+ upper upper case letters
+ word "word" characters (same as \ew)
+ xdigit hexadecimal digits
+.sp
+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 \es, which does not include VT (for Perl
+compatibility).
+.P
+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,
+.sp
+ [12[:^digit:]]
+.sp
+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.
+.P
+In UTF-8 mode, characters with values greater than 128 do not match any of
+the POSIX character classes.
+.
+.
+.SH "VERTICAL BAR"
+.rs
+.sp
+Vertical bar characters are used to separate alternative patterns. For example,
+the pattern
+.sp
+ gilbert|sullivan
+.sp
+matches either "gilbert" or "sullivan". Any number of alternatives may appear,
+and an empty alternative is permitted (matching the empty string).
+The matching process tries each alternative in turn, from left to right,
+and the first one that succeeds is used. If the alternatives are within a
+subpattern
+.\" HTML <a href="#subpattern">
+.\" </a>
+(defined below),
+.\"
+"succeeds" means matching the rest of the main pattern as well as the
+alternative in the subpattern.
+.
+.
+.SH "INTERNAL OPTION SETTING"
+.rs
+.sp
+The settings of the PCRE_CASELESS, PCRE_MULTILINE, PCRE_DOTALL, and
+PCRE_EXTENDED options can be changed from within the pattern by a sequence of
+Perl option letters enclosed between "(?" and ")". The option letters are
+.sp
+ i for PCRE_CASELESS
+ m for PCRE_MULTILINE
+ s for PCRE_DOTALL
+ x for PCRE_EXTENDED
+.sp
+For example, (?im) sets caseless, multiline matching. It is also possible to
+unset these options by preceding the letter with a hyphen, and a combined
+setting and unsetting such as (?im-sx), which sets PCRE_CASELESS and
+PCRE_MULTILINE while unsetting PCRE_DOTALL and PCRE_EXTENDED, is also
+permitted. If a letter appears both before and after the hyphen, the option is
+unset.
+.P
+When an option change occurs at top level (that is, not inside subpattern
+parentheses), the change applies to the remainder of the pattern that follows.
+If the change is placed right at the start of a pattern, PCRE extracts it into
+the global options (and it will therefore show up in data extracted by the
+\fBpcre_fullinfo()\fP function).
+.P
+An option change within a subpattern affects only that part of the current
+pattern that follows it, so
+.sp
+ (a(?i)b)c
+.sp
+matches abc and aBc and no other strings (assuming PCRE_CASELESS is not used).
+By this means, options can be made to have different settings in different
+parts of the pattern. Any changes made in one alternative do carry on
+into subsequent branches within the same subpattern. For example,
+.sp
+ (a(?i)b|c)
+.sp
+matches "ab", "aB", "c", and "C", even though when matching "C" the first
+branch is abandoned before the option setting. This is because the effects of
+option settings happen at compile time. There would be some very weird
+behaviour otherwise.
+.P
+The PCRE-specific options PCRE_UNGREEDY and PCRE_EXTRA can be changed in the
+same way as the Perl-compatible options by using the characters U and X
+respectively. The (?X) flag setting is special in that it must always occur
+earlier in the pattern than any of the additional features it turns on, even
+when it is at top level. It is best to put it at the start.
+.
+.
+.\" HTML <a name="subpattern"></a>
+.SH SUBPATTERNS
+.rs
+.sp
+Subpatterns are delimited by parentheses (round brackets), which can be nested.
+Turning part of a pattern into a subpattern does two things:
+.sp
+1. It localizes a set of alternatives. For example, the pattern
+.sp
+ cat(aract|erpillar|)
+.sp
+matches one of the words "cat", "cataract", or "caterpillar". Without the
+parentheses, it would match "cataract", "erpillar" or the empty string.
+.sp
+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 \fIovector\fP argument of
+\fBpcre_exec()\fP. Opening parentheses are counted from left to right (starting
+from 1) to obtain numbers for the capturing subpatterns.
+.P
+For example, if the string "the red king" is matched against the pattern
+.sp
+ the ((red|white) (king|queen))
+.sp
+the captured substrings are "red king", "red", and "king", and are numbered 1,
+2, and 3, respectively.
+.P
+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 capturing, 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
+.sp
+ the ((?:red|white) (king|queen))
+.sp
+the captured substrings are "white queen" and "queen", and are numbered 1 and
+2. The maximum number of capturing subpatterns is 65535, and the maximum depth
+of nesting of all subpatterns, both capturing and non-capturing, is 200.
+.P
+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
+.sp
+ (?i:saturday|sunday)
+ (?:(?i)saturday|sunday)
+.sp
+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 "Saturday".
+.
+.
+.SH "NAMED SUBPATTERNS"
+.rs
+.sp
+Identifying capturing parentheses by number is simple, but it can be very hard
+to keep track of the numbers in complicated regular expressions. Furthermore,
+if an expression is modified, the numbers may change. To help with this
+difficulty, PCRE supports the naming of subpatterns, something that Perl does
+not provide. The Python syntax (?P<name>...) is used. Names consist of
+alphanumeric characters and underscores, and must be unique within a pattern.
+.P
+Named capturing parentheses are still allocated numbers as well as names. 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. For further details see the
+.\" HREF
+\fBpcreapi\fP
+.\"
+documentation.
+.
+.
+.SH REPETITION
+.rs
+.sp
+Repetition is specified by quantifiers, which can follow any of the following
+items:
+.sp
+ a literal data character
+ the . metacharacter
+ the \eC escape sequence
+ the \eX escape sequence (in UTF-8 mode with Unicode properties)
+ an escape such as \ed that matches a single character
+ a character class
+ a back reference (see next section)
+ a parenthesized subpattern (unless it is an assertion)
+.sp
+The general repetition quantifier specifies a minimum and maximum number 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:
+.sp
+ z{2,4}
+.sp
+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
+.sp
+ [aeiou]{3,}
+.sp
+matches at least 3 successive vowels, but may match many more, while
+.sp
+ \ed{8}
+.sp
+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 example, {,6} is not a
+quantifier, but a literal string of four characters.
+.P
+In UTF-8 mode, quantifiers apply to UTF-8 characters rather than to individual
+bytes. Thus, for example, \ex{100}{2} matches two UTF-8 characters, each of
+which is represented by a two-byte sequence. Similarly, when Unicode property
+support is available, \eX{3} matches three Unicode extended sequences, each of
+which may be several bytes long (and they may be of different lengths).
+.P
+The quantifier {0} is permitted, causing the expression to behave as if the
+previous item and the quantifier were not present.
+.P
+For convenience (and historical compatibility) the three most common
+quantifiers have single-character abbreviations:
+.sp
+ * is equivalent to {0,}
+ + is equivalent to {1,}
+ ? is equivalent to {0,1}
+.sp
+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:
+.sp
+ (a?)*
+.sp
+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 broken.
+.P
+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 pattern
+.sp
+ /\e*.*\e*/
+.sp
+to the string
+.sp
+ /* first comment */ not comment /* second comment */
+.sp
+fails, because it matches the entire string owing to the greediness of the .*
+item.
+.P
+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
+.sp
+ /\e*.*?\e*/
+.sp
+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
+.sp
+ \ed??\ed
+.sp
+which matches one digit by preference, but can match two if that is the only
+way the rest of the pattern matches.
+.P
+If the PCRE_UNGREEDY option is set (an option which 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.
+.P
+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.
+.P
+If a pattern starts with .* or .{0,} and the PCRE_DOTALL option (equivalent
+to Perl's /s) is set, thus allowing the . 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 \eA.
+.P
+In cases where it is known that the subject string contains no newlines, it is
+worth setting PCRE_DOTALL in order to obtain this optimization, or
+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
+elsewhere in the pattern, a match at the start may fail, and a later one
+succeed. Consider, for example:
+.sp
+ (.*)abc\e1
+.sp
+If the subject is "xyz123abc123" the match point is the fourth character. For
+this reason, such a pattern is not implicitly anchored.
+.P
+When a capturing subpattern is repeated, the value captured is the substring
+that matched the final iteration. For example, after
+.sp
+ (tweedle[dume]{3}\es*)+
+.sp
+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 iterations. For
+example, after
+.sp
+ /(a|(b))+/
+.sp
+matches "aba" the value of the second captured substring is "b".
+.
+.
+.\" HTML <a name="atomicgroup"></a>
+.SH "ATOMIC GROUPING AND POSSESSIVE QUANTIFIERS"
+.rs
+.sp
+With both maximizing and minimizing 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.
+.P
+Consider, for example, the pattern \ed+foo when applied to the subject line
+.sp
+ 123456bar
+.sp
+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 \ed+
+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.
+.P
+If we use atomic grouping for the previous example, the matcher would give up
+immediately on failing to match "foo" the first time. The notation is a kind of
+special parenthesis, starting with (?> as in this example:
+.sp
+ (?>\ed+)foo
+.sp
+This kind of parenthesis "locks up" the part of the pattern it contains 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.
+.P
+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.
+.P
+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 \ed+ and \ed+? are prepared to adjust the
+number of digits they match in order to make the rest of the pattern match,
+(?>\ed+) can only match an entire sequence of digits.
+.P
+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 this notation, the
+previous example can be rewritten as
+.sp
+ \ed++foo
+.sp
+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 or processing of a
+possessive quantifier and the equivalent atomic group.
+.P
+The possessive quantifier syntax is an extension to the Perl syntax. It
+originates in Sun's Java package.
+.P
+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
+.sp
+ (\eD+|<\ed+>)*[!?]
+.sp
+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
+.sp
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+.sp
+it takes a long time before reporting failure. This is because the string can
+be divided between the internal \eD+ 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 character 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:
+.sp
+ ((?>\eD+)|<\ed+>)*[!?]
+.sp
+sequences of non-digits cannot be broken, and failure happens quickly.
+.
+.
+.\" HTML <a name="backreferences"></a>
+.SH "BACK REFERENCES"
+.rs
+.sp
+Outside a character class, a backslash followed by a digit greater than 0 (and
+possibly further digits) is a back reference to a capturing subpattern earlier
+(that is, to its left) in the pattern, provided there have been that many
+previous capturing left parentheses.
+.P
+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 pattern. In other words, the
+parentheses that are referenced need not be to the left of the reference for
+numbers less than 10. See the subsection entitled "Non-printing characters"
+.\" HTML <a href="#digitsafterbackslash">
+.\" </a>
+above
+.\"
+for further details of the handling of digits following a backslash.
+.P
+A back reference matches whatever actually matched the capturing subpattern in
+the current subject string, rather than anything matching the subpattern
+itself (see
+.\" HTML <a href="#subpatternsassubroutines">
+.\" </a>
+"Subpatterns as subroutines"
+.\"
+below for a way of doing that). So the pattern
+.sp
+ (sens|respons)e and \e1ibility
+.sp
+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 example,
+.sp
+ ((?i)rah)\es+\e1
+.sp
+matches "rah rah" and "RAH RAH", but not "RAH rah", even though the original
+capturing subpattern is matched caselessly.
+.P
+Back references to named subpatterns use the Python syntax (?P=name). We could
+rewrite the above example as follows:
+.sp
+ (?<p1>(?i)rah)\es+(?P=p1)
+.sp
+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. For example, the pattern
+.sp
+ (a|(bc))\e2
+.sp
+always fails if it starts to match "a" rather than "bc". Because there may be
+many capturing parentheses in a pattern, all digits following the backslash are
+taken as part of a potential back reference 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 an empty comment (see
+.\" HTML <a href="#comments">
+.\" </a>
+"Comments"
+.\"
+below) can be used.
+.P
+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
+example, the pattern
+.sp
+ (a|b\e1)+
+.sp
+matches any number of "a"s and also "aba", "ababbaa" etc. At each iteration 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.
+.
+.
+.\" HTML <a name="bigassertions"></a>
+.SH ASSERTIONS
+.rs
+.sp
+An assertion is a test on the characters following or preceding the current
+matching point that does not actually consume any characters. The simple
+assertions coded as \eb, \eB, \eA, \eG, \eZ, \ez, ^ and $ are described
+.\" HTML <a href="#smallassertions">
+.\" </a>
+above.
+.\"
+.P
+More complicated assertions are coded as subpatterns. There are two kinds:
+those that look ahead of the current position in the subject string, and those
+that look behind it. An assertion subpattern is matched in the normal way,
+except that it does not cause the current matching position to be changed.
+.P
+Assertion subpatterns are not capturing subpatterns, and may not be repeated,
+because it makes no sense to assert the same thing several times. If any kind
+of assertion contains capturing subpatterns within it, these are counted for
+the purposes of numbering the capturing subpatterns in the whole pattern.
+However, substring capturing is carried out only for positive assertions,
+because it does not make sense for negative assertions.
+.
+.
+.SS "Lookahead assertions"
+.rs
+.sp
+Lookahead assertions start
+with (?= for positive assertions and (?! for negative assertions. For example,
+.sp
+ \ew+(?=;)
+.sp
+matches a word followed by a semicolon, but does not include the semicolon in
+the match, and
+.sp
+ foo(?!bar)
+.sp
+matches any occurrence of "foo" that is not followed by "bar". Note that the
+apparently similar pattern
+.sp
+ (?!foo)bar
+.sp
+does not find an occurrence of "bar" that is preceded by something other than
+"foo"; it finds any occurrence of "bar" whatsoever, because the assertion
+(?!foo) is always true when the next three characters are "bar". A
+lookbehind assertion is needed to achieve the other effect.
+.P
+If you want to force a matching failure at some point in a pattern, the most
+convenient way to do it is with (?!) because an empty string always matches, so
+an assertion that requires there not to be an empty string must always fail.
+.
+.
+.\" HTML <a name="lookbehind"></a>
+.SS "Lookbehind assertions"
+.rs
+.sp
+Lookbehind assertions start with (?<= for positive assertions and (?<! for
+negative assertions. For example,
+.sp
+ (?<!foo)bar
+.sp
+does find an occurrence of "bar" that is not preceded by "foo". The contents of
+a lookbehind assertion are restricted such that all the strings it matches must
+have a fixed length. However, if there are several alternatives, they do not
+all have to have the same fixed length. Thus
+.sp
+ (?<=bullock|donkey)
+.sp
+is permitted, but
+.sp
+ (?<!dogs?|cats?)
+.sp
+causes an error at compile time. Branches that match different length strings
+are permitted only at the top level of a lookbehind assertion. This is an
+extension compared with Perl (at least for 5.8), which requires all branches to
+match the same length of string. An assertion such as
+.sp
+ (?<=ab(c|de))
+.sp
+is not permitted, because its single top-level branch can match two different
+lengths, but it is acceptable if rewritten to use two top-level branches:
+.sp
+ (?<=abc|abde)
+.sp
+The implementation of lookbehind assertions is, for each alternative, to
+temporarily move the current position back by the fixed width and then try to
+match. If there are insufficient characters before the current position, the
+match is deemed to fail.
+.P
+PCRE does not allow the \eC escape (which matches a single byte in UTF-8 mode)
+to appear in lookbehind assertions, because it makes it impossible to calculate
+the length of the lookbehind. The \eX escape, which can match different numbers
+of bytes, is also not permitted.
+.P
+Atomic groups can be used in conjunction with lookbehind assertions to specify
+efficient matching at the end of the subject string. Consider a simple pattern
+such as
+.sp
+ abcd$
+.sp
+when applied to a long string that does not match. Because matching proceeds
+from left to right, PCRE will look for each "a" in the subject and then see if
+what follows matches the rest of the pattern. If the pattern is specified as
+.sp
+ ^.*abcd$
+.sp
+the initial .* matches the entire string at first, but when this fails (because
+there is no following "a"), it backtracks to match all but the last character,
+then all but the last two characters, and so on. Once again the search for "a"
+covers the entire string, from right to left, so we are no better off. However,
+if the pattern is written as
+.sp
+ ^(?>.*)(?<=abcd)
+.sp
+or, equivalently, using the possessive quantifier syntax,
+.sp
+ ^.*+(?<=abcd)
+.sp
+there can be no backtracking for the .* item; it can match only the entire
+string. The subsequent lookbehind assertion does a single test on the last four
+characters. If it fails, the match fails immediately. For long strings, this
+approach makes a significant difference to the processing time.
+.
+.
+.SS "Using multiple assertions"
+.rs
+.sp
+Several assertions (of any sort) may occur in succession. For example,
+.sp
+ (?<=\ed{3})(?<!999)foo
+.sp
+matches "foo" preceded by three digits that are not "999". Notice that each of
+the assertions is applied independently at the same point in the subject
+string. First there is a check that the previous three characters are all
+digits, and then there is a check that the same three characters are not "999".
+This pattern does \fInot\fP match "foo" preceded by six characters, the first
+of which are digits and the last three of which are not "999". For example, it
+doesn't match "123abcfoo". A pattern to do that is
+.sp
+ (?<=\ed{3}...)(?<!999)foo
+.sp
+This time the first assertion looks at the preceding six characters, checking
+that the first three are digits, and then the second assertion checks that the
+preceding three characters are not "999".
+.P
+Assertions can be nested in any combination. For example,
+.sp
+ (?<=(?<!foo)bar)baz
+.sp
+matches an occurrence of "baz" that is preceded by "bar" which in turn is not
+preceded by "foo", while
+.sp
+ (?<=\ed{3}(?!999)...)foo
+.sp
+is another pattern that matches "foo" preceded by three digits and any three
+characters that are not "999".
+.
+.
+.SH "CONDITIONAL SUBPATTERNS"
+.rs
+.sp
+It is possible to cause the matching process to obey a subpattern
+conditionally or to choose between two alternative subpatterns, depending on
+the result of an assertion, or whether a previous capturing subpattern matched
+or not. The two possible forms of conditional subpattern are
+.sp
+ (?(condition)yes-pattern)
+ (?(condition)yes-pattern|no-pattern)
+.sp
+If the condition is satisfied, the yes-pattern is used; otherwise the
+no-pattern (if present) is used. If there are more than two alternatives in the
+subpattern, a compile-time error occurs.
+.P
+There are three kinds of condition. If the text between the parentheses
+consists of a sequence of digits, the condition is satisfied if the capturing
+subpattern of that number has previously matched. The number must be greater
+than zero. Consider the following pattern, which contains non-significant white
+space to make it more readable (assume the PCRE_EXTENDED option) and to divide
+it into three parts for ease of discussion:
+.sp
+ ( \e( )? [^()]+ (?(1) \e) )
+.sp
+The first part matches an optional opening parenthesis, and if that
+character is present, sets it as the first captured substring. The second part
+matches one or more characters that are not parentheses. The third part is a
+conditional subpattern that tests whether the first set of parentheses matched
+or not. If they did, that is, if subject started with an opening parenthesis,
+the condition is true, and so the yes-pattern is executed and a closing
+parenthesis is required. Otherwise, since no-pattern is not present, the
+subpattern matches nothing. In other words, this pattern matches a sequence of
+non-parentheses, optionally enclosed in parentheses.
+.P
+If the condition is the string (R), it is satisfied if a recursive call to the
+pattern or subpattern has been made. At "top level", the condition is false.
+This is a PCRE extension. Recursive patterns are described in the next section.
+.P
+If the condition is not a sequence of digits or (R), it must be an assertion.
+This may be a positive or negative lookahead or lookbehind assertion. Consider
+this pattern, again containing non-significant white space, and with the two
+alternatives on the second line:
+.sp
+ (?(?=[^a-z]*[a-z])
+ \ed{2}-[a-z]{3}-\ed{2} | \ed{2}-\ed{2}-\ed{2} )
+.sp
+The condition is a positive lookahead assertion that matches an optional
+sequence of non-letters followed by a letter. In other words, it tests for the
+presence of at least one letter in the subject. If a letter is found, the
+subject is matched against the first alternative; otherwise it is matched
+against the second. This pattern matches strings in one of the two forms
+dd-aaa-dd or dd-dd-dd, where aaa are letters and dd are digits.
+.
+.
+.\" HTML <a name="comments"></a>
+.SH COMMENTS
+.rs
+.sp
+The sequence (?# marks the start of a comment that continues up to the next
+closing parenthesis. Nested parentheses are not permitted. The characters
+that make up a comment play no part in the pattern matching at all.
+.P
+If the PCRE_EXTENDED option is set, an unescaped # character outside a
+character class introduces a comment that continues up to the next newline
+character in the pattern.
+.
+.
+.SH "RECURSIVE PATTERNS"
+.rs
+.sp
+Consider the problem of matching a string in parentheses, allowing for
+unlimited nested parentheses. Without the use of recursion, the best that can
+be done is to use a pattern that matches up to some fixed depth of nesting. It
+is not possible to handle an arbitrary nesting depth. Perl provides a facility
+that allows regular expressions to recurse (amongst other things). It does this
+by interpolating Perl code in the expression at run time, and the code can
+refer to the expression itself. A Perl pattern to solve the parentheses problem
+can be created like this:
+.sp
+ $re = qr{\e( (?: (?>[^()]+) | (?p{$re}) )* \e)}x;
+.sp
+The (?p{...}) item interpolates Perl code at run time, and in this case refers
+recursively to the pattern in which it appears. Obviously, PCRE cannot support
+the interpolation of Perl code. Instead, it supports some special syntax for
+recursion of the entire pattern, and also for individual subpattern recursion.
+.P
+The special item that consists of (? followed by a number greater than zero and
+a closing parenthesis is a recursive call of the subpattern of the given
+number, provided that it occurs inside that subpattern. (If not, it is a
+"subroutine" call, which is described in the next section.) The special item
+(?R) is a recursive call of the entire regular expression.
+.P
+For example, this PCRE pattern solves the nested parentheses problem (assume
+the PCRE_EXTENDED option is set so that white space is ignored):
+.sp
+ \e( ( (?>[^()]+) | (?R) )* \e)
+.sp
+First it matches an opening parenthesis. Then it matches any number of
+substrings which can either be a sequence of non-parentheses, or a recursive
+match of the pattern itself (that is a correctly parenthesized substring).
+Finally there is a closing parenthesis.
+.P
+If this were part of a larger pattern, you would not want to recurse the entire
+pattern, so instead you could use this:
+.sp
+ ( \e( ( (?>[^()]+) | (?1) )* \e) )
+.sp
+We have put the pattern into parentheses, and caused the recursion to refer to
+them instead of the whole pattern. In a larger pattern, keeping track of
+parenthesis numbers can be tricky. It may be more convenient to use named
+parentheses instead. For this, PCRE uses (?P>name), which is an extension to
+the Python syntax that PCRE uses for named parentheses (Perl does not provide
+named parentheses). We could rewrite the above example as follows:
+.sp
+ (?P<pn> \e( ( (?>[^()]+) | (?P>pn) )* \e) )
+.sp
+This particular example pattern contains nested unlimited repeats, and so the
+use of atomic grouping for matching strings of non-parentheses is important
+when applying the pattern to strings that do not match. For example, when this
+pattern is applied to
+.sp
+ (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()
+.sp
+it yields "no match" quickly. However, if atomic grouping is not used,
+the match runs for a very long time indeed because there are so many different
+ways the + and * repeats can carve up the subject, and all have to be tested
+before failure can be reported.
+.P
+At the end of a match, the values set for any capturing subpatterns are those
+from the outermost level of the recursion at which the subpattern value is set.
+If you want to obtain intermediate values, a callout function can be used (see
+the next section and the
+.\" HREF
+\fBpcrecallout\fP
+.\"
+documentation). If the pattern above is matched against
+.sp
+ (ab(cd)ef)
+.sp
+the value for the capturing parentheses is "ef", which is the last value taken
+on at the top level. If additional parentheses are added, giving
+.sp
+ \e( ( ( (?>[^()]+) | (?R) )* ) \e)
+ ^ ^
+ ^ ^
+.sp
+the string they capture is "ab(cd)ef", the contents of the top level
+parentheses. If there are more than 15 capturing parentheses in a pattern, PCRE
+has to obtain extra memory to store data during a recursion, which it does by
+using \fBpcre_malloc\fP, freeing it via \fBpcre_free\fP afterwards. If no
+memory can be obtained, the match fails with the PCRE_ERROR_NOMEMORY error.
+.P
+Do not confuse the (?R) item with the condition (R), which tests for recursion.
+Consider this pattern, which matches text in angle brackets, allowing for
+arbitrary nesting. Only digits are allowed in nested brackets (that is, when
+recursing), whereas any characters are permitted at the outer level.
+.sp
+ < (?: (?(R) \ed++ | [^<>]*+) | (?R)) * >
+.sp
+In this pattern, (?(R) is the start of a conditional subpattern, with two
+different alternatives for the recursive and non-recursive cases. The (?R) item
+is the actual recursive call.
+.
+.
+.\" HTML <a name="subpatternsassubroutines"></a>
+.SH "SUBPATTERNS AS SUBROUTINES"
+.rs
+.sp
+If the syntax for a recursive subpattern reference (either by number or by
+name) is used outside the parentheses to which it refers, it operates like a
+subroutine in a programming language. An earlier example pointed out that the
+pattern
+.sp
+ (sens|respons)e and \e1ibility
+.sp
+matches "sense and sensibility" and "response and responsibility", but not
+"sense and responsibility". If instead the pattern
+.sp
+ (sens|respons)e and (?1)ibility
+.sp
+is used, it does match "sense and responsibility" as well as the other two
+strings. Such references must, however, follow the subpattern to which they
+refer.
+.
+.
+.SH CALLOUTS
+.rs
+.sp
+Perl has a feature whereby using the sequence (?{...}) causes arbitrary Perl
+code to be obeyed in the middle of matching a regular expression. This makes it
+possible, amongst other things, to extract different substrings that match the
+same pair of parentheses when there is a repetition.
+.P
+PCRE provides a similar feature, but of course it cannot obey arbitrary Perl
+code. The feature is called "callout". The caller of PCRE provides an external
+function by putting its entry point in the global variable \fIpcre_callout\fP.
+By default, this variable contains NULL, which disables all calling out.
+.P
+Within a regular expression, (?C) indicates the points at which the external
+function is to be called. If you want to identify different callout points, you
+can put a number less than 256 after the letter C. The default value is zero.
+For example, this pattern has two callout points:
+.sp
+ (?C1)\dabc(?C2)def
+.sp
+If the PCRE_AUTO_CALLOUT flag is passed to \fBpcre_compile()\fP, callouts are
+automatically installed before each item in the pattern. They are all numbered
+255.
+.P
+During matching, when PCRE reaches a callout point (and \fIpcre_callout\fP is
+set), the external function is called. It is provided with the number of the
+callout, the position in the pattern, and, optionally, one item of data
+originally supplied by the caller of \fBpcre_exec()\fP. The callout function
+may cause matching to proceed, to backtrack, or to fail altogether. A complete
+description of the interface to the callout function is given in the
+.\" HREF
+\fBpcrecallout\fP
+.\"
+documentation.
+.P
+.in 0
+Last updated: 09 September 2004
+.br
+Copyright (c) 1997-2004 University of Cambridge.
diff --git a/srclib/pcre/doc/pcreperform.3 b/srclib/pcre/doc/pcreperform.3
new file mode 100644
index 0000000000..999268eaf6
--- /dev/null
+++ b/srclib/pcre/doc/pcreperform.3
@@ -0,0 +1,76 @@
+.TH PCRE 3
+.SH NAME
+PCRE - Perl-compatible regular expressions
+.SH "PCRE PERFORMANCE"
+.rs
+.sp
+Certain items that may appear in regular expression patterns are more efficient
+than others. It is more efficient to use a character class like [aeiou] than a
+set of 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
+observations about PCRE.
+.P
+Using Unicode character properties (the \ep, \eP, and \eX 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.
+.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
+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 newlines, the pattern may match from the character
+immediately following one of them instead of from the very start. For example,
+the pattern
+.sp
+ .*second
+.sp
+matches the subject "first\enand second" (where \en 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.
+.P
+If you are using such a pattern with subject strings that do not contain
+newlines, the best performance is obtained by setting PCRE_DOTALL, or starting
+the pattern with ^.* to indicate explicit anchoring. That saves PCRE from
+having to scan along the subject looking for a newline to restart at.
+.P
+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
+.sp
+ (a+)*
+.sp
+This can match "aaaa" in 33 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, 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 extremely long time.
+.P
+An optimization catches some of the more simple cases such as
+.sp
+ (a+)*b
+.sp
+where a literal character follows. Before embarking on the standard matching
+procedure, PCRE checks that there is a "b" later in the subject string, and if
+there is not, it fails the match immediately. However, when there is no
+following literal this optimization cannot be used. You can see the difference
+by comparing the behaviour of
+.sp
+ (a+)*\ed
+.sp
+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.
+.P
+In many cases, the solution to this kind of performance issue is to use an
+atomic group or a possessive quantifier.
+.P
+.in 0
+Last updated: 09 September 2004
+.br
+Copyright (c) 1997-2004 University of Cambridge.
diff --git a/srclib/pcre/doc/pcreposix.3 b/srclib/pcre/doc/pcreposix.3
index 41716ead91..321dcd7ac9 100644
--- a/srclib/pcre/doc/pcreposix.3
+++ b/srclib/pcre/doc/pcreposix.3
@@ -1,149 +1,201 @@
.TH PCRE 3
.SH NAME
-pcreposix - POSIX API for Perl-compatible regular expressions.
-.SH SYNOPSIS
+PCRE - Perl-compatible regular expressions.
+.SH "SYNOPSIS OF POSIX API"
+.rs
+.sp
.B #include <pcreposix.h>
.PP
.SM
.br
-.B int regcomp(regex_t *\fIpreg\fR, const char *\fIpattern\fR,
+.B int regcomp(regex_t *\fIpreg\fP, const char *\fIpattern\fP,
.ti +5n
-.B int \fIcflags\fR);
+.B int \fIcflags\fP);
.PP
.br
-.B int regexec(regex_t *\fIpreg\fR, const char *\fIstring\fR,
+.B int regexec(regex_t *\fIpreg\fP, const char *\fIstring\fP,
.ti +5n
-.B size_t \fInmatch\fR, regmatch_t \fIpmatch\fR[], int \fIeflags\fR);
+.B size_t \fInmatch\fP, regmatch_t \fIpmatch\fP[], int \fIeflags\fP);
.PP
.br
-.B size_t regerror(int \fIerrcode\fR, const regex_t *\fIpreg\fR,
+.B size_t regerror(int \fIerrcode\fP, const regex_t *\fIpreg\fP,
.ti +5n
-.B char *\fIerrbuf\fR, size_t \fIerrbuf_size\fR);
+.B char *\fIerrbuf\fP, size_t \fIerrbuf_size\fP);
.PP
.br
-.B void regfree(regex_t *\fIpreg\fR);
-
-
+.B void regfree(regex_t *\fIpreg\fP);
+.
.SH DESCRIPTION
+.rs
+.sp
This set of functions provides a POSIX-style API to the PCRE regular expression
-package. See the \fBpcre\fR documentation for a description of the native API,
-which contains additional functionality.
-
+package. See the
+.\" HREF
+\fBpcreapi\fP
+.\"
+documentation for a description of PCRE's native API, which contains additional
+functionality.
+.P
The functions described here are just wrapper functions that ultimately call
-the native API. Their prototypes are defined in the \fBpcreposix.h\fR header
-file, and on Unix systems the library itself is called \fBpcreposix.a\fR, so
-can be accessed by adding \fB-lpcreposix\fR to the command for linking an
-application which uses them. Because the POSIX functions call the native ones,
-it is also necessary to add \fR-lpcre\fR.
-
+the PCRE native API. Their prototypes are defined in the \fBpcreposix.h\fP
+header file, and on Unix systems the library itself is called
+\fBpcreposix.a\fP, so can be accessed by adding \fB-lpcreposix\fP to the
+command for linking an application that uses them. Because the POSIX functions
+call the native ones, it is also necessary to add \fB-lpcre\fP.
+.P
I have implemented only those option bits that can be reasonably mapped to PCRE
native options. In addition, the options REG_EXTENDED and REG_NOSUB are defined
with the value zero. They have no effect, but since programs that are written
to the POSIX interface often use them, this makes it easier to slot in PCRE as
a replacement library. Other POSIX options are not even defined.
-
+.P
When PCRE is called via these functions, it is only the API that is POSIX-like
in style. The syntax and semantics of the regular expressions themselves are
still those of Perl, subject to the setting of various PCRE options, as
-described below.
-
-The header for these functions is supplied as \fBpcreposix.h\fR to avoid any
+described below. "POSIX-like in style" means that the API approximates to the
+POSIX definition; it is not fully POSIX-compatible, and in multi-byte encoding
+domains it is probably even less compatible.
+.P
+The header for these functions is supplied as \fBpcreposix.h\fP to avoid any
potential clash with other POSIX libraries. It can, of course, be renamed or
-aliased as \fBregex.h\fR, which is the "correct" name. It provides two
-structure types, \fIregex_t\fR for compiled internal forms, and
-\fIregmatch_t\fR for returning captured substrings. It also defines some
+aliased as \fBregex.h\fP, which is the "correct" name. It provides two
+structure types, \fIregex_t\fP for compiled internal forms, and
+\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.
-
-
-.SH COMPILING A PATTERN
-
-The function \fBregcomp()\fR is called to compile a pattern into an
+.P
+.SH "COMPILING A PATTERN"
+.rs
+.sp
+The function \fBregcomp()\fP is called to compile a pattern into an
internal form. The pattern is a C string terminated by a binary zero, and
-is passed in the argument \fIpattern\fR. The \fIpreg\fR argument is a pointer
-to a regex_t structure which is used as a base for storing information about
-the compiled expression.
-
-The argument \fIcflags\fR is either zero, or contains one or more of the bits
+is passed in the argument \fIpattern\fP. The \fIpreg\fP argument is a pointer
+to a \fBregex_t\fP structure that is used as a base for storing information
+about the compiled expression.
+.P
+The argument \fIcflags\fP is either zero, or contains one or more of the bits
defined by the following macros:
-
+.sp
REG_ICASE
-
+.sp
The PCRE_CASELESS option is set when the expression is passed for compilation
to the native function.
-
+.sp
REG_NEWLINE
-
+.sp
The PCRE_MULTILINE option is set when the expression is passed for compilation
-to the native function.
-
+to the native function. Note that this does \fInot\fP mimic the defined POSIX
+behaviour for REG_NEWLINE (see the following section).
+.P
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
-\fIsome\fR of the effects specified for REG_NEWLINE. It does not affect the way
-newlines are matched by . (they aren't) or a negative class such as [^a] (they
-are).
-
-The yield of \fBregcomp()\fR is zero on success, and non-zero otherwise. The
-\fIpreg\fR structure is filled in on success, and one member of the structure
-is publicized: \fIre_nsub\fR contains the number of capturing subpatterns in
+\fIsome\fP of the effects specified for REG_NEWLINE. It does not affect the way
+newlines are matched by . (they aren't) or by a negative class such as [^a]
+(they are).
+.P
+The yield of \fBregcomp()\fP is zero on success, and non-zero otherwise. The
+\fIpreg\fP structure is filled in on success, and one member of the structure
+is public: \fIre_nsub\fP contains the number of capturing subpatterns in
the regular expression. Various error codes are defined in the header file.
-
-
-.SH MATCHING A PATTERN
-The function \fBregexec()\fR is called to match a pre-compiled pattern
-\fIpreg\fR against a given \fIstring\fR, which is terminated by a zero byte,
-subject to the options in \fIeflags\fR. These can be:
-
+.
+.
+.SH "MATCHING NEWLINE CHARACTERS"
+.rs
+.sp
+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 PCRE:
+.sp
+ Default Change with
+.sp
+ . matches newline no PCRE_DOTALL
+ newline matches [^a] yes not changeable
+ $ matches \en at end yes PCRE_DOLLARENDONLY
+ $ matches \en in middle no PCRE_MULTILINE
+ ^ matches \en in middle no PCRE_MULTILINE
+.sp
+This is the equivalent table for POSIX:
+.sp
+ Default Change with
+.sp
+ . matches newline yes REG_NEWLINE
+ newline matches [^a] yes REG_NEWLINE
+ $ matches \en at end no REG_NEWLINE
+ $ matches \en in middle no REG_NEWLINE
+ ^ matches \en in middle no REG_NEWLINE
+.sp
+PCRE's behaviour is the same as Perl's, except that there is no equivalent for
+PCRE_DOLLAR_ENDONLY in Perl. In both PCRE and Perl, there is no way to stop
+newline from matching [^a].
+.P
+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.
+.
+.
+.SH "MATCHING A PATTERN"
+.rs
+.sp
+The function \fBregexec()\fP is called to match a compiled pattern \fIpreg\fP
+against a given \fIstring\fP, which is terminated by a zero byte, subject to
+the options in \fIeflags\fP. These can be:
+.sp
REG_NOTBOL
-
+.sp
The PCRE_NOTBOL option is set when calling the underlying PCRE matching
function.
-
+.sp
REG_NOTEOL
-
+.sp
The PCRE_NOTEOL option is set when calling the underlying PCRE matching
function.
-
+.P
The portion of the string that was matched, and also any captured substrings,
-are returned via the \fIpmatch\fR argument, which points to an array of
-\fInmatch\fR structures of type \fIregmatch_t\fR, containing the members
-\fIrm_so\fR and \fIrm_eo\fR. These contain the offset to the first character of
+are returned via the \fIpmatch\fP argument, which points to an array of
+\fInmatch\fP structures of type \fIregmatch_t\fP, containing the members
+\fIrm_so\fP and \fIrm_eo\fP. 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 \fIstring\fR that was matched; subsequent elements relate to the
+portion of \fIstring\fP 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.
-
+.P
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.
-
-
-.SH ERROR MESSAGES
-The \fBregerror()\fR function maps a non-zero errorcode from either
-\fBregcomp\fR or \fBregexec\fR to a printable message. If \fIpreg\fR is not
+.
+.
+.SH "ERROR MESSAGES"
+.rs
+.sp
+The \fBregerror()\fP function maps a non-zero errorcode from either
+\fBregcomp()\fP or \fBregexec()\fP to a printable message. If \fIpreg\fP is not
NULL, the error should have arisen from the use of that structure. A message
-terminated by a binary zero is placed in \fIerrbuf\fR. The length of the
-message, including the zero, is limited to \fIerrbuf_size\fR. The yield of the
+terminated by a binary zero is placed in \fIerrbuf\fP. The length of the
+message, including the zero, is limited to \fIerrbuf_size\fP. The yield of the
function is the size of buffer needed to hold the whole message.
-
-
-.SH STORAGE
+.
+.
+.SH MEMORY USAGE
+.rs
+.sp
Compiling a regular expression causes memory to be allocated and associated
-with the \fIpreg\fR structure. The function \fBregfree()\fR frees all such
-memory, after which \fIpreg\fR may no longer be used as a compiled expression.
-
-
+with the \fIpreg\fP structure. The function \fBregfree()\fP frees all such
+memory, after which \fIpreg\fP may no longer be used as a compiled expression.
+.
+.
.SH AUTHOR
+.rs
+.sp
Philip Hazel <ph10@cam.ac.uk>
.br
University Computing Service,
.br
-New Museums Site,
-.br
Cambridge CB2 3QG, England.
+.P
+.in 0
+Last updated: 07 September 2004
.br
-Phone: +44 1223 334714
-
-Copyright (c) 1997-2000 University of Cambridge.
+Copyright (c) 1997-2004 University of Cambridge.
diff --git a/srclib/pcre/doc/pcreprecompile.3 b/srclib/pcre/doc/pcreprecompile.3
new file mode 100644
index 0000000000..f08939bae0
--- /dev/null
+++ b/srclib/pcre/doc/pcreprecompile.3
@@ -0,0 +1,125 @@
+.TH PCRE 3
+.SH NAME
+PCRE - Perl-compatible regular expressions
+.SH "SAVING AND RE-USING PRECOMPILED PCRE PATTERNS"
+.rs
+.sp
+If you are running an application that uses a large number of regular
+expression patterns, it may be useful to store them in a precompiled form
+instead of having to compile them every time the application is run.
+If you are not using any private character tables (see the
+.\" HREF
+\fBpcre_maketables()\fP
+.\"
+documentation), this is relatively straightforward. If you are using private
+tables, it is a little bit more complicated.
+.P
+If you save compiled patterns to a file, you can copy them to a different host
+and run them there. This works even if the new host has the opposite endianness
+to the one on which the patterns were compiled. There may be a small
+performance penalty, but it should be insignificant.
+.
+.
+.SH "SAVING A COMPILED PATTERN"
+.rs
+.sh
+The value returned by \fBpcre_compile()\fP points to a single block of memory
+that holds the compiled pattern and associated data. You can find the length of
+this block in bytes by calling \fBpcre_fullinfo()\fP with an argument of
+PCRE_INFO_SIZE. You can then save the data in any appropriate manner. Here is
+sample code that compiles a pattern and writes it to a file. It assumes that
+the variable \fIfd\fP refers to a file that is open for output:
+.sp
+ int erroroffset, rc, size;
+ char *error;
+ pcre *re;
+.sp
+ re = pcre_compile("my pattern", 0, &error, &erroroffset, NULL);
+ if (re == NULL) { ... handle errors ... }
+ rc = pcre_fullinfo(re, NULL, PCRE_INFO_SIZE, &size);
+ if (rc < 0) { ... handle errors ... }
+ rc = fwrite(re, 1, size, fd);
+ if (rc != size) { ... handle errors ... }
+.sp
+In this example, the bytes that comprise the compiled pattern are copied
+exactly. Note that this is binary data that may contain any of the 256 possible
+byte values. On systems that make a distinction between binary and non-binary
+data, be sure that the file is opened for binary output.
+.P
+If you want to write more than one pattern to a file, you will have to devise a
+way of separating them. For binary data, preceding each pattern with its length
+is probably the most straightforward approach. Another possibility is to write
+out the data in hexadecimal instead of binary, one pattern to a line.
+.P
+Saving compiled patterns in a file is only one possible way of storing them for
+later use. They could equally well be saved in a database, or in the memory of
+some daemon process that passes them via sockets to the processes that want
+them.
+.P
+If the pattern has been studied, it is also possible to save the study data in
+a similar way to the compiled pattern itself. When studying generates
+additional information, \fBpcre_study()\fP returns a pointer to a
+\fBpcre_extra\fP data block. Its format is defined in the
+.\" HTML <a href="pcreapi.html#extradata">
+.\" </a>
+section on matching a pattern
+.\"
+in the
+.\" HREF
+\fBpcreapi\fP
+.\"
+documentation. The \fIstudy_data\fP field points to the binary study data, and
+this is what you must save (not the \fBpcre_extra\fP block itself). The length
+of the study data can be obtained by calling \fBpcre_fullinfo()\fP with an
+argument of PCRE_INFO_STUDYSIZE. Remember to check that \fBpcre_study()\fP did
+return a non-NULL value before trying to save the study data.
+.
+.
+.SH "RE-USING A PRECOMPILED PATTERN"
+.rs
+.sp
+Re-using a precompiled pattern is straightforward. Having reloaded it into main
+memory, you pass its pointer to \fBpcre_exec()\fP in the usual way. This should
+work even on another host, and even if that host has the opposite endianness to
+the one where the pattern was compiled.
+.P
+However, if you passed a pointer to custom character tables when the pattern
+was compiled (the \fItableptr\fP argument of \fBpcre_compile()\fP), you must
+now pass a similar pointer to \fBpcre_exec()\fP, because the value saved with
+the compiled pattern will obviously be nonsense. A field in a
+\fBpcre_extra()\fP block is used to pass this data, as described in the
+.\" HTML <a href="pcreapi.html#extradata">
+.\" </a>
+section on matching a pattern
+.\"
+in the
+.\" HREF
+\fBpcreapi\fP
+.\"
+documentation.
+.P
+If you did not provide custom character tables when the pattern was compiled,
+the pointer in the compiled pattern is NULL, which causes \fBpcre_exec()\fP to
+use PCRE's internal tables. Thus, you do not need to take any special action at
+run time in this case.
+.P
+If you saved study data with the compiled pattern, you need to create your own
+\fBpcre_extra\fP data block and set the \fIstudy_data\fP field to point to the
+reloaded study data. You must also set the PCRE_EXTRA_STUDY_DATA bit in the
+\fIflags\fP field to indicate that study data is present. Then pass the
+\fBpcre_extra\fP block to \fBpcre_exec()\fP in the usual way.
+.
+.
+.SH "COMPATIBILITY WITH DIFFERENT PCRE RELEASES"
+.rs
+.sp
+The layout of the control block that is at the start of the data that makes up
+a compiled pattern was changed for release 5.0. If you have any saved patterns
+that were compiled with previous releases (not a facility that was previously
+advertised), you will have to recompile them for release 5.0. However, from now
+on, it should be possible to make changes in a compabible manner.
+.P
+.in 0
+Last updated: 10 September 2004
+.br
+Copyright (c) 1997-2004 University of Cambridge.
diff --git a/srclib/pcre/doc/pcresample.3 b/srclib/pcre/doc/pcresample.3
new file mode 100644
index 0000000000..8d949a671e
--- /dev/null
+++ b/srclib/pcre/doc/pcresample.3
@@ -0,0 +1,66 @@
+.TH PCRE 3
+.SH NAME
+PCRE - Perl-compatible regular expressions
+.SH "PCRE SAMPLE PROGRAM"
+.rs
+.sp
+A simple, complete demonstration program, to get you started with using PCRE,
+is supplied in the file \fIpcredemo.c\fP in the PCRE distribution.
+.P
+The program compiles the regular expression that is its first argument, and
+matches it against the subject string in its second argument. No PCRE options
+are set, and default character tables are used. If matching succeeds, the
+program outputs the portion of the subject that matched, together with the
+contents of any captured substrings.
+.P
+If the -g option is given on the command line, the program then goes on to
+check for further matches of the same regular expression in the same subject
+string. The logic is a little bit tricky because of the possibility of matching
+an empty string. Comments in the code explain what is going on.
+.P
+If PCRE is installed in the standard include and library directories for your
+system, you should be able to compile the demonstration program using this
+command:
+.sp
+ gcc -o pcredemo pcredemo.c -lpcre
+.sp
+If PCRE is installed elsewhere, you may need to add additional options to the
+command line. For example, on a Unix-like system that has PCRE installed in
+\fI/usr/local\fP, you can compile the demonstration program using a command
+like this:
+.sp
+.\" JOINSH
+ 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:
+.sp
+ ./pcredemo 'cat|dog' 'the cat sat on the mat'
+ ./pcredemo -g 'cat|dog' 'the dog sat on the cat'
+.sp
+Note that there is a much more comprehensive test program, called
+.\" HREF
+\fBpcretest\fP,
+.\"
+which supports many more facilities for testing regular expressions and the
+PCRE library. The \fBpcredemo\fP program is provided as a simple coding
+example.
+.P
+On some operating systems (e.g. Solaris), when PCRE is not installed in the
+standard library directory, you may get an error like this when you try to run
+\fBpcredemo\fP:
+.sp
+ ld.so.1: a.out: fatal: libpcre.so.0: open failed: No such file or directory
+.sp
+This is caused by the way shared library support works on those systems. You
+need to add
+.sp
+ -R/usr/local/lib
+.sp
+(for example) to the compile command to get round this problem.
+.P
+.in 0
+Last updated: 09 September 2004
+.br
+Copyright (c) 1997-2004 University of Cambridge.
diff --git a/srclib/pcre/doc/pcretest.1 b/srclib/pcre/doc/pcretest.1
index b2e25560d7..0c06cb701e 100644
--- a/srclib/pcre/doc/pcretest.1
+++ b/srclib/pcre/doc/pcretest.1
@@ -2,248 +2,347 @@
.SH NAME
pcretest - a program for testing Perl-compatible regular expressions.
.SH SYNOPSIS
-.B pcretest "[-d] [-i] [-m] [-o osize] [-p] [-t] [source] [destination]"
-
-\fBpcretest\fR was written as a test program for the PCRE regular expression
+.rs
+.sp
+.B pcretest "[-C] [-d] [-i] [-m] [-o osize] [-p] [-t] [source]"
+.ti +5n
+.B "[destination]"
+.P
+\fBpcretest\fP was written as a test program for the PCRE regular expression
library itself, but it can also be used for experimenting with regular
-expressions. This man page describes the features of the test program; for
-details of the regular expressions themselves, see the \fBpcre\fR man page.
-
+expressions. This document describes the features of the test program; for
+details of the regular expressions themselves, see the
+.\" HREF
+\fBpcrepattern\fP
+.\"
+documentation. For details of the PCRE library function calls and their
+options, see the
+.\" HREF
+\fBpcreapi\fP
+.\"
+documentation.
+.
+.
.SH OPTIONS
+.rs
.TP 10
-\fB-d\fR
-Behave as if each regex had the \fB/D\fR modifier (see below); the internal
+\fB-C\fP
+Output the version number of the PCRE library, and all available information
+about the optional features that are included, and then exit.
+.TP 10
+\fB-d\fP
+Behave as if each regex had the \fB/D\fP (debug) modifier; the internal
form is output after compilation.
.TP 10
-\fB-i\fR
-Behave as if each regex had the \fB/I\fR modifier; information about the
+\fB-i\fP
+Behave as if each regex had the \fB/I\fP modifier; information about the
compiled pattern is given after compilation.
.TP 10
-\fB-m\fR
+\fB-m\fP
Output the size of each compiled pattern after it has been compiled. This is
-equivalent to adding /M to each regular expression. For compatibility with
-earlier versions of pcretest, \fB-s\fR is a synonym for \fB-m\fR.
+equivalent to adding \fB/M\fP to each regular expression. For compatibility
+with earlier versions of pcretest, \fB-s\fP is a synonym for \fB-m\fP.
.TP 10
-\fB-o\fR \fIosize\fR
-Set the number of elements in the output vector that is used when calling PCRE
-to be \fIosize\fR. The default value is 45, which is enough for 14 capturing
-subexpressions. The vector size can be changed for individual matching calls by
-including \\O in the data line (see below).
+\fB-o\fP \fIosize\fP
+Set the number of elements in the output vector that is used when calling
+\fBpcre_exec()\fP to be \fIosize\fP. The default value is 45, which is enough
+for 14 capturing subexpressions. The vector size can be changed for individual
+matching calls by including \eO in the data line (see below).
.TP 10
-\fB-p\fR
-Behave as if each regex has \fB/P\fR modifier; the POSIX wrapper API is used
-to call PCRE. None of the other options has any effect when \fB-p\fR is set.
+\fB-p\fP
+Behave as if each regex has \fB/P\fP modifier; the POSIX wrapper API is used
+to call PCRE. None of the other options has any effect when \fB-p\fP is set.
.TP 10
-\fB-t\fR
-Run each compile, study, and match 20000 times with a timer, and output
-resulting time per compile or match (in milliseconds). Do not set \fB-t\fR with
-\fB-m\fR, because you will then get the size output 20000 times and the timing
-will be distorted.
-
-
+\fB-t\fP
+Run each compile, study, and match many times with a timer, and output
+resulting time per compile or match (in milliseconds). Do not set \fB-m\fP with
+\fB-t\fP, because you will then get the size output a zillion times, and the
+timing will be distorted.
+.
+.
.SH DESCRIPTION
-
-If \fBpcretest\fR is given two filename arguments, it reads from the first and
+.rs
+.sp
+If \fBpcretest\fP is given two filename arguments, it reads from the first and
writes to the second. If it is given only one filename argument, it reads from
that file and writes to stdout. Otherwise, it reads from stdin and writes to
stdout, and prompts for each line of input, using "re>" to prompt for regular
expressions, and "data>" to prompt for data lines.
-
+.P
The program handles any number of sets of input on a single input file. Each
set starts with a regular expression, and continues with any number of data
-lines to be matched against the pattern. An empty line signals the end of the
-data lines, at which point a new regular expression is read. The regular
-expressions are given enclosed in any non-alphameric delimiters other than
-backslash, for example
-
+lines to be matched against the pattern.
+.P
+Each data line is matched separately and independently. If you want to do
+multiple-line matches, you have to use the \en escape sequence in a single line
+of input to encode the newline characters. The maximum length of data line is
+30,000 characters.
+.P
+An empty line signals the end of the data lines, at which point a new regular
+expression is read. The regular expressions are given enclosed in any
+non-alphanumeric delimiters other than backslash, for example
+.sp
/(a|bc)x+yz/
-
+.sp
White space before the initial delimiter is ignored. A regular expression may
be continued over several input lines, in which case the newline characters are
included within it. It is possible to include the delimiter within the pattern
by escaping it, for example
-
- /abc\\/def/
-
+.sp
+ /abc\e/def/
+.sp
If you do so, the escape and the delimiter form part of the pattern, but since
-delimiters are always non-alphameric, this does not affect its interpretation.
+delimiters are always non-alphanumeric, this does not affect its interpretation.
If the terminating delimiter is immediately followed by a backslash, for
example,
-
- /abc/\\
-
+.sp
+ /abc/\e
+.sp
then a backslash is added to the end of the pattern. This is done to provide a
way of testing the error condition that arises if a pattern finishes with a
backslash, because
-
- /abc\\/
-
+.sp
+ /abc\e/
+.sp
is interpreted as the first line of a pattern that starts with "abc/", causing
pcretest to read the next line as a continuation of the regular expression.
-
-
-.SH PATTERN MODIFIERS
-
-The pattern may be followed by \fBi\fR, \fBm\fR, \fBs\fR, or \fBx\fR to set the
-PCRE_CASELESS, PCRE_MULTILINE, PCRE_DOTALL, or PCRE_EXTENDED options,
-respectively. For example:
-
+.
+.
+.SH "PATTERN MODIFIERS"
+.rs
+.sp
+A pattern may be followed by any number of modifiers, which are mostly single
+characters. Following Perl usage, these are referred to below as, for example,
+"the \fB/i\fP modifier", even though the delimiter of the pattern need not
+always be a slash, and no slash is used when writing modifiers. Whitespace may
+appear between the final pattern delimiter and the first modifier, and between
+the modifiers themselves.
+.P
+The \fB/i\fP, \fB/m\fP, \fB/s\fP, and \fB/x\fP modifiers set the PCRE_CASELESS,
+PCRE_MULTILINE, PCRE_DOTALL, or PCRE_EXTENDED options, respectively, when
+\fBpcre_compile()\fP is called. These four modifier letters have the same
+effect as they do in Perl. For example:
+.sp
/caseless/i
-
-These modifier letters have the same effect as they do in Perl. There are
-others which set PCRE options that do not correspond to anything in Perl:
-\fB/A\fR, \fB/E\fR, and \fB/X\fR set PCRE_ANCHORED, PCRE_DOLLAR_ENDONLY, and
-PCRE_EXTRA respectively.
-
+.sp
+The following table shows additional modifiers for setting PCRE options that do
+not correspond to anything in Perl:
+.sp
+ \fB/A\fP PCRE_ANCHORED
+ \fB/C\fP PCRE_AUTO_CALLOUT
+ \fB/E\fP PCRE_DOLLAR_ENDONLY
+ \fB/N\fP PCRE_NO_AUTO_CAPTURE
+ \fB/U\fP PCRE_UNGREEDY
+ \fB/X\fP PCRE_EXTRA
+.sp
Searching for all possible matches within each subject string can be requested
-by the \fB/g\fR or \fB/G\fR modifier. After finding a match, PCRE is called
+by the \fB/g\fP or \fB/G\fP modifier. After finding a match, PCRE is called
again to search the remainder of the subject string. The difference between
-\fB/g\fR and \fB/G\fR is that the former uses the \fIstartoffset\fR argument to
-\fBpcre_exec()\fR to start searching at a new point within the entire string
+\fB/g\fP and \fB/G\fP is that the former uses the \fIstartoffset\fP argument to
+\fBpcre_exec()\fP 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 \fBpcre_exec()\fR in a \fB/g\fR or \fB/G\fR sequence matches an
+begins with a lookbehind assertion (including \eb or \eB).
+.P
+If any call to \fBpcre_exec()\fP in a \fB/g\fP or \fB/G\fP sequence matches an
empty string, the next call is done with the PCRE_NOTEMPTY 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, and the normal
match is retried. This imitates the way Perl handles such cases when using the
-\fB/g\fR modifier or the \fBsplit()\fR function.
-
-There are a number of other modifiers for controlling the way \fBpcretest\fR
+\fB/g\fP modifier or the \fBsplit()\fP function.
+.P
+There are yet more modifiers for controlling the way \fBpcretest\fP
operates.
-
-The \fB/+\fR modifier requests that as well as outputting the substring that
+.P
+The \fB/+\fP 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 \fB/L\fR modifier must be followed directly by the name of a locale, for
+.P
+The \fB/L\fP modifier must be followed directly by the name of a locale, for
example,
-
- /pattern/Lfr
-
-For this reason, it must be the last modifier letter. The given locale is set,
-\fBpcre_maketables()\fR is called to build a set of character tables for the
-locale, and this is then passed to \fBpcre_compile()\fR when compiling the
-regular expression. Without an \fB/L\fR modifier, NULL is passed as the tables
-pointer; that is, \fB/L\fR applies only to the expression on which it appears.
-
-The \fB/I\fR modifier requests that \fBpcretest\fR output information about the
-compiled expression (whether it is anchored, has a fixed first character, and
-so on). It does this by calling \fBpcre_fullinfo()\fR after compiling an
-expression, and outputting the information it gets back. If the pattern is
-studied, the results of that are also output.
-
-The \fB/D\fR modifier is a PCRE debugging feature, which also assumes \fB/I\fR.
+.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, which also assumes \fB/I\fP.
It causes the internal form of compiled regular expressions to be output after
-compilation.
-
-The \fB/S\fR modifier causes \fBpcre_study()\fR to be called after the
+compilation. If the pattern was studied, the information returned is also
+output.
+.P
+The \fB/F\fP modifier causes \fBpcretest\fP 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
+\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/M\fR modifier causes the size of memory block used to hold the compiled
+.P
+The \fB/M\fP modifier causes the size of memory block used to hold the compiled
pattern to be output.
-
-The \fB/P\fR modifier causes \fBpcretest\fR to call PCRE via the POSIX wrapper
+.P
+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\fR, \fB/m\fR, and \fB/+\fR are ignored. REG_ICASE is set if \fB/i\fR is
-present, and REG_NEWLINE is set if \fB/m\fR is present. The wrapper functions
+\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.
-
-The \fB/8\fR modifier causes \fBpcretest\fR to call PCRE with the PCRE_UTF8
-option set. This turns on the (currently incomplete) 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.
-
-
-.SH DATA LINES
-
-Before each data line is passed to \fBpcre_exec()\fR, leading and trailing
-whitespace is removed, and it is then scanned for \\ escapes. The following are
+.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.
+.
+.
+.SH "DATA LINES"
+.rs
+.sp
+Before each data line is passed to \fBpcre_exec()\fP, leading and trailing
+whitespace is removed, and it is then scanned for \e escapes. Some of these are
+pretty esoteric features, intended for checking out some of the more
+complicated features of PCRE. If you are just testing "ordinary" regular
+expressions, you probably don't need any of these. The following escapes are
recognized:
-
- \\a alarm (= BEL)
- \\b backspace
- \\e escape
- \\f formfeed
- \\n newline
- \\r carriage return
- \\t tab
- \\v vertical tab
- \\nnn octal character (up to 3 octal digits)
- \\xhh hexadecimal character (up to 2 hex digits)
- \\x{hh...} hexadecimal UTF-8 character
-
- \\A pass the PCRE_ANCHORED option to \fBpcre_exec()\fR
- \\B pass the PCRE_NOTBOL option to \fBpcre_exec()\fR
- \\Cdd call pcre_copy_substring() for substring dd
- after a successful match (any decimal number
- less than 32)
- \\Gdd call pcre_get_substring() for substring dd
- after a successful match (any decimal number
- less than 32)
- \\L call pcre_get_substringlist() after a
- successful match
- \\N pass the PCRE_NOTEMPTY option to \fBpcre_exec()\fR
- \\Odd set the size of the output vector passed to
- \fBpcre_exec()\fR to dd (any number of decimal
- digits)
- \\Z pass the PCRE_NOTEOL option to \fBpcre_exec()\fR
-
-When \\O is used, it may be higher or lower than the size set by the \fB-O\fR
-option (or defaulted to 45); \\O applies only to the call of \fBpcre_exec()\fR
-for the line in which it appears.
-
+.sp
+ \ea alarm (= BEL)
+ \eb backspace
+ \ee escape
+ \ef formfeed
+ \en newline
+ \er carriage return
+ \et tab
+ \ev vertical tab
+ \ennn octal character (up to 3 octal digits)
+ \exhh hexadecimal character (up to 2 hex digits)
+.\" JOIN
+ \ex{hh...} hexadecimal character, any number of digits
+ in UTF-8 mode
+ \eA pass the PCRE_ANCHORED option to \fBpcre_exec()\fP
+ \eB pass the PCRE_NOTBOL option to \fBpcre_exec()\fP
+.\" JOIN
+ \eCdd call pcre_copy_substring() for substring dd
+ after a successful match (number less than 32)
+.\" JOIN
+ \eCname call pcre_copy_named_substring() for substring
+ "name" after a successful match (name termin-
+ ated by next non alphanumeric character)
+.\" JOIN
+ \eC+ show the current captured substrings at callout
+ time
+ \eC- do not supply a callout function
+.\" JOIN
+ \eC!n return 1 instead of 0 when callout number n is
+ reached
+.\" JOIN
+ \eC!n!m return 1 instead of 0 when callout number n is
+ reached for the nth time
+.\" JOIN
+ \eC*n pass the number n (may be negative) as callout
+ data; this is used as the callout return value
+.\" JOIN
+ \eGdd call pcre_get_substring() for substring dd
+ after a successful match (number less than 32)
+.\" JOIN
+ \eGname call pcre_get_named_substring() for substring
+ "name" after a successful match (name termin-
+ ated by next non-alphanumeric character)
+.\" JOIN
+ \eL call pcre_get_substringlist() after a
+ successful match
+ \eM discover the minimum MATCH_LIMIT setting
+ \eN pass the PCRE_NOTEMPTY option to \fBpcre_exec()\fP
+.\" JOIN
+ \eOdd set the size of the output vector passed to
+ \fBpcre_exec()\fP to dd (any number of digits)
+ \eP pass the PCRE_PARTIAL option to \fBpcre_exec()\fP
+ \eS output details of memory get/free calls during matching
+ \eZ pass the PCRE_NOTEOL option to \fBpcre_exec()\fP
+.\" JOIN
+ \e? pass the PCRE_NO_UTF8_CHECK option to
+ \fBpcre_exec()\fP
+ \e>dd start the match at offset dd (any number of digits);
+ this sets the \fIstartoffset\fP argument for \fBpcre_exec()\fP
+.sp
A backslash followed by anything else just escapes the anything else. If the
very last character is a backslash, it is ignored. This gives a way of passing
an empty line as data, since a real empty line terminates the data input.
-
-If \fB/P\fR was present on the regex, causing the POSIX wrapper API to be used,
-only \fB\B\fR, and \fB\Z\fR have any effect, causing REG_NOTBOL and REG_NOTEOL
-to be passed to \fBregexec()\fR respectively.
-
-The use of \\x{hh...} to represent UTF-8 characters is not dependent on the use
-of the \fB/8\fR modifier on the pattern. It is recognized always. There may be
+.P
+If \eM is present, \fBpcretest\fP calls \fBpcre_exec()\fP several times, with
+different values in the \fImatch_limit\fP field of the \fBpcre_extra\fP data
+structure, until it finds the minimum number that is needed for
+\fBpcre_exec()\fP to complete. This number is a measure of the amount of
+recursion and backtracking that takes place, and checking it out can be
+instructive. For most simple matches, the number is quite small, but for
+patterns with very large numbers of matching possibilities, it can become large
+very quickly with increasing length of subject string.
+.P
+When \eO is used, the value specified may be higher or lower than the size set
+by the \fB-O\fP command line option (or defaulted to 45); \eO applies only to
+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, only \eB and \eZ have any effect, causing REG_NOTBOL and
+REG_NOTEOL to be passed to \fBregexec()\fP respectively.
+.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
any number of hexadecimal digits inside the braces. The result is from one to
six bytes, encoded according to the UTF-8 rules.
-
-
-.SH OUTPUT FROM PCRETEST
-
+.
+.
+.SH "OUTPUT FROM PCRETEST"
+.rs
+.sp
When a match succeeds, pcretest outputs the list of captured substrings that
-\fBpcre_exec()\fR returns, starting with number 0 for the string that matched
-the whole pattern. Here is an example of an interactive pcretest run.
-
+\fBpcre_exec()\fP returns, starting with number 0 for the string that matched
+the whole pattern. Otherwise, it outputs "No match" or "Partial match"
+when \fBpcre_exec()\fP returns PCRE_ERROR_NOMATCH or PCRE_ERROR_PARTIAL,
+respectively, and otherwise the PCRE negative error number. Here is an example
+of an interactive pcretest run.
+.sp
$ pcretest
- PCRE version 2.06 08-Jun-1999
-
- re> /^abc(\\d+)/
+ PCRE version 5.00 07-Sep-2004
+.sp
+ re> /^abc(\ed+)/
data> abc123
0: abc123
1: 123
data> xyz
No match
-
-If the strings contain any non-printing characters, they are output as \\0x
-escapes, or as \\x{...} escapes if the \fB/8\fR modifier was present on the
-pattern. If the pattern has the \fB/+\fR modifier, then the output for
-substring 0 is followed by the the rest of the subject string, identified by
-"0+" like this:
-
+.sp
+If the strings contain any non-printing characters, they are output as \e0x
+escapes, or as \ex{...} escapes if the \fB/8\fP modifier was present on the
+pattern. If the pattern has the \fB/+\fP modifier, the output for substring 0
+is followed by the the rest of the subject string, identified by "0+" like
+this:
+.sp
re> /cat/+
data> cataract
0: cat
0+ aract
-
-If the pattern has the \fB/g\fR or \fB/G\fR modifier, the results of successive
+.sp
+If the pattern has the \fB/g\fP or \fB/G\fP modifier, the results of successive
matching attempts are output in sequence, like this:
-
- re> /\\Bi(\\w\\w)/g
+.sp
+ re> /\eBi(\ew\ew)/g
data> Mississippi
0: iss
1: ss
@@ -251,32 +350,134 @@ matching attempts are output in sequence, like this:
1: ss
0: ipp
1: pp
-
+.sp
"No match" is output only if the first match attempt fails.
-
-If any of the sequences \fB\\C\fR, \fB\\G\fR, or \fB\\L\fR are present in a
+.P
+If any of the sequences \fB\eC\fP, \fB\eG\fP, or \fB\eL\fP are present in a
data line that is successfully matched, the substrings extracted by the
convenience functions are output with C, G, or L after the string number
instead of a colon. This is in addition to the normal full list. The string
length (that is, the return from the extraction function) is given in
-parentheses after each string for \fB\\C\fR and \fB\\G\fR.
-
+parentheses after each string for \fB\eC\fP and \fB\eG\fP.
+.P
Note that while patterns can be continued over several lines (a plain ">"
prompt is used for continuations), data lines may not. However newlines can be
-included in data by means of the \\n escape.
-
-
+included in data by means of the \en escape.
+.
+.
+.SH CALLOUTS
+.rs
+.sp
+If the pattern contains any callout requests, \fBpcretest\fP's callout function
+is called during matching. By default, it displays the callout number, the
+start and current positions in the text at the callout time, and the next
+pattern item to be tested. For example, the output
+.sp
+ --->pqrabcdef
+ 0 ^ ^ \ed
+.sp
+indicates that callout number 0 occurred for a match attempt starting at the
+fourth character of the subject string, when the pointer was at the seventh
+character of the data, and when the next pattern item was \ed. Just one
+circumflex is output if the start and current positions are the same.
+.P
+Callouts numbered 255 are assumed to be automatic callouts, inserted as a
+result of the \fB/C\fP pattern modifier. In this case, instead of showing the
+callout number, the offset in the pattern, preceded by a plus, is output. For
+example:
+.sp
+ re> /\ed?[A-E]\e*/C
+ data> E*
+ --->E*
+ +0 ^ \ed?
+ +3 ^ [A-E]
+ +8 ^^ \e*
+ +10 ^ ^
+ 0: E*
+.sp
+The callout function in \fBpcretest\fP returns zero (carry on matching) by
+default, but you can use an \eC item in a data line (as described above) to
+change this.
+.P
+Inserting callouts can be helpful when using \fBpcretest\fP to check
+complicated regular expressions. For further information about callouts, see
+the
+.\" HREF
+\fBpcrecallout\fP
+.\"
+documentation.
+.
+.
+.SH "SAVING AND RELOADING COMPILED PATTERNS"
+.rs
+.sp
+The facilities described in this section are not available when the POSIX
+inteface to PCRE is being used, that is, when the \fB/P\fP pattern modifier is
+specified.
+.P
+When the POSIX interface is not in use, you can cause \fBpcretest\fP to write a
+compiled pattern to a file, by following the modifiers with > and a file name.
+For example:
+.sp
+ /pattern/im >/some/file
+.sp
+See the
+.\" HREF
+\fBpcreprecompile\fP
+.\"
+documentation for a discussion about saving and re-using compiled patterns.
+.P
+The data that is written is binary. The first eight bytes are the length of the
+compiled pattern data followed by the length of the optional study data, each
+written as four bytes in big-endian order (most significant byte first). If
+there is no study data (either the pattern was not studied, or studying did not
+return any data), the second length is zero. The lengths are followed by an
+exact copy of the compiled pattern. If there is additional study data, this
+follows immediately after the compiled pattern. After writing the file,
+\fBpcretest\fP expects to read a new pattern.
+.P
+A saved pattern can be reloaded into \fBpcretest\fP by specifing < and a file
+name instead of a pattern. The name of the file must not contain a < character,
+as otherwise \fBpcretest\fP will interpret the line as a pattern delimited by <
+characters.
+For example:
+.sp
+ re> </some/file
+ Compiled regex loaded from /some/file
+ No study data
+.sp
+When the pattern has been loaded, \fBpcretest\fP proceeds to read data lines in
+the usual way.
+.P
+You can copy a file written by \fBpcretest\fP to a different host and reload it
+there, even if the new host has opposite endianness to the one on which the
+pattern was compiled. For example, you can compile on an i86 machine and run on
+a SPARC machine.
+.P
+File names for saving and reloading can be absolute or relative, but note that
+the shell facility of expanding a file name that starts with a tilde (~) is not
+available.
+.P
+The ability to save and reload files in \fBpcretest\fP is intended for testing
+and experimentation. It is not intended for production use because only a
+single pattern can be written to a file. Furthermore, there is no facility for
+supplying custom character tables for use with a reloaded pattern. If the
+original pattern was compiled with custom tables, an attempt to match a subject
+string using a reloaded pattern is likely to cause \fBpcretest\fP to crash.
+Finally, if you attempt to load a file that is not in the correct format, the
+result is undefined.
+.
+.
.SH AUTHOR
+.rs
+.sp
Philip Hazel <ph10@cam.ac.uk>
.br
University Computing Service,
.br
-New Museums Site,
-.br
Cambridge CB2 3QG, England.
+.P
+.in 0
+Last updated: 10 September 2004
.br
-Phone: +44 1223 334714
-
-Last updated: 15 August 2001
-.br
-Copyright (c) 1997-2001 University of Cambridge.
+Copyright (c) 1997-2004 University of Cambridge.
diff --git a/srclib/pcre/doc/pcretest.txt b/srclib/pcre/doc/pcretest.txt
index 0e13b6c6c5..7da68894a1 100644
--- a/srclib/pcre/doc/pcretest.txt
+++ b/srclib/pcre/doc/pcretest.txt
@@ -1,319 +1,450 @@
-NAME
- pcretest - a program for testing Perl-compatible regular
- expressions.
+PCRETEST(1) PCRETEST(1)
+
+NAME
+ pcretest - a program for testing Perl-compatible regular expressions.
SYNOPSIS
- pcretest [-d] [-i] [-m] [-o osize] [-p] [-t] [source] [des-
- tination]
- pcretest was written as a test program for the PCRE regular
- expression library itself, but it can also be used for
- experimenting with regular expressions. This man page
- describes the features of the test program; for details of
- the regular expressions themselves, see the pcre man page.
+ pcretest [-C] [-d] [-i] [-m] [-o osize] [-p] [-t] [source]
+ [destination]
+ pcretest was written as a test program for the PCRE regular expression
+ library itself, but it can also be used for experimenting with regular
+ expressions. This document describes the features of the test program;
+ for details of the regular expressions themselves, see the pcrepattern
+ documentation. For details of the PCRE library function calls and their
+ options, see the pcreapi documentation.
OPTIONS
- -d Behave as if each regex had the /D modifier (see
- below); the internal form is output after compila-
- tion.
-
- -i Behave as if each regex had the /I modifier;
- information about the compiled pattern is given
- after compilation.
-
- -m Output the size of each compiled pattern after it
- has been compiled. This is equivalent to adding /M
- to each regular expression. For compatibility with
- earlier versions of pcretest, -s is a synonym for
- -m.
-
- -o osize Set the number of elements in the output vector
- that is used when calling PCRE to be osize. The
- default value is 45, which is enough for 14 cap-
- turing subexpressions. The vector size can be
- changed for individual matching calls by including
- \O in the data line (see below).
- -p Behave as if each regex has /P modifier; the POSIX
- wrapper API is used to call PCRE. None of the
- other options has any effect when -p is set.
+ -C Output the version number of the PCRE library, and all avail-
+ able information about the optional features that are
+ included, and then exit.
- -t Run each compile, study, and match 20000 times
- with a timer, and output resulting time per com-
- pile or match (in milliseconds). Do not set -t
- with -m, because you will then get the size output
- 20000 times and the timing will be distorted.
+ -d Behave as if each regex had the /D (debug) modifier; the
+ internal form is output after compilation.
+ -i Behave as if each regex had the /I modifier; information
+ about the compiled pattern is given after compilation.
+ -m Output the size of each compiled pattern after it has been
+ compiled. This is equivalent to adding /M to each regular
+ expression. For compatibility with earlier versions of
+ pcretest, -s is a synonym for -m.
-DESCRIPTION
- If pcretest is given two filename arguments, it reads from
- the first and writes to the second. If it is given only one
-
+ -o osize Set the number of elements in the output vector that is used
+ when calling pcre_exec() to be osize. The default value is
+ 45, which is enough for 14 capturing subexpressions. The vec-
+ tor size can be changed for individual matching calls by
+ including \O in the data line (see below).
+ -p Behave as if each regex has /P modifier; the POSIX wrapper
+ API is used to call PCRE. None of the other options has any
+ effect when -p is set.
+ -t Run each compile, study, and match many times with a timer,
+ and output resulting time per compile or match (in millisec-
+ onds). Do not set -m with -t, because you will then get the
+ size output a zillion times, and the timing will be dis-
+ torted.
-SunOS 5.8 Last change: 1
+DESCRIPTION
+ If pcretest is given two filename arguments, it reads from the first
+ and writes to the second. If it is given only one filename argument, it
+ reads from that file and writes to stdout. Otherwise, it reads from
+ stdin and writes to stdout, and prompts for each line of input, using
+ "re>" to prompt for regular expressions, and "data>" to prompt for data
+ lines.
- filename argument, it reads from that file and writes to
- stdout. Otherwise, it reads from stdin and writes to stdout,
- and prompts for each line of input, using "re>" to prompt
- for regular expressions, and "data>" to prompt for data
- lines.
+ The program handles any number of sets of input on a single input file.
+ Each set starts with a regular expression, and continues with any num-
+ ber of data lines to be matched against the pattern.
- The program handles any number of sets of input on a single
- input file. Each set starts with a regular expression, and
- continues with any number of data lines to be matched
- against the pattern. An empty line signals the end of the
- data lines, at which point a new regular expression is read.
- The regular expressions are given enclosed in any non-
- alphameric delimiters other than backslash, for example
+ Each data line is matched separately and independently. If you want to
+ do multiple-line matches, you have to use the \n escape sequence in a
+ single line of input to encode the newline characters. The maximum
+ length of data line is 30,000 characters.
- /(a|bc)x+yz/
+ An empty line signals the end of the data lines, at which point a new
+ regular expression is read. The regular expressions are given enclosed
+ in any non-alphanumeric delimiters other than backslash, for example
- White space before the initial delimiter is ignored. A regu-
- lar expression may be continued over several input lines, in
- which case the newline characters are included within it. It
- is possible to include the delimiter within the pattern by
- escaping it, for example
+ /(a|bc)x+yz/
- /abc\/def/
+ White space before the initial delimiter is ignored. A regular expres-
+ sion may be continued over several input lines, in which case the new-
+ line characters are included within it. It is possible to include the
+ delimiter within the pattern by escaping it, for example
- If you do so, the escape and the delimiter form part of the
- pattern, but since delimiters are always non-alphameric,
- this does not affect its interpretation. If the terminating
- delimiter is immediately followed by a backslash, for exam-
- ple,
+ /abc\/def/
- /abc/\
+ If you do so, the escape and the delimiter form part of the pattern,
+ but since delimiters are always non-alphanumeric, this does not affect
+ its interpretation. If the terminating delimiter is immediately fol-
+ lowed by a backslash, for example,
- then a backslash is added to the end of the pattern. This is
- done to provide a way of testing the error condition that
- arises if a pattern finishes with a backslash, because
+ /abc/\
- /abc\/
+ then a backslash is added to the end of the pattern. This is done to
+ provide a way of testing the error condition that arises if a pattern
+ finishes with a backslash, because
- is interpreted as the first line of a pattern that starts
- with "abc/", causing pcretest to read the next line as a
- continuation of the regular expression.
+ /abc\/
+ is interpreted as the first line of a pattern that starts with "abc/",
+ causing pcretest to read the next line as a continuation of the regular
+ expression.
PATTERN MODIFIERS
- The pattern may be followed by i, m, s, or x to set the
- PCRE_CASELESS, PCRE_MULTILINE, PCRE_DOTALL, or PCRE_EXTENDED
- options, respectively. For example:
-
- /caseless/i
-
- These modifier letters have the same effect as they do in
- Perl. There are others which set PCRE options that do not
- correspond to anything in Perl: /A, /E, and /X set
- PCRE_ANCHORED, PCRE_DOLLAR_ENDONLY, and PCRE_EXTRA respec-
- tively.
-
- 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 difference 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 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
- 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, and the normal
- match is retried. This imitates the way Perl handles such
- cases when using the /g modifier or the split() function.
-
- There are a number of other modifiers for controlling the
- way pcretest operates.
-
- The /+ modifier requests that as well as outputting the sub-
- string 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 /L modifier must be followed directly by the name of a
- locale, for example,
-
- /pattern/Lfr
-
- For this reason, it must be the last modifier letter. 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 expres-
- sion. Without an /L modifier, NULL is passed as the tables
- pointer; that is, /L applies only to the expression on which
- it appears.
-
- The /I modifier requests that pcretest output information
- about the compiled expression (whether it is anchored, has a
- fixed first character, and so on). It does this by calling
- pcre_fullinfo() after compiling an expression, and output-
- ting the information it gets back. If the pattern is stu-
- died, the results of that are also output.
- The /D modifier is a PCRE debugging feature, which also
- assumes /I. It causes the internal form of compiled regular
- expressions to be output after compilation.
-
- 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 /M modifier causes the size of memory block used to hold
- the compiled 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 the (currently incom-
- plete) 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.
+ A pattern may be followed by any number of modifiers, which are mostly
+ single characters. Following Perl usage, these are referred to below
+ as, for example, "the /i modifier", even though the delimiter of the
+ pattern need not always be a slash, and no slash is used when writing
+ modifiers. Whitespace may appear between the final pattern delimiter
+ and the first modifier, and between the modifiers themselves.
+
+ The /i, /m, /s, and /x modifiers set the PCRE_CASELESS, PCRE_MULTILINE,
+ PCRE_DOTALL, or PCRE_EXTENDED options, respectively, when pcre_com-
+ pile() is called. These four modifier letters have the same effect as
+ they do in Perl. For example:
+
+ /caseless/i
+
+ The following table shows additional modifiers for setting PCRE options
+ that do not correspond to anything in Perl:
+
+ /A PCRE_ANCHORED
+ /C PCRE_AUTO_CALLOUT
+ /E PCRE_DOLLAR_ENDONLY
+ /N PCRE_NO_AUTO_CAPTURE
+ /U PCRE_UNGREEDY
+ /X PCRE_EXTRA
+
+ 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
+ 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 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, and the normal match is retried. This imitates the way Perl han-
+ dles such cases when using the /g modifier or the split() function.
+
+ 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
+ subject contains multiple copies of the same substring.
+
+ The /L modifier must be followed directly by the name of a locale, for
+ example,
+
+ /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 modifier, NULL is passed as the
+ tables pointer; that is, /L applies only to the expression on which it
+ appears.
+
+ The /I modifier requests that pcretest output information about the
+ compiled pattern (whether it is anchored, has a fixed first character,
+ and so on). It does this by calling pcre_fullinfo() after compiling a
+ pattern. If the pattern is studied, the results of that are also out-
+ put.
+
+ The /D modifier is a PCRE debugging feature, which also assumes /I. It
+ causes the internal form of compiled regular expressions to be output
+ after compilation. If the pattern was studied, the information returned
+ is also output.
+
+ 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 /S modifier causes pcre_study() to be called after the expression
+ has been compiled, and the results used when the expression is matched.
+
+ 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.
DATA LINES
- Before each data line is passed to pcre_exec(), leading and
- trailing whitespace is removed, and it is then scanned for \
- escapes. The following are recognized:
-
- \a alarm (= BEL)
- \b backspace
- \e escape
- \f formfeed
- \n newline
- \r carriage return
- \t tab
- \v vertical tab
- \nnn octal character (up to 3 octal digits)
- \xhh hexadecimal character (up to 2 hex digits)
- \x{hh...} hexadecimal UTF-8 character
-
- \A pass the PCRE_ANCHORED option to pcre_exec()
- \B pass the PCRE_NOTBOL option to pcre_exec()
- \Cdd call pcre_copy_substring() for substring dd
- after a successful match (any decimal number
- less than 32)
- \Gdd call pcre_get_substring() for substring dd
-
- after a successful match (any decimal number
- less than 32)
- \L call pcre_get_substringlist() after a
- successful match
- \N pass the PCRE_NOTEMPTY option to pcre_exec()
- \Odd set the size of the output vector passed to
- pcre_exec() to dd (any number of decimal
- digits)
- \Z pass the PCRE_NOTEOL option to pcre_exec()
-
- When \O is used, it may be higher or lower than the size set
- by the -O option (or defaulted to 45); \O applies only to
- the call of pcre_exec() for the line in which it appears.
-
- A backslash followed by anything else just escapes the any-
- thing else. If the very last character is a backslash, it is
- ignored. This gives a way of passing an empty line as data,
- since a real empty line terminates the data input.
-
- If /P was present on the regex, causing the POSIX wrapper
- API to be used, only B, and Z have any effect, causing
- REG_NOTBOL and REG_NOTEOL to be passed to regexec() respec-
- tively.
-
- 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. There may be any number of hexadecimal
- digits inside the braces. The result is from one to six
- bytes, encoded according to the UTF-8 rules.
+ Before each data line is passed to pcre_exec(), leading and trailing
+ whitespace is removed, and it is then scanned for \ escapes. Some of
+ these are pretty esoteric features, intended for checking out some of
+ the more complicated features of PCRE. If you are just testing "ordi-
+ nary" regular expressions, you probably don't need any of these. The
+ following escapes are recognized:
+
+ \a alarm (= BEL)
+ \b backspace
+ \e escape
+ \f formfeed
+ \n newline
+ \r carriage return
+ \t tab
+ \v vertical tab
+ \nnn octal character (up to 3 octal digits)
+ \xhh hexadecimal character (up to 2 hex digits)
+ \x{hh...} hexadecimal character, any number of digits
+ in UTF-8 mode
+ \A pass the PCRE_ANCHORED option to pcre_exec()
+ \B pass the PCRE_NOTBOL option to pcre_exec()
+ \Cdd call pcre_copy_substring() for substring dd
+ after a successful match (number less than 32)
+ \Cname call pcre_copy_named_substring() for substring
+ "name" after a successful match (name termin-
+ ated by next non alphanumeric character)
+ \C+ show the current captured substrings at callout
+ time
+ \C- do not supply a callout function
+ \C!n return 1 instead of 0 when callout number n is
+ reached
+ \C!n!m return 1 instead of 0 when callout number n is
+ reached for the nth time
+ \C*n pass the number n (may be negative) as callout
+ data; this is used as the callout return value
+ \Gdd call pcre_get_substring() for substring dd
+ after a successful match (number less than 32)
+ \Gname call pcre_get_named_substring() for substring
+ "name" after a successful match (name termin-
+ ated by next non-alphanumeric character)
+ \L call pcre_get_substringlist() after a
+ successful match
+ \M discover the minimum MATCH_LIMIT setting
+ \N pass the PCRE_NOTEMPTY option to pcre_exec()
+ \Odd set the size of the output vector passed to
+ pcre_exec() to dd (any number of digits)
+ \P pass the PCRE_PARTIAL option to pcre_exec()
+ \S output details of memory get/free calls during matching
+ \Z pass the PCRE_NOTEOL option to pcre_exec()
+ \? pass the PCRE_NO_UTF8_CHECK option to
+ pcre_exec()
+ \>dd start the match at offset dd (any number of digits);
+ this sets the startoffset argument for pcre_exec()
+
+ A backslash followed by anything else just escapes the anything else.
+ If the very last character is a backslash, it is ignored. This gives a
+ way of passing an empty line as data, since a real empty line termi-
+ nates the data input.
+
+ If \M is present, pcretest calls pcre_exec() several times, with dif-
+ ferent values in the match_limit field of the pcre_extra data struc-
+ ture, until it finds the minimum number that is needed for pcre_exec()
+ to complete. This number is a measure of the amount of recursion and
+ backtracking that takes place, and checking it out can be instructive.
+ For most simple matches, the number is quite small, but for patterns
+ with very large numbers of matching possibilities, it can become large
+ very quickly with increasing length of subject string.
+
+ When \O is used, the value specified may be higher or lower than the
+ size set by the -O command line option (or defaulted to 45); \O applies
+ only to the call of pcre_exec() for the line in which it appears.
+
+ If the /P modifier was present on the pattern, causing the POSIX wrap-
+ per API to be used, only \B and \Z have any effect, causing REG_NOTBOL
+ and REG_NOTEOL to be passed to regexec() respectively.
+
+ 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.
+ There may be any number of hexadecimal digits inside the braces. The
+ result is from one to six bytes, encoded according to the UTF-8 rules.
OUTPUT FROM PCRETEST
- When a match succeeds, pcretest outputs the list of captured
- substrings that pcre_exec() returns, starting with number 0
- for the string that matched the whole pattern. Here is an
- example of an interactive pcretest run.
-
- $ pcretest
- PCRE version 2.06 08-Jun-1999
-
- re> /^abc(\d+)/
- data> abc123
- 0: abc123
- 1: 123
- data> xyz
- No match
-
- If the strings contain any non-printing characters, they are
- output as \0x escapes, or as \x{...} escapes if the /8
- modifier was present on the pattern. If the pattern has the
- /+ modifier, then the output for substring 0 is followed by
- the the rest of the subject string, identified by "0+" like
- this:
-
- re> /cat/+
- data> cataract
- 0: cat
- 0+ aract
-
- If the pattern has the /g or /G modifier, the results of
- successive matching attempts are output in sequence, like
- this:
-
- re> /\Bi(\w\w)/g
- data> Mississippi
- 0: iss
- 1: ss
- 0: iss
- 1: ss
- 0: ipp
- 1: pp
-
- "No match" is output only if the first match attempt fails.
-
- If any of the sequences \C, \G, or \L are present in a data
- line that is successfully matched, the substrings extracted
- by the convenience functions are output with C, G, or L
- after the string number instead of a colon. This is in addi-
- tion to the normal full list. The string length (that is,
- the return from the extraction function) is given in
- parentheses after each string for \C and \G.
-
- Note that while patterns can be continued over several lines
- (a plain ">" prompt is used for continuations), data lines
- may not. However newlines can be included in data by means
- of the \n escape.
+ When a match succeeds, pcretest outputs the list of captured substrings
+ that pcre_exec() returns, starting with number 0 for the string that
+ matched the whole pattern. Otherwise, it outputs "No match" or "Partial
+ match" when pcre_exec() returns PCRE_ERROR_NOMATCH or PCRE_ERROR_PAR-
+ TIAL, respectively, and otherwise the PCRE negative error number. Here
+ is an example of an interactive pcretest run.
+
+ $ pcretest
+ PCRE version 5.00 07-Sep-2004
+
+ re> /^abc(\d+)/
+ data> abc123
+ 0: abc123
+ 1: 123
+ data> xyz
+ No match
+
+ If the strings contain any non-printing characters, they are output as
+ \0x escapes, or as \x{...} escapes if the /8 modifier was present on
+ the pattern. If the pattern has the /+ modifier, the output for sub-
+ string 0 is followed by the the rest of the subject string, identified
+ by "0+" like this:
+
+ re> /cat/+
+ data> cataract
+ 0: cat
+ 0+ aract
+
+ If the pattern has the /g or /G modifier, the results of successive
+ matching attempts are output in sequence, like this:
+
+ re> /\Bi(\w\w)/g
+ data> Mississippi
+ 0: iss
+ 1: ss
+ 0: iss
+ 1: ss
+ 0: ipp
+ 1: pp
+
+ "No match" is output only if the first match attempt fails.
+
+ If any of the sequences \C, \G, or \L are present in a data line that
+ is successfully matched, the substrings extracted by the convenience
+ functions are output with C, G, or L after the string number instead of
+ a colon. This is in addition to the normal full list. The string length
+ (that is, the return from the extraction function) is given in paren-
+ theses after each string for \C and \G.
+
+ Note that while patterns can be continued over several lines (a plain
+ ">" prompt is used for continuations), data lines may not. However new-
+ lines can be included in data by means of the \n escape.
+
+
+CALLOUTS
+
+ If the pattern contains any callout requests, pcretest's callout func-
+ tion is called during matching. By default, it displays the callout
+ number, the start and current positions in the text at the callout
+ time, and the next pattern item to be tested. For example, the output
+
+ --->pqrabcdef
+ 0 ^ ^ \d
+
+ indicates that callout number 0 occurred for a match attempt starting
+ at the fourth character of the subject string, when the pointer was at
+ the seventh character of the data, and when the next pattern item was
+ \d. Just one circumflex is output if the start and current positions
+ are the same.
+
+ Callouts numbered 255 are assumed to be automatic callouts, inserted as
+ a result of the /C pattern modifier. In this case, instead of showing
+ the callout number, the offset in the pattern, preceded by a plus, is
+ output. For example:
+
+ re> /\d?[A-E]\*/C
+ data> E*
+ --->E*
+ +0 ^ \d?
+ +3 ^ [A-E]
+ +8 ^^ \*
+ +10 ^ ^
+ 0: E*
+
+ The callout function in pcretest returns zero (carry on matching) by
+ default, but you can use an \C item in a data line (as described above)
+ to change this.
+
+ Inserting callouts can be helpful when using pcretest to check compli-
+ cated regular expressions. For further information about callouts, see
+ the pcrecallout documentation.
+
+
+SAVING AND RELOADING COMPILED PATTERNS
+
+ The facilities described in this section are not available when the
+ POSIX inteface to PCRE is being used, that is, when the /P pattern mod-
+ ifier is specified.
+
+ When the POSIX interface is not in use, you can cause pcretest to write
+ a compiled pattern to a file, by following the modifiers with > and a
+ file name. For example:
+
+ /pattern/im >/some/file
+
+ See the pcreprecompile documentation for a discussion about saving and
+ re-using compiled patterns.
+
+ The data that is written is binary. The first eight bytes are the
+ length of the compiled pattern data followed by the length of the
+ optional study data, each written as four bytes in big-endian order
+ (most significant byte first). If there is no study data (either the
+ pattern was not studied, or studying did not return any data), the sec-
+ ond length is zero. The lengths are followed by an exact copy of the
+ compiled pattern. If there is additional study data, this follows imme-
+ diately after the compiled pattern. After writing the file, pcretest
+ expects to read a new pattern.
+
+ A saved pattern can be reloaded into pcretest by specifing < and a file
+ name instead of a pattern. The name of the file must not contain a <
+ character, as otherwise pcretest will interpret the line as a pattern
+ delimited by < characters. For example:
+
+ re> </some/file
+ Compiled regex loaded from /some/file
+ No study data
+
+ When the pattern has been loaded, pcretest proceeds to read data lines
+ in the usual way.
+
+ You can copy a file written by pcretest to a different host and reload
+ it there, even if the new host has opposite endianness to the one on
+ which the pattern was compiled. For example, you can compile on an i86
+ machine and run on a SPARC machine.
+
+ File names for saving and reloading can be absolute or relative, but
+ note that the shell facility of expanding a file name that starts with
+ a tilde (~) is not available.
+
+ The ability to save and reload files in pcretest is intended for test-
+ ing and experimentation. It is not intended for production use because
+ only a single pattern can be written to a file. Furthermore, there is
+ no facility for supplying custom character tables for use with a
+ reloaded pattern. If the original pattern was compiled with custom
+ tables, an attempt to match a subject string using a reloaded pattern
+ is likely to cause pcretest to crash. Finally, if you attempt to load
+ a file that is not in the correct format, the result is undefined.
AUTHOR
- Philip Hazel <ph10@cam.ac.uk>
- University Computing Service,
- New Museums Site,
- Cambridge CB2 3QG, England.
- Phone: +44 1223 334714
-
- Last updated: 15 August 2001
- Copyright (c) 1997-2001 University of Cambridge.
+
+ Philip Hazel <ph10@cam.ac.uk>
+ University Computing Service,
+ Cambridge CB2 3QG, England.
+
+Last updated: 10 September 2004
+Copyright (c) 1997-2004 University of Cambridge.
diff --git a/srclib/pcre/doc/perltest.txt b/srclib/pcre/doc/perltest.txt
index 5a404016b5..f1d2c15961 100644
--- a/srclib/pcre/doc/perltest.txt
+++ b/srclib/pcre/doc/perltest.txt
@@ -7,23 +7,27 @@ input patterns can be followed only by Perl's lower case modifiers and /+ (as
used by pcretest), which is recognized and handled by the program.
The data lines are processed as Perl double-quoted strings, so if they contain
-" \ $ or @ characters, these have to be escaped. For this reason, all such
-characters in testinput1 and testinput3 are escaped so that they can be used
-for perltest as well as for pcretest, and the special upper case modifiers such
-as /A that pcretest recognizes are not used in these files. The output should
-be identical, apart from the initial identifying banner.
+" $ or @ characters, these have to be escaped. For this reason, all such
+characters in testinput1 and testinput4 are escaped so that they can be used
+for perltest as well as for pcretest. The special upper case pattern
+modifiers such as /A that pcretest recognizes, and its special data line
+escapes, are not used in these files. The output should be identical, apart
+from the initial identifying banner.
-For testing UTF-8 features, an alternative form of perltest, called perltest8,
-is supplied. This requires Perl 5.6 or higher. It recognizes the special
-modifier /8 that pcretest uses to invoke UTF-8 functionality. The testinput5
-file can be fed to perltest8.
+The perltest script can also test UTF-8 features. It works as is for Perl 5.8
+or higher. It recognizes the special modifier /8 that pcretest uses to invoke
+UTF-8 functionality. The testinput4 file can be fed to perltest to run
+compatible UTF-8 tests.
-The testinput2 and testinput4 files are not suitable for feeding to perltest,
-since they do make use of the special upper case modifiers and escapes that
-pcretest uses to test some features of PCRE. The first of these files also
-contains malformed regular expressions, in order to check that PCRE diagnoses
-them correctly. Similarly, testinput6 tests UTF-8 features that do not relate
-to Perl.
+For Perl 5.6, perltest won't work unmodified for the UTF-8 tests. You need to
+uncomment the "use utf8" lines that it contains. It is best to do this on a
+copy of the script, because for non-UTF-8 tests, these lines should remain
+commented out.
+
+The other testinput files are not suitable for feeding to perltest, since they
+make use of the special upper case modifiers and escapes that pcretest uses to
+test some features of PCRE. Some of these files also contains malformed regular
+expressions, in order to check that PCRE diagnoses them correctly.
Philip Hazel <ph10@cam.ac.uk>
-August 2000
+September 2004
diff --git a/srclib/pcre/get.c b/srclib/pcre/get.c
index 55e736dc24..225843e2e2 100644
--- a/srclib/pcre/get.c
+++ b/srclib/pcre/get.c
@@ -9,32 +9,40 @@ the file Tech.Notes for some information on the internals.
Written by: Philip Hazel <ph10@cam.ac.uk>
- Copyright (c) 1997-2001 University of Cambridge
+ Copyright (c) 1997-2003 University of Cambridge
-----------------------------------------------------------------------------
-Permission is granted to anyone to use this software for any purpose on any
-computer system, and to redistribute it freely, subject to the following
-restrictions:
-
-1. This software is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-2. The origin of this software must not be misrepresented, either by
- explicit claim or by omission.
-
-3. Altered versions must be plainly marked as such, and must not be
- misrepresented as being the original software.
-
-4. If PCRE is embedded in any software that is released under the GNU
- General Purpose Licence (GPL), then the terms of that licence shall
- supersede any condition above with which it is incompatible.
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
-----------------------------------------------------------------------------
*/
/* This module contains some convenience functions for extracting substrings
from the subject string after a regex match has succeeded. The original idea
-for these functions came from Scott Wimer <scottw@cgibuilder.com>. */
+for these functions came from Scott Wimer. */
/* Include the internals header, which itself includes Standard C headers plus
@@ -43,6 +51,52 @@ the external pcre header. */
#include "internal.h"
+/*************************************************
+* Find number for named string *
+*************************************************/
+
+/* This function is used by the two extraction functions below, as well
+as being generally available.
+
+Arguments:
+ code the compiled regex
+ stringname the name whose number is required
+
+Returns: the number of the named parentheses, or a negative number
+ (PCRE_ERROR_NOSUBSTRING) if not found
+*/
+
+int
+pcre_get_stringnumber(const pcre *code, const char *stringname)
+{
+int rc;
+int entrysize;
+int top, bot;
+uschar *nametable;
+
+if ((rc = pcre_fullinfo(code, NULL, PCRE_INFO_NAMECOUNT, &top)) != 0)
+ return rc;
+if (top <= 0) return PCRE_ERROR_NOSUBSTRING;
+
+if ((rc = pcre_fullinfo(code, NULL, PCRE_INFO_NAMEENTRYSIZE, &entrysize)) != 0)
+ return rc;
+if ((rc = pcre_fullinfo(code, NULL, PCRE_INFO_NAMETABLE, &nametable)) != 0)
+ return rc;
+
+bot = 0;
+while (top > bot)
+ {
+ int mid = (top + bot) / 2;
+ uschar *entry = nametable + entrysize*mid;
+ int c = strcmp(stringname, (char *)(entry + 2));
+ if (c == 0) return (entry[0] << 8) + entry[1];
+ if (c > 0) bot = mid + 1; else top = mid;
+ }
+
+return PCRE_ERROR_NOSUBSTRING;
+}
+
+
/*************************************************
* Copy captured string to given buffer *
@@ -89,6 +143,44 @@ return yield;
/*************************************************
+* Copy named captured string to given buffer *
+*************************************************/
+
+/* This function copies a single captured substring into a given buffer,
+identifying it by name.
+
+Arguments:
+ code the compiled regex
+ subject the subject string that was matched
+ ovector pointer to the offsets table
+ stringcount the number of substrings that were captured
+ (i.e. the yield of the pcre_exec call, unless
+ that was zero, in which case it should be 1/3
+ of the offset table size)
+ stringname the name of the required substring
+ buffer where to put the substring
+ size the size of the buffer
+
+Returns: if successful:
+ the length of the copied string, not including the zero
+ that is put on the end; can be zero
+ if not successful:
+ PCRE_ERROR_NOMEMORY (-6) buffer too small
+ PCRE_ERROR_NOSUBSTRING (-7) no such captured substring
+*/
+
+int
+pcre_copy_named_substring(const pcre *code, const char *subject, int *ovector,
+ int stringcount, const char *stringname, char *buffer, int size)
+{
+int n = pcre_get_stringnumber(code, stringname);
+if (n <= 0) return n;
+return pcre_copy_substring(subject, ovector, stringcount, n, buffer, size);
+}
+
+
+
+/*************************************************
* Copy all captured strings to new store *
*************************************************/
@@ -208,6 +300,44 @@ return yield;
/*************************************************
+* Copy named captured string to new store *
+*************************************************/
+
+/* This function copies a single captured substring, identified by name, into
+new store.
+
+Arguments:
+ code the compiled regex
+ subject the subject string that was matched
+ ovector pointer to the offsets table
+ stringcount the number of substrings that were captured
+ (i.e. the yield of the pcre_exec call, unless
+ that was zero, in which case it should be 1/3
+ of the offset table size)
+ stringname the name of the required substring
+ stringptr where to put the pointer
+
+Returns: if successful:
+ the length of the copied string, not including the zero
+ that is put on the end; can be zero
+ if not successful:
+ PCRE_ERROR_NOMEMORY (-6) couldn't get memory
+ PCRE_ERROR_NOSUBSTRING (-7) no such captured substring
+*/
+
+int
+pcre_get_named_substring(const pcre *code, const char *subject, int *ovector,
+ int stringcount, const char *stringname, const char **stringptr)
+{
+int n = pcre_get_stringnumber(code, stringname);
+if (n <= 0) return n;
+return pcre_get_substring(subject, ovector, stringcount, n, stringptr);
+}
+
+
+
+
+/*************************************************
* Free store obtained by get_substring *
*************************************************/
diff --git a/srclib/pcre/internal.h b/srclib/pcre/internal.h
index 0c8c1c9df6..5d1433178f 100644
--- a/srclib/pcre/internal.h
+++ b/srclib/pcre/internal.h
@@ -5,30 +5,38 @@
/* This is a library of functions to support regular expressions whose syntax
and semantics are as close as possible to those of the Perl 5 language. See
-the file Tech.Notes for some information on the internals.
+the file doc/Tech.Notes for some information on the internals.
Written by: Philip Hazel <ph10@cam.ac.uk>
- Copyright (c) 1997-2001 University of Cambridge
+ Copyright (c) 1997-2004 University of Cambridge
-----------------------------------------------------------------------------
-Permission is granted to anyone to use this software for any purpose on any
-computer system, and to redistribute it freely, subject to the following
-restrictions:
-
-1. This software is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-2. The origin of this software must not be misrepresented, either by
- explicit claim or by omission.
-
-3. Altered versions must be plainly marked as such, and must not be
- misrepresented as being the original software.
-
-4. If PCRE is embedded in any software that is released under the GNU
- General Purpose Licence (GPL), then the terms of that licence shall
- supersede any condition above with which it is incompatible.
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
-----------------------------------------------------------------------------
*/
@@ -39,6 +47,68 @@ modules, but which are not relevant to the outside. */
#include "config.h"
+/* Standard C headers plus the external interface definition. The only time
+setjmp and stdarg are used is when NO_RECURSE is set. */
+
+#include <ctype.h>
+#include <limits.h>
+#include <setjmp.h>
+#include <stdarg.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#ifndef PCRE_SPY
+#define PCRE_DEFINITION /* Win32 __declspec(export) trigger for .dll */
+#endif
+
+/* We need to have types that specify unsigned 16-bit and 32-bit integers. We
+cannot determine these outside the compilation (e.g. by running a program as
+part of "configure") because PCRE is often cross-compiled for use on other
+systems. Instead we make use of the maximum sizes that are available at
+preprocessor time in standard C environments. */
+
+#if USHRT_MAX == 65535
+ typedef unsigned short pcre_uint16;
+#elif UINT_MAX == 65535
+ typedef unsigned int pcre_uint16;
+#else
+ #error Cannot determine a type for 16-bit unsigned integers
+#endif
+
+#if UINT_MAX == 4294967295
+ typedef unsigned int pcre_uint32;
+#elif ULONG_MAX == 4294967295
+ typedef unsigned long int pcre_uint32;
+#else
+ #error Cannot determine a type for 32-bit unsigned integers
+#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
+should make things easier for callers. We define a short type for unsigned char
+to save lots of typing. I tried "uchar", but it causes problems on Digital
+Unix, where it is defined in sys/types, so use "uschar" instead. */
+
+typedef unsigned char uschar;
+
+/* Include the public PCRE header */
+
+#include "pcre.h"
+
+/* When compiling for use with the Virtual Pascal compiler, these functions
+need to have their names changed. PCRE must be compiled with the -DVPCOMPAT
+option on the command line. */
+
+#ifdef VPCOMPAT
+#define strncmp(s1,s2,m) _strncmp(s1,s2,m)
+#define memcpy(d,s,n) _memcpy(d,s,n)
+#define memmove(d,s,n) _memmove(d,s,n)
+#define memset(s,c,n) _memset(s,c,n)
+#else /* VPCOMPAT */
+
/* To cope with SunOS4 and other systems that lack memmove() but have bcopy(),
define a macro for memmove() if HAVE_MEMMOVE is false, provided that HAVE_BCOPY
is set. Otherwise, include an emulating function for those systems that have
@@ -50,7 +120,7 @@ case in PCRE. */
#undef memmove /* some systems may have a macro */
#if HAVE_BCOPY
#define memmove(a, b, c) bcopy(b, a, c)
-#else
+#else /* HAVE_BCOPY */
void *
pcre_memmove(unsigned char *dest, const unsigned char *src, size_t n)
{
@@ -60,18 +130,86 @@ src += n;
for (i = 0; i < n; ++i) *(--dest) = *(--src);
}
#define memmove(a, b, c) pcre_memmove(a, b, c)
-#endif
+#endif /* not HAVE_BCOPY */
+#endif /* not HAVE_MEMMOVE */
+#endif /* not VPCOMPAT */
+
+
+/* PCRE keeps offsets in its compiled code as 2-byte quantities (always stored
+in big-endian order) by default. These are used, for example, to link from the
+start of a subpattern to its alternatives and its end. The use of 2 bytes per
+offset limits the size of the compiled regex to around 64K, which is big enough
+for almost everybody. However, I received a request for an even bigger limit.
+For this reason, and also to make the code easier to maintain, the storing and
+loading of offsets from the byte string is now handled by the macros that are
+defined here.
+
+The macros are controlled by the value of LINK_SIZE. This defaults to 2 in
+the config.h file, but can be overridden by using -D on the command line. This
+is automated on Unix systems via the "configure" command. */
+
+#if LINK_SIZE == 2
+
+#define PUT(a,n,d) \
+ (a[n] = (d) >> 8), \
+ (a[(n)+1] = (d) & 255)
+
+#define GET(a,n) \
+ (((a)[n] << 8) | (a)[(n)+1])
+
+#define MAX_PATTERN_SIZE (1 << 16)
+
+
+#elif LINK_SIZE == 3
+
+#define PUT(a,n,d) \
+ (a[n] = (d) >> 16), \
+ (a[(n)+1] = (d) >> 8), \
+ (a[(n)+2] = (d) & 255)
+
+#define GET(a,n) \
+ (((a)[n] << 16) | ((a)[(n)+1] << 8) | (a)[(n)+2])
+
+#define MAX_PATTERN_SIZE (1 << 24)
+
+
+#elif LINK_SIZE == 4
+
+#define PUT(a,n,d) \
+ (a[n] = (d) >> 24), \
+ (a[(n)+1] = (d) >> 16), \
+ (a[(n)+2] = (d) >> 8), \
+ (a[(n)+3] = (d) & 255)
+
+#define GET(a,n) \
+ (((a)[n] << 24) | ((a)[(n)+1] << 16) | ((a)[(n)+2] << 8) | (a)[(n)+3])
+
+#define MAX_PATTERN_SIZE (1 << 30) /* Keep it positive */
+
+
+#else
+#error LINK_SIZE must be either 2, 3, or 4
#endif
-/* Standard C headers plus the external interface definition */
-#include <ctype.h>
-#include <limits.h>
-#include <stddef.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "pcre.h"
+/* Convenience macro defined in terms of the others */
+
+#define PUTINC(a,n,d) PUT(a,n,d), a += LINK_SIZE
+
+
+/* PCRE uses some other 2-byte quantities that do not change when the size of
+offsets changes. There are used for repeat counts and for other things such as
+capturing parenthesis numbers in back references. */
+
+#define PUT2(a,n,d) \
+ a[n] = (d) >> 8; \
+ a[(n)+1] = (d) & 255
+
+#define GET2(a,n) \
+ (((a)[n] << 8) | (a)[(n)+1])
+
+#define PUT2INC(a,n,d) PUT2(a,n,d), a += 2
+
/* In case there is no definition of offsetof() provided - though any proper
Standard C system should have one. */
@@ -80,6 +218,7 @@ Standard C system should have one. */
#define offsetof(p_type,field) ((size_t)&(((p_type *)0)->field))
#endif
+
/* These are the public options that can change during matching. */
#define PCRE_IMS (PCRE_CASELESS|PCRE_MULTILINE|PCRE_DOTALL)
@@ -88,13 +227,13 @@ Standard C system should have one. */
but skip the top bit so we can use ints for convenience without getting tangled
with negative values. The public options defined in pcre.h start at the least
significant end. Make sure they don't overlap, though now that we have expanded
-to four bytes there is plenty of space. */
+to four bytes, there is plenty of space. */
-#define PCRE_FIRSTSET 0x40000000 /* first_char is set */
-#define PCRE_REQCHSET 0x20000000 /* req_char is set */
+#define PCRE_FIRSTSET 0x40000000 /* first_byte is set */
+#define PCRE_REQCHSET 0x20000000 /* req_byte is set */
#define PCRE_STARTLINE 0x10000000 /* start after \n for multiline */
-#define PCRE_INGROUP 0x08000000 /* compiling inside a group */
-#define PCRE_ICHANGED 0x04000000 /* i option changes within regex */
+#define PCRE_ICHANGED 0x08000000 /* i option changes within regex */
+#define PCRE_NOPARTIAL 0x04000000 /* can't use partial with this regex */
/* Options for the "extra" block produced by pcre_study(). */
@@ -105,10 +244,12 @@ time, run time or study time, respectively. */
#define PUBLIC_OPTIONS \
(PCRE_CASELESS|PCRE_EXTENDED|PCRE_ANCHORED|PCRE_MULTILINE| \
- PCRE_DOTALL|PCRE_DOLLAR_ENDONLY|PCRE_EXTRA|PCRE_UNGREEDY|PCRE_UTF8)
+ PCRE_DOTALL|PCRE_DOLLAR_ENDONLY|PCRE_EXTRA|PCRE_UNGREEDY|PCRE_UTF8| \
+ PCRE_NO_AUTO_CAPTURE|PCRE_NO_UTF8_CHECK|PCRE_AUTO_CALLOUT)
#define PUBLIC_EXEC_OPTIONS \
- (PCRE_ANCHORED|PCRE_NOTBOL|PCRE_NOTEOL|PCRE_NOTEMPTY)
+ (PCRE_ANCHORED|PCRE_NOTBOL|PCRE_NOTEOL|PCRE_NOTEMPTY|PCRE_NO_UTF8_CHECK| \
+ PCRE_PARTIAL)
#define PUBLIC_STUDY_OPTIONS 0 /* None defined */
@@ -116,6 +257,17 @@ time, run time or study time, respectively. */
#define MAGIC_NUMBER 0x50435245UL /* 'PCRE' */
+/* Negative values for the firstchar and reqchar variables */
+
+#define REQ_UNSET (-2)
+#define REQ_NONE (-1)
+
+/* Flags added to firstbyte or reqbyte; a "non-literal" item is either a
+variable-length repeat, or a anything other than literal characters. */
+
+#define REQ_CASELESS 0x0100 /* indicates caselessness */
+#define REQ_VARY 0x0200 /* reqbyte followed non-literal item */
+
/* Miscellaneous definitions */
typedef int BOOL;
@@ -124,150 +276,267 @@ typedef int BOOL;
#define TRUE 1
/* Escape items that are just an encoding of a particular data value. Note that
-ESC_N is defined as yet another macro, which is set in config.h to either \n
+ESC_n is defined as yet another macro, which is set in config.h to either \n
(the default) or \r (which some people want). */
-#ifndef ESC_E
-#define ESC_E 27
+#ifndef ESC_e
+#define ESC_e 27
#endif
-#ifndef ESC_F
-#define ESC_F '\f'
+#ifndef ESC_f
+#define ESC_f '\f'
#endif
-#ifndef ESC_N
-#define ESC_N NEWLINE
+#ifndef ESC_n
+#define ESC_n NEWLINE
#endif
-#ifndef ESC_R
-#define ESC_R '\r'
+#ifndef ESC_r
+#define ESC_r '\r'
#endif
-#ifndef ESC_T
-#define ESC_T '\t'
+/* We can't officially use ESC_t because it is a POSIX reserved identifier
+(presumably because of all the others like size_t). */
+
+#ifndef ESC_tee
+#define ESC_tee '\t'
#endif
/* 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. The final one must be ESC_REF as subsequent
-values are used for \1, \2, \3, etc. There is a test in the code for an escape
-greater than ESC_b and less than ESC_Z to detect the types that may be
-repeated. If any new escapes are put in-between that don't consume a character,
-that code will have to change. */
+definitions below, up to ESC_z. There's a dummy for OP_ANY because it
+corresponds to "." rather than an escape sequence. The final one must be
+ESC_REF as subsequent values are used for \1, \2, \3, etc. There is are two
+tests in the code for an escape greater than ESC_b and less than ESC_Z to
+detect the types that may be repeated. These are the types that consume
+characters. If any new escapes are put in between that don't consume a
+character, that code will have to change. */
+
+enum { ESC_A = 1, ESC_G, ESC_B, ESC_b, ESC_D, ESC_d, ESC_S, ESC_s, ESC_W,
+ ESC_w, ESC_dum1, ESC_C, ESC_P, ESC_p, ESC_X, ESC_Z, ESC_z, ESC_E,
+ ESC_Q, ESC_REF };
+
+/* Flag bits and data types for the extended class (OP_XCLASS) for classes that
+contain UTF-8 characters with values greater than 255. */
+
+#define XCL_NOT 0x01 /* Flag: this is a negative class */
+#define XCL_MAP 0x02 /* Flag: a 32-byte map is present */
+
+#define XCL_END 0 /* Marks end of individual items */
+#define XCL_SINGLE 1 /* Single item (one multibyte char) follows */
+#define XCL_RANGE 2 /* A range (two multibyte chars) follows */
+#define XCL_PROP 3 /* Unicode property (one property code) follows */
+#define XCL_NOTPROP 4 /* Unicode inverted property (ditto) */
-enum { ESC_A = 1, ESC_B, ESC_b, ESC_D, ESC_d, ESC_S, ESC_s, ESC_W, ESC_w,
- ESC_Z, ESC_z, ESC_REF };
/* Opcode table: OP_BRA must be last, as all values >= it are used for brackets
that extract substrings. 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. */
+OP_EOD must correspond in order to the list of escapes immediately above.
+Note that whenever this list is updated, the two macro definitions that follow
+must also be updated to match. */
enum {
- OP_END, /* End of pattern */
+ OP_END, /* 0 End of pattern */
/* Values corresponding to backslashed metacharacters */
- OP_SOD, /* Start of data: \A */
- OP_NOT_WORD_BOUNDARY, /* \B */
- OP_WORD_BOUNDARY, /* \b */
- OP_NOT_DIGIT, /* \D */
- OP_DIGIT, /* \d */
- OP_NOT_WHITESPACE, /* \S */
- OP_WHITESPACE, /* \s */
- OP_NOT_WORDCHAR, /* \W */
- OP_WORDCHAR, /* \w */
- OP_EODN, /* End of data or \n at end of data: \Z. */
- OP_EOD, /* End of data: \z */
-
- OP_OPT, /* Set runtime options */
- OP_CIRC, /* Start of line - varies with multiline switch */
- OP_DOLL, /* End of line - varies with multiline switch */
- OP_ANY, /* Match any character */
- OP_CHARS, /* Match string of characters */
- OP_NOT, /* Match anything but the following char */
-
- OP_STAR, /* The maximizing and minimizing versions of */
- OP_MINSTAR, /* all these opcodes must come in pairs, with */
- OP_PLUS, /* the minimizing one second. */
- OP_MINPLUS, /* This first set applies to single characters */
- OP_QUERY,
- OP_MINQUERY,
- OP_UPTO, /* From 0 to n matches */
- OP_MINUPTO,
- OP_EXACT, /* Exactly n matches */
-
- OP_NOTSTAR, /* The maximizing and minimizing versions of */
- OP_NOTMINSTAR, /* all these opcodes must come in pairs, with */
- OP_NOTPLUS, /* the minimizing one second. */
- OP_NOTMINPLUS, /* This first set applies to "not" single characters */
- OP_NOTQUERY,
- OP_NOTMINQUERY,
- OP_NOTUPTO, /* From 0 to n matches */
- OP_NOTMINUPTO,
- OP_NOTEXACT, /* Exactly n matches */
-
- OP_TYPESTAR, /* The maximizing and minimizing versions of */
- OP_TYPEMINSTAR, /* all these opcodes must come in pairs, with */
- OP_TYPEPLUS, /* the minimizing one second. These codes must */
- OP_TYPEMINPLUS, /* be in exactly the same order as those above. */
- OP_TYPEQUERY, /* This set applies to character types such as \d */
- OP_TYPEMINQUERY,
- OP_TYPEUPTO, /* From 0 to n matches */
- OP_TYPEMINUPTO,
- OP_TYPEEXACT, /* Exactly n matches */
-
- OP_CRSTAR, /* The maximizing and minimizing versions of */
- OP_CRMINSTAR, /* all these opcodes must come in pairs, with */
- OP_CRPLUS, /* the minimizing one second. These codes must */
- OP_CRMINPLUS, /* be in exactly the same order as those above. */
- OP_CRQUERY, /* These are for character classes and back refs */
- OP_CRMINQUERY,
- OP_CRRANGE, /* These are different to the three seta above. */
- OP_CRMINRANGE,
-
- OP_CLASS, /* Match a character class */
- OP_REF, /* Match a back reference */
- OP_RECURSE, /* Match this pattern recursively */
-
- OP_ALT, /* Start of alternation */
- OP_KET, /* End of group that doesn't have an unbounded repeat */
- OP_KETRMAX, /* These two must remain together and in this */
- OP_KETRMIN, /* order. They are for groups the repeat for ever. */
+ OP_SOD, /* 1 Start of data: \A */
+ OP_SOM, /* 2 Start of match (subject + offset): \G */
+ OP_NOT_WORD_BOUNDARY, /* 3 \B */
+ OP_WORD_BOUNDARY, /* 4 \b */
+ OP_NOT_DIGIT, /* 5 \D */
+ OP_DIGIT, /* 6 \d */
+ OP_NOT_WHITESPACE, /* 7 \S */
+ OP_WHITESPACE, /* 8 \s */
+ OP_NOT_WORDCHAR, /* 9 \W */
+ OP_WORDCHAR, /* 10 \w */
+ OP_ANY, /* 11 Match any character */
+ OP_ANYBYTE, /* 12 Match any byte (\C); different to OP_ANY for UTF-8 */
+ OP_NOTPROP, /* 13 \P (not Unicode property) */
+ OP_PROP, /* 14 \p (Unicode property) */
+ OP_EXTUNI, /* 15 \X (extended Unicode sequence */
+ OP_EODN, /* 16 End of data or \n at end of data: \Z. */
+ OP_EOD, /* 17 End of data: \z */
+
+ OP_OPT, /* 18 Set runtime options */
+ OP_CIRC, /* 19 Start of line - varies with multiline switch */
+ OP_DOLL, /* 20 End of line - varies with multiline switch */
+ OP_CHAR, /* 21 Match one character, casefully */
+ OP_CHARNC, /* 22 Match one character, caselessly */
+ OP_NOT, /* 23 Match anything but the following char */
+
+ OP_STAR, /* 24 The maximizing and minimizing versions of */
+ OP_MINSTAR, /* 25 all these opcodes must come in pairs, with */
+ OP_PLUS, /* 26 the minimizing one second. */
+ OP_MINPLUS, /* 27 This first set applies to single characters */
+ OP_QUERY, /* 28 */
+ OP_MINQUERY, /* 29 */
+ OP_UPTO, /* 30 From 0 to n matches */
+ OP_MINUPTO, /* 31 */
+ OP_EXACT, /* 32 Exactly n matches */
+
+ OP_NOTSTAR, /* 33 The maximizing and minimizing versions of */
+ OP_NOTMINSTAR, /* 34 all these opcodes must come in pairs, with */
+ OP_NOTPLUS, /* 35 the minimizing one second. */
+ OP_NOTMINPLUS, /* 36 This set applies to "not" single characters */
+ OP_NOTQUERY, /* 37 */
+ OP_NOTMINQUERY, /* 38 */
+ OP_NOTUPTO, /* 39 From 0 to n matches */
+ OP_NOTMINUPTO, /* 40 */
+ OP_NOTEXACT, /* 41 Exactly n matches */
+
+ OP_TYPESTAR, /* 42 The maximizing and minimizing versions of */
+ OP_TYPEMINSTAR, /* 43 all these opcodes must come in pairs, with */
+ OP_TYPEPLUS, /* 44 the minimizing one second. These codes must */
+ OP_TYPEMINPLUS, /* 45 be in exactly the same order as those above. */
+ OP_TYPEQUERY, /* 46 This set applies to character types such as \d */
+ OP_TYPEMINQUERY, /* 47 */
+ OP_TYPEUPTO, /* 48 From 0 to n matches */
+ OP_TYPEMINUPTO, /* 49 */
+ OP_TYPEEXACT, /* 50 Exactly n matches */
+
+ OP_CRSTAR, /* 51 The maximizing and minimizing versions of */
+ OP_CRMINSTAR, /* 52 all these opcodes must come in pairs, with */
+ OP_CRPLUS, /* 53 the minimizing one second. These codes must */
+ OP_CRMINPLUS, /* 54 be in exactly the same order as those above. */
+ OP_CRQUERY, /* 55 These are for character classes and back refs */
+ OP_CRMINQUERY, /* 56 */
+ OP_CRRANGE, /* 57 These are different to the three sets above. */
+ OP_CRMINRANGE, /* 58 */
+
+ OP_CLASS, /* 59 Match a character class, chars < 256 only */
+ OP_NCLASS, /* 60 Same, but the bitmap was created from a negative
+ class - the difference is relevant only when a UTF-8
+ character > 255 is encountered. */
+
+ OP_XCLASS, /* 61 Extended class for handling UTF-8 chars within the
+ class. This does both positive and negative. */
+
+ OP_REF, /* 62 Match a back reference */
+ OP_RECURSE, /* 63 Match a numbered subpattern (possibly recursive) */
+ OP_CALLOUT, /* 64 Call out to external function if provided */
+
+ OP_ALT, /* 65 Start of alternation */
+ OP_KET, /* 66 End of group that doesn't have an unbounded repeat */
+ OP_KETRMAX, /* 67 These two must remain together and in this */
+ OP_KETRMIN, /* 68 order. They are for groups the repeat for ever. */
/* The assertions must come before ONCE and COND */
- OP_ASSERT, /* Positive lookahead */
- OP_ASSERT_NOT, /* Negative lookahead */
- OP_ASSERTBACK, /* Positive lookbehind */
- OP_ASSERTBACK_NOT, /* Negative lookbehind */
- OP_REVERSE, /* Move pointer back - used in lookbehind assertions */
+ OP_ASSERT, /* 69 Positive lookahead */
+ OP_ASSERT_NOT, /* 70 Negative lookahead */
+ OP_ASSERTBACK, /* 71 Positive lookbehind */
+ OP_ASSERTBACK_NOT, /* 72 Negative lookbehind */
+ OP_REVERSE, /* 73 Move pointer back - used in lookbehind assertions */
/* ONCE and COND must come after the assertions, with ONCE first, as there's
a test for >= ONCE for a subpattern that isn't an assertion. */
- OP_ONCE, /* Once matched, don't back up into the subpattern */
- OP_COND, /* Conditional group */
- OP_CREF, /* Used to hold an extraction string number (cond ref) */
+ OP_ONCE, /* 74 Once matched, don't back up into the subpattern */
+ OP_COND, /* 75 Conditional group */
+ OP_CREF, /* 76 Used to hold an extraction string number (cond ref) */
- OP_BRAZERO, /* These two must remain together and in this */
- OP_BRAMINZERO, /* order. */
+ OP_BRAZERO, /* 77 These two must remain together and in this */
+ OP_BRAMINZERO, /* 78 order. */
- OP_BRANUMBER, /* Used for extracting brackets whose number is greater
- than can fit into an opcode. */
+ OP_BRANUMBER, /* 79 Used for extracting brackets whose number is greater
+ than can fit into an opcode. */
- OP_BRA /* This and greater values are used for brackets that
- extract substrings up to a basic limit. After that,
- use is made of OP_BRANUMBER. */
+ OP_BRA /* 80 This and greater values are used for brackets that
+ extract substrings up to EXTRACT_BASIC_MAX. After
+ that, use is made of OP_BRANUMBER. */
};
+/* WARNING WARNING WARNING: There is an implicit assumption in pcre.c and
+study.c that all opcodes are less than 128 in value. This makes handling UTF-8
+character sequences easier. */
+
/* The highest extraction number before we have to start using additional
bytes. (Originally PCRE didn't have support for extraction counts highter than
this number.) The value is limited by the number of opcodes left after OP_BRA,
i.e. 255 - OP_BRA. We actually set it a bit lower to leave room for additional
opcodes. */
-#define EXTRACT_BASIC_MAX 150
+#define EXTRACT_BASIC_MAX 100
+
+
+/* This macro defines textual names for all the opcodes. There are used only
+for debugging, in pcre.c when DEBUG is defined, and also in pcretest.c. The
+macro is referenced only in printint.c. */
+
+#define OP_NAME_LIST \
+ "End", "\\A", "\\G", "\\B", "\\b", "\\D", "\\d", \
+ "\\S", "\\s", "\\W", "\\w", "Any", "Anybyte", \
+ "notprop", "prop", "extuni", \
+ "\\Z", "\\z", \
+ "Opt", "^", "$", "char", "charnc", "not", \
+ "*", "*?", "+", "+?", "?", "??", "{", "{", "{", \
+ "*", "*?", "+", "+?", "?", "??", "{", "{", "{", \
+ "*", "*?", "+", "+?", "?", "??", "{", "{", "{", \
+ "*", "*?", "+", "+?", "?", "??", "{", "{", \
+ "class", "nclass", "xclass", "Ref", "Recurse", "Callout", \
+ "Alt", "Ket", "KetRmax", "KetRmin", "Assert", "Assert not", \
+ "AssertB", "AssertB not", "Reverse", "Once", "Cond", "Cond ref",\
+ "Brazero", "Braminzero", "Branumber", "Bra"
+
+
+/* This macro defines the length of fixed length operations in the compiled
+regex. The lengths are used when searching for specific things, and also in the
+debugging printing of a compiled regex. We use a macro so that it can be
+incorporated both into pcre.c and pcretest.c without being publicly exposed.
+
+As things have been extended, some of these are no longer fixed lenths, but are
+minima instead. For example, the length of a single-character repeat may vary
+in UTF-8 mode. The code that uses this table must know about such things. */
+
+#define OP_LENGTHS \
+ 1, /* End */ \
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* \A, \G, \B, \B, \D, \d, \S, \s, \W, \w */ \
+ 1, 1, /* Any, Anybyte */ \
+ 2, 2, 1, /* NOTPROP, PROP, EXTUNI */ \
+ 1, 1, 2, 1, 1, /* \Z, \z, Opt, ^, $ */ \
+ 2, /* Char - the minimum length */ \
+ 2, /* Charnc - the minimum length */ \
+ 2, /* not */ \
+ /* Positive single-char repeats ** These are */ \
+ 2, 2, 2, 2, 2, 2, /* *, *?, +, +?, ?, ?? ** minima in */ \
+ 4, 4, 4, /* upto, minupto, exact ** UTF-8 mode */ \
+ /* Negative single-char repeats - only for chars < 256 */ \
+ 2, 2, 2, 2, 2, 2, /* NOT *, *?, +, +?, ?, ?? */ \
+ 4, 4, 4, /* NOT upto, minupto, exact */ \
+ /* Positive type repeats */ \
+ 2, 2, 2, 2, 2, 2, /* Type *, *?, +, +?, ?, ?? */ \
+ 4, 4, 4, /* Type upto, minupto, exact */ \
+ /* Character class & ref repeats */ \
+ 1, 1, 1, 1, 1, 1, /* *, *?, +, +?, ?, ?? */ \
+ 5, 5, /* CRRANGE, CRMINRANGE */ \
+ 33, /* CLASS */ \
+ 33, /* NCLASS */ \
+ 0, /* XCLASS - variable length */ \
+ 3, /* REF */ \
+ 1+LINK_SIZE, /* RECURSE */ \
+ 2+2*LINK_SIZE, /* CALLOUT */ \
+ 1+LINK_SIZE, /* Alt */ \
+ 1+LINK_SIZE, /* Ket */ \
+ 1+LINK_SIZE, /* KetRmax */ \
+ 1+LINK_SIZE, /* KetRmin */ \
+ 1+LINK_SIZE, /* Assert */ \
+ 1+LINK_SIZE, /* Assert not */ \
+ 1+LINK_SIZE, /* Assert behind */ \
+ 1+LINK_SIZE, /* Assert behind not */ \
+ 1+LINK_SIZE, /* Reverse */ \
+ 1+LINK_SIZE, /* Once */ \
+ 1+LINK_SIZE, /* COND */ \
+ 3, /* CREF */ \
+ 1, 1, /* BRAZERO, BRAMINZERO */ \
+ 3, /* BRANUMBER */ \
+ 1+LINK_SIZE /* BRA */ \
+
+
+/* A magic value for OP_CREF to indicate the "in recursion" condition. */
+
+#define CREF_RECURSE 0xffff
/* The texts of compile-time error messages are defined as macros here so that
they can be accessed by the POSIX wrapper and converted into error codes. Yes,
@@ -286,9 +555,9 @@ just to accommodate the POSIX wrapper. */
#define ERR10 "operand of unlimited repeat could match the empty string"
#define ERR11 "internal error: unexpected repeat"
#define ERR12 "unrecognized character after (?"
-#define ERR13 "unused error"
+#define ERR13 "POSIX named classes are supported only within a class"
#define ERR14 "missing )"
-#define ERR15 "back reference to non-existent subpattern"
+#define ERR15 "reference to non-existent subpattern"
#define ERR16 "erroffset passed as NULL"
#define ERR17 "unknown option bit(s) set"
#define ERR18 "missing ) after comment"
@@ -302,45 +571,69 @@ just to accommodate the POSIX wrapper. */
#define ERR26 "malformed number after (?("
#define ERR27 "conditional group contains more than two branches"
#define ERR28 "assertion expected after (?("
-#define ERR29 "(?p must be followed by )"
+#define ERR29 "(?R or (?digits must be followed by )"
#define ERR30 "unknown POSIX class name"
#define ERR31 "POSIX collating elements are not supported"
#define ERR32 "this version of PCRE is not compiled with PCRE_UTF8 support"
-#define ERR33 "characters with values > 255 are not yet supported in classes"
+#define ERR33 "spare error"
#define ERR34 "character value in \\x{...} sequence is too large"
#define ERR35 "invalid condition (?(0)"
-
-/* 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
-should make things easier for callers. We define a short type for unsigned char
-to save lots of typing. I tried "uchar", but it causes problems on Digital
-Unix, where it is defined in sys/types, so use "uschar" instead. */
-
-typedef unsigned char uschar;
-
-/* The real format of the start of the pcre block; the actual code vector
-runs on as long as necessary after the end. */
+#define ERR36 "\\C not allowed in lookbehind assertion"
+#define ERR37 "PCRE does not support \\L, \\l, \\N, \\U, or \\u"
+#define ERR38 "number after (?C is > 255"
+#define ERR39 "closing ) for (?C expected"
+#define ERR40 "recursive call could loop indefinitely"
+#define ERR41 "unrecognized character after (?P"
+#define ERR42 "syntax error after (?P"
+#define ERR43 "two named groups have the same name"
+#define ERR44 "invalid UTF-8 string"
+#define ERR45 "support for \\P, \\p, and \\X has not been compiled"
+#define ERR46 "malformed \\P or \\p sequence"
+#define ERR47 "unknown property name after \\P or \\p"
+
+/* 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
+offset to the name table so that if a regex is compiled on one host, saved, and
+then run on another where the size of pointers is different, all might still
+be well. For the case of compiled-on-4 and run-on-8, we include an extra
+pointer that is always NULL. For future-proofing, we also include a few dummy
+fields - even though you can never get this planning right!
+
+NOTE NOTE NOTE:
+Because people can now save and re-use compiled patterns, any additions to this
+structure should be made at the end, and something earlier (e.g. a new
+flag in the options or one of the dummy fields) should indicate that the new
+fields are present. Currently PCRE always sets the dummy fields to zero.
+NOTE NOTE NOTE:
+*/
typedef struct real_pcre {
- unsigned long int magic_number;
- size_t size;
- const unsigned char *tables;
- unsigned long int options;
- unsigned short int top_bracket;
- unsigned short int top_backref;
- uschar first_char;
- uschar req_char;
- uschar code[1];
+ pcre_uint32 magic_number;
+ pcre_uint32 size; /* Total that was malloced */
+ pcre_uint32 options;
+ pcre_uint32 dummy1; /* For future use, maybe */
+
+ pcre_uint16 top_bracket;
+ pcre_uint16 top_backref;
+ pcre_uint16 first_byte;
+ pcre_uint16 req_byte;
+ pcre_uint16 name_table_offset; /* Offset to name table that follows */
+ pcre_uint16 name_entry_size; /* Size of any name items */
+ pcre_uint16 name_count; /* Number of name items */
+ pcre_uint16 dummy2; /* For future use, maybe */
+
+ const unsigned char *tables; /* Pointer to tables or NULL for std */
+ const unsigned char *nullpad; /* NULL padding */
} real_pcre;
-/* The real format of the extra block returned by pcre_study(). */
+/* The format of the block used to store data from pcre_study(). The same
+remark (see NOTE above) about extending this structure applies. */
-typedef struct real_pcre_extra {
- uschar options;
+typedef struct pcre_study_data {
+ pcre_uint32 size; /* Total that was malloced */
+ pcre_uint32 options;
uschar start_bits[32];
-} real_pcre_extra;
-
+} pcre_study_data;
/* Structure for passing "static" information around between the functions
doing the compiling, so that they are thread-safe. */
@@ -350,13 +643,53 @@ typedef struct compile_data {
const uschar *fcc; /* Points to case-flipping table */
const uschar *cbits; /* Points to character type table */
const uschar *ctypes; /* Points to table of type maps */
+ const uschar *start_code; /* The start of the compiled code */
+ const uschar *start_pattern; /* The start of the pattern */
+ uschar *name_table; /* The name/number table */
+ int names_found; /* Number of entries so far */
+ int name_entry_size; /* Size of each entry */
+ int top_backref; /* Maximum back reference */
+ unsigned int backref_map; /* Bitmap of low back refs */
+ int req_varyopt; /* "After variable item" flag for reqbyte */
+ BOOL nopartial; /* Set TRUE if partial won't work */
} compile_data;
+/* Structure for maintaining a chain of pointers to the currently incomplete
+branches, for testing for left recursion. */
+
+typedef struct branch_chain {
+ struct branch_chain *outer;
+ uschar *current;
+} branch_chain;
+
+/* Structure for items in a linked list that represents an explicit recursive
+call within the pattern. */
+
+typedef struct recursion_info {
+ 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 */
+ const uschar *save_start; /* Old value of md->start_match */
+ int *offset_save; /* Pointer to start of saved offsets */
+ int saved_max; /* Number of saved offsets */
+} recursion_info;
+
+/* When compiling in a mode that doesn't use recursive calls to match(),
+a structure is used to remember local variables on the heap. It is defined in
+pcre.c, close to the match() function, so that it is easy to keep it in step
+with any changes of local variable. However, the pointer to the current frame
+must be saved in some "static" place over a longjmp(). We declare the
+structure here so that we can put a pointer in the match_data structure.
+NOTE: This isn't used for a "normal" compilation of pcre. */
+
+struct heapframe;
+
/* Structure for passing "static" information around between the functions
doing the matching, so that they are thread-safe. */
typedef struct match_data {
- int errorcode; /* As it says */
+ unsigned long int match_call_count; /* As it says */
+ unsigned long int match_limit;/* As it says */
int *offset_vector; /* Offset vector */
int offset_end; /* One past the end */
int offset_max; /* The maximum usable for return data */
@@ -368,12 +701,19 @@ typedef struct match_data {
BOOL utf8; /* UTF8 flag */
BOOL endonly; /* Dollar not before final \n */
BOOL notempty; /* Empty string match not wanted */
- const uschar *start_pattern; /* For use when recursing */
+ BOOL partial; /* PARTIAL flag */
+ BOOL hitend; /* Hit the end of the subject at some point */
+ const uschar *start_code; /* For use when recursing */
const uschar *start_subject; /* Start of the subject string */
const uschar *end_subject; /* End of the subject string */
const uschar *start_match; /* Start of this match attempt */
const uschar *end_match_ptr; /* Subject position at end match */
int end_offset_top; /* Highwater mark at end of match */
+ int capture_last; /* Most recent capture number */
+ int start_offset; /* The start offset value */
+ recursion_info *recursive; /* Linked list of recursion data */
+ void *callout_data; /* To pass back to callouts */
+ struct heapframe *thisframe; /* Used only when compiling for no recursion */
} match_data;
/* Bit definitions for entries in the pcre_ctypes table. */
diff --git a/srclib/pcre/libpcre.def b/srclib/pcre/libpcre.def
new file mode 100644
index 0000000000..2b35d10ba9
--- /dev/null
+++ b/srclib/pcre/libpcre.def
@@ -0,0 +1,19 @@
+LIBRARY libpcre
+EXPORTS
+pcre_malloc
+pcre_free
+pcre_config
+pcre_callout
+pcre_compile
+pcre_copy_substring
+pcre_exec
+pcre_get_substring
+pcre_get_stringnumber
+pcre_get_substring_list
+pcre_free_substring
+pcre_free_substring_list
+pcre_info
+pcre_fullinfo
+pcre_maketables
+pcre_study
+pcre_version
diff --git a/srclib/pcre/libpcre.pc.in b/srclib/pcre/libpcre.pc.in
new file mode 100644
index 0000000000..4784401c84
--- /dev/null
+++ b/srclib/pcre/libpcre.pc.in
@@ -0,0 +1,12 @@
+# Package Information for pkg-config
+
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: libpcre
+Description: PCRE - Perl compatible regular expressions C library
+Version: @PCRE_VERSION@
+Libs: -L${libdir} -lpcre
+Cflags: -I${includedir}
diff --git a/srclib/pcre/libpcreposix.def b/srclib/pcre/libpcreposix.def
new file mode 100644
index 0000000000..572344009e
--- /dev/null
+++ b/srclib/pcre/libpcreposix.def
@@ -0,0 +1,24 @@
+LIBRARY libpcreposix
+EXPORTS
+pcre_malloc
+pcre_free
+pcre_config
+pcre_callout
+pcre_compile
+pcre_copy_substring
+pcre_exec
+pcre_get_substring
+pcre_get_stringnumber
+pcre_get_substring_list
+pcre_free_substring
+pcre_free_substring_list
+pcre_info
+pcre_fullinfo
+pcre_maketables
+pcre_study
+pcre_version
+
+regcomp
+regexec
+regerror
+regfree
diff --git a/srclib/pcre/maketables.c b/srclib/pcre/maketables.c
index 01078f19e6..f1c7b9a5c4 100644
--- a/srclib/pcre/maketables.c
+++ b/srclib/pcre/maketables.c
@@ -8,29 +8,35 @@ and semantics are as close as possible to those of the Perl 5 language.
Written by: Philip Hazel <ph10@cam.ac.uk>
- Copyright (c) 1997-2001 University of Cambridge
+ Copyright (c) 1997-2003 University of Cambridge
-----------------------------------------------------------------------------
-Permission is granted to anyone to use this software for any purpose on any
-computer system, and to redistribute it freely, subject to the following
-restrictions:
-
-1. This software is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-2. The origin of this software must not be misrepresented, either by
- explicit claim or by omission.
-
-3. Altered versions must be plainly marked as such, and must not be
- misrepresented as being the original software.
-
-4. If PCRE is embedded in any software that is released under the GNU
- General Purpose Licence (GPL), then the terms of that licence shall
- supersede any condition above with which it is incompatible.
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
-----------------------------------------------------------------------------
-
-See the file Tech.Notes for some information on the internals.
*/
@@ -82,7 +88,9 @@ for (i = 0; i < 256; i++) *p++ = tolower(i);
for (i = 0; i < 256; i++) *p++ = islower(i)? toupper(i) : tolower(i);
/* Then the character class tables. Don't try to be clever and save effort
-on exclusive ones - in some locales things may be different. */
+on exclusive ones - in some locales things may be different. Note that the
+table for "space" includes everything "isspace" gives, including VT in the
+default locale. This makes it work for the POSIX class [:space:]. */
memset(p, 0, cbit_length);
for (i = 0; i < 256; i++)
@@ -112,19 +120,25 @@ for (i = 0; i < 256; i++)
}
p += cbit_length;
-/* Finally, the character type table */
+/* Finally, the character type table. In this, we exclude VT from the white
+space chars, because Perl doesn't recognize it as such for \s and for comments
+within regexes. */
for (i = 0; i < 256; i++)
{
int x = 0;
- if (isspace(i)) x += ctype_space;
+ if (i != 0x0b && isspace(i)) x += ctype_space;
if (isalpha(i)) x += ctype_letter;
if (isdigit(i)) x += ctype_digit;
if (isxdigit(i)) x += ctype_xdigit;
if (isalnum(i) || i == '_') x += ctype_word;
- if (strchr("*+?{^.$|()[", i) != 0) x += ctype_meta;
- *p++ = x;
- }
+
+ /* Note: strchr includes the terminating zero in the characters it considers.
+ In this instance, that is ok because we want binary zero to be flagged as a
+ meta-character, which in this sense is any character that terminates a run
+ of data characters. */
+
+ if (strchr("*+?{^.$|()[", i) != 0) x += ctype_meta; *p++ = x; }
return yield;
}
diff --git a/srclib/pcre/makevp.bat b/srclib/pcre/makevp.bat
new file mode 100644
index 0000000000..10bd2487a4
--- /dev/null
+++ b/srclib/pcre/makevp.bat
@@ -0,0 +1,25 @@
+@echo off
+
+REM This file was contributed by Alexander Tokarev for building PCRE for use
+REM with Virtual Pascal. It has not been tested with the latest PCRE release.
+
+REM CHANGE THIS FOR YOUR BORLAND C++ COMPILER PATH
+
+SET BORLAND=c:\usr\apps\bcc55
+
+sh configure
+
+bcc32 -DDFTABLES -DSTATIC -DVPCOMPAT -I%BORLAND%\include -L%BORLAND%\lib dftables.c
+
+dftables > chartables.c
+
+bcc32 -c -RT- -y- -v- -u- -P- -O2 -5 -DSTATIC -DVPCOMPAT -UDFTABLES -I%BORLAND%\include get.c maketables.c pcre.c study.c
+
+tlib %BORLAND%\lib\cw32.lib *calloc *del *strncmp *memcpy *memmove *memset
+tlib pcre.lib +get.obj +maketables.obj +pcre.obj +study.obj +calloc.obj +del.obj +strncmp.obj +memcpy.obj +memmove.obj +memset.obj
+
+del *.obj *.exe *.tds *.bak >nul 2>nul
+
+echo ---
+echo Now the library should be complete. Please check all messages above.
+echo Don't care for warnings, it's OK.
diff --git a/srclib/pcre/pcre-config.in b/srclib/pcre/pcre-config.in
index 8daded9fe1..30d66ced36 100644
--- a/srclib/pcre/pcre-config.in
+++ b/srclib/pcre/pcre-config.in
@@ -12,6 +12,13 @@ if test $# -eq 0; then
exit 1
fi
+libR=
+case `uname -s` in
+ *SunOS*)
+ libR=" -R@libdir@"
+ ;;
+esac
+
while test $# -gt 0; do
case "$1" in
-*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
@@ -45,10 +52,10 @@ while test $# -gt 0; do
echo $includes
;;
--libs-posix)
- echo -L@libdir@ -lpcreposix -lpcre
+ echo -L@libdir@$libR -lpcreposix -lpcre
;;
--libs)
- echo -L@libdir@ -lpcre
+ echo -L@libdir@$libR -lpcre
;;
*)
echo "${usage}" 1>&2
diff --git a/srclib/pcre/pcre.c b/srclib/pcre/pcre.c
index ad3ddc7c57..c495ec015f 100644
--- a/srclib/pcre/pcre.c
+++ b/srclib/pcre/pcre.c
@@ -9,32 +9,39 @@ the file Tech.Notes for some information on the internals.
Written by: Philip Hazel <ph10@cam.ac.uk>
- Copyright (c) 1997-2001 University of Cambridge
+ Copyright (c) 1997-2004 University of Cambridge
-----------------------------------------------------------------------------
-Permission is granted to anyone to use this software for any purpose on any
-computer system, and to redistribute it freely, subject to the following
-restrictions:
-
-1. This software is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-2. The origin of this software must not be misrepresented, either by
- explicit claim or by omission.
-
-3. Altered versions must be plainly marked as such, and must not be
- misrepresented as being the original software.
-
-4. If PCRE is embedded in any software that is released under the GNU
- General Purpose Licence (GPL), then the terms of that licence shall
- supersede any condition above with which it is incompatible.
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
-----------------------------------------------------------------------------
*/
/* Define DEBUG to get debugging output on stdout. */
-
/* #define DEBUG */
/* Use a macro for debugging printing, 'cause that eliminates the use of #ifdef
@@ -47,19 +54,19 @@ pre-processor statements. I suppose it's only been 10 years... */
#define DPRINTF(p) /*nothing*/
#endif
-/* Include the internals header, which itself includes Standard C headers plus
-the external pcre header. */
+/* Include the internals header, which itself includes "config.h", the Standard
+C headers, and the external pcre header. */
#include "internal.h"
+/* If Unicode Property support is wanted, include a private copy of the
+function that does it, and the table that translates names to numbers. */
-/* Allow compilation as C++ source code, should anybody want to do that. */
-
-#ifdef __cplusplus
-#define class pcre_class
+#ifdef SUPPORT_UCP
+#include "ucp.c"
+#include "ucptypetable.c"
#endif
-
/* Maximum number of items on the nested bracket stacks at compile time. This
applies to the nesting of all kinds of parentheses. It does not limit
un-nested, non-capturing parentheses. This number can be made bigger if
@@ -69,71 +76,92 @@ compile time. */
#define BRASTACK_SIZE 200
-/* The number of bytes in a literal character string above which we can't add
-any more is different when UTF-8 characters may be encountered. */
+/* 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,
+because the offset vector is always a multiple of 3 long. */
+
+#define REC_STACK_SAVE_MAX 30
+
+
+/* The maximum remaining length of subject we are prepared to search for a
+req_byte match. */
+
+#define REQ_BYTE_MAX 1000
-#ifdef SUPPORT_UTF8
-#define MAXLIT 250
-#else
-#define MAXLIT 255
-#endif
+/* Table of sizes for the fixed-length opcodes. It's defined in a macro so that
+the definition is next to the definition of the opcodes in internal.h. */
+
+static const uschar OP_lengths[] = { OP_LENGTHS };
/* Min and max values for the common repeats; for the maxima, 0 => infinity */
static const char rep_min[] = { 0, 0, 1, 1, 0, 0 };
static const char rep_max[] = { 0, 0, 0, 0, 1, 1 };
-/* Text forms of OP_ values and things, for debugging (not all used) */
-
-#ifdef DEBUG
-static const char *OP_names[] = {
- "End", "\\A", "\\B", "\\b", "\\D", "\\d",
- "\\S", "\\s", "\\W", "\\w", "\\Z", "\\z",
- "Opt", "^", "$", "Any", "chars", "not",
- "*", "*?", "+", "+?", "?", "??", "{", "{", "{",
- "*", "*?", "+", "+?", "?", "??", "{", "{", "{",
- "*", "*?", "+", "+?", "?", "??", "{", "{", "{",
- "*", "*?", "+", "+?", "?", "??", "{", "{",
- "class", "Ref", "Recurse",
- "Alt", "Ket", "KetRmax", "KetRmin", "Assert", "Assert not",
- "AssertB", "AssertB not", "Reverse", "Once", "Cond", "Cref",
- "Brazero", "Braminzero", "Branumber", "Bra"
-};
-#endif
-
/* 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
on. Zero means further processing is needed (for things like \x), or the escape
is invalid. */
+#if !EBCDIC /* This is the "normal" table for ASCII systems */
static const short int escapes[] = {
- 0, 0, 0, 0, 0, 0, 0, 0, /* 0 - 7 */
- 0, 0, ':', ';', '<', '=', '>', '?', /* 8 - ? */
- '@', -ESC_A, -ESC_B, 0, -ESC_D, 0, 0, 0, /* @ - G */
- 0, 0, 0, 0, 0, 0, 0, 0, /* H - O */
- 0, 0, 0, -ESC_S, 0, 0, 0, -ESC_W, /* P - W */
- 0, 0, -ESC_Z, '[', '\\', ']', '^', '_', /* X - _ */
- '`', 7, -ESC_b, 0, -ESC_d, ESC_E, ESC_F, 0, /* ` - g */
- 0, 0, 0, 0, 0, 0, ESC_N, 0, /* h - o */
- 0, 0, ESC_R, -ESC_s, ESC_T, 0, 0, -ESC_w, /* p - w */
- 0, 0, -ESC_z /* x - z */
+ 0, 0, 0, 0, 0, 0, 0, 0, /* 0 - 7 */
+ 0, 0, ':', ';', '<', '=', '>', '?', /* 8 - ? */
+ '@', -ESC_A, -ESC_B, -ESC_C, -ESC_D, -ESC_E, 0, -ESC_G, /* @ - G */
+ 0, 0, 0, 0, 0, 0, 0, 0, /* H - O */
+-ESC_P, -ESC_Q, 0, -ESC_S, 0, 0, 0, -ESC_W, /* P - W */
+-ESC_X, 0, -ESC_Z, '[', '\\', ']', '^', '_', /* X - _ */
+ '`', 7, -ESC_b, 0, -ESC_d, ESC_e, ESC_f, 0, /* ` - g */
+ 0, 0, 0, 0, 0, 0, ESC_n, 0, /* h - o */
+-ESC_p, 0, ESC_r, -ESC_s, ESC_tee, 0, 0, -ESC_w, /* p - w */
+ 0, 0, -ESC_z /* x - z */
};
+#else /* This is the "abnormal" table for EBCDIC systems */
+static const short int escapes[] = {
+/* 48 */ 0, 0, 0, '.', '<', '(', '+', '|',
+/* 50 */ '&', 0, 0, 0, 0, 0, 0, 0,
+/* 58 */ 0, 0, '!', '$', '*', ')', ';', '~',
+/* 60 */ '-', '/', 0, 0, 0, 0, 0, 0,
+/* 68 */ 0, 0, '|', ',', '%', '_', '>', '?',
+/* 70 */ 0, 0, 0, 0, 0, 0, 0, 0,
+/* 78 */ 0, '`', ':', '#', '@', '\'', '=', '"',
+/* 80 */ 0, 7, -ESC_b, 0, -ESC_d, ESC_e, ESC_f, 0,
+/* 88 */ 0, 0, 0, '{', 0, 0, 0, 0,
+/* 90 */ 0, 0, 0, 'l', 0, ESC_n, 0, -ESC_p,
+/* 98 */ 0, ESC_r, 0, '}', 0, 0, 0, 0,
+/* A0 */ 0, '~', -ESC_s, ESC_tee, 0, 0, -ESC_w, 0,
+/* A8 */ 0,-ESC_z, 0, 0, 0, '[', 0, 0,
+/* B0 */ 0, 0, 0, 0, 0, 0, 0, 0,
+/* B8 */ 0, 0, 0, 0, 0, ']', '=', '-',
+/* C0 */ '{',-ESC_A, -ESC_B, -ESC_C, -ESC_D,-ESC_E, 0, -ESC_G,
+/* C8 */ 0, 0, 0, 0, 0, 0, 0, 0,
+/* D0 */ '}', 0, 0, 0, 0, 0, 0, -ESC_P,
+/* D8 */-ESC_Q, 0, 0, 0, 0, 0, 0, 0,
+/* E0 */ '\\', 0, -ESC_S, 0, 0, 0, -ESC_W, -ESC_X,
+/* E8 */ 0,-ESC_Z, 0, 0, 0, 0, 0, 0,
+/* F0 */ 0, 0, 0, 0, 0, 0, 0, 0,
+/* F8 */ 0, 0, 0, 0, 0, 0, 0, 0
+};
+#endif
+
+
/* Tables of names of POSIX character classes and their lengths. The list is
terminated by a zero length entry. The first three must be alpha, upper, lower,
as this is assumed for handling case independence. */
-static const char *posix_names[] = {
+static const char *const posix_names[] = {
"alpha", "lower", "upper",
- "alnum", "ascii", "cntrl", "digit", "graph",
+ "alnum", "ascii", "blank", "cntrl", "digit", "graph",
"print", "punct", "space", "word", "xdigit" };
static const uschar posix_name_lengths[] = {
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 6, 0 };
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 6, 0 };
/* Table of class bit maps for each POSIX class; up to three may be combined
-to form the class. */
+to form the class. The table for [:blank:] is dynamically modified to remove
+the vertical space characters. */
static const int posix_class_maps[] = {
cbit_lower, cbit_upper, -1, /* alpha */
@@ -141,31 +169,156 @@ static const int posix_class_maps[] = {
cbit_upper, -1, -1, /* upper */
cbit_digit, cbit_lower, cbit_upper, /* alnum */
cbit_print, cbit_cntrl, -1, /* ascii */
+ cbit_space, -1, -1, /* blank - a GNU extension */
cbit_cntrl, -1, -1, /* cntrl */
cbit_digit, -1, -1, /* digit */
cbit_graph, -1, -1, /* graph */
cbit_print, -1, -1, /* print */
cbit_punct, -1, -1, /* punct */
cbit_space, -1, -1, /* space */
- cbit_word, -1, -1, /* word */
+ cbit_word, -1, -1, /* word - a Perl extension */
cbit_xdigit,-1, -1 /* xdigit */
};
+/* 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
+may mark arbitrary characters as digits - but the PCRE compiling code expects
+to handle only 0-9, a-z, and A-Z as digits when compiling. That is why we have
+a private table here. It costs 256 bytes, but it is a lot faster than doing
+character value tests (at least in some simple cases I timed), and in some
+applications one wants PCRE to compile efficiently as well as match
+efficiently.
+
+For convenience, we use the same bit definitions as in chartables:
+
+ 0x04 decimal digit
+ 0x08 hexadecimal digit
+
+Then we can use ctype_digit and ctype_xdigit in the code. */
+
+#if !EBCDIC /* This is the "normal" case, for ASCII systems */
+static const unsigned char digitab[] =
+ {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 0- 7 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 8- 15 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 16- 23 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 24- 31 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* - ' */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* ( - / */
+ 0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c, /* 0 - 7 */
+ 0x0c,0x0c,0x00,0x00,0x00,0x00,0x00,0x00, /* 8 - ? */
+ 0x00,0x08,0x08,0x08,0x08,0x08,0x08,0x00, /* @ - G */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* H - O */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* P - W */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* X - _ */
+ 0x00,0x08,0x08,0x08,0x08,0x08,0x08,0x00, /* ` - g */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* h - o */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* p - w */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* x -127 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 128-135 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 136-143 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 144-151 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 152-159 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 160-167 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 168-175 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 176-183 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 184-191 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 192-199 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 200-207 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 208-215 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 216-223 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 224-231 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 232-239 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 240-247 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};/* 248-255 */
+
+#else /* This is the "abnormal" case, for EBCDIC systems */
+static const unsigned char digitab[] =
+ {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 0- 7 0 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 8- 15 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 16- 23 10 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 24- 31 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 32- 39 20 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 40- 47 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 48- 55 30 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 56- 63 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* - 71 40 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 72- | */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* & - 87 50 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 88- ¬ */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* - -103 60 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 104- ? */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 112-119 70 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 120- " */
+ 0x00,0x08,0x08,0x08,0x08,0x08,0x08,0x00, /* 128- g 80 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* h -143 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 144- p 90 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* q -159 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 160- x A0 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* y -175 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* ^ -183 B0 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 184-191 */
+ 0x00,0x08,0x08,0x08,0x08,0x08,0x08,0x00, /* { - G C0 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* H -207 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* } - P D0 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* Q -223 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* \ - X E0 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* Y -239 */
+ 0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c, /* 0 - 7 F0 */
+ 0x0c,0x0c,0x00,0x00,0x00,0x00,0x00,0x00};/* 8 -255 */
+
+static const unsigned char ebcdic_chartab[] = { /* chartable partial dup */
+ 0x80,0x00,0x00,0x00,0x00,0x01,0x00,0x00, /* 0- 7 */
+ 0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x00, /* 8- 15 */
+ 0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00, /* 16- 23 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 24- 31 */
+ 0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00, /* 32- 39 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 40- 47 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 48- 55 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 56- 63 */
+ 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* - 71 */
+ 0x00,0x00,0x00,0x80,0x00,0x80,0x80,0x80, /* 72- | */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* & - 87 */
+ 0x00,0x00,0x00,0x80,0x80,0x80,0x00,0x00, /* 88- ¬ */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* - -103 */
+ 0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x80, /* 104- ? */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 112-119 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 120- " */
+ 0x00,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x12, /* 128- g */
+ 0x12,0x12,0x00,0x00,0x00,0x00,0x00,0x00, /* h -143 */
+ 0x00,0x12,0x12,0x12,0x12,0x12,0x12,0x12, /* 144- p */
+ 0x12,0x12,0x00,0x00,0x00,0x00,0x00,0x00, /* q -159 */
+ 0x00,0x00,0x12,0x12,0x12,0x12,0x12,0x12, /* 160- x */
+ 0x12,0x12,0x00,0x00,0x00,0x00,0x00,0x00, /* y -175 */
+ 0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* ^ -183 */
+ 0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00, /* 184-191 */
+ 0x80,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x12, /* { - G */
+ 0x12,0x12,0x00,0x00,0x00,0x00,0x00,0x00, /* H -207 */
+ 0x00,0x12,0x12,0x12,0x12,0x12,0x12,0x12, /* } - P */
+ 0x12,0x12,0x00,0x00,0x00,0x00,0x00,0x00, /* Q -223 */
+ 0x00,0x00,0x12,0x12,0x12,0x12,0x12,0x12, /* \ - X */
+ 0x12,0x12,0x00,0x00,0x00,0x00,0x00,0x00, /* Y -239 */
+ 0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c, /* 0 - 7 */
+ 0x1c,0x1c,0x00,0x00,0x00,0x00,0x00,0x00};/* 8 -255 */
+#endif
+
/* Definition to allow mutual recursion */
static BOOL
compile_regex(int, int, int *, uschar **, const uschar **, const char **,
- BOOL, int, int *, int *, compile_data *);
+ BOOL, int, int *, int *, branch_chain *, compile_data *);
/* Structure for building a chain of data that actually lives on the
stack, for holding the values of the subject pointer at the start of each
subpattern, so as to detect when an empty string has been matched by a
-subpattern - to break infinite loops. */
+subpattern - to break infinite loops. When NO_RECURSE is set, these blocks
+are on the heap, not on the stack. */
typedef struct eptrblock {
- struct eptrblock *prev;
- const uschar *saved_eptr;
+ struct eptrblock *epb_prev;
+ const uschar *epb_saved_eptr;
} eptrblock;
/* Flag bits for the match() function */
@@ -173,6 +326,12 @@ typedef struct eptrblock {
#define match_condassert 0x01 /* Called to check a condition assertion */
#define match_isgroup 0x02 /* Set if start of bracketed group */
+/* Non-error returns from the match() function. Error returns are externally
+defined PCRE_ERROR_xxx codes, which are all negative. */
+
+#define MATCH_MATCH 1
+#define MATCH_NOMATCH 0
+
/*************************************************
@@ -180,13 +339,26 @@ typedef struct eptrblock {
*************************************************/
/* PCRE is thread-clean and doesn't use any global variables in the normal
-sense. However, it calls memory allocation and free functions via the two
-indirections below, which are can be changed by the caller, but are shared
-between all threads. */
+sense. However, it calls memory allocation and free functions via the four
+indirections below, and it can optionally do callouts. These values can be
+changed by the caller, but are shared between all threads. However, when
+compiling for Virtual Pascal, things are done differently (see pcre.in). */
+#ifndef VPCOMPAT
+#ifdef __cplusplus
+extern "C" void *(*pcre_malloc)(size_t) = malloc;
+extern "C" void (*pcre_free)(void *) = free;
+extern "C" void *(*pcre_stack_malloc)(size_t) = malloc;
+extern "C" void (*pcre_stack_free)(void *) = free;
+extern "C" int (*pcre_callout)(pcre_callout_block *) = NULL;
+#else
void *(*pcre_malloc)(size_t) = malloc;
void (*pcre_free)(void *) = free;
-
+void *(*pcre_stack_malloc)(size_t) = malloc;
+void (*pcre_stack_free)(void *) = free;
+int (*pcre_callout)(pcre_callout_block *) = NULL;
+#endif
+#endif
/*************************************************
@@ -198,49 +370,86 @@ byte. The macros for character handling generate simple sequences when used in
byte-mode, and more complicated ones for UTF-8 characters. */
#ifndef SUPPORT_UTF8
+#define GETCHAR(c, eptr) c = *eptr;
#define GETCHARINC(c, eptr) c = *eptr++;
+#define GETCHARINCTEST(c, eptr) c = *eptr++;
#define GETCHARLEN(c, eptr, len) c = *eptr;
#define BACKCHAR(eptr)
#else /* SUPPORT_UTF8 */
-/* Get the next UTF-8 character, advancing the pointer */
+/* Get the next UTF-8 character, not advancing the pointer. This is called when
+we know we are in UTF-8 mode. */
+
+#define GETCHAR(c, eptr) \
+ c = *eptr; \
+ if ((c & 0xc0) == 0xc0) \
+ { \
+ int gcii; \
+ int gcaa = utf8_table4[c & 0x3f]; /* Number of additional bytes */ \
+ int gcss = 6*gcaa; \
+ c = (c & utf8_table3[gcaa]) << gcss; \
+ for (gcii = 1; gcii <= gcaa; gcii++) \
+ { \
+ gcss -= 6; \
+ c |= (eptr[gcii] & 0x3f) << gcss; \
+ } \
+ }
+
+/* Get the next UTF-8 character, advancing the pointer. This is called when we
+know we are in UTF-8 mode. */
#define GETCHARINC(c, eptr) \
c = *eptr++; \
+ if ((c & 0xc0) == 0xc0) \
+ { \
+ int gcaa = utf8_table4[c & 0x3f]; /* Number of additional bytes */ \
+ int gcss = 6*gcaa; \
+ c = (c & utf8_table3[gcaa]) << gcss; \
+ while (gcaa-- > 0) \
+ { \
+ gcss -= 6; \
+ c |= (*eptr++ & 0x3f) << gcss; \
+ } \
+ }
+
+/* Get the next character, testing for UTF-8 mode, and advancing the pointer */
+
+#define GETCHARINCTEST(c, eptr) \
+ c = *eptr++; \
if (md->utf8 && (c & 0xc0) == 0xc0) \
{ \
- int a = utf8_table4[c & 0x3f]; /* Number of additional bytes */ \
- int s = 6*a; \
- c = (c & utf8_table3[a]) << s; \
- while (a-- > 0) \
+ int gcaa = utf8_table4[c & 0x3f]; /* Number of additional bytes */ \
+ int gcss = 6*gcaa; \
+ c = (c & utf8_table3[gcaa]) << gcss; \
+ while (gcaa-- > 0) \
{ \
- s -= 6; \
- c |= (*eptr++ & 0x3f) << s; \
+ gcss -= 6; \
+ c |= (*eptr++ & 0x3f) << gcss; \
} \
}
-/* Get the next UTF-8 character, not advancing the pointer, setting length */
+/* Get the next UTF-8 character, not advancing the pointer, incrementing length
+if there are extra bytes. This is called when we know we are in UTF-8 mode. */
#define GETCHARLEN(c, eptr, len) \
c = *eptr; \
- len = 1; \
- if (md->utf8 && (c & 0xc0) == 0xc0) \
+ if ((c & 0xc0) == 0xc0) \
{ \
- int i; \
- int a = utf8_table4[c & 0x3f]; /* Number of additional bytes */ \
- int s = 6*a; \
- c = (c & utf8_table3[a]) << s; \
- for (i = 1; i <= a; i++) \
+ int gcii; \
+ int gcaa = utf8_table4[c & 0x3f]; /* Number of additional bytes */ \
+ int gcss = 6*gcaa; \
+ c = (c & utf8_table3[gcaa]) << gcss; \
+ for (gcii = 1; gcii <= gcaa; gcii++) \
{ \
- s -= 6; \
- c |= (eptr[i] & 0x3f) << s; \
+ gcss -= 6; \
+ c |= (eptr[gcii] & 0x3f) << gcss; \
} \
- len += a; \
+ len += gcaa; \
}
/* If the pointer is not at the start of a character, move it back until
-it is. */
+it is. Called only in UTF-8 mode. */
#define BACKCHAR(eptr) while((*eptr & 0xc0) == 0x80) eptr--;
@@ -270,19 +479,20 @@ tables. */
/* These are the breakpoints for different numbers of bytes in a UTF-8
character. */
-static int utf8_table1[] = { 0x7f, 0x7ff, 0xffff, 0x1fffff, 0x3ffffff, 0x7fffffff};
+static const int utf8_table1[] =
+ { 0x7f, 0x7ff, 0xffff, 0x1fffff, 0x3ffffff, 0x7fffffff};
/* These are the indicator bits and the mask for the data bits to set in the
first byte of a character, indexed by the number of additional bytes. */
-static int utf8_table2[] = { 0, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc};
-static int utf8_table3[] = { 0xff, 0x1f, 0x0f, 0x07, 0x03, 0x01};
+static const int utf8_table2[] = { 0, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc};
+static const int utf8_table3[] = { 0xff, 0x1f, 0x0f, 0x07, 0x03, 0x01};
/* Table of the number of extra characters, indexed by the first character
masked with 0x3f. The highest number for a valid UTF-8 character is in fact
0x3d. */
-static uschar utf8_table4[] = {
+static const uschar utf8_table4[] = {
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
@@ -323,13 +533,26 @@ return i + 1;
/*************************************************
+* Print compiled regex *
+*************************************************/
+
+/* The code for doing this is held in a separate file that is also included in
+pcretest.c. It defines a function called print_internals(). */
+
+#ifdef DEBUG
+#include "printint.c"
+#endif
+
+
+
+/*************************************************
* Return version string *
*************************************************/
#define STRING(a) # a
#define XSTRING(s) STRING(s)
-const char *
+EXPORT const char *
pcre_version(void)
{
return XSTRING(PCRE_MAJOR) "." XSTRING(PCRE_MINOR) " " XSTRING(PCRE_DATE);
@@ -339,6 +562,86 @@ return XSTRING(PCRE_MAJOR) "." XSTRING(PCRE_MINOR) " " XSTRING(PCRE_DATE);
/*************************************************
+* Flip bytes in an integer *
+*************************************************/
+
+/* This function is called when the magic number in a regex doesn't match in
+order to flip its bytes to see if we are dealing with a pattern that was
+compiled on a host of different endianness. If so, this function is used to
+flip other byte values.
+
+Arguments:
+ value the number to flip
+ n the number of bytes to flip (assumed to be 2 or 4)
+
+Returns: the flipped value
+*/
+
+static long int
+byteflip(long int value, int n)
+{
+if (n == 2) return ((value & 0x00ff) << 8) | ((value & 0xff00) >> 8);
+return ((value & 0x000000ff) << 24) |
+ ((value & 0x0000ff00) << 8) |
+ ((value & 0x00ff0000) >> 8) |
+ ((value & 0xff000000) >> 24);
+}
+
+
+
+/*************************************************
+* Test for a byte-flipped compiled regex *
+*************************************************/
+
+/* This function is called from pce_exec() and also from pcre_fullinfo(). Its
+job is to test whether the regex is byte-flipped - that is, it was compiled on
+a system of opposite endianness. The function is called only when the native
+MAGIC_NUMBER test fails. If the regex is indeed flipped, we flip all the
+relevant values into a different data block, and return it.
+
+Arguments:
+ re points to the regex
+ study points to study data, or NULL
+ internal_re points to a new regex block
+ internal_study points to a new study block
+
+Returns: the new block if is is indeed a byte-flipped regex
+ NULL if it is not
+*/
+
+static real_pcre *
+try_flipped(const real_pcre *re, real_pcre *internal_re,
+ const pcre_study_data *study, pcre_study_data *internal_study)
+{
+if (byteflip(re->magic_number, sizeof(re->magic_number)) != MAGIC_NUMBER)
+ return NULL;
+
+*internal_re = *re; /* To copy other fields */
+internal_re->size = byteflip(re->size, sizeof(re->size));
+internal_re->options = byteflip(re->options, sizeof(re->options));
+internal_re->top_bracket = byteflip(re->top_bracket, sizeof(re->top_bracket));
+internal_re->top_backref = byteflip(re->top_backref, sizeof(re->top_backref));
+internal_re->first_byte = byteflip(re->first_byte, sizeof(re->first_byte));
+internal_re->req_byte = byteflip(re->req_byte, sizeof(re->req_byte));
+internal_re->name_table_offset = byteflip(re->name_table_offset,
+ sizeof(re->name_table_offset));
+internal_re->name_entry_size = byteflip(re->name_entry_size,
+ sizeof(re->name_entry_size));
+internal_re->name_count = byteflip(re->name_count, sizeof(re->name_count));
+
+if (study != NULL)
+ {
+ *internal_study = *study; /* To copy other fields */
+ internal_study->size = byteflip(study->size, sizeof(study->size));
+ internal_study->options = byteflip(study->options, sizeof(study->options));
+ }
+
+return internal_re;
+}
+
+
+
+/*************************************************
* (Obsolete) Return info about compiled pattern *
*************************************************/
@@ -350,9 +653,9 @@ at the low end of it, and so even on 16-bit systems this will still be OK.
Therefore, I haven't changed the API for pcre_info().
Arguments:
- external_re points to compiled code
+ argument_re points to compiled code
optptr where to pass back the options
- first_char where to pass back the first character,
+ first_byte where to pass back the first character,
or -1 if multiline and all branches start ^,
or -2 otherwise
@@ -360,15 +663,20 @@ Returns: number of capturing subpatterns
or negative values on error
*/
-int
-pcre_info(const pcre *external_re, int *optptr, int *first_char)
+EXPORT int
+pcre_info(const pcre *argument_re, int *optptr, int *first_byte)
{
-const real_pcre *re = (const real_pcre *)external_re;
+real_pcre internal_re;
+const real_pcre *re = (const real_pcre *)argument_re;
if (re == NULL) return PCRE_ERROR_NULL;
-if (re->magic_number != MAGIC_NUMBER) return PCRE_ERROR_BADMAGIC;
+if (re->magic_number != MAGIC_NUMBER)
+ {
+ re = try_flipped(re, &internal_re, NULL, NULL);
+ if (re == NULL) return PCRE_ERROR_BADMAGIC;
+ }
if (optptr != NULL) *optptr = (int)(re->options & PUBLIC_OPTIONS);
-if (first_char != NULL)
- *first_char = ((re->options & PCRE_FIRSTSET) != 0)? re->first_char :
+if (first_byte != NULL)
+ *first_byte = ((re->options & PCRE_FIRSTSET) != 0)? re->first_byte :
((re->options & PCRE_STARTLINE) != 0)? -1 : -2;
return re->top_bracket;
}
@@ -383,23 +691,34 @@ return re->top_bracket;
that additional items can be added compatibly.
Arguments:
- external_re points to compiled code
- external_study points to study data, or NULL
+ argument_re points to compiled code
+ extra_data points extra data, or NULL
what what information is required
where where to put the information
Returns: 0 if data returned, negative on error
*/
-int
-pcre_fullinfo(const pcre *external_re, const pcre_extra *study_data, int what,
+EXPORT int
+pcre_fullinfo(const pcre *argument_re, const pcre_extra *extra_data, int what,
void *where)
{
-const real_pcre *re = (const real_pcre *)external_re;
-const real_pcre_extra *study = (const real_pcre_extra *)study_data;
+real_pcre internal_re;
+pcre_study_data internal_study;
+const real_pcre *re = (const real_pcre *)argument_re;
+const pcre_study_data *study = NULL;
if (re == NULL || where == NULL) return PCRE_ERROR_NULL;
-if (re->magic_number != MAGIC_NUMBER) return PCRE_ERROR_BADMAGIC;
+
+if (extra_data != NULL && (extra_data->flags & PCRE_EXTRA_STUDY_DATA) != 0)
+ study = (const pcre_study_data *)extra_data->study_data;
+
+if (re->magic_number != MAGIC_NUMBER)
+ {
+ re = try_flipped(re, &internal_re, study, &internal_study);
+ if (re == NULL) return PCRE_ERROR_BADMAGIC;
+ if (study != NULL) study = &internal_study;
+ }
switch (what)
{
@@ -411,6 +730,10 @@ switch (what)
*((size_t *)where) = re->size;
break;
+ case PCRE_INFO_STUDYSIZE:
+ *((size_t *)where) = (study == NULL)? 0 : study->size;
+ break;
+
case PCRE_INFO_CAPTURECOUNT:
*((int *)where) = re->top_bracket;
break;
@@ -419,21 +742,107 @@ switch (what)
*((int *)where) = re->top_backref;
break;
- case PCRE_INFO_FIRSTCHAR:
+ case PCRE_INFO_FIRSTBYTE:
*((int *)where) =
- ((re->options & PCRE_FIRSTSET) != 0)? re->first_char :
+ ((re->options & PCRE_FIRSTSET) != 0)? re->first_byte :
((re->options & PCRE_STARTLINE) != 0)? -1 : -2;
break;
+ /* Make sure we pass back the pointer to the bit vector in the external
+ block, not the internal copy (with flipped integer fields). */
+
case PCRE_INFO_FIRSTTABLE:
*((const uschar **)where) =
(study != NULL && (study->options & PCRE_STUDY_MAPPED) != 0)?
- study->start_bits : NULL;
+ ((const pcre_study_data *)extra_data->study_data)->start_bits : NULL;
break;
case PCRE_INFO_LASTLITERAL:
*((int *)where) =
- ((re->options & PCRE_REQCHSET) != 0)? re->req_char : -1;
+ ((re->options & PCRE_REQCHSET) != 0)? re->req_byte : -1;
+ break;
+
+ case PCRE_INFO_NAMEENTRYSIZE:
+ *((int *)where) = re->name_entry_size;
+ break;
+
+ case PCRE_INFO_NAMECOUNT:
+ *((int *)where) = re->name_count;
+ break;
+
+ case PCRE_INFO_NAMETABLE:
+ *((const uschar **)where) = (const uschar *)re + re->name_table_offset;
+ break;
+
+ case PCRE_INFO_DEFAULT_TABLES:
+ *((const uschar **)where) = (const uschar *)pcre_default_tables;
+ break;
+
+ default: return PCRE_ERROR_BADOPTION;
+ }
+
+return 0;
+}
+
+
+
+/*************************************************
+* Return info about what features are configured *
+*************************************************/
+
+/* This is function which has an extensible interface so that additional items
+can be added compatibly.
+
+Arguments:
+ what what information is required
+ where where to put the information
+
+Returns: 0 if data returned, negative on error
+*/
+
+EXPORT int
+pcre_config(int what, void *where)
+{
+switch (what)
+ {
+ case PCRE_CONFIG_UTF8:
+#ifdef SUPPORT_UTF8
+ *((int *)where) = 1;
+#else
+ *((int *)where) = 0;
+#endif
+ break;
+
+ case PCRE_CONFIG_UNICODE_PROPERTIES:
+#ifdef SUPPORT_UCP
+ *((int *)where) = 1;
+#else
+ *((int *)where) = 0;
+#endif
+ break;
+
+ case PCRE_CONFIG_NEWLINE:
+ *((int *)where) = NEWLINE;
+ break;
+
+ case PCRE_CONFIG_LINK_SIZE:
+ *((int *)where) = LINK_SIZE;
+ break;
+
+ case PCRE_CONFIG_POSIX_MALLOC_THRESHOLD:
+ *((int *)where) = POSIX_MALLOC_THRESHOLD;
+ break;
+
+ case PCRE_CONFIG_MATCH_LIMIT:
+ *((unsigned int *)where) = MATCH_LIMIT;
+ break;
+
+ case PCRE_CONFIG_STACKRECURSE:
+#ifdef NO_RECURSE
+ *((int *)where) = 0;
+#else
+ *((int *)where) = 1;
+#endif
break;
default: return PCRE_ERROR_BADOPTION;
@@ -490,7 +899,6 @@ Arguments:
bracount number of previous extracting brackets
options the options bits
isclass TRUE if inside a character class
- cd pointer to char tables block
Returns: zero or positive => a data character
negative => a special escape sequence
@@ -499,7 +907,7 @@ Returns: zero or positive => a data character
static int
check_escape(const uschar **ptrptr, const char **errorptr, int bracount,
- int options, BOOL isclass, compile_data *cd)
+ int options, BOOL isclass)
{
const uschar *ptr = *ptrptr;
int c, i;
@@ -509,15 +917,19 @@ int c, i;
c = *(++ptr);
if (c == 0) *errorptr = ERR1;
-/* Digits or letters may have special meaning; all others are literals. */
-
-else if (c < '0' || c > 'z') {}
-
-/* Do an initial lookup in a table. A non-zero result is something that can be
-returned immediately. Otherwise further processing may be required. */
+/* Non-alphamerics are literals. For digits or letters, do an initial lookup in
+a table. A non-zero result is something that can be returned immediately.
+Otherwise further processing may be required. */
+#if !EBCDIC /* ASCII coding */
+else if (c < '0' || c > 'z') {} /* Not alphameric */
else if ((i = escapes[c - '0']) != 0) c = i;
+#else /* EBCDIC coding */
+else if (c < 'a' || (ebcdic_chartab[c] & 0x0E) == 0) {} /* Not alphameric */
+else if ((i = escapes[c - 0x48]) != 0) c = i;
+#endif
+
/* Escapes that need further processing, or are illegal. */
else
@@ -525,6 +937,17 @@ else
const uschar *oldptr;
switch (c)
{
+ /* A number of Perl escapes are not handled by PCRE. We give an explicit
+ error. */
+
+ case 'l':
+ case 'L':
+ case 'N':
+ case 'u':
+ case 'U':
+ *errorptr = ERR37;
+ break;
+
/* The handling of escape sequences consisting of a string of digits
starting with one that is not zero is not straightforward. By experiment,
the way Perl works seems to be as follows:
@@ -544,7 +967,7 @@ else
{
oldptr = ptr;
c -= '0';
- while ((cd->ctypes[ptr[1]] & ctype_digit) != 0)
+ while ((digitab[ptr[1]] & ctype_digit) != 0)
c = c * 10 + *(++ptr) - '0';
if (c < 10 || c <= bracount)
{
@@ -570,8 +993,7 @@ else
case '0':
c -= '0';
- while(i++ < 2 && (cd->ctypes[ptr[1]] & ctype_digit) != 0 &&
- ptr[1] != '8' && ptr[1] != '9')
+ while(i++ < 2 && ptr[1] >= '0' && ptr[1] <= '7')
c = c * 8 + *(++ptr) - '0';
c &= 255; /* Take least significant 8 bits */
break;
@@ -586,12 +1008,17 @@ else
const uschar *pt = ptr + 2;
register int count = 0;
c = 0;
- while ((cd->ctypes[*pt] & ctype_xdigit) != 0)
+ while ((digitab[*pt] & ctype_xdigit) != 0)
{
+ int cc = *pt++;
count++;
- c = c * 16 + cd->lcc[*pt] -
- (((cd->ctypes[*pt] & ctype_digit) != 0)? '0' : 'W');
- pt++;
+#if !EBCDIC /* ASCII coding */
+ if (cc >= 'a') cc -= 32; /* Convert to upper case */
+ c = c * 16 + cc - ((cc < 'A')? '0' : ('A' - 10));
+#else /* EBCDIC coding */
+ if (cc >= 'a' && cc <= 'z') cc += 64; /* Convert to upper case */
+ c = c * 16 + cc - ((cc >= '0')? '0' : ('A' - 10));
+#endif
}
if (*pt == '}')
{
@@ -607,11 +1034,17 @@ else
/* Read just a single hex char */
c = 0;
- while (i++ < 2 && (cd->ctypes[ptr[1]] & ctype_xdigit) != 0)
+ while (i++ < 2 && (digitab[ptr[1]] & ctype_xdigit) != 0)
{
- ptr++;
- c = c * 16 + cd->lcc[*ptr] -
- (((cd->ctypes[*ptr] & ctype_digit) != 0)? '0' : 'W');
+ int cc; /* Some compilers don't like ++ */
+ cc = *(++ptr); /* in initializers */
+#if !EBCDIC /* ASCII coding */
+ if (cc >= 'a') cc -= 32; /* Convert to upper case */
+ c = c * 16 + cc - ((cc < 'A')? '0' : ('A' - 10));
+#else /* EBCDIC coding */
+ if (cc <= 'z') cc += 64; /* Convert to upper case */
+ c = c * 16 + cc - ((cc >= '0')? '0' : ('A' - 10));
+#endif
}
break;
@@ -625,10 +1058,17 @@ else
return 0;
}
- /* A letter is upper-cased; then the 0x40 bit is flipped */
+ /* A letter is upper-cased; then the 0x40 bit is flipped. This coding
+ is ASCII-specific, but then the whole concept of \cx is ASCII-specific.
+ (However, an EBCDIC equivalent has now been added.) */
- if (c >= 'a' && c <= 'z') c = cd->fcc[c];
+#if !EBCDIC /* ASCII coding */
+ if (c >= 'a' && c <= 'z') c -= 32;
c ^= 0x40;
+#else /* EBCDIC coding */
+ if (c >= 'a' && c <= 'z') c += 64;
+ c ^= 0xC0;
+#endif
break;
/* PCRE_EXTRA enables extensions to Perl in the matter of escapes. Any
@@ -654,6 +1094,99 @@ return c;
+#ifdef SUPPORT_UCP
+/*************************************************
+* Handle \P and \p *
+*************************************************/
+
+/* This function is called after \P or \p has been encountered, provided that
+PCRE is compiled with support for Unicode properties. On entry, ptrptr is
+pointing at the P or p. On exit, it is pointing at the final character of the
+escape sequence.
+
+Argument:
+ ptrptr points to the pattern position pointer
+ negptr points to a boolean that is set TRUE for negation else FALSE
+ errorptr points to the pointer to the error message
+
+Returns: value from ucp_type_table, or -1 for an invalid type
+*/
+
+static int
+get_ucp(const uschar **ptrptr, BOOL *negptr, const char **errorptr)
+{
+int c, i, bot, top;
+const uschar *ptr = *ptrptr;
+char name[4];
+
+c = *(++ptr);
+if (c == 0) goto ERROR_RETURN;
+
+*negptr = FALSE;
+
+/* \P or \p can be followed by a one- or two-character name in {}, optionally
+preceded by ^ for negation. */
+
+if (c == '{')
+ {
+ if (ptr[1] == '^')
+ {
+ *negptr = TRUE;
+ ptr++;
+ }
+ for (i = 0; i <= 2; i++)
+ {
+ c = *(++ptr);
+ if (c == 0) goto ERROR_RETURN;
+ if (c == '}') break;
+ name[i] = c;
+ }
+ if (c !='}') /* Try to distinguish error cases */
+ {
+ while (*(++ptr) != 0 && *ptr != '}');
+ if (*ptr == '}') goto UNKNOWN_RETURN; else goto ERROR_RETURN;
+ }
+ name[i] = 0;
+ }
+
+/* Otherwise there is just one following character */
+
+else
+ {
+ name[0] = c;
+ name[1] = 0;
+ }
+
+*ptrptr = ptr;
+
+/* Search for a recognized property name using binary chop */
+
+bot = 0;
+top = sizeof(utt)/sizeof(ucp_type_table);
+
+while (bot < top)
+ {
+ i = (bot + top)/2;
+ c = strcmp(name, utt[i].name);
+ if (c == 0) return utt[i].value;
+ if (c > 0) bot = i + 1; else top = i;
+ }
+
+UNKNOWN_RETURN:
+*errorptr = ERR47;
+*ptrptr = ptr;
+return -1;
+
+ERROR_RETURN:
+*errorptr = ERR46;
+*ptrptr = ptr;
+return -1;
+}
+#endif
+
+
+
+
/*************************************************
* Check for counted repeat *
*************************************************/
@@ -665,23 +1198,23 @@ where the ddds are digits.
Arguments:
p pointer to the first char after '{'
- cd pointer to char tables block
Returns: TRUE or FALSE
*/
static BOOL
-is_counted_repeat(const uschar *p, compile_data *cd)
+is_counted_repeat(const uschar *p)
{
-if ((cd->ctypes[*p++] & ctype_digit) == 0) return FALSE;
-while ((cd->ctypes[*p] & ctype_digit) != 0) p++;
+if ((digitab[*p++] & ctype_digit) == 0) return FALSE;
+while ((digitab[*p] & ctype_digit) != 0) p++;
if (*p == '}') return TRUE;
if (*p++ != ',') return FALSE;
if (*p == '}') return TRUE;
-if ((cd->ctypes[*p++] & ctype_digit) == 0) return FALSE;
-while ((cd->ctypes[*p] & ctype_digit) != 0) p++;
+if ((digitab[*p++] & ctype_digit) == 0) return FALSE;
+while ((digitab[*p] & ctype_digit) != 0) p++;
+
return (*p == '}');
}
@@ -701,27 +1234,25 @@ Arguments:
maxp pointer to int for max
returned as -1 if no max
errorptr points to pointer to error message
- cd pointer to character tables clock
Returns: pointer to '}' on success;
current ptr on error, with errorptr set
*/
static const uschar *
-read_repeat_counts(const uschar *p, int *minp, int *maxp,
- const char **errorptr, compile_data *cd)
+read_repeat_counts(const uschar *p, int *minp, int *maxp, const char **errorptr)
{
int min = 0;
int max = -1;
-while ((cd->ctypes[*p] & ctype_digit) != 0) min = min * 10 + *p++ - '0';
+while ((digitab[*p] & ctype_digit) != 0) min = min * 10 + *p++ - '0';
if (*p == '}') max = min; else
{
if (*(++p) != '}')
{
max = 0;
- while((cd->ctypes[*p] & ctype_digit) != 0) max = max * 10 + *p++ - '0';
+ while((digitab[*p] & ctype_digit) != 0) max = max * 10 + *p++ - '0';
if (max < min)
{
*errorptr = ERR4;
@@ -746,17 +1277,82 @@ return p;
/*************************************************
+* Find first significant op code *
+*************************************************/
+
+/* This is called by several functions that scan a compiled expression looking
+for a fixed first character, or an anchoring op code etc. It skips over things
+that do not influence this. For some calls, a change of option is important.
+For some calls, it makes sense to skip negative forward and all backward
+assertions, and also the \b assertion; for others it does not.
+
+Arguments:
+ code pointer to the start of the group
+ options pointer to external options
+ optbit the option bit whose changing is significant, or
+ zero if none are
+ skipassert TRUE if certain assertions are to be skipped
+
+Returns: pointer to the first significant opcode
+*/
+
+static const uschar*
+first_significant_code(const uschar *code, int *options, int optbit,
+ BOOL skipassert)
+{
+for (;;)
+ {
+ switch ((int)*code)
+ {
+ case OP_OPT:
+ if (optbit > 0 && ((int)code[1] & optbit) != (*options & optbit))
+ *options = (int)code[1];
+ code += 2;
+ break;
+
+ case OP_ASSERT_NOT:
+ case OP_ASSERTBACK:
+ case OP_ASSERTBACK_NOT:
+ if (!skipassert) return code;
+ do code += GET(code, 1); while (*code == OP_ALT);
+ code += OP_lengths[*code];
+ break;
+
+ case OP_WORD_BOUNDARY:
+ case OP_NOT_WORD_BOUNDARY:
+ if (!skipassert) return code;
+ /* Fall through */
+
+ case OP_CALLOUT:
+ case OP_CREF:
+ case OP_BRANUMBER:
+ code += OP_lengths[*code];
+ break;
+
+ default:
+ return code;
+ }
+ }
+/* Control never reaches here */
+}
+
+
+
+
+/*************************************************
* Find the fixed length of a pattern *
*************************************************/
/* Scan a pattern and compute the fixed length of subject that will match it,
if the length is fixed. This is needed for dealing with backward assertions.
+In UTF8 mode, the result is in characters rather than bytes.
Arguments:
code points to the start of the pattern (the bracket)
options the compiling options
-Returns: the fixed length, or -1 if there is no fixed length
+Returns: the fixed length, or -1 if there is no fixed length,
+ or -2 if \C was encountered
*/
static int
@@ -765,7 +1361,7 @@ find_fixedlength(uschar *code, int options)
int length = -1;
register int branchlength = 0;
-register uschar *cc = code + 3;
+register uschar *cc = code + 1 + LINK_SIZE;
/* Scan along the opcodes for this branch. If we get to the end of the
branch, check the length against that of the other branches. */
@@ -782,10 +1378,10 @@ for (;;)
case OP_ONCE:
case OP_COND:
d = find_fixedlength(cc, options);
- if (d < 0) return -1;
+ if (d < 0) return d;
branchlength += d;
- do cc += (cc[1] << 8) + cc[2]; while (*cc == OP_ALT);
- cc += 3;
+ do cc += GET(cc, 1); while (*cc == OP_ALT);
+ cc += 1 + LINK_SIZE;
break;
/* Reached end of a branch; if it's a ket it is the end of a nested
@@ -800,7 +1396,7 @@ for (;;)
if (length < 0) length = branchlength;
else if (length != branchlength) return -1;
if (*cc != OP_ALT) return length;
- cc += 3;
+ cc += 1 + LINK_SIZE;
branchlength = 0;
break;
@@ -810,56 +1406,67 @@ for (;;)
case OP_ASSERT_NOT:
case OP_ASSERTBACK:
case OP_ASSERTBACK_NOT:
- do cc += (cc[1] << 8) + cc[2]; while (*cc == OP_ALT);
- cc += 3;
- break;
+ do cc += GET(cc, 1); while (*cc == OP_ALT);
+ /* Fall through */
/* Skip over things that don't match chars */
case OP_REVERSE:
case OP_BRANUMBER:
case OP_CREF:
- cc++;
- /* Fall through */
-
case OP_OPT:
- cc++;
- /* Fall through */
-
+ case OP_CALLOUT:
case OP_SOD:
+ case OP_SOM:
case OP_EOD:
case OP_EODN:
case OP_CIRC:
case OP_DOLL:
case OP_NOT_WORD_BOUNDARY:
case OP_WORD_BOUNDARY:
- cc++;
+ cc += OP_lengths[*cc];
break;
- /* Handle char strings. In UTF-8 mode we must count characters, not bytes.
- This requires a scan of the string, unfortunately. We assume valid UTF-8
- strings, so all we do is reduce the length by one for byte whose bits are
- 10xxxxxx. */
+ /* Handle literal characters */
- case OP_CHARS:
- branchlength += *(++cc);
+ case OP_CHAR:
+ case OP_CHARNC:
+ branchlength++;
+ cc += 2;
#ifdef SUPPORT_UTF8
- for (d = 1; d <= *cc; d++)
- if ((cc[d] & 0xc0) == 0x80) branchlength--;
+ if ((options & PCRE_UTF8) != 0)
+ {
+ while ((*cc & 0xc0) == 0x80) cc++;
+ }
#endif
- cc += *cc + 1;
break;
- /* Handle exact repetitions */
+ /* Handle exact repetitions. The count is already in characters, but we
+ need to skip over a multibyte character in UTF8 mode. */
case OP_EXACT:
+ branchlength += GET2(cc,1);
+ cc += 4;
+#ifdef SUPPORT_UTF8
+ if ((options & PCRE_UTF8) != 0)
+ {
+ while((*cc & 0x80) == 0x80) cc++;
+ }
+#endif
+ break;
+
case OP_TYPEEXACT:
- branchlength += (cc[1] << 8) + cc[2];
+ branchlength += GET2(cc,1);
cc += 4;
break;
/* Handle single-char matchers */
+ case OP_PROP:
+ case OP_NOTPROP:
+ cc++;
+ /* Fall through */
+
case OP_NOT_DIGIT:
case OP_DIGIT:
case OP_NOT_WHITESPACE:
@@ -871,10 +1478,21 @@ for (;;)
cc++;
break;
+ /* The single-byte matcher isn't allowed */
+
+ case OP_ANYBYTE:
+ return -2;
/* Check a class for variable quantification */
+#ifdef SUPPORT_UTF8
+ case OP_XCLASS:
+ cc += GET(cc, 1) - 33;
+ /* Fall through */
+#endif
+
case OP_CLASS:
+ case OP_NCLASS:
cc += 33;
switch (*cc)
@@ -887,8 +1505,8 @@ for (;;)
case OP_CRRANGE:
case OP_CRMINRANGE:
- if ((cc[1] << 8) + cc[2] != (cc[3] << 8) + cc[4]) return -1;
- branchlength += (cc[1] << 8) + cc[2];
+ if (GET2(cc,1) != GET2(cc,3)) return -1;
+ branchlength += GET2(cc,1);
cc += 5;
break;
@@ -910,6 +1528,329 @@ for (;;)
/*************************************************
+* Scan compiled regex for numbered bracket *
+*************************************************/
+
+/* This little function scans through a compiled pattern until it finds a
+capturing bracket with the given number.
+
+Arguments:
+ code points to start of expression
+ utf8 TRUE in UTF-8 mode
+ number the required bracket number
+
+Returns: pointer to the opcode for the bracket, or NULL if not found
+*/
+
+static const uschar *
+find_bracket(const uschar *code, BOOL utf8, int number)
+{
+#ifndef SUPPORT_UTF8
+utf8 = utf8; /* Stop pedantic compilers complaining */
+#endif
+
+for (;;)
+ {
+ register int c = *code;
+ if (c == OP_END) return NULL;
+ else if (c > OP_BRA)
+ {
+ int n = c - OP_BRA;
+ if (n > EXTRACT_BASIC_MAX) n = GET2(code, 2+LINK_SIZE);
+ if (n == number) return (uschar *)code;
+ code += OP_lengths[OP_BRA];
+ }
+ else
+ {
+ code += OP_lengths[c];
+
+#ifdef SUPPORT_UTF8
+
+ /* In UTF-8 mode, opcodes that are followed by a character may be followed
+ by a multi-byte character. The length in the table is a minimum, so we have
+ to scan along to skip the extra bytes. All opcodes are less than 128, so we
+ can use relatively efficient code. */
+
+ if (utf8) switch(c)
+ {
+ case OP_CHAR:
+ case OP_CHARNC:
+ case OP_EXACT:
+ case OP_UPTO:
+ case OP_MINUPTO:
+ case OP_STAR:
+ case OP_MINSTAR:
+ case OP_PLUS:
+ case OP_MINPLUS:
+ case OP_QUERY:
+ case OP_MINQUERY:
+ while ((*code & 0xc0) == 0x80) code++;
+ break;
+
+ /* XCLASS is used for classes that cannot be represented just by a bit
+ map. This includes negated single high-valued characters. The length in
+ the table is zero; the actual length is stored in the compiled code. */
+
+ case OP_XCLASS:
+ code += GET(code, 1) + 1;
+ break;
+ }
+#endif
+ }
+ }
+}
+
+
+
+/*************************************************
+* Scan compiled regex for recursion reference *
+*************************************************/
+
+/* This little function scans through a compiled pattern until it finds an
+instance of OP_RECURSE.
+
+Arguments:
+ code points to start of expression
+ utf8 TRUE in UTF-8 mode
+
+Returns: pointer to the opcode for OP_RECURSE, or NULL if not found
+*/
+
+static const uschar *
+find_recurse(const uschar *code, BOOL utf8)
+{
+#ifndef SUPPORT_UTF8
+utf8 = utf8; /* Stop pedantic compilers complaining */
+#endif
+
+for (;;)
+ {
+ register int c = *code;
+ if (c == OP_END) return NULL;
+ else if (c == OP_RECURSE) return code;
+ else if (c > OP_BRA)
+ {
+ code += OP_lengths[OP_BRA];
+ }
+ else
+ {
+ code += OP_lengths[c];
+
+#ifdef SUPPORT_UTF8
+
+ /* In UTF-8 mode, opcodes that are followed by a character may be followed
+ by a multi-byte character. The length in the table is a minimum, so we have
+ to scan along to skip the extra bytes. All opcodes are less than 128, so we
+ can use relatively efficient code. */
+
+ if (utf8) switch(c)
+ {
+ case OP_CHAR:
+ case OP_CHARNC:
+ case OP_EXACT:
+ case OP_UPTO:
+ case OP_MINUPTO:
+ case OP_STAR:
+ case OP_MINSTAR:
+ case OP_PLUS:
+ case OP_MINPLUS:
+ case OP_QUERY:
+ case OP_MINQUERY:
+ while ((*code & 0xc0) == 0x80) code++;
+ break;
+
+ /* XCLASS is used for classes that cannot be represented just by a bit
+ map. This includes negated single high-valued characters. The length in
+ the table is zero; the actual length is stored in the compiled code. */
+
+ case OP_XCLASS:
+ code += GET(code, 1) + 1;
+ break;
+ }
+#endif
+ }
+ }
+}
+
+
+
+/*************************************************
+* Scan compiled branch for non-emptiness *
+*************************************************/
+
+/* This function scans through a branch of a compiled pattern to see whether it
+can match the empty string or not. It is called only from could_be_empty()
+below. Note that first_significant_code() skips over assertions. If we hit an
+unclosed bracket, we return "empty" - this means we've struck an inner bracket
+whose current branch will already have been scanned.
+
+Arguments:
+ code points to start of search
+ endcode points to where to stop
+ utf8 TRUE if in UTF8 mode
+
+Returns: TRUE if what is matched could be empty
+*/
+
+static BOOL
+could_be_empty_branch(const uschar *code, const uschar *endcode, BOOL utf8)
+{
+register int c;
+for (code = first_significant_code(code + 1 + LINK_SIZE, NULL, 0, TRUE);
+ code < endcode;
+ code = first_significant_code(code + OP_lengths[c], NULL, 0, TRUE))
+ {
+ const uschar *ccode;
+
+ c = *code;
+
+ if (c >= OP_BRA)
+ {
+ BOOL empty_branch;
+ if (GET(code, 1) == 0) return TRUE; /* Hit unclosed bracket */
+
+ /* Scan a closed bracket */
+
+ empty_branch = FALSE;
+ do
+ {
+ if (!empty_branch && could_be_empty_branch(code, endcode, utf8))
+ empty_branch = TRUE;
+ code += GET(code, 1);
+ }
+ while (*code == OP_ALT);
+ if (!empty_branch) return FALSE; /* All branches are non-empty */
+ code += 1 + LINK_SIZE;
+ c = *code;
+ }
+
+ else switch (c)
+ {
+ /* Check for quantifiers after a class */
+
+#ifdef SUPPORT_UTF8
+ case OP_XCLASS:
+ ccode = code + GET(code, 1);
+ goto CHECK_CLASS_REPEAT;
+#endif
+
+ case OP_CLASS:
+ case OP_NCLASS:
+ ccode = code + 33;
+
+#ifdef SUPPORT_UTF8
+ CHECK_CLASS_REPEAT:
+#endif
+
+ switch (*ccode)
+ {
+ case OP_CRSTAR: /* These could be empty; continue */
+ case OP_CRMINSTAR:
+ case OP_CRQUERY:
+ case OP_CRMINQUERY:
+ break;
+
+ default: /* Non-repeat => class must match */
+ case OP_CRPLUS: /* These repeats aren't empty */
+ case OP_CRMINPLUS:
+ return FALSE;
+
+ case OP_CRRANGE:
+ case OP_CRMINRANGE:
+ if (GET2(ccode, 1) > 0) return FALSE; /* Minimum > 0 */
+ break;
+ }
+ break;
+
+ /* Opcodes that must match a character */
+
+ case OP_PROP:
+ case OP_NOTPROP:
+ case OP_EXTUNI:
+ case OP_NOT_DIGIT:
+ case OP_DIGIT:
+ case OP_NOT_WHITESPACE:
+ case OP_WHITESPACE:
+ case OP_NOT_WORDCHAR:
+ case OP_WORDCHAR:
+ case OP_ANY:
+ case OP_ANYBYTE:
+ case OP_CHAR:
+ case OP_CHARNC:
+ case OP_NOT:
+ case OP_PLUS:
+ case OP_MINPLUS:
+ case OP_EXACT:
+ case OP_NOTPLUS:
+ case OP_NOTMINPLUS:
+ case OP_NOTEXACT:
+ case OP_TYPEPLUS:
+ case OP_TYPEMINPLUS:
+ case OP_TYPEEXACT:
+ return FALSE;
+
+ /* End of branch */
+
+ case OP_KET:
+ case OP_KETRMAX:
+ case OP_KETRMIN:
+ case OP_ALT:
+ return TRUE;
+
+ /* In UTF-8 mode, STAR, MINSTAR, QUERY, MINQUERY, UPTO, and MINUPTO may be
+ followed by a multibyte character */
+
+#ifdef SUPPORT_UTF8
+ case OP_STAR:
+ case OP_MINSTAR:
+ case OP_QUERY:
+ case OP_MINQUERY:
+ case OP_UPTO:
+ case OP_MINUPTO:
+ if (utf8) while ((code[2] & 0xc0) == 0x80) code++;
+ break;
+#endif
+ }
+ }
+
+return TRUE;
+}
+
+
+
+/*************************************************
+* Scan compiled regex for non-emptiness *
+*************************************************/
+
+/* This function is called to check for left recursive calls. We want to check
+the current branch of the current pattern to see if it could match the empty
+string. If it could, we must look outwards for branches at other levels,
+stopping when we pass beyond the bracket which is the subject of the recursion.
+
+Arguments:
+ code points to start of the recursion
+ endcode points to where to stop (current RECURSE item)
+ bcptr points to the chain of current (unclosed) branch starts
+ utf8 TRUE if in UTF-8 mode
+
+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)
+{
+while (bcptr != NULL && bcptr->current >= code)
+ {
+ if (!could_be_empty_branch(bcptr->current, endcode, utf8)) return FALSE;
+ bcptr = bcptr->outer;
+ }
+return TRUE;
+}
+
+
+
+/*************************************************
* Check for POSIX class syntax *
*************************************************/
@@ -972,71 +1913,288 @@ return -1;
}
+/*************************************************
+* Adjust OP_RECURSE items in repeated group *
+*************************************************/
+
+/* OP_RECURSE items contain an offset from the start of the regex to the group
+that is referenced. This means that groups can be replicated for fixed
+repetition simply by copying (because the recursion is allowed to refer to
+earlier groups that are outside the current group). However, when a group is
+optional (i.e. the minimum quantifier is zero), OP_BRAZERO is inserted before
+it, after it has been compiled. This means that any OP_RECURSE items within it
+that refer to the group itself or any contained groups have to have their
+offsets adjusted. That is the job of this function. Before it is called, the
+partially compiled regex must be temporarily terminated with OP_END.
+
+Arguments:
+ group points to the start of the group
+ adjust the amount by which the group is to be moved
+ utf8 TRUE in UTF-8 mode
+ cd contains pointers to tables etc.
+
+Returns: nothing
+*/
+
+static void
+adjust_recurse(uschar *group, int adjust, BOOL utf8, compile_data *cd)
+{
+uschar *ptr = group;
+while ((ptr = (uschar *)find_recurse(ptr, utf8)) != NULL)
+ {
+ int offset = GET(ptr, 1);
+ if (cd->start_code + offset >= group) PUT(ptr, 1, offset + adjust);
+ ptr += 1 + LINK_SIZE;
+ }
+}
+
+
+
+/*************************************************
+* Insert an automatic callout point *
+*************************************************/
+
+/* This function is called when the PCRE_AUTO_CALLOUT option is set, to insert
+callout points before each pattern item.
+
+Arguments:
+ code current code pointer
+ ptr current pattern pointer
+ cd pointers to tables etc
+
+Returns: new code pointer
+*/
+
+static uschar *
+auto_callout(uschar *code, const uschar *ptr, compile_data *cd)
+{
+*code++ = OP_CALLOUT;
+*code++ = 255;
+PUT(code, 0, ptr - cd->start_pattern); /* Pattern offset */
+PUT(code, LINK_SIZE, 0); /* Default length */
+return code + 2*LINK_SIZE;
+}
+
+
+
+/*************************************************
+* Complete a callout item *
+*************************************************/
+
+/* A callout item contains the length of the next item in the pattern, which
+we can't fill in till after we have reached the relevant point. This is used
+for both automatic and manual callouts.
+
+Arguments:
+ previous_callout points to previous callout item
+ ptr current pattern pointer
+ cd pointers to tables etc
+
+Returns: nothing
+*/
+
+static void
+complete_callout(uschar *previous_callout, const uschar *ptr, compile_data *cd)
+{
+int length = ptr - cd->start_pattern - GET(previous_callout, 2);
+PUT(previous_callout, 2 + LINK_SIZE, length);
+}
+
+
+
+#ifdef SUPPORT_UCP
+/*************************************************
+* Get othercase range *
+*************************************************/
+
+/* This function is passed the start and end of a class range, in UTF-8 mode
+with UCP support. It searches up the characters, looking for internal ranges of
+characters in the "other" case. Each call returns the next one, updating the
+start address.
+
+Arguments:
+ cptr points to starting character value; updated
+ d end value
+ ocptr where to put start of othercase range
+ odptr where to put end of othercase range
+
+Yield: TRUE when range returned; FALSE when no more
+*/
+
+static BOOL
+get_othercase_range(int *cptr, int d, int *ocptr, int *odptr)
+{
+int c, chartype, othercase, next;
+
+for (c = *cptr; c <= d; c++)
+ {
+ if (ucp_findchar(c, &chartype, &othercase) == ucp_L && othercase != 0) break;
+ }
+
+if (c > d) return FALSE;
+
+*ocptr = othercase;
+next = othercase + 1;
+
+for (++c; c <= d; c++)
+ {
+ if (ucp_findchar(c, &chartype, &othercase) != ucp_L || othercase != next)
+ break;
+ next++;
+ }
+
+*odptr = next - 1;
+*cptr = c;
+
+return TRUE;
+}
+#endif /* SUPPORT_UCP */
/*************************************************
* Compile one branch *
*************************************************/
-/* Scan the pattern, compiling it into the code vector.
+/* Scan the pattern, compiling it into the code vector. If the options are
+changed during the branch, the pointer is used to change the external options
+bits.
Arguments:
- options the option bits
- brackets points to number of extracting brackets used
- code points to the pointer to the current code point
- ptrptr points to the current pattern pointer
- errorptr points to pointer to error message
- optchanged set to the value of the last OP_OPT item compiled
- reqchar set to the last literal character required, else -1
- countlits set to count of mandatory literal characters
- cd contains pointers to tables
-
-Returns: TRUE on success
- FALSE, with *errorptr set on error
+ optionsptr pointer to the option bits
+ brackets points to number of extracting brackets used
+ codeptr points to the pointer to the current code point
+ ptrptr points to the current pattern pointer
+ errorptr points to pointer to error message
+ firstbyteptr set to initial literal character, or < 0 (REQ_UNSET, REQ_NONE)
+ reqbyteptr set to the last literal character required, else < 0
+ bcptr points to current branch chain
+ cd contains pointers to tables etc.
+
+Returns: TRUE on success
+ FALSE, with *errorptr set on error
*/
static BOOL
-compile_branch(int options, int *brackets, uschar **codeptr,
- const uschar **ptrptr, const char **errorptr, int *optchanged,
- int *reqchar, int *countlits, compile_data *cd)
+compile_branch(int *optionsptr, int *brackets, uschar **codeptr,
+ const uschar **ptrptr, const char **errorptr, int *firstbyteptr,
+ int *reqbyteptr, branch_chain *bcptr, compile_data *cd)
{
int repeat_type, op_type;
-int repeat_min, repeat_max;
-int bravalue, length;
+int repeat_min = 0, repeat_max = 0; /* To please picky compilers */
+int bravalue = 0;
int greedy_default, greedy_non_default;
-int prevreqchar;
+int firstbyte, reqbyte;
+int zeroreqbyte, zerofirstbyte;
+int req_caseopt, reqvary, tempreqvary;
int condcount = 0;
-int subcountlits = 0;
+int options = *optionsptr;
+int after_manual_callout = 0;
register int c;
register uschar *code = *codeptr;
uschar *tempcode;
+BOOL inescq = FALSE;
+BOOL groupsetfirstbyte = FALSE;
const uschar *ptr = *ptrptr;
const uschar *tempptr;
uschar *previous = NULL;
-uschar class[32];
+uschar *previous_callout = NULL;
+uschar classbits[32];
+
+#ifdef SUPPORT_UTF8
+BOOL class_utf8;
+BOOL utf8 = (options & PCRE_UTF8) != 0;
+uschar *class_utf8data;
+uschar utf8_char[6];
+#else
+BOOL utf8 = FALSE;
+#endif
/* Set up the default and non-default settings for greediness */
greedy_default = ((options & PCRE_UNGREEDY) != 0);
greedy_non_default = greedy_default ^ 1;
-/* Initialize no required char, and count of literals */
+/* Initialize no first byte, no required byte. REQ_UNSET means "no char
+matching encountered yet". It gets changed to REQ_NONE if we hit something that
+matches a non-fixed char first char; reqbyte just remains unset if we never
+find one.
-*reqchar = prevreqchar = -1;
-*countlits = 0;
+When we hit a repeat whose minimum is zero, we may have to adjust these values
+to take the zero repeat into account. This is implemented by setting them to
+zerofirstbyte and zeroreqbyte when such a repeat is encountered. The individual
+item types that can be repeated set these backoff variables appropriately. */
+
+firstbyte = reqbyte = zerofirstbyte = zeroreqbyte = REQ_UNSET;
+
+/* The variable req_caseopt contains either the REQ_CASELESS value or zero,
+according to the current setting of the caseless flag. REQ_CASELESS is a bit
+value > 255. It is added into the firstbyte or reqbyte variables to record the
+case status of the value. This is used only for ASCII characters. */
+
+req_caseopt = ((options & PCRE_CASELESS) != 0)? REQ_CASELESS : 0;
/* Switch on next character until the end of the branch */
for (;; ptr++)
{
BOOL negate_class;
+ BOOL possessive_quantifier;
+ BOOL is_quantifier;
int class_charcount;
int class_lastchar;
int newoptions;
+ int recno;
int skipbytes;
- int subreqchar;
+ int subreqbyte;
+ int subfirstbyte;
+ int mclength;
+ uschar mcbuffer[8];
+
+ /* Next byte in the pattern */
c = *ptr;
+
+ /* If in \Q...\E, check for the end; if not, we have a literal */
+
+ if (inescq && c != 0)
+ {
+ if (c == '\\' && ptr[1] == 'E')
+ {
+ inescq = FALSE;
+ ptr++;
+ continue;
+ }
+ else
+ {
+ if (previous_callout != NULL)
+ {
+ complete_callout(previous_callout, ptr, cd);
+ previous_callout = NULL;
+ }
+ if ((options & PCRE_AUTO_CALLOUT) != 0)
+ {
+ previous_callout = code;
+ code = auto_callout(code, ptr, cd);
+ }
+ goto NORMAL_CHAR;
+ }
+ }
+
+ /* Fill in length of a previous callout, except when the next thing is
+ a quantifier. */
+
+ is_quantifier = c == '*' || c == '+' || c == '?' ||
+ (c == '{' && is_counted_repeat(ptr+1));
+
+ if (!is_quantifier && previous_callout != NULL &&
+ after_manual_callout-- <= 0)
+ {
+ complete_callout(previous_callout, ptr, cd);
+ previous_callout = NULL;
+ }
+
+ /* In extended mode, skip white space and comments */
+
if ((options & PCRE_EXTENDED) != 0)
{
if ((cd->ctypes[c] & ctype_space) != 0) continue;
@@ -1045,10 +2203,18 @@ for (;; ptr++)
/* The space before the ; is to avoid a warning on a silly compiler
on the Macintosh. */
while ((c = *(++ptr)) != 0 && c != NEWLINE) ;
- continue;
+ if (c != 0) continue; /* Else fall through to handle end of string */
}
}
+ /* No auto callout for quantifiers. */
+
+ if ((options & PCRE_AUTO_CALLOUT) != 0 && !is_quantifier)
+ {
+ previous_callout = code;
+ code = auto_callout(code, ptr, cd);
+ }
+
switch(c)
{
/* The branch terminates at end of string, |, or ). */
@@ -1056,13 +2222,20 @@ for (;; ptr++)
case 0:
case '|':
case ')':
+ *firstbyteptr = firstbyte;
+ *reqbyteptr = reqbyte;
*codeptr = code;
*ptrptr = ptr;
return TRUE;
- /* Handle single-character metacharacters */
+ /* Handle single-character metacharacters. In multiline mode, ^ disables
+ the setting of any following char as a first character. */
case '^':
+ if ((options & PCRE_MULTILINE) != 0)
+ {
+ if (firstbyte == REQ_UNSET) firstbyte = REQ_NONE;
+ }
previous = NULL;
*code++ = OP_CIRC;
break;
@@ -1072,19 +2245,41 @@ for (;; ptr++)
*code++ = OP_DOLL;
break;
+ /* There can never be a first char if '.' is first, whatever happens about
+ repeats. The value of reqbyte doesn't change either. */
+
case '.':
+ if (firstbyte == REQ_UNSET) firstbyte = REQ_NONE;
+ zerofirstbyte = firstbyte;
+ zeroreqbyte = reqbyte;
previous = code;
*code++ = OP_ANY;
break;
- /* Character classes. These always build a 32-byte bitmap of the permitted
- characters, except in the special case where there is only one character.
- For negated classes, we build the map as usual, then invert it at the end.
+ /* Character classes. If the included characters are all < 255 in value, we
+ build a 32-byte bitmap of the permitted characters, except in the special
+ case where there is only one such character. For negated classes, we build
+ the map as usual, then invert it at the end. However, we use a different
+ opcode so that data characters > 255 can be handled correctly.
+
+ If the class contains characters outside the 0-255 range, a different
+ opcode is compiled. It may optionally have a bit map for characters < 256,
+ but those above are are explicitly listed afterwards. A flag byte tells
+ whether the bitmap is present, and whether this is a negated class or not.
*/
case '[':
previous = code;
- *code++ = OP_CLASS;
+
+ /* PCRE supports POSIX class stuff inside a class. Perl gives an error if
+ they are encountered at the top level, so we'll do that too. */
+
+ if ((ptr[1] == ':' || ptr[1] == '.' || ptr[1] == '=') &&
+ check_posix_syntax(ptr, &tempptr, cd))
+ {
+ *errorptr = (ptr[1] == ':')? ERR13 : ERR31;
+ goto FAILED;
+ }
/* If the first character is '^', set the negation flag and skip it. */
@@ -1093,37 +2288,63 @@ for (;; ptr++)
negate_class = TRUE;
c = *(++ptr);
}
- else negate_class = FALSE;
+ else
+ {
+ negate_class = FALSE;
+ }
- /* Keep a count of chars so that we can optimize the case of just a single
- character. */
+ /* Keep a count of chars with values < 256 so that we can optimize the case
+ of just a single character (as long as it's < 256). For higher valued UTF-8
+ characters, we don't yet do any optimization. */
class_charcount = 0;
class_lastchar = -1;
+#ifdef SUPPORT_UTF8
+ class_utf8 = FALSE; /* No chars >= 256 */
+ class_utf8data = code + LINK_SIZE + 34; /* For UTF-8 items */
+#endif
+
/* Initialize the 32-char bit map to all zeros. We have to build the
map in a temporary bit of store, in case the class contains only 1
- character, because in that case the compiled code doesn't use the
+ character (< 256), because in that case the compiled code doesn't use the
bit map. */
- memset(class, 0, 32 * sizeof(uschar));
+ memset(classbits, 0, 32 * sizeof(uschar));
/* Process characters until ] is reached. By writing this as a "do" it
- means that an initial ] is taken as a data character. */
+ means that an initial ] is taken as a data character. The first pass
+ through the regex checked the overall syntax, so we don't need to be very
+ strict here. At the start of the loop, c contains the first byte of the
+ character. */
do
{
- if (c == 0)
+#ifdef SUPPORT_UTF8
+ if (utf8 && c > 127)
+ { /* Braces are required because the */
+ GETCHARLEN(c, ptr, ptr); /* macro generates multiple statements */
+ }
+#endif
+
+ /* Inside \Q...\E everything is literal except \E */
+
+ if (inescq)
{
- *errorptr = ERR6;
- goto FAILED;
+ if (c == '\\' && ptr[1] == 'E')
+ {
+ inescq = FALSE;
+ ptr++;
+ continue;
+ }
+ else goto LONE_SINGLE_CHARACTER;
}
/* Handle POSIX class names. Perl allows a negation extension of the
- form [:^name]. A square bracket that doesn't match the syntax is
+ form [:^name:]. A square bracket that doesn't match the syntax is
treated as a literal. We also recognize the POSIX constructions
[.ch.] and [=ch=] ("collating elements") and fault them, as Perl
- 5.6 does. */
+ 5.6 and 5.8 do. */
if (c == '[' &&
(ptr[1] == ':' || ptr[1] == '.' || ptr[1] == '=') &&
@@ -1161,22 +2382,34 @@ for (;; ptr++)
posix_class = 0;
/* Or into the map we are building up to 3 of the static class
- tables, or their negations. */
+ tables, or their negations. The [:blank:] class sets up the same
+ chars as the [:space:] class (all white space). We remove the vertical
+ white space chars afterwards. */
posix_class *= 3;
for (i = 0; i < 3; i++)
{
+ BOOL blankclass = strncmp((char *)ptr, "blank", 5) == 0;
int taboffset = posix_class_maps[posix_class + i];
if (taboffset < 0) break;
if (local_negate)
- for (c = 0; c < 32; c++) class[c] |= ~cbits[c+taboffset];
+ {
+ if (i == 0)
+ for (c = 0; c < 32; c++) classbits[c] |= ~cbits[c+taboffset];
+ else
+ for (c = 0; c < 32; c++) classbits[c] &= ~cbits[c+taboffset];
+ if (blankclass) classbits[1] |= 0x3c;
+ }
else
- for (c = 0; c < 32; c++) class[c] |= cbits[c+taboffset];
+ {
+ for (c = 0; c < 32; c++) classbits[c] |= cbits[c+taboffset];
+ if (blankclass) classbits[1] &= ~0x3c;
+ }
}
ptr = tempptr + 1;
class_charcount = 10; /* Set > 1; assumes more than 1 per class */
- continue;
+ continue; /* End of POSIX syntax handling */
}
/* Backslash may introduce a single character, or it may introduce one
@@ -1185,59 +2418,91 @@ for (;; ptr++)
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_count bigger than one. */
+ character in them, so set class_charcount bigger than one. */
if (c == '\\')
{
- c = check_escape(&ptr, errorptr, *brackets, options, TRUE, cd);
- if (-c == ESC_b) c = '\b';
- else if (c < 0)
+ c = check_escape(&ptr, errorptr, *brackets, options, TRUE);
+
+ if (-c == ESC_b) c = '\b'; /* \b is backslash in a class */
+ else if (-c == ESC_X) c = 'X'; /* \X is literal X in a class */
+ else if (-c == ESC_Q) /* Handle start of quoted string */
+ {
+ if (ptr[1] == '\\' && ptr[2] == 'E')
+ {
+ ptr += 2; /* avoid empty string */
+ }
+ else inescq = TRUE;
+ continue;
+ }
+
+ if (c < 0)
{
register const uschar *cbits = cd->cbits;
- class_charcount = 10;
+ class_charcount += 2; /* Greater than 1 is what matters */
switch (-c)
{
case ESC_d:
- for (c = 0; c < 32; c++) class[c] |= cbits[c+cbit_digit];
+ for (c = 0; c < 32; c++) classbits[c] |= cbits[c+cbit_digit];
continue;
case ESC_D:
- for (c = 0; c < 32; c++) class[c] |= ~cbits[c+cbit_digit];
+ for (c = 0; c < 32; c++) classbits[c] |= ~cbits[c+cbit_digit];
continue;
case ESC_w:
- for (c = 0; c < 32; c++) class[c] |= cbits[c+cbit_word];
+ for (c = 0; c < 32; c++) classbits[c] |= cbits[c+cbit_word];
continue;
case ESC_W:
- for (c = 0; c < 32; c++) class[c] |= ~cbits[c+cbit_word];
+ for (c = 0; c < 32; c++) classbits[c] |= ~cbits[c+cbit_word];
continue;
case ESC_s:
- for (c = 0; c < 32; c++) class[c] |= cbits[c+cbit_space];
+ for (c = 0; c < 32; c++) classbits[c] |= cbits[c+cbit_space];
+ classbits[1] &= ~0x08; /* Perl 5.004 onwards omits VT from \s */
continue;
case ESC_S:
- for (c = 0; c < 32; c++) class[c] |= ~cbits[c+cbit_space];
+ for (c = 0; c < 32; c++) classbits[c] |= ~cbits[c+cbit_space];
+ classbits[1] |= 0x08; /* Perl 5.004 onwards omits VT from \s */
+ continue;
+
+#ifdef SUPPORT_UCP
+ case ESC_p:
+ case ESC_P:
+ {
+ BOOL negated;
+ int property = get_ucp(&ptr, &negated, errorptr);
+ if (property < 0) goto FAILED;
+ class_utf8 = TRUE;
+ *class_utf8data++ = ((-c == ESC_p) != negated)?
+ XCL_PROP : XCL_NOTPROP;
+ *class_utf8data++ = property;
+ 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. */
default:
- *errorptr = ERR7;
- goto FAILED;
+ if ((options & PCRE_EXTRA) != 0)
+ {
+ *errorptr = ERR7;
+ goto FAILED;
+ }
+ c = *ptr; /* The final character */
+ class_charcount -= 2; /* Undo the default count from above */
}
}
- /* Fall through if single character, but don't at present allow
- chars > 255 in UTF-8 mode. */
+ /* Fall through if we have a single character (c >= 0). This may be
+ > 256 in UTF-8 mode. */
-#ifdef SUPPORT_UTF8
- if (c > 255)
- {
- *errorptr = ERR33;
- goto FAILED;
- }
-#endif
- }
+ } /* End of backslash handling */
/* A single character may be followed by '-' to form a range. However,
Perl does not permit ']' to be the end of the range. A '-' character
@@ -1247,13 +2512,15 @@ for (;; ptr++)
{
int d;
ptr += 2;
- d = *ptr;
- if (d == 0)
- {
- *errorptr = ERR6;
- goto FAILED;
+#ifdef SUPPORT_UTF8
+ if (utf8)
+ { /* Braces are required because the */
+ GETCHARLEN(d, ptr, ptr); /* macro generates multiple statements */
}
+ else
+#endif
+ d = *ptr; /* Not UTF-8 mode */
/* The second part of a range can be a single-character escape, but
not any of the other escapes. Perl 5.6 treats a hyphen as a literal
@@ -1262,104 +2529,291 @@ for (;; ptr++)
if (d == '\\')
{
const uschar *oldptr = ptr;
- d = check_escape(&ptr, errorptr, *brackets, options, TRUE, cd);
+ d = check_escape(&ptr, errorptr, *brackets, options, TRUE);
-#ifdef SUPPORT_UTF8
- if (d > 255)
- {
- *errorptr = ERR33;
- goto FAILED;
- }
-#endif
- /* \b is backslash; any other special means the '-' was literal */
+ /* \b is backslash; \X is literal X; any other special means the '-'
+ was literal */
if (d < 0)
{
- if (d == -ESC_b) d = '\b'; else
+ if (d == -ESC_b) d = '\b';
+ else if (d == -ESC_X) d = 'X'; else
{
ptr = oldptr - 2;
- goto SINGLE_CHARACTER; /* A few lines below */
+ goto LONE_SINGLE_CHARACTER; /* A few lines below */
}
}
}
- if (d < c)
+ /* The check that the two values are in the correct order happens in
+ the pre-pass. Optimize one-character ranges */
+
+ if (d == c) goto LONE_SINGLE_CHARACTER; /* A few lines below */
+
+ /* In UTF-8 mode, if the upper limit is > 255, or > 127 for caseless
+ matching, we have to use an XCLASS with extra data items. Caseless
+ matching for characters > 127 is available only if UCP support is
+ available. */
+
+#ifdef SUPPORT_UTF8
+ if (utf8 && (d > 255 || ((options & PCRE_CASELESS) != 0 && d > 127)))
{
- *errorptr = ERR8;
- goto FAILED;
+ class_utf8 = TRUE;
+
+ /* With UCP support, we can find the other case equivalents of
+ the relevant characters. There may be several ranges. Optimize how
+ they fit with the basic range. */
+
+#ifdef SUPPORT_UCP
+ if ((options & PCRE_CASELESS) != 0)
+ {
+ int occ, ocd;
+ int cc = c;
+ int origd = d;
+ while (get_othercase_range(&cc, origd, &occ, &ocd))
+ {
+ if (occ >= c && ocd <= d) continue; /* Skip embedded ranges */
+
+ if (occ < c && ocd >= c - 1) /* Extend the basic range */
+ { /* if there is overlap, */
+ c = occ; /* noting that if occ < c */
+ continue; /* we can't have ocd > d */
+ } /* because a subrange is */
+ if (ocd > d && occ <= d + 1) /* always shorter than */
+ { /* the basic range. */
+ d = ocd;
+ continue;
+ }
+
+ if (occ == ocd)
+ {
+ *class_utf8data++ = XCL_SINGLE;
+ }
+ else
+ {
+ *class_utf8data++ = XCL_RANGE;
+ class_utf8data += ord2utf8(occ, class_utf8data);
+ }
+ class_utf8data += ord2utf8(ocd, class_utf8data);
+ }
+ }
+#endif /* SUPPORT_UCP */
+
+ /* Now record the original range, possibly modified for UCP caseless
+ overlapping ranges. */
+
+ *class_utf8data++ = XCL_RANGE;
+ class_utf8data += ord2utf8(c, class_utf8data);
+ class_utf8data += ord2utf8(d, class_utf8data);
+
+ /* With UCP support, we are done. Without UCP support, there is no
+ caseless matching for UTF-8 characters > 127; we can use the bit map
+ for the smaller ones. */
+
+#ifdef SUPPORT_UCP
+ continue; /* With next character in the class */
+#else
+ if ((options & PCRE_CASELESS) == 0 || c > 127) continue;
+
+ /* Adjust upper limit and fall through to set up the map */
+
+ d = 127;
+
+#endif /* SUPPORT_UCP */
}
+#endif /* SUPPORT_UTF8 */
+
+ /* We use the bit map for all cases when not in UTF-8 mode; else
+ ranges that lie entirely within 0-127 when there is UCP support; else
+ for partial ranges without UCP support. */
for (; c <= d; c++)
{
- class[c/8] |= (1 << (c&7));
+ classbits[c/8] |= (1 << (c&7));
if ((options & PCRE_CASELESS) != 0)
{
int uc = cd->fcc[c]; /* flip case */
- class[uc/8] |= (1 << (uc&7));
+ classbits[uc/8] |= (1 << (uc&7));
}
class_charcount++; /* in case a one-char range */
class_lastchar = c;
}
+
continue; /* Go get the next char in the class */
}
/* Handle a lone single character - we can get here for a normal
- non-escape char, or after \ that introduces a single character. */
+ non-escape char, or after \ that introduces a single character or for an
+ apparent range that isn't. */
+
+ LONE_SINGLE_CHARACTER:
- SINGLE_CHARACTER:
+ /* Handle a character that cannot go in the bit map */
- class [c/8] |= (1 << (c&7));
- if ((options & PCRE_CASELESS) != 0)
+#ifdef SUPPORT_UTF8
+ if (utf8 && (c > 255 || ((options & PCRE_CASELESS) != 0 && c > 127)))
{
- c = cd->fcc[c]; /* flip case */
- class[c/8] |= (1 << (c&7));
+ class_utf8 = TRUE;
+ *class_utf8data++ = XCL_SINGLE;
+ class_utf8data += ord2utf8(c, class_utf8data);
+
+#ifdef SUPPORT_UCP
+ if ((options & PCRE_CASELESS) != 0)
+ {
+ int chartype;
+ int othercase;
+ if (ucp_findchar(c, &chartype, &othercase) >= 0 && othercase > 0)
+ {
+ *class_utf8data++ = XCL_SINGLE;
+ class_utf8data += ord2utf8(othercase, class_utf8data);
+ }
+ }
+#endif /* SUPPORT_UCP */
+
+ }
+ else
+#endif /* SUPPORT_UTF8 */
+
+ /* Handle a single-byte character */
+ {
+ classbits[c/8] |= (1 << (c&7));
+ if ((options & PCRE_CASELESS) != 0)
+ {
+ c = cd->fcc[c]; /* flip case */
+ classbits[c/8] |= (1 << (c&7));
+ }
+ class_charcount++;
+ class_lastchar = c;
}
- class_charcount++;
- class_lastchar = c;
}
/* Loop until ']' reached; the check for end of string happens inside the
loop. This "while" is the end of the "do" above. */
- while ((c = *(++ptr)) != ']');
+ while ((c = *(++ptr)) != ']' || inescq);
- /* If class_charcount is 1 and class_lastchar is not negative, we saw
- precisely one character. This doesn't need the whole 32-byte bit map.
- We turn it into a 1-character OP_CHAR if it's positive, or OP_NOT if
- it's negative. */
+ /* If class_charcount is 1, we saw precisely one character whose value is
+ less than 256. In non-UTF-8 mode we can always optimize. In UTF-8 mode, we
+ can optimize the negative case only if there were no characters >= 128
+ because OP_NOT and the related opcodes like OP_NOTSTAR operate on
+ single-bytes only. This is an historical hangover. Maybe one day we can
+ tidy these opcodes to handle multi-byte characters.
- if (class_charcount == 1 && class_lastchar >= 0)
+ The optimization throws away the bit map. We turn the item into a
+ 1-character OP_CHAR[NC] if it's positive, or OP_NOT if it's negative. Note
+ that OP_NOT does not support multibyte characters. In the positive case, it
+ can cause firstbyte to be set. Otherwise, there can be no first char if
+ this item is first, whatever repeat count may follow. In the case of
+ reqbyte, save the previous value for reinstating. */
+
+#ifdef SUPPORT_UTF8
+ if (class_charcount == 1 &&
+ (!utf8 ||
+ (!class_utf8 && (!negate_class || class_lastchar < 128))))
+
+#else
+ if (class_charcount == 1)
+#endif
{
+ zeroreqbyte = reqbyte;
+
+ /* The OP_NOT opcode works on one-byte characters only. */
+
if (negate_class)
{
- code[-1] = OP_NOT;
+ if (firstbyte == REQ_UNSET) firstbyte = REQ_NONE;
+ zerofirstbyte = firstbyte;
+ *code++ = OP_NOT;
+ *code++ = class_lastchar;
+ break;
}
+
+ /* For a single, positive character, get the value into mcbuffer, and
+ then we can handle this with the normal one-character code. */
+
+#ifdef SUPPORT_UTF8
+ if (utf8 && class_lastchar > 127)
+ mclength = ord2utf8(class_lastchar, mcbuffer);
else
+#endif
{
- code[-1] = OP_CHARS;
- *code++ = 1;
+ mcbuffer[0] = class_lastchar;
+ mclength = 1;
}
- *code++ = class_lastchar;
+ goto ONE_CHAR;
+ } /* End of 1-char optimization */
+
+ /* The general case - not the one-char optimization. If this is the first
+ thing in the branch, there can be no first char setting, whatever the
+ repeat count. Any reqbyte setting must remain unchanged after any kind of
+ repeat. */
+
+ if (firstbyte == REQ_UNSET) firstbyte = REQ_NONE;
+ zerofirstbyte = firstbyte;
+ zeroreqbyte = reqbyte;
+
+ /* If there are characters with values > 255, we have to compile an
+ extended class, with its own opcode. If there are no characters < 256,
+ we can omit the bitmap. */
+
+#ifdef SUPPORT_UTF8
+ if (class_utf8)
+ {
+ *class_utf8data++ = XCL_END; /* Marks the end of extra data */
+ *code++ = OP_XCLASS;
+ code += LINK_SIZE;
+ *code = negate_class? XCL_NOT : 0;
+
+ /* If the map is required, install it, and move on to the end of
+ the extra data */
+
+ if (class_charcount > 0)
+ {
+ *code++ |= XCL_MAP;
+ memcpy(code, classbits, 32);
+ code = class_utf8data;
+ }
+
+ /* If the map is not required, slide down the extra data. */
+
+ else
+ {
+ int len = class_utf8data - (code + 33);
+ memmove(code + 1, code + 33, len);
+ code += len + 1;
+ }
+
+ /* Now fill in the complete length of the item */
+
+ PUT(previous, 1, code - previous);
+ break; /* End of class handling */
}
+#endif
- /* Otherwise, negate the 32-byte map if necessary, and copy it into
- the code vector. */
+ /* If there are no characters > 255, negate the 32-byte map if necessary,
+ and copy it into the code vector. If this is the first thing in the branch,
+ there can be no first char setting, whatever the repeat count. Any reqbyte
+ setting must remain unchanged after any kind of repeat. */
+ if (negate_class)
+ {
+ *code++ = OP_NCLASS;
+ for (c = 0; c < 32; c++) code[c] = ~classbits[c];
+ }
else
{
- if (negate_class)
- for (c = 0; c < 32; c++) code[c] = ~class[c];
- else
- memcpy(code, class, 32);
- code += 32;
+ *code++ = OP_CLASS;
+ memcpy(code, classbits, 32);
}
+ code += 32;
break;
- /* Various kinds of repeat */
+ /* Various kinds of repeat; '{' is not necessarily a quantifier, but this
+ has been tested above. */
case '{':
- if (!is_counted_repeat(ptr+1, cd)) goto NORMAL_CHAR;
- ptr = read_repeat_counts(ptr+1, &repeat_min, &repeat_max, errorptr, cd);
+ if (!is_quantifier) goto NORMAL_CHAR;
+ ptr = read_repeat_counts(ptr+1, &repeat_min, &repeat_max, errorptr);
if (*errorptr != NULL) goto FAILED;
goto REPEAT;
@@ -1384,71 +2838,136 @@ for (;; ptr++)
goto FAILED;
}
- /* If the next character is '?' this is a minimizing repeat, by default,
- but if PCRE_UNGREEDY is set, it works the other way round. Advance to the
- next character. */
+ if (repeat_min == 0)
+ {
+ firstbyte = zerofirstbyte; /* Adjust for zero repeat */
+ reqbyte = zeroreqbyte; /* Ditto */
+ }
- if (ptr[1] == '?')
- { repeat_type = greedy_non_default; ptr++; }
+ /* Remember whether this is a variable length repeat */
+
+ reqvary = (repeat_min == repeat_max)? 0 : REQ_VARY;
+
+ op_type = 0; /* Default single-char op codes */
+ possessive_quantifier = FALSE; /* Default not possessive quantifier */
+
+ /* Save start of previous item, in case we have to move it up to make space
+ for an inserted OP_ONCE for the additional '+' extension. */
+
+ tempcode = previous;
+
+ /* If the next character is '+', we have a possessive quantifier. This
+ implies greediness, whatever the setting of the PCRE_UNGREEDY option.
+ If the next character is '?' this is a minimizing repeat, by default,
+ but if PCRE_UNGREEDY is set, it works the other way round. We change the
+ repeat type to the non-default. */
+
+ if (ptr[1] == '+')
+ {
+ repeat_type = 0; /* Force greedy */
+ possessive_quantifier = TRUE;
+ ptr++;
+ }
+ else if (ptr[1] == '?')
+ {
+ repeat_type = greedy_non_default;
+ ptr++;
+ }
else repeat_type = greedy_default;
- /* If previous was a string of characters, chop off the last one and use it
- as the subject of the repeat. If there was only one character, we can
- abolish the previous item altogether. A repeat with a zero minimum wipes
- out any reqchar setting, backing up to the previous value. We must also
- adjust the countlits value. */
+ /* If previous was a recursion, we need to wrap it inside brackets so that
+ it can be replicated if necessary. */
- if (*previous == OP_CHARS)
+ if (*previous == OP_RECURSE)
{
- int len = previous[1];
+ memmove(previous + 1 + LINK_SIZE, previous, 1 + LINK_SIZE);
+ code += 1 + LINK_SIZE;
+ *previous = OP_BRA;
+ PUT(previous, 1, code - previous);
+ *code = OP_KET;
+ PUT(code, 1, code - previous);
+ code += 1 + LINK_SIZE;
+ }
+
+ /* If previous was a character match, abolish the item and generate a
+ repeat item instead. If a char item has a minumum of more than one, ensure
+ that it is set in reqbyte - it might not be if a sequence such as x{3} is
+ the first thing in a branch because the x will have gone into firstbyte
+ instead. */
- if (repeat_min == 0) *reqchar = prevreqchar;
- *countlits += repeat_min - 1;
+ if (*previous == OP_CHAR || *previous == OP_CHARNC)
+ {
+ /* Deal with UTF-8 characters that take up more than one byte. It's
+ easier to write this out separately than try to macrify it. Use c to
+ hold the length of the character in bytes, plus 0x80 to flag that it's a
+ length rather than a small character. */
- if (len == 1)
+#ifdef SUPPORT_UTF8
+ if (utf8 && (code[-1] & 0x80) != 0)
{
- c = previous[2];
- code = previous;
+ uschar *lastchar = code - 1;
+ while((*lastchar & 0xc0) == 0x80) lastchar--;
+ c = code - lastchar; /* Length of UTF-8 character */
+ memcpy(utf8_char, lastchar, c); /* Save the char */
+ c |= 0x80; /* Flag c as a length */
}
else
+#endif
+
+ /* Handle the case of a single byte - either with no UTF8 support, or
+ with UTF-8 disabled, or for a UTF-8 character < 128. */
+
{
- c = previous[len+1];
- previous[1]--;
- code--;
+ c = code[-1];
+ if (repeat_min > 1) reqbyte = c | req_caseopt | cd->req_varyopt;
}
- op_type = 0; /* Use single-char op codes */
+
goto OUTPUT_SINGLE_REPEAT; /* Code shared with single character types */
}
/* If previous was a single negated character ([^a] or similar), we use
one of the special opcodes, replacing it. The code is shared with single-
- character repeats by adding a suitable offset into repeat_type. */
+ character repeats by setting opt_type to add a suitable offset into
+ repeat_type. OP_NOT is currently used only for single-byte chars. */
- else if ((int)*previous == OP_NOT)
+ else if (*previous == OP_NOT)
{
op_type = OP_NOTSTAR - OP_STAR; /* Use "not" opcodes */
c = previous[1];
- code = previous;
goto OUTPUT_SINGLE_REPEAT;
}
/* If previous was a character type match (\d or similar), abolish it and
create a suitable repeat item. The code is shared with single-character
- repeats by adding a suitable offset into repeat_type. */
+ repeats by setting op_type to add a suitable offset into repeat_type. Note
+ the the Unicode property types will be present only when SUPPORT_UCP is
+ defined, but we don't wrap the little bits of code here because it just
+ makes it horribly messy. */
- else if ((int)*previous < OP_EODN || *previous == OP_ANY)
+ else if (*previous < OP_EODN)
{
+ uschar *oldcode;
+ int prop_type;
op_type = OP_TYPESTAR - OP_STAR; /* Use type opcodes */
c = *previous;
- code = previous;
OUTPUT_SINGLE_REPEAT:
+ prop_type = (*previous == OP_PROP || *previous == OP_NOTPROP)?
+ previous[1] : -1;
+
+ oldcode = code;
+ code = previous; /* Usually overwrite previous item */
/* If the maximum is zero then the minimum must also be zero; Perl allows
this case, so we do too - by simply omitting the item altogether. */
if (repeat_max == 0) goto END_REPEAT;
+ /* All real repeats make it impossible to handle partial matching (maybe
+ one day we will be able to remove this restriction). */
+
+ if (repeat_max != 1) cd->nopartial = TRUE;
+
/* Combine the op_type with the repeat_type */
repeat_type += op_type;
@@ -1463,80 +2982,121 @@ for (;; ptr++)
else
{
*code++ = OP_UPTO + repeat_type;
- *code++ = repeat_max >> 8;
- *code++ = (repeat_max & 255);
+ PUT2INC(code, 0, repeat_max);
}
}
- /* The case {1,} is handled as the special case + */
-
- else if (repeat_min == 1 && repeat_max == -1)
- *code++ = OP_PLUS + repeat_type;
-
- /* The case {n,n} is just an EXACT, while the general case {n,m} is
- handled as an EXACT followed by an UPTO. An EXACT of 1 is optimized. */
+ /* A repeat minimum of 1 is optimized into some special cases. If the
+ maximum is unlimited, we use OP_PLUS. Otherwise, the original item it
+ left in place and, if the maximum is greater than 1, we use OP_UPTO with
+ one less than the maximum. */
- else
+ else if (repeat_min == 1)
{
- if (repeat_min != 1)
- {
- *code++ = OP_EXACT + op_type; /* NB EXACT doesn't have repeat_type */
- *code++ = repeat_min >> 8;
- *code++ = (repeat_min & 255);
- }
-
- /* If the mininum is 1 and the previous item was a character string,
- we either have to put back the item that got cancelled if the string
- length was 1, or add the character back onto the end of a longer
- string. For a character type nothing need be done; it will just get
- put back naturally. Note that the final character is always going to
- get added below. */
-
- else if (*previous == OP_CHARS)
+ if (repeat_max == -1)
+ *code++ = OP_PLUS + repeat_type;
+ else
{
- if (code == previous) code += 2; else previous[1]++;
+ code = oldcode; /* leave previous item in place */
+ if (repeat_max == 1) goto END_REPEAT;
+ *code++ = OP_UPTO + repeat_type;
+ PUT2INC(code, 0, repeat_max - 1);
}
+ }
- /* For a single negated character we also have to put back the
- item that got cancelled. */
+ /* The case {n,n} is just an EXACT, while the general case {n,m} is
+ handled as an EXACT followed by an UPTO. */
- else if (*previous == OP_NOT) code++;
+ else
+ {
+ *code++ = OP_EXACT + op_type; /* NB EXACT doesn't have repeat_type */
+ PUT2INC(code, 0, repeat_min);
- /* If the maximum is unlimited, insert an OP_STAR. */
+ /* If the maximum is unlimited, insert an OP_STAR. Before doing so,
+ we have to insert the character for the previous code. For a repeated
+ Unicode property match, there is an extra byte that defines the
+ required property. In UTF-8 mode, long characters have their length in
+ c, with the 0x80 bit as a flag. */
if (repeat_max < 0)
{
- *code++ = c;
+#ifdef SUPPORT_UTF8
+ if (utf8 && c >= 128)
+ {
+ memcpy(code, utf8_char, c & 7);
+ code += c & 7;
+ }
+ else
+#endif
+ {
+ *code++ = c;
+ if (prop_type >= 0) *code++ = prop_type;
+ }
*code++ = OP_STAR + repeat_type;
}
- /* Else insert an UPTO if the max is greater than the min. */
+ /* Else insert an UPTO if the max is greater than the min, again
+ preceded by the character, for the previously inserted code. */
else if (repeat_max != repeat_min)
{
+#ifdef SUPPORT_UTF8
+ if (utf8 && c >= 128)
+ {
+ memcpy(code, utf8_char, c & 7);
+ code += c & 7;
+ }
+ else
+#endif
*code++ = c;
+ if (prop_type >= 0) *code++ = prop_type;
repeat_max -= repeat_min;
*code++ = OP_UPTO + repeat_type;
- *code++ = repeat_max >> 8;
- *code++ = (repeat_max & 255);
+ PUT2INC(code, 0, repeat_max);
}
}
/* The character or character type itself comes last in all cases. */
+#ifdef SUPPORT_UTF8
+ if (utf8 && c >= 128)
+ {
+ memcpy(code, utf8_char, c & 7);
+ code += c & 7;
+ }
+ else
+#endif
*code++ = c;
+
+ /* For a repeated Unicode property match, there is an extra byte that
+ defines the required property. */
+
+#ifdef SUPPORT_UCP
+ if (prop_type >= 0) *code++ = prop_type;
+#endif
}
/* If previous was a character class or a back reference, we put the repeat
stuff after it, but just skip the item if the repeat was {0,0}. */
- else if (*previous == OP_CLASS || *previous == OP_REF)
+ else if (*previous == OP_CLASS ||
+ *previous == OP_NCLASS ||
+#ifdef SUPPORT_UTF8
+ *previous == OP_XCLASS ||
+#endif
+ *previous == OP_REF)
{
if (repeat_max == 0)
{
code = previous;
goto END_REPEAT;
}
+
+ /* All real repeats make it impossible to handle partial matching (maybe
+ one day we will be able to remove this restriction). */
+
+ if (repeat_max != 1) cd->nopartial = TRUE;
+
if (repeat_min == 0 && repeat_max == -1)
*code++ = OP_CRSTAR + repeat_type;
else if (repeat_min == 1 && repeat_max == -1)
@@ -1546,19 +3106,17 @@ for (;; ptr++)
else
{
*code++ = OP_CRRANGE + repeat_type;
- *code++ = repeat_min >> 8;
- *code++ = repeat_min & 255;
+ PUT2INC(code, 0, repeat_min);
if (repeat_max == -1) repeat_max = 0; /* 2-byte encoding for max */
- *code++ = repeat_max >> 8;
- *code++ = repeat_max & 255;
+ PUT2INC(code, 0, repeat_max);
}
}
/* If previous was a bracket group, we may have to replicate it in certain
cases. */
- else if ((int)*previous >= OP_BRA || (int)*previous == OP_ONCE ||
- (int)*previous == OP_COND)
+ else if (*previous >= OP_BRA || *previous == OP_ONCE ||
+ *previous == OP_COND)
{
register int i;
int ketoffset = 0;
@@ -1574,7 +3132,7 @@ for (;; ptr++)
if (repeat_max == -1)
{
register uschar *ket = previous;
- do ket += (ket[1] << 8) + ket[2]; while (*ket != OP_KET);
+ do ket += GET(ket, 1); while (*ket != OP_KET);
ketoffset = code - ket;
}
@@ -1587,15 +3145,6 @@ for (;; ptr++)
if (repeat_min == 0)
{
- /* If we set up a required char from the bracket, we must back off
- to the previous value and reset the countlits value too. */
-
- if (subcountlits > 0)
- {
- *reqchar = prevreqchar;
- *countlits -= subcountlits;
- }
-
/* If the maximum is also zero, we just omit the group from the output
altogether. */
@@ -1606,10 +3155,15 @@ for (;; ptr++)
}
/* If the maximum is 1 or unlimited, we just have to stick in the
- BRAZERO and do no more at this point. */
+ BRAZERO and do no more at this point. However, we do need to adjust
+ any OP_RECURSE calls inside the group that refer to the group itself or
+ any internal group, because the offset is from the start of the whole
+ regex. Temporarily terminate the pattern while doing this. */
if (repeat_max <= 1)
{
+ *code = OP_END;
+ adjust_recurse(previous, 1, utf8, cd);
memmove(previous+1, previous, len);
code++;
*previous++ = OP_BRAZERO + repeat_type;
@@ -1619,14 +3173,17 @@ for (;; ptr++)
in a nested fashion, sticking OP_BRAZERO before each set of brackets.
The first one has to be handled carefully because it's the original
copy, which has to be moved up. The remainder can be handled by code
- that is common with the non-zero minimum case below. We just have to
- adjust the value or repeat_max, since one less copy is required. */
+ that is common with the non-zero minimum case below. We have to
+ adjust the value or repeat_max, since one less copy is required. Once
+ again, we may have to adjust any OP_RECURSE calls inside the group. */
else
{
int offset;
- memmove(previous+4, previous, len);
- code += 4;
+ *code = OP_END;
+ adjust_recurse(previous, 2 + LINK_SIZE, utf8, cd);
+ memmove(previous + 2 + LINK_SIZE, previous, len);
+ code += 2 + LINK_SIZE;
*previous++ = OP_BRAZERO + repeat_type;
*previous++ = OP_BRA;
@@ -1635,8 +3192,7 @@ for (;; ptr++)
offset = (bralink == NULL)? 0 : previous - bralink;
bralink = previous;
- *previous++ = offset >> 8;
- *previous++ = offset & 255;
+ PUTINC(previous, 0, offset);
}
repeat_max--;
@@ -1644,14 +3200,19 @@ for (;; ptr++)
/* If the minimum is greater than zero, replicate the group as many
times as necessary, and adjust the maximum to the number of subsequent
- copies that we need. */
+ copies that we need. If we set a first char from the group, and didn't
+ set a required char, copy the latter from the former. */
else
{
- for (i = 1; i < repeat_min; i++)
+ if (repeat_min > 1)
{
- memcpy(code, previous, len);
- code += len;
+ if (groupsetfirstbyte && reqbyte < 0) reqbyte = firstbyte;
+ for (i = 1; i < repeat_min; i++)
+ {
+ memcpy(code, previous, len);
+ code += len;
+ }
}
if (repeat_max > 0) repeat_max -= repeat_min;
}
@@ -1677,8 +3238,7 @@ for (;; ptr++)
*code++ = OP_BRA;
offset = (bralink == NULL)? 0 : code - bralink;
bralink = code;
- *code++ = offset >> 8;
- *code++ = offset & 255;
+ PUTINC(code, 0, offset);
}
memcpy(code, previous, len);
@@ -1693,11 +3253,11 @@ for (;; ptr++)
int oldlinkoffset;
int offset = code - bralink + 1;
uschar *bra = code - offset;
- oldlinkoffset = (bra[1] << 8) + bra[2];
+ oldlinkoffset = GET(bra, 1);
bralink = (oldlinkoffset == 0)? NULL : bralink - oldlinkoffset;
*code++ = OP_KET;
- *code++ = bra[1] = offset >> 8;
- *code++ = bra[2] = (offset & 255);
+ PUTINC(code, 0, offset);
+ PUT(bra, 1, offset);
}
}
@@ -1717,10 +3277,31 @@ for (;; ptr++)
goto FAILED;
}
- /* In all case we no longer have a previous item. */
+ /* If the character following a repeat is '+', we wrap the entire repeated
+ item inside OP_ONCE brackets. This is just syntactic sugar, taken from
+ Sun's Java package. The repeated item starts at tempcode, not at previous,
+ which might be the first part of a string whose (former) last char we
+ repeated. However, we don't support '+' after a greediness '?'. */
+
+ if (possessive_quantifier)
+ {
+ int len = code - tempcode;
+ memmove(tempcode + 1+LINK_SIZE, tempcode, len);
+ code += 1 + LINK_SIZE;
+ len += 1 + LINK_SIZE;
+ tempcode[0] = OP_ONCE;
+ *code++ = OP_KET;
+ PUTINC(code, 0, len);
+ PUT(tempcode, 1, len);
+ }
+
+ /* In all case we no longer have a previous item. We also set the
+ "follows varying string" flag for subsequently encountered reqbytes if
+ it isn't already set and we have just passed a varying length item. */
END_REPEAT:
previous = NULL;
+ cd->req_varyopt |= reqvary;
break;
@@ -1754,9 +3335,25 @@ for (;; ptr++)
case '(':
bravalue = OP_COND; /* Conditional group */
- if ((cd->ctypes[*(++ptr)] & ctype_digit) != 0)
+
+ /* Condition to test for recursion */
+
+ if (ptr[1] == 'R')
+ {
+ code[1+LINK_SIZE] = OP_CREF;
+ PUT2(code, 2+LINK_SIZE, CREF_RECURSE);
+ skipbytes = 3;
+ ptr += 3;
+ }
+
+ /* Condition to test for a numbered subpattern match. We know that
+ if a digit follows ( then there will just be digits until ) because
+ the syntax was checked in the first pass. */
+
+ else if ((digitab[ptr[1]] && ctype_digit) != 0)
{
- int condref = *ptr - '0';
+ int condref; /* Don't amalgamate; some compilers */
+ condref = *(++ptr) - '0'; /* grumble at autoincrement in declaration */
while (*(++ptr) != ')') condref = condref*10 + *ptr - '0';
if (condref == 0)
{
@@ -1764,12 +3361,12 @@ for (;; ptr++)
goto FAILED;
}
ptr++;
- code[3] = OP_CREF;
- code[4] = condref >> 8;
- code[5] = condref & 255;
+ code[1+LINK_SIZE] = OP_CREF;
+ PUT2(code, 2+LINK_SIZE, condref);
skipbytes = 3;
}
- else ptr--;
+ /* For conditions that are assertions, we just fall through, having
+ set bravalue above. */
break;
case '=': /* Positive lookahead */
@@ -1794,10 +3391,6 @@ for (;; ptr++)
bravalue = OP_ASSERTBACK_NOT;
ptr++;
break;
-
- default: /* Syntax error */
- *errorptr = ERR24;
- goto FAILED;
}
break;
@@ -1806,11 +3399,157 @@ for (;; ptr++)
ptr++;
break;
+ case 'C': /* Callout - may be followed by digits; */
+ previous_callout = code; /* Save for later completion */
+ after_manual_callout = 1; /* Skip one item before completing */
+ *code++ = OP_CALLOUT; /* Already checked that the terminating */
+ { /* closing parenthesis is present. */
+ int n = 0;
+ while ((digitab[*(++ptr)] & ctype_digit) != 0)
+ n = n * 10 + *ptr - '0';
+ if (n > 255)
+ {
+ *errorptr = ERR38;
+ goto FAILED;
+ }
+ *code++ = n;
+ PUT(code, 0, ptr - cd->start_pattern + 1); /* Pattern offset */
+ PUT(code, LINK_SIZE, 0); /* Default length */
+ code += 2 * LINK_SIZE;
+ }
+ previous = NULL;
+ continue;
+
+ case 'P': /* Named subpattern handling */
+ if (*(++ptr) == '<') /* Definition */
+ {
+ int i, namelen;
+ uschar *slot = cd->name_table;
+ const uschar *name; /* Don't amalgamate; some compilers */
+ name = ++ptr; /* grumble at autoincrement in declaration */
+
+ while (*ptr++ != '>');
+ namelen = ptr - name - 1;
+
+ for (i = 0; i < cd->names_found; i++)
+ {
+ int crc = memcmp(name, slot+2, namelen);
+ if (crc == 0)
+ {
+ if (slot[2+namelen] == 0)
+ {
+ *errorptr = ERR43;
+ goto FAILED;
+ }
+ crc = -1; /* Current name is substring */
+ }
+ if (crc < 0)
+ {
+ memmove(slot + cd->name_entry_size, slot,
+ (cd->names_found - i) * cd->name_entry_size);
+ break;
+ }
+ slot += cd->name_entry_size;
+ }
+
+ PUT2(slot, 0, *brackets + 1);
+ memcpy(slot + 2, name, namelen);
+ slot[2+namelen] = 0;
+ cd->names_found++;
+ goto NUMBERED_GROUP;
+ }
+
+ if (*ptr == '=' || *ptr == '>') /* Reference or recursion */
+ {
+ int i, namelen;
+ int type = *ptr++;
+ const uschar *name = ptr;
+ uschar *slot = cd->name_table;
+
+ while (*ptr != ')') ptr++;
+ namelen = ptr - name;
+
+ for (i = 0; i < cd->names_found; i++)
+ {
+ if (strncmp((char *)name, (char *)slot+2, namelen) == 0) break;
+ slot += cd->name_entry_size;
+ }
+ if (i >= cd->names_found)
+ {
+ *errorptr = ERR15;
+ goto FAILED;
+ }
+
+ recno = GET2(slot, 0);
+
+ if (type == '>') goto HANDLE_RECURSION; /* A few lines below */
+
+ /* Back reference */
+
+ previous = code;
+ *code++ = OP_REF;
+ PUT2INC(code, 0, recno);
+ cd->backref_map |= (recno < 32)? (1 << recno) : 1;
+ if (recno > cd->top_backref) cd->top_backref = recno;
+ continue;
+ }
+
+ /* Should never happen */
+ break;
+
case 'R': /* Pattern recursion */
- *code++ = OP_RECURSE;
- ptr++;
+ ptr++; /* Same as (?0) */
+ /* Fall through */
+
+ /* Recursion or "subroutine" call */
+
+ case '0': case '1': case '2': case '3': case '4':
+ case '5': case '6': case '7': case '8': case '9':
+ {
+ const uschar *called;
+ recno = 0;
+ while((digitab[*ptr] & ctype_digit) != 0)
+ recno = recno * 10 + *ptr++ - '0';
+
+ /* Come here from code above that handles a named recursion */
+
+ HANDLE_RECURSION:
+
+ previous = code;
+
+ /* Find the bracket that is being referenced. Temporarily end the
+ regex in case it doesn't exist. */
+
+ *code = OP_END;
+ called = (recno == 0)?
+ cd->start_code : find_bracket(cd->start_code, utf8, recno);
+
+ if (called == NULL)
+ {
+ *errorptr = ERR15;
+ goto FAILED;
+ }
+
+ /* If the subpattern is still open, this is a recursive call. We
+ check to see if this is a left recursion that could loop for ever,
+ and diagnose that case. */
+
+ if (GET(called, 1) == 0 && could_be_empty(called, code, bcptr, utf8))
+ {
+ *errorptr = ERR40;
+ goto FAILED;
+ }
+
+ /* Insert the recursion/subroutine item */
+
+ *code = OP_RECURSE;
+ PUT(code, 1, called - cd->start_code);
+ code += 1 + LINK_SIZE;
+ }
continue;
+ /* Character after (? not specially recognized */
+
default: /* Option setting */
set = unset = 0;
optset = &set;
@@ -1827,10 +3566,6 @@ for (;; ptr++)
case 'x': *optset |= PCRE_EXTENDED; break;
case 'U': *optset |= PCRE_UNGREEDY; break;
case 'X': *optset |= PCRE_EXTRA; break;
-
- default:
- *errorptr = ERR12;
- goto FAILED;
}
}
@@ -1839,23 +3574,33 @@ for (;; ptr++)
newoptions = (options | set) & (~unset);
/* If the options ended with ')' this is not the start of a nested
- group with option changes, so the options change at this level. At top
- level there is nothing else to be done (the options will in fact have
- been set from the start of compiling as a result of the first pass) but
- at an inner level we must compile code to change the ims options if
- necessary, and pass the new setting back so that it can be put at the
- start of any following branches, and when this group ends, a resetting
- item can be compiled. */
+ group with option changes, so the options change at this level. Compile
+ code to change the ims options if this setting actually changes any of
+ them. We also pass the new setting back so that it can be put at the
+ start of any following branches, and when this group ends (if we are in
+ a group), a resetting item can be compiled.
+
+ Note that if this item is right at the start of the pattern, the
+ options will have been abstracted and made global, so there will be no
+ change to compile. */
if (*ptr == ')')
{
- if ((options & PCRE_INGROUP) != 0 &&
- (options & PCRE_IMS) != (newoptions & PCRE_IMS))
+ if ((options & PCRE_IMS) != (newoptions & PCRE_IMS))
{
*code++ = OP_OPT;
- *code++ = *optchanged = newoptions & PCRE_IMS;
+ *code++ = newoptions & PCRE_IMS;
}
- options = newoptions; /* Change options at this level */
+
+ /* Change options at this level, and pass them back for use
+ in subsequent branches. Reset the greedy defaults and the case
+ value for firstbyte and reqbyte. */
+
+ *optionsptr = options = newoptions;
+ greedy_default = ((newoptions & PCRE_UNGREEDY) != 0);
+ greedy_non_default = greedy_default ^ 1;
+ req_caseopt = ((options & PCRE_CASELESS) != 0)? REQ_CASELESS : 0;
+
previous = NULL; /* This item can't be repeated */
continue; /* It is complete */
}
@@ -1870,18 +3615,26 @@ for (;; ptr++)
}
}
+ /* 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)
+ {
+ bravalue = OP_BRA;
+ }
+
/* Else we have a referencing group; adjust the opcode. If the bracket
number is greater than EXTRACT_BASIC_MAX, we set the opcode one higher, and
arrange for the true number to follow later, in an OP_BRANUMBER item. */
else
{
+ NUMBERED_GROUP:
if (++(*brackets) > EXTRACT_BASIC_MAX)
{
bravalue = OP_BRA + EXTRACT_BASIC_MAX + 1;
- code[3] = OP_BRANUMBER;
- code[4] = *brackets >> 8;
- code[5] = *brackets & 255;
+ code[1+LINK_SIZE] = OP_BRANUMBER;
+ PUT2(code, 2+LINK_SIZE, *brackets);
skipbytes = 3;
}
else bravalue = OP_BRA + *brackets;
@@ -1895,11 +3648,11 @@ for (;; ptr++)
previous = (bravalue >= OP_ONCE)? code : NULL;
*code = bravalue;
tempcode = code;
+ tempreqvary = cd->req_varyopt; /* Save value before bracket */
if (!compile_regex(
- options | PCRE_INGROUP, /* Set for all nested groups */
- ((options & PCRE_IMS) != (newoptions & PCRE_IMS))?
- newoptions & PCRE_IMS : -1, /* Pass ims options if changed */
+ newoptions, /* The complete new option state */
+ options & PCRE_IMS, /* The previous ims option state */
brackets, /* Extracting bracket count */
&tempcode, /* Where to put code (updated) */
&ptr, /* Input pointer (updated) */
@@ -1907,8 +3660,9 @@ for (;; ptr++)
(bravalue == OP_ASSERTBACK ||
bravalue == OP_ASSERTBACK_NOT), /* TRUE if back assert */
skipbytes, /* Skip over OP_COND/OP_BRANUMBER */
- &subreqchar, /* For possible last char */
- &subcountlits, /* For literal count */
+ &subfirstbyte, /* For possible first char */
+ &subreqbyte, /* For possible last char */
+ bcptr, /* Current branch chain */
cd)) /* Tables block */
goto FAILED;
@@ -1927,7 +3681,7 @@ for (;; ptr++)
do {
condcount++;
- tc += (tc[1] << 8) | tc[2];
+ tc += GET(tc,1);
}
while (*tc != OP_KET);
@@ -1936,25 +3690,65 @@ for (;; ptr++)
*errorptr = ERR27;
goto FAILED;
}
+
+ /* If there is just one branch, we must not make use of its firstbyte or
+ reqbyte, because this is equivalent to an empty second branch. */
+
+ if (condcount == 1) subfirstbyte = subreqbyte = REQ_NONE;
}
- /* Handle updating of the required character. If the subpattern didn't
- set one, leave it as it was. Otherwise, update it for normal brackets of
- all kinds, forward assertions, and conditions with two branches. Don't
- update the literal count for forward assertions, however. If the bracket
- is followed by a quantifier with zero repeat, we have to back off. Hence
- the definition of prevreqchar and subcountlits outside the main loop so
- that they can be accessed for the back off. */
-
- if (subreqchar > 0 &&
- (bravalue >= OP_BRA || bravalue == OP_ONCE || bravalue == OP_ASSERT ||
- (bravalue == OP_COND && condcount == 2)))
+ /* Handle updating of the required and first characters. Update for normal
+ brackets of all kinds, and conditions with two branches (see code above).
+ If the bracket is followed by a quantifier with zero repeat, we have to
+ back off. Hence the definition of zeroreqbyte and zerofirstbyte outside the
+ main loop so that they can be accessed for the back off. */
+
+ zeroreqbyte = reqbyte;
+ zerofirstbyte = firstbyte;
+ groupsetfirstbyte = FALSE;
+
+ if (bravalue >= OP_BRA || bravalue == OP_ONCE || bravalue == OP_COND)
{
- prevreqchar = *reqchar;
- *reqchar = subreqchar;
- if (bravalue != OP_ASSERT) *countlits += subcountlits;
+ /* If we have not yet set a firstbyte in this branch, take it from the
+ subpattern, remembering that it was set here so that a repeat of more
+ than one can replicate it as reqbyte if necessary. If the subpattern has
+ no firstbyte, set "none" for the whole branch. In both cases, a zero
+ repeat forces firstbyte to "none". */
+
+ if (firstbyte == REQ_UNSET)
+ {
+ if (subfirstbyte >= 0)
+ {
+ firstbyte = subfirstbyte;
+ groupsetfirstbyte = TRUE;
+ }
+ else firstbyte = REQ_NONE;
+ zerofirstbyte = REQ_NONE;
+ }
+
+ /* If firstbyte was previously set, convert the subpattern's firstbyte
+ into reqbyte if there wasn't one, using the vary flag that was in
+ existence beforehand. */
+
+ else if (subfirstbyte >= 0 && subreqbyte < 0)
+ subreqbyte = subfirstbyte | tempreqvary;
+
+ /* If the subpattern set a required byte (or set a first byte that isn't
+ really the first byte - see above), set it. */
+
+ if (subreqbyte >= 0) reqbyte = subreqbyte;
}
+ /* For a forward assertion, we take the reqbyte, if set. This can be
+ helpful if the pattern that follows the assertion doesn't set a different
+ char. For example, it's useful for /(?=abcde).+/. We can't set firstbyte
+ for an assertion, however because it leads to incorrect effect for patterns
+ such as /(?=a)a.+/ when the "real" "a" would then become a reqbyte instead
+ of a firstbyte. This is overcome by a scan at the end if there's no
+ firstbyte, looking for an asserted first char. */
+
+ else if (bravalue == OP_ASSERT && subreqbyte >= 0) reqbyte = subreqbyte;
+
/* Now update the main code pointer to the end of the group. */
code = tempcode;
@@ -1974,7 +3768,7 @@ for (;; ptr++)
case '\\':
tempptr = ptr;
- c = check_escape(&ptr, errorptr, *brackets, options, FALSE, cd);
+ c = check_escape(&ptr, errorptr, *brackets, options, FALSE);
/* Handle metacharacters introduced by \. For ones like \d, the ESC_ values
are arranged to be the negation of the corresponding OP_values. For the
@@ -1985,14 +3779,51 @@ for (;; ptr++)
if (c < 0)
{
+ if (-c == ESC_Q) /* Handle start of quoted string */
+ {
+ if (ptr[1] == '\\' && ptr[2] == 'E') ptr += 2; /* avoid empty string */
+ else inescq = TRUE;
+ continue;
+ }
+
+ /* For metasequences that actually match a character, we disable the
+ setting of a first character if it hasn't already been set. */
+
+ if (firstbyte == REQ_UNSET && -c > ESC_b && -c < ESC_Z)
+ firstbyte = REQ_NONE;
+
+ /* Set values to reset to if this is followed by a zero repeat. */
+
+ zerofirstbyte = firstbyte;
+ zeroreqbyte = reqbyte;
+
+ /* Back references are handled specially */
+
if (-c >= ESC_REF)
{
int number = -c - ESC_REF;
previous = code;
*code++ = OP_REF;
- *code++ = number >> 8;
- *code++ = number & 255;
+ PUT2INC(code, 0, number);
+ }
+
+ /* So are Unicode property matches, if supported. We know that get_ucp
+ won't fail because it was tested in the pre-pass. */
+
+#ifdef SUPPORT_UCP
+ else if (-c == ESC_P || -c == ESC_p)
+ {
+ BOOL negated;
+ int value = get_ucp(&ptr, &negated, errorptr);
+ previous = code;
+ *code++ = ((-c == ESC_p) != negated)? OP_PROP : OP_NOTPROP;
+ *code++ = value;
}
+#endif
+
+ /* For the rest, we can obtain the OP value by negating the escape
+ value */
+
else
{
previous = (-c > ESC_b && -c < ESC_Z)? code : NULL;
@@ -2001,84 +3832,81 @@ for (;; ptr++)
continue;
}
- /* Data character: reset and fall through */
-
- ptr = tempptr;
- c = '\\';
-
- /* Handle a run of data characters until a metacharacter is encountered.
- The first character is guaranteed not to be whitespace or # when the
- extended flag is set. */
+ /* We have a data character whose value is in c. In UTF-8 mode it may have
+ a value > 127. We set its representation in the length/buffer, and then
+ handle it as a data character. */
- NORMAL_CHAR:
- default:
- previous = code;
- *code = OP_CHARS;
- code += 2;
- length = 0;
+#ifdef SUPPORT_UTF8
+ if (utf8 && c > 127)
+ mclength = ord2utf8(c, mcbuffer);
+ else
+#endif
- do
- {
- if ((options & PCRE_EXTENDED) != 0)
- {
- if ((cd->ctypes[c] & ctype_space) != 0) continue;
- if (c == '#')
- {
- /* The space before the ; is to avoid a warning on a silly compiler
- on the Macintosh. */
- while ((c = *(++ptr)) != 0 && c != NEWLINE) ;
- if (c == 0) break;
- continue;
- }
- }
+ {
+ mcbuffer[0] = c;
+ mclength = 1;
+ }
- /* Backslash may introduce a data char or a metacharacter. Escaped items
- are checked for validity in the pre-compiling pass. Stop the string
- before a metaitem. */
+ goto ONE_CHAR;
- if (c == '\\')
- {
- tempptr = ptr;
- c = check_escape(&ptr, errorptr, *brackets, options, FALSE, cd);
- if (c < 0) { ptr = tempptr; break; }
+ /* Handle a literal character. It is guaranteed not to be whitespace or #
+ when the extended flag is set. If we are in UTF-8 mode, it may be a
+ multi-byte literal character. */
- /* If a character is > 127 in UTF-8 mode, we have to turn it into
- two or more characters in the UTF-8 encoding. */
+ default:
+ NORMAL_CHAR:
+ mclength = 1;
+ mcbuffer[0] = c;
#ifdef SUPPORT_UTF8
- if (c > 127 && (options & PCRE_UTF8) != 0)
- {
- uschar buffer[8];
- int len = ord2utf8(c, buffer);
- for (c = 0; c < len; c++) *code++ = buffer[c];
- length += len;
- continue;
- }
+ if (utf8 && (c & 0xc0) == 0xc0)
+ {
+ while ((ptr[1] & 0xc0) == 0x80)
+ mcbuffer[mclength++] = *(++ptr);
+ }
#endif
- }
- /* Ordinary character or single-char escape */
+ /* At this point we have the character's bytes in mcbuffer, and the length
+ in mclength. When not in UTF-8 mode, the length is always 1. */
- *code++ = c;
- length++;
- }
+ ONE_CHAR:
+ previous = code;
+ *code++ = ((options & PCRE_CASELESS) != 0)? OP_CHARNC : OP_CHAR;
+ for (c = 0; c < mclength; c++) *code++ = mcbuffer[c];
- /* This "while" is the end of the "do" above. */
+ /* Set the first and required bytes appropriately. If no previous first
+ byte, set it from this character, but revert to none on a zero repeat.
+ Otherwise, leave the firstbyte value alone, and don't change it on a zero
+ repeat. */
- while (length < MAXLIT && (cd->ctypes[c = *(++ptr)] & ctype_meta) == 0);
+ if (firstbyte == REQ_UNSET)
+ {
+ zerofirstbyte = REQ_NONE;
+ zeroreqbyte = reqbyte;
- /* Update the last character and the count of literals */
+ /* If the character is more than one byte long, we can set firstbyte
+ only if it is not to be matched caselessly. */
- prevreqchar = (length > 1)? code[-2] : *reqchar;
- *reqchar = code[-1];
- *countlits += length;
+ if (mclength == 1 || req_caseopt == 0)
+ {
+ firstbyte = mcbuffer[0] | req_caseopt;
+ if (mclength != 1) reqbyte = code[-1] | cd->req_varyopt;
+ }
+ else firstbyte = reqbyte = REQ_NONE;
+ }
- /* Compute the length and set it in the data vector, and advance to
- the next state. */
+ /* firstbyte was previously set; we can set reqbyte only the length is
+ 1 or the matching is caseful. */
- previous[1] = length;
- if (length < MAXLIT) ptr--;
- break;
+ else
+ {
+ zerofirstbyte = firstbyte;
+ zeroreqbyte = reqbyte;
+ if (mclength == 1 || req_caseopt == 0)
+ reqbyte = code[-1] | req_caseopt | cd->req_varyopt;
+ }
+
+ break; /* End of literal character handling */
}
} /* end of big loop */
@@ -2107,52 +3935,56 @@ following branch to ensure they get set correctly at run time, and also pass
the new options into every subsequent branch compile.
Argument:
- options the option bits
- optchanged new ims options to set as if (?ims) were at the start, or -1
- for no change
- brackets -> int containing the number of extracting brackets used
- codeptr -> the address of the current code pointer
- ptrptr -> the address of the current pattern pointer
- errorptr -> pointer to error message
- lookbehind TRUE if this is a lookbehind assertion
- skipbytes skip this many bytes at start (for OP_COND, OP_BRANUMBER)
- reqchar -> place to put the last required character, or a negative number
- countlits -> place to put the shortest literal count of any branch
- cd points to the data block with tables pointers
+ options option bits, including any changes for this subpattern
+ oldims previous settings of ims option bits
+ brackets -> int containing the number of extracting brackets used
+ codeptr -> the address of the current code pointer
+ ptrptr -> the address of the current pattern pointer
+ errorptr -> pointer to error message
+ lookbehind TRUE if this is a lookbehind assertion
+ skipbytes skip this many bytes at start (for OP_COND, OP_BRANUMBER)
+ firstbyteptr place to put the first required character, or a negative number
+ reqbyteptr place to put the last required character, or a negative number
+ bcptr pointer to the chain of currently open branches
+ cd points to the data block with tables pointers etc.
Returns: TRUE on success
*/
static BOOL
-compile_regex(int options, int optchanged, int *brackets, uschar **codeptr,
+compile_regex(int options, int oldims, int *brackets, uschar **codeptr,
const uschar **ptrptr, const char **errorptr, BOOL lookbehind, int skipbytes,
- int *reqchar, int *countlits, compile_data *cd)
+ int *firstbyteptr, int *reqbyteptr, branch_chain *bcptr, compile_data *cd)
{
const uschar *ptr = *ptrptr;
uschar *code = *codeptr;
uschar *last_branch = code;
uschar *start_bracket = code;
uschar *reverse_count = NULL;
-int oldoptions = options & PCRE_IMS;
-int branchreqchar, branchcountlits;
+int firstbyte, reqbyte;
+int branchfirstbyte, branchreqbyte;
+branch_chain bc;
-*reqchar = -1;
-*countlits = INT_MAX;
-code += 3 + skipbytes;
+bc.outer = bcptr;
+bc.current = code;
+
+firstbyte = reqbyte = REQ_UNSET;
+
+/* Offset is set zero to mark that this bracket is still open */
+
+PUT(code, 1, 0);
+code += 1 + LINK_SIZE + skipbytes;
/* Loop for each alternative branch */
for (;;)
{
- int length;
-
- /* Handle change of options */
+ /* Handle a change of ims options at the start of the branch */
- if (optchanged >= 0)
+ if ((options & PCRE_IMS) != oldims)
{
*code++ = OP_OPT;
- *code++ = optchanged;
- options = (options & ~PCRE_IMS) | optchanged;
+ *code++ = options & PCRE_IMS;
}
/* Set up dummy OP_REVERSE if lookbehind assertion */
@@ -2161,43 +3993,56 @@ for (;;)
{
*code++ = OP_REVERSE;
reverse_count = code;
- *code++ = 0;
- *code++ = 0;
+ PUTINC(code, 0, 0);
}
/* Now compile the branch */
- if (!compile_branch(options, brackets, &code, &ptr, errorptr, &optchanged,
- &branchreqchar, &branchcountlits, cd))
+ if (!compile_branch(&options, brackets, &code, &ptr, errorptr,
+ &branchfirstbyte, &branchreqbyte, &bc, cd))
{
*ptrptr = ptr;
return FALSE;
}
- /* Fill in the length of the last branch */
+ /* If this is the first branch, the firstbyte and reqbyte values for the
+ branch become the values for the regex. */
- length = code - last_branch;
- last_branch[1] = length >> 8;
- last_branch[2] = length & 255;
+ if (*last_branch != OP_ALT)
+ {
+ firstbyte = branchfirstbyte;
+ reqbyte = branchreqbyte;
+ }
- /* Save the last required character if all branches have the same; a current
- value of -1 means unset, while -2 means "previous branch had no last required
- char". */
+ /* If this is not the first branch, the first char and reqbyte have to
+ match the values from all the previous branches, except that if the previous
+ value for reqbyte didn't have REQ_VARY set, it can still match, and we set
+ REQ_VARY for the regex. */
- if (*reqchar != -2)
+ else
{
- if (branchreqchar >= 0)
+ /* If we previously had a firstbyte, but it doesn't match the new branch,
+ we have to abandon the firstbyte for the regex, but if there was previously
+ no reqbyte, it takes on the value of the old firstbyte. */
+
+ if (firstbyte >= 0 && firstbyte != branchfirstbyte)
{
- if (*reqchar == -1) *reqchar = branchreqchar;
- else if (*reqchar != branchreqchar) *reqchar = -2;
+ if (reqbyte < 0) reqbyte = firstbyte;
+ firstbyte = REQ_NONE;
}
- else *reqchar = -2;
- }
- /* Keep the shortest literal count */
+ /* If we (now or from before) have no firstbyte, a firstbyte from the
+ branch becomes a reqbyte if there isn't a branch reqbyte. */
- if (branchcountlits < *countlits) *countlits = branchcountlits;
- DPRINTF(("literal count = %d min=%d\n", branchcountlits, *countlits));
+ if (firstbyte < 0 && branchfirstbyte >= 0 && branchreqbyte < 0)
+ branchreqbyte = branchfirstbyte;
+
+ /* Now ensure that the reqbytes match */
+
+ if ((reqbyte & ~REQ_VARY) != (branchreqbyte & ~REQ_VARY))
+ reqbyte = REQ_NONE;
+ else reqbyte |= branchreqbyte; /* To "or" REQ_VARY */
+ }
/* If lookbehind, check that this branch matches a fixed-length string,
and put the length into the OP_REVERSE item. Temporarily mark the end of
@@ -2205,110 +4050,73 @@ for (;;)
if (lookbehind)
{
+ int length;
*code = OP_END;
length = find_fixedlength(last_branch, options);
DPRINTF(("fixed length = %d\n", length));
if (length < 0)
{
- *errorptr = ERR25;
+ *errorptr = (length == -2)? ERR36 : ERR25;
*ptrptr = ptr;
return FALSE;
}
- reverse_count[0] = (length >> 8);
- reverse_count[1] = length & 255;
+ PUT(reverse_count, 0, length);
}
- /* Reached end of expression, either ')' or end of pattern. Insert a
- terminating ket and the length of the whole bracketed item, and return,
- leaving the pointer at the terminating char. If any of the ims options
- were changed inside the group, compile a resetting op-code following. */
+ /* Reached end of expression, either ')' or end of pattern. Go back through
+ the alternative branches and reverse the chain of offsets, with the field in
+ the BRA item now becoming an offset to the first alternative. If there are
+ no alternatives, it points to the end of the group. The length in the
+ terminating ket is always the length of the whole bracketed item. If any of
+ the ims options were changed inside the group, compile a resetting op-code
+ following, except at the very end of the pattern. Return leaving the pointer
+ at the terminating char. */
if (*ptr != '|')
{
- length = code - start_bracket;
- *code++ = OP_KET;
- *code++ = length >> 8;
- *code++ = length & 255;
- if (optchanged >= 0)
+ int length = code - last_branch;
+ do
{
- *code++ = OP_OPT;
- *code++ = oldoptions;
+ int prev_length = GET(last_branch, 1);
+ PUT(last_branch, 1, length);
+ length = prev_length;
+ last_branch -= length;
}
- *codeptr = code;
- *ptrptr = ptr;
- return TRUE;
- }
-
- /* Another branch follows; insert an "or" node and advance the pointer. */
-
- *code = OP_ALT;
- last_branch = code;
- code += 3;
- ptr++;
- }
-/* Control never reaches here */
-}
-
-
+ while (length > 0);
+ /* Fill in the ket */
-/*************************************************
-* Find first significant op code *
-*************************************************/
-
-/* This is called by several functions that scan a compiled expression looking
-for a fixed first character, or an anchoring op code etc. It skips over things
-that do not influence this. For one application, a change of caseless option is
-important.
+ *code = OP_KET;
+ PUT(code, 1, code - start_bracket);
+ code += 1 + LINK_SIZE;
-Arguments:
- code pointer to the start of the group
- options pointer to external options
- optbit the option bit whose changing is significant, or
- zero if none are
- optstop TRUE to return on option change, otherwise change the options
- value and continue
-
-Returns: pointer to the first significant opcode
-*/
+ /* Resetting option if needed */
-static const uschar*
-first_significant_code(const uschar *code, int *options, int optbit,
- BOOL optstop)
-{
-for (;;)
- {
- switch ((int)*code)
- {
- case OP_OPT:
- if (optbit > 0 && ((int)code[1] & optbit) != (*options & optbit))
+ if ((options & PCRE_IMS) != oldims && *ptr == ')')
{
- if (optstop) return code;
- *options = (int)code[1];
+ *code++ = OP_OPT;
+ *code++ = oldims;
}
- code += 2;
- break;
- case OP_CREF:
- case OP_BRANUMBER:
- code += 3;
- break;
+ /* Set values to pass back */
- case OP_WORD_BOUNDARY:
- case OP_NOT_WORD_BOUNDARY:
- code++;
- break;
+ *codeptr = code;
+ *ptrptr = ptr;
+ *firstbyteptr = firstbyte;
+ *reqbyteptr = reqbyte;
+ return TRUE;
+ }
- case OP_ASSERT_NOT:
- case OP_ASSERTBACK:
- case OP_ASSERTBACK_NOT:
- do code += (code[1] << 8) + code[2]; while (*code == OP_ALT);
- code += 3;
- break;
+ /* Another branch follows; insert an "or" node. Its length field points back
+ to the previous branch while the bracket remains open. At the end the chain
+ is reversed. It's done like this so that the start of the bracket has a
+ zero offset until it is closed, making it possible to detect recursion. */
- default:
- return code;
- }
+ *code = OP_ALT;
+ PUT(code, 1, code - last_branch);
+ bc.current = last_branch = code;
+ code += 1 + LINK_SIZE;
+ ptr++;
}
/* Control never reaches here */
}
@@ -2326,35 +4134,78 @@ all of whose alternatives start with OP_SOD or OP_CIRC (recurse ad lib), then
it's anchored. However, if this is a multiline pattern, then only OP_SOD
counts, since OP_CIRC can match in the middle.
+We can also consider a regex to be anchored if OP_SOM starts all its branches.
+This is the code for \G, which means "match at start of match position, taking
+into account the match offset".
+
A branch is also implicitly anchored if it starts with .* and DOTALL is set,
because that will try the rest of the pattern at all possible matching points,
-so there is no point trying them again.
+so there is no point trying again.... er ....
+
+.... except when the .* appears inside capturing parentheses, and there is a
+subsequent back reference to those parentheses. We haven't enough information
+to catch that case precisely.
+
+At first, the best we could do was to detect when .* was in capturing brackets
+and the highest back reference was greater than or equal to that level.
+However, by keeping a bitmap of the first 31 back references, we can catch some
+of the more common cases more precisely.
Arguments:
- code points to start of expression (the bracket)
- options points to the options setting
+ code points to start of expression (the bracket)
+ options points to the options setting
+ bracket_map a bitmap of which brackets we are inside while testing; this
+ handles up to substring 31; after that we just have to take
+ the less precise approach
+ backref_map the back reference bitmap
Returns: TRUE or FALSE
*/
static BOOL
-is_anchored(register const uschar *code, int *options)
+is_anchored(register const uschar *code, int *options, unsigned int bracket_map,
+ unsigned int backref_map)
{
do {
- const uschar *scode = first_significant_code(code + 3, options,
- PCRE_MULTILINE, FALSE);
+ const uschar *scode =
+ first_significant_code(code + 1+LINK_SIZE, options, PCRE_MULTILINE, FALSE);
register int op = *scode;
- if (op >= OP_BRA || op == OP_ASSERT || op == OP_ONCE || op == OP_COND)
- { if (!is_anchored(scode, options)) return FALSE; }
+
+ /* Capturing brackets */
+
+ if (op > OP_BRA)
+ {
+ int new_map;
+ op -= OP_BRA;
+ if (op > EXTRACT_BASIC_MAX) op = GET2(scode, 2+LINK_SIZE);
+ new_map = bracket_map | ((op < 32)? (1 << op) : 1);
+ if (!is_anchored(scode, options, new_map, backref_map)) return FALSE;
+ }
+
+ /* Other brackets */
+
+ else if (op == OP_BRA || op == OP_ASSERT || op == OP_ONCE || op == OP_COND)
+ {
+ if (!is_anchored(scode, options, bracket_map, backref_map)) return FALSE;
+ }
+
+ /* .* is not anchored unless DOTALL is set and it isn't in brackets that
+ are or may be referenced. */
+
else if ((op == OP_TYPESTAR || op == OP_TYPEMINSTAR) &&
(*options & PCRE_DOTALL) != 0)
- { if (scode[1] != OP_ANY) return FALSE; }
- else if (op != OP_SOD &&
+ {
+ if (scode[1] != OP_ANY || (bracket_map & backref_map) != 0) return FALSE;
+ }
+
+ /* Check for explicit anchoring */
+
+ else if (op != OP_SOD && op != OP_SOM &&
((*options & PCRE_MULTILINE) != 0 || op != OP_CIRC))
return FALSE;
- code += (code[1] << 8) + code[2];
+ code += GET(code, 1);
}
-while (*code == OP_ALT);
+while (*code == OP_ALT); /* Loop for each alternative */
return TRUE;
}
@@ -2367,56 +4218,95 @@ return TRUE;
/* This is called to find out if every branch starts with ^ or .* so that
"first char" processing can be done to speed things up in multiline
matching and for non-DOTALL patterns that start with .* (which must start at
-the beginning or after \n).
+the beginning or after \n). As in the case of is_anchored() (see above), we
+have to take account of back references to capturing brackets that contain .*
+because in that case we can't make the assumption.
-Argument: points to start of expression (the bracket)
-Returns: TRUE or FALSE
+Arguments:
+ code points to start of expression (the bracket)
+ bracket_map a bitmap of which brackets we are inside while testing; this
+ handles up to substring 31; after that we just have to take
+ the less precise approach
+ backref_map the back reference bitmap
+
+Returns: TRUE or FALSE
*/
static BOOL
-is_startline(const uschar *code)
+is_startline(const uschar *code, unsigned int bracket_map,
+ unsigned int backref_map)
{
do {
- const uschar *scode = first_significant_code(code + 3, NULL, 0, FALSE);
+ const uschar *scode = first_significant_code(code + 1+LINK_SIZE, NULL, 0,
+ FALSE);
register int op = *scode;
- if (op >= OP_BRA || op == OP_ASSERT || op == OP_ONCE || op == OP_COND)
- { if (!is_startline(scode)) return FALSE; }
+
+ /* Capturing brackets */
+
+ if (op > OP_BRA)
+ {
+ int new_map;
+ op -= OP_BRA;
+ if (op > EXTRACT_BASIC_MAX) op = GET2(scode, 2+LINK_SIZE);
+ new_map = bracket_map | ((op < 32)? (1 << op) : 1);
+ if (!is_startline(scode, new_map, backref_map)) return FALSE;
+ }
+
+ /* Other brackets */
+
+ else if (op == OP_BRA || op == OP_ASSERT || op == OP_ONCE || op == OP_COND)
+ { if (!is_startline(scode, bracket_map, backref_map)) return FALSE; }
+
+ /* .* means "start at start or after \n" if it isn't in brackets that
+ may be referenced. */
+
else if (op == OP_TYPESTAR || op == OP_TYPEMINSTAR)
- { if (scode[1] != OP_ANY) return FALSE; }
+ {
+ if (scode[1] != OP_ANY || (bracket_map & backref_map) != 0) return FALSE;
+ }
+
+ /* Check for explicit circumflex */
+
else if (op != OP_CIRC) return FALSE;
- code += (code[1] << 8) + code[2];
+
+ /* Move on to the next alternative */
+
+ code += GET(code, 1);
}
-while (*code == OP_ALT);
+while (*code == OP_ALT); /* Loop for each alternative */
return TRUE;
}
/*************************************************
-* Check for fixed first char *
+* Check for asserted fixed first char *
*************************************************/
-/* Try to find out if there is a fixed first character. This is called for
-unanchored expressions, as it speeds up their processing quite considerably.
-Consider each alternative branch. If they all start with the same char, or with
-a bracket all of whose alternatives start with the same char (recurse ad lib),
-then we return that char, otherwise -1.
+/* During compilation, the "first char" settings from forward assertions are
+discarded, because they can cause conflicts with actual literals that follow.
+However, if we end up without a first char setting for an unanchored pattern,
+it is worth scanning the regex to see if there is an initial asserted first
+char. If all branches start with the same asserted char, or with a bracket all
+of whose alternatives start with the same asserted char (recurse ad lib), then
+we return that char, otherwise -1.
Arguments:
code points to start of expression (the bracket)
options pointer to the options (used to check casing changes)
+ inassert TRUE if in an assertion
Returns: -1 or the fixed first char
*/
static int
-find_firstchar(const uschar *code, int *options)
+find_firstassertedchar(const uschar *code, int *options, BOOL inassert)
{
register int c = -1;
do {
int d;
- const uschar *scode = first_significant_code(code + 3, options,
- PCRE_CASELESS, TRUE);
+ const uschar *scode =
+ first_significant_code(code + 1+LINK_SIZE, options, PCRE_CASELESS, TRUE);
register int op = *scode;
if (op >= OP_BRA) op = OP_BRA;
@@ -2430,23 +4320,29 @@ do {
case OP_ASSERT:
case OP_ONCE:
case OP_COND:
- if ((d = find_firstchar(scode, options)) < 0) return -1;
+ if ((d = find_firstassertedchar(scode, options, op == OP_ASSERT)) < 0)
+ return -1;
if (c < 0) c = d; else if (c != d) return -1;
break;
case OP_EXACT: /* Fall through */
- scode++;
-
- case OP_CHARS: /* Fall through */
- scode++;
+ scode += 2;
+ case OP_CHAR:
+ case OP_CHARNC:
case OP_PLUS:
case OP_MINPLUS:
- if (c < 0) c = scode[1]; else if (c != scode[1]) return -1;
+ if (!inassert) return -1;
+ if (c < 0)
+ {
+ c = scode[1];
+ if ((*options & PCRE_CASELESS) != 0) c |= REQ_CASELESS;
+ }
+ else if (c != scode[1]) return -1;
break;
}
- code += (code[1] << 8) + code[2];
+ code += GET(code, 1);
}
while (*code == OP_ALT);
return c;
@@ -2455,6 +4351,91 @@ return c;
+#ifdef SUPPORT_UTF8
+/*************************************************
+* Validate a UTF-8 string *
+*************************************************/
+
+/* This function is called (optionally) at the start of compile or match, to
+validate that a supposed UTF-8 string is actually valid. The early check means
+that subsequent code can assume it is dealing with a valid string. The check
+can be turned off for maximum performance, but then consequences of supplying
+an invalid string are then undefined.
+
+Arguments:
+ string points to the string
+ length length of string, or -1 if the string is zero-terminated
+
+Returns: < 0 if the string is a valid UTF-8 string
+ >= 0 otherwise; the value is the offset of the bad byte
+*/
+
+static int
+valid_utf8(const uschar *string, int length)
+{
+register const uschar *p;
+
+if (length < 0)
+ {
+ for (p = string; *p != 0; p++);
+ length = p - string;
+ }
+
+for (p = string; length-- > 0; p++)
+ {
+ register int ab;
+ register int c = *p;
+ if (c < 128) continue;
+ if ((c & 0xc0) != 0xc0) return p - string;
+ ab = utf8_table4[c & 0x3f]; /* Number of additional bytes */
+ if (length < ab) return p - string;
+ length -= ab;
+
+ /* Check top bits in the second byte */
+ if ((*(++p) & 0xc0) != 0x80) return p - string;
+
+ /* Check for overlong sequences for each different length */
+ switch (ab)
+ {
+ /* Check for xx00 000x */
+ case 1:
+ if ((c & 0x3e) == 0) return p - string;
+ continue; /* We know there aren't any more bytes to check */
+
+ /* Check for 1110 0000, xx0x xxxx */
+ case 2:
+ if (c == 0xe0 && (*p & 0x20) == 0) return p - string;
+ break;
+
+ /* Check for 1111 0000, xx00 xxxx */
+ case 3:
+ if (c == 0xf0 && (*p & 0x30) == 0) return p - string;
+ break;
+
+ /* Check for 1111 1000, xx00 0xxx */
+ case 4:
+ if (c == 0xf8 && (*p & 0x38) == 0) return p - string;
+ break;
+
+ /* Check for leading 0xfe or 0xff, and then for 1111 1100, xx00 00xx */
+ case 5:
+ if (c == 0xfe || c == 0xff ||
+ (c == 0xfc && (*p & 0x3c) == 0)) return p - string;
+ break;
+ }
+
+ /* Check for valid bytes after the 2nd, if any; all must start 10 */
+ while (--ab > 0)
+ {
+ if ((*(++p) & 0xc0) != 0x80) return p - string;
+ }
+ }
+
+return -1;
+}
+#endif
+
+
/*************************************************
* Compile a Regular Expression *
@@ -2474,40 +4455,35 @@ Returns: pointer to compiled data block, or NULL on error,
with errorptr and erroroffset set
*/
-pcre *
+EXPORT pcre *
pcre_compile(const char *pattern, int options, const char **errorptr,
int *erroroffset, const unsigned char *tables)
{
real_pcre *re;
-int length = 3; /* For initial BRA plus length */
+int length = 1 + LINK_SIZE; /* For initial BRA plus length */
int runlength;
-int c, reqchar, countlits;
+int c, firstbyte, reqbyte;
int bracount = 0;
-int top_backref = 0;
int branch_extra = 0;
int branch_newextra;
+int item_count = -1;
+int name_count = 0;
+int max_name_size = 0;
+int lastitemlength = 0;
+#ifdef SUPPORT_UTF8
+BOOL utf8;
+BOOL class_utf8;
+#endif
+BOOL inescq = FALSE;
unsigned int brastackptr = 0;
size_t size;
uschar *code;
+const uschar *codestart;
const uschar *ptr;
compile_data compile_block;
int brastack[BRASTACK_SIZE];
uschar bralenstack[BRASTACK_SIZE];
-#ifdef DEBUG
-uschar *code_base, *code_end;
-#endif
-
-/* Can't support UTF8 unless PCRE has been compiled to include the code. */
-
-#ifndef SUPPORT_UTF8
-if ((options & PCRE_UTF8) != 0)
- {
- *errorptr = ERR32;
- return NULL;
- }
-#endif
-
/* We can't pass back an error message if errorptr is NULL; I guess the best we
can do is just return NULL. */
@@ -2523,6 +4499,24 @@ if (erroroffset == NULL)
}
*erroroffset = 0;
+/* Can't support UTF8 unless PCRE has been compiled to include the code. */
+
+#ifdef SUPPORT_UTF8
+utf8 = (options & PCRE_UTF8) != 0;
+if (utf8 && (options & PCRE_NO_UTF8_CHECK) == 0 &&
+ (*erroroffset = valid_utf8((uschar *)pattern, -1)) >= 0)
+ {
+ *errorptr = ERR44;
+ return NULL;
+ }
+#else
+if ((options & PCRE_UTF8) != 0)
+ {
+ *errorptr = ERR32;
+ return NULL;
+ }
+#endif
+
if ((options & ~PUBLIC_OPTIONS) != 0)
{
*errorptr = ERR17;
@@ -2537,6 +4531,14 @@ compile_block.fcc = tables + fcc_offset;
compile_block.cbits = tables + cbits_offset;
compile_block.ctypes = tables + ctypes_offset;
+/* Maximum back reference and backref bitmap. This is updated for numeric
+references during the first pass, but for named references during the actual
+compile pass. The bitmap records up to 31 back references to help in deciding
+whether (.*) can be treated as anchored or not. */
+
+compile_block.top_backref = 0;
+compile_block.backref_map = 0;
+
/* Reflect pattern for debugging output */
DPRINTF(("------------------------------------------------------------------\n"));
@@ -2545,16 +4547,27 @@ DPRINTF(("%s\n", pattern));
/* The first thing to do is to make a pass over the pattern to compute the
amount of store required to hold the compiled code. This does not have to be
perfect as long as errors are overestimates. At the same time we can detect any
-internal flag settings. Make an attempt to correct for any counted white space
-if an "extended" flag setting appears late in the pattern. We can't be so
-clever for #-comments. */
+flag settings right at the start, and extract them. Make an attempt to correct
+for any counted white space if an "extended" flag setting appears late in the
+pattern. We can't be so clever for #-comments. */
ptr = (const uschar *)(pattern - 1);
while ((c = *(++ptr)) != 0)
{
int min, max;
- int class_charcount;
+ int class_optcount;
int bracket_length;
+ int duplength;
+
+ /* If we are inside a \Q...\E sequence, all chars are literal */
+
+ if (inescq)
+ {
+ if ((options & PCRE_AUTO_CALLOUT) != 0) length += 2 + 2*LINK_SIZE;
+ goto NORMAL_CHAR;
+ }
+
+ /* Otherwise, first check for ignored whitespace and comments */
if ((options & PCRE_EXTENDED) != 0)
{
@@ -2564,29 +4577,86 @@ while ((c = *(++ptr)) != 0)
/* The space before the ; is to avoid a warning on a silly compiler
on the Macintosh. */
while ((c = *(++ptr)) != 0 && c != NEWLINE) ;
+ if (c == 0) break;
continue;
}
}
+ item_count++; /* Is zero for the first non-comment item */
+
+ /* Allow space for auto callout before every item except quantifiers. */
+
+ if ((options & PCRE_AUTO_CALLOUT) != 0 &&
+ c != '*' && c != '+' && c != '?' &&
+ (c != '{' || !is_counted_repeat(ptr + 1)))
+ length += 2 + 2*LINK_SIZE;
+
switch(c)
{
- /* A backslashed item may be an escaped "normal" character or a
- character type. For a "normal" character, put the pointers and
- character back so that tests for whitespace etc. in the input
- are done correctly. */
+ /* A backslashed item may be an escaped data character or it may be a
+ character type. */
case '\\':
+ c = check_escape(&ptr, errorptr, bracount, options, FALSE);
+ if (*errorptr != NULL) goto PCRE_ERROR_RETURN;
+
+ lastitemlength = 1; /* Default length of last item for repeats */
+
+ if (c >= 0) /* Data character */
{
- const uschar *save_ptr = ptr;
- c = check_escape(&ptr, errorptr, bracount, options, FALSE, &compile_block);
- if (*errorptr != NULL) goto PCRE_ERROR_RETURN;
- if (c >= 0)
+ length += 2; /* For a one-byte character */
+
+#ifdef SUPPORT_UTF8
+ if (utf8 && c > 127)
{
- ptr = save_ptr;
- c = '\\';
- goto NORMAL_CHAR;
+ int i;
+ for (i = 0; i < sizeof(utf8_table1)/sizeof(int); i++)
+ if (c <= utf8_table1[i]) break;
+ length += i;
+ lastitemlength += i;
}
+#endif
+
+ continue;
+ }
+
+ /* If \Q, enter "literal" mode */
+
+ if (-c == ESC_Q)
+ {
+ inescq = TRUE;
+ continue;
+ }
+
+ /* \X is supported only if Unicode property support is compiled */
+
+#ifndef SUPPORT_UCP
+ if (-c == ESC_X)
+ {
+ *errorptr = ERR45;
+ goto PCRE_ERROR_RETURN;
}
+#endif
+
+ /* \P and \p are for Unicode properties, but only when the support has
+ been compiled. Each item needs 2 bytes. */
+
+ else if (-c == ESC_P || -c == ESC_p)
+ {
+#ifdef SUPPORT_UCP
+ BOOL negated;
+ length += 2;
+ lastitemlength = 2;
+ if (get_ucp(&ptr, &negated, errorptr) < 0) goto PCRE_ERROR_RETURN;
+ continue;
+#else
+ *errorptr = ERR45;
+ goto PCRE_ERROR_RETURN;
+#endif
+ }
+
+ /* Other escapes need one byte */
+
length++;
/* A back reference needs an additional 2 bytes, plus either one or 5
@@ -2596,11 +4666,13 @@ while ((c = *(++ptr)) != 0)
if (c <= -ESC_REF)
{
int refnum = -c - ESC_REF;
- if (refnum > top_backref) top_backref = refnum;
+ compile_block.backref_map |= (refnum < 32)? (1 << refnum) : 1;
+ if (refnum > compile_block.top_backref)
+ compile_block.top_backref = refnum;
length += 2; /* For single back reference */
- if (ptr[1] == '{' && is_counted_repeat(ptr+2, &compile_block))
+ if (ptr[1] == '{' && is_counted_repeat(ptr+2))
{
- ptr = read_repeat_counts(ptr+2, &min, &max, errorptr, &compile_block);
+ ptr = read_repeat_counts(ptr+2, &min, &max, errorptr);
if (*errorptr != NULL) goto PCRE_ERROR_RETURN;
if ((min == 0 && (max == 1 || max == -1)) ||
(min == 1 && max == -1))
@@ -2611,32 +4683,53 @@ while ((c = *(++ptr)) != 0)
}
continue;
- case '^':
+ case '^': /* Single-byte metacharacters */
case '.':
case '$':
- case '*': /* These repeats won't be after brackets; */
- case '+': /* those are handled separately */
- case '?':
length++;
+ lastitemlength = 1;
continue;
- /* This covers the cases of repeats after a single char, metachar, class,
- or back reference. */
+ case '*': /* These repeats won't be after brackets; */
+ case '+': /* those are handled separately */
+ case '?':
+ length++;
+ goto POSESSIVE; /* A few lines below */
+
+ /* This covers the cases of braced repeats after a single char, metachar,
+ class, or back reference. */
case '{':
- if (!is_counted_repeat(ptr+1, &compile_block)) goto NORMAL_CHAR;
- ptr = read_repeat_counts(ptr+1, &min, &max, errorptr, &compile_block);
+ if (!is_counted_repeat(ptr+1)) goto NORMAL_CHAR;
+ ptr = read_repeat_counts(ptr+1, &min, &max, errorptr);
if (*errorptr != NULL) goto PCRE_ERROR_RETURN;
+
+ /* These special cases just insert one extra opcode */
+
if ((min == 0 && (max == 1 || max == -1)) ||
(min == 1 && max == -1))
length++;
+
+ /* These cases might insert additional copies of a preceding character. */
+
else
{
- length--; /* Uncount the original char or metachar */
- if (min == 1) length++; else if (min > 0) length += 4;
- if (max > 0) length += 4; else length += 2;
+ if (min != 1)
+ {
+ length -= lastitemlength; /* Uncount the original char or metachar */
+ if (min > 0) length += 3 + lastitemlength;
+ }
+ length += lastitemlength + ((max > 0)? 3 : 1);
+ }
+
+ if (ptr[1] == '?') ptr++; /* Needs no extra length */
+
+ POSESSIVE: /* Test for possessive quantifier */
+ if (ptr[1] == '+')
+ {
+ ptr++;
+ length += 2 + 2*LINK_SIZE; /* Allow for atomic brackets */
}
- if (ptr[1] == '?') ptr++;
continue;
/* An alternation contains an offset to the next branch or ket. If any ims
@@ -2645,48 +4738,280 @@ while ((c = *(++ptr)) != 0)
branch. This is handled by branch_extra. */
case '|':
- length += 3 + branch_extra;
+ length += 1 + LINK_SIZE + branch_extra;
continue;
- /* A character class uses 33 characters. Don't worry about character types
- that aren't allowed in classes - they'll get picked up during the compile.
- A character class that contains only one character uses 2 or 3 bytes,
- depending on whether it is negated or not. Notice this where we can. */
+ /* A character class uses 33 characters provided that all the character
+ values are less than 256. Otherwise, it uses a bit map for low valued
+ characters, and individual items for others. Don't worry about character
+ types that aren't allowed in classes - they'll get picked up during the
+ compile. A character class that contains only one single-byte character
+ uses 2 or 3 bytes, depending on whether it is negated or not. Notice this
+ where we can. (In UTF-8 mode we can do this only for chars < 128.) */
case '[':
- class_charcount = 0;
- if (*(++ptr) == '^') ptr++;
- do
+ if (*(++ptr) == '^')
{
+ class_optcount = 10; /* Greater than one */
+ ptr++;
+ }
+ else class_optcount = 0;
+
+#ifdef SUPPORT_UTF8
+ class_utf8 = FALSE;
+#endif
+
+ /* Written as a "do" so that an initial ']' is taken as data */
+
+ if (*ptr != 0) do
+ {
+ /* Inside \Q...\E everything is literal except \E */
+
+ if (inescq)
+ {
+ if (*ptr != '\\' || ptr[1] != 'E') goto GET_ONE_CHARACTER;
+ inescq = FALSE;
+ ptr += 1;
+ continue;
+ }
+
+ /* Outside \Q...\E, check for escapes */
+
if (*ptr == '\\')
{
- int ch = check_escape(&ptr, errorptr, bracount, options, TRUE,
- &compile_block);
+ c = check_escape(&ptr, errorptr, bracount, options, TRUE);
if (*errorptr != NULL) goto PCRE_ERROR_RETURN;
- if (-ch == ESC_b) class_charcount++; else class_charcount = 10;
+
+ /* \b is backspace inside a class; \X is literal */
+
+ if (-c == ESC_b) c = '\b';
+ else if (-c == ESC_X) c = 'X';
+
+ /* \Q enters quoting mode */
+
+ else if (-c == ESC_Q)
+ {
+ inescq = TRUE;
+ continue;
+ }
+
+ /* Handle escapes that turn into characters */
+
+ if (c >= 0) goto NON_SPECIAL_CHARACTER;
+
+ /* Escapes that are meta-things. The normal ones just affect the
+ bit map, but Unicode properties require an XCLASS extended item. */
+
+ else
+ {
+ class_optcount = 10; /* \d, \s etc; make sure > 1 */
+#ifdef SUPPORT_UTF8
+ if (-c == ESC_p || -c == ESC_P)
+ {
+ if (!class_utf8)
+ {
+ class_utf8 = TRUE;
+ length += LINK_SIZE + 2;
+ }
+ length += 2;
+ }
+#endif
+ }
}
- else class_charcount++;
- ptr++;
+
+ /* Check the syntax for POSIX stuff. The bits we actually handle are
+ checked during the real compile phase. */
+
+ else if (*ptr == '[' && check_posix_syntax(ptr, &ptr, &compile_block))
+ {
+ ptr++;
+ class_optcount = 10; /* Make sure > 1 */
+ }
+
+ /* Anything else increments the possible optimization count. We have to
+ detect ranges here so that we can compute the number of extra ranges for
+ caseless wide characters when UCP support is available. If there are wide
+ characters, we are going to have to use an XCLASS, even for single
+ characters. */
+
+ else
+ {
+ int d;
+
+ GET_ONE_CHARACTER:
+
+#ifdef SUPPORT_UTF8
+ if (utf8)
+ {
+ int extra = 0;
+ GETCHARLEN(c, ptr, extra);
+ ptr += extra;
+ }
+ else c = *ptr;
+#else
+ c = *ptr;
+#endif
+
+ /* Come here from handling \ above when it escapes to a char value */
+
+ NON_SPECIAL_CHARACTER:
+ class_optcount++;
+
+ d = -1;
+ if (ptr[1] == '-')
+ {
+ uschar const *hyptr = ptr++;
+ if (ptr[1] == '\\')
+ {
+ ptr++;
+ d = check_escape(&ptr, errorptr, bracount, options, TRUE);
+ if (*errorptr != NULL) goto PCRE_ERROR_RETURN;
+ if (-d == ESC_b) d = '\b'; /* backspace */
+ else if (-d == ESC_X) d = 'X'; /* literal X in a class */
+ }
+ else if (ptr[1] != 0 && ptr[1] != ']')
+ {
+ ptr++;
+#ifdef SUPPORT_UTF8
+ if (utf8)
+ {
+ int extra = 0;
+ GETCHARLEN(d, ptr, extra);
+ ptr += extra;
+ }
+ else
+#endif
+ d = *ptr;
+ }
+ if (d < 0) ptr = hyptr; /* go back to hyphen as data */
+ }
+
+ /* If d >= 0 we have a range. In UTF-8 mode, if the end is > 255, or >
+ 127 for caseless matching, we will need to use an XCLASS. */
+
+ if (d >= 0)
+ {
+ class_optcount = 10; /* Ensure > 1 */
+ if (d < c)
+ {
+ *errorptr = ERR8;
+ goto PCRE_ERROR_RETURN;
+ }
+
+#ifdef SUPPORT_UTF8
+ if (utf8 && (d > 255 || ((options & PCRE_CASELESS) != 0 && d > 127)))
+ {
+ uschar buffer[6];
+ if (!class_utf8) /* Allow for XCLASS overhead */
+ {
+ class_utf8 = TRUE;
+ length += LINK_SIZE + 2;
+ }
+
+#ifdef SUPPORT_UCP
+ /* If we have UCP support, find out how many extra ranges are
+ needed to map the other case of characters within this range. We
+ have to mimic the range optimization here, because extending the
+ range upwards might push d over a boundary that makes is use
+ another byte in the UTF-8 representation. */
+
+ if ((options & PCRE_CASELESS) != 0)
+ {
+ int occ, ocd;
+ int cc = c;
+ int origd = d;
+ while (get_othercase_range(&cc, origd, &occ, &ocd))
+ {
+ if (occ >= c && ocd <= d) continue; /* Skip embedded */
+
+ if (occ < c && ocd >= c - 1) /* Extend the basic range */
+ { /* if there is overlap, */
+ c = occ; /* noting that if occ < c */
+ continue; /* we can't have ocd > d */
+ } /* because a subrange is */
+ if (ocd > d && occ <= d + 1) /* always shorter than */
+ { /* the basic range. */
+ d = ocd;
+ continue;
+ }
+
+ /* An extra item is needed */
+
+ length += 1 + ord2utf8(occ, buffer) +
+ ((occ == ocd)? 0 : ord2utf8(ocd, buffer));
+ }
+ }
+#endif /* SUPPORT_UCP */
+
+ /* The length of the (possibly extended) range */
+
+ length += 1 + ord2utf8(c, buffer) + ord2utf8(d, buffer);
+ }
+#endif /* SUPPORT_UTF8 */
+
+ }
+
+ /* We have a single character. There is nothing to be done unless we
+ are in UTF-8 mode. If the char is > 255, or 127 when caseless, we must
+ allow for an XCL_SINGLE item, doubled for caselessness if there is UCP
+ support. */
+
+ else
+ {
+#ifdef SUPPORT_UTF8
+ if (utf8 && (c > 255 || ((options & PCRE_CASELESS) != 0 && c > 127)))
+ {
+ uschar buffer[6];
+ class_optcount = 10; /* Ensure > 1 */
+ if (!class_utf8) /* Allow for XCLASS overhead */
+ {
+ class_utf8 = TRUE;
+ length += LINK_SIZE + 2;
+ }
+#ifdef SUPPORT_UCP
+ length += (((options & PCRE_CASELESS) != 0)? 2 : 1) *
+ (1 + ord2utf8(c, buffer));
+#else /* SUPPORT_UCP */
+ length += 1 + ord2utf8(c, buffer);
+#endif /* SUPPORT_UCP */
+ }
+#endif /* SUPPORT_UTF8 */
+ }
+ }
+ }
+ while (*(++ptr) != 0 && (inescq || *ptr != ']')); /* Concludes "do" above */
+
+ if (*ptr == 0) /* Missing terminating ']' */
+ {
+ *errorptr = ERR6;
+ goto PCRE_ERROR_RETURN;
}
- while (*ptr != 0 && *ptr != ']');
- /* Repeats for negated single chars are handled by the general code */
+ /* We can optimize when there was only one optimizable character. Repeats
+ for positive and negated single one-byte chars are handled by the general
+ code. Here, we handle repeats for the class opcodes. */
- if (class_charcount == 1) length += 3; else
+ if (class_optcount == 1) length += 3; else
{
length += 33;
- /* A repeat needs either 1 or 5 bytes. */
+ /* A repeat needs either 1 or 5 bytes. If it is a possessive quantifier,
+ we also need extra for wrapping the whole thing in a sub-pattern. */
- if (*ptr != 0 && ptr[1] == '{' && is_counted_repeat(ptr+2, &compile_block))
+ if (*ptr != 0 && ptr[1] == '{' && is_counted_repeat(ptr+2))
{
- ptr = read_repeat_counts(ptr+2, &min, &max, errorptr, &compile_block);
+ ptr = read_repeat_counts(ptr+2, &min, &max, errorptr);
if (*errorptr != NULL) goto PCRE_ERROR_RETURN;
if ((min == 0 && (max == 1 || max == -1)) ||
(min == 1 && max == -1))
length++;
else length += 5;
- if (ptr[1] == '?') ptr++;
+ if (ptr[1] == '+')
+ {
+ ptr++;
+ length += 2 + 2*LINK_SIZE;
+ }
+ else if (ptr[1] == '?') ptr++;
}
}
continue;
@@ -2695,7 +5020,7 @@ while ((c = *(++ptr)) != 0)
case '(':
branch_newextra = 0;
- bracket_length = 3;
+ bracket_length = 1 + LINK_SIZE;
/* Handle special forms of bracket, which all start (? */
@@ -2729,27 +5054,99 @@ while ((c = *(++ptr)) != 0)
ptr += 2;
break;
- /* A recursive call to the regex is an extension, to provide the
- facility which can be obtained by $(?p{perl-code}) in Perl 5.6. */
+ /* (?R) specifies a recursive call to the regex, which is an extension
+ to provide the facility which can be obtained by (?p{perl-code}) in
+ Perl 5.6. In Perl 5.8 this has become (??{perl-code}).
+
+ From PCRE 4.00, items such as (?3) specify subroutine-like "calls" to
+ the appropriate numbered brackets. This includes both recursive and
+ non-recursive calls. (?R) is now synonymous with (?0). */
case 'R':
- if (ptr[3] != ')')
+ ptr++;
+
+ case '0': case '1': case '2': case '3': case '4':
+ case '5': case '6': case '7': case '8': case '9':
+ ptr += 2;
+ if (c != 'R')
+ while ((digitab[*(++ptr)] & ctype_digit) != 0);
+ if (*ptr != ')')
{
*errorptr = ERR29;
goto PCRE_ERROR_RETURN;
}
+ length += 1 + LINK_SIZE;
+
+ /* If this item is quantified, it will get wrapped inside brackets so
+ as to use the code for quantified brackets. We jump down and use the
+ code that handles this for real brackets. */
+
+ if (ptr[1] == '+' || ptr[1] == '*' || ptr[1] == '?' || ptr[1] == '{')
+ {
+ length += 2 + 2 * LINK_SIZE; /* to make bracketed */
+ duplength = 5 + 3 * LINK_SIZE;
+ goto HANDLE_QUANTIFIED_BRACKETS;
+ }
+ continue;
+
+ /* (?C) is an extension which provides "callout" - to provide a bit of
+ the functionality of the Perl (?{...}) feature. An optional number may
+ follow (default is zero). */
+
+ case 'C':
+ ptr += 2;
+ while ((digitab[*(++ptr)] & ctype_digit) != 0);
+ if (*ptr != ')')
+ {
+ *errorptr = ERR39;
+ goto PCRE_ERROR_RETURN;
+ }
+ length += 2 + 2*LINK_SIZE;
+ continue;
+
+ /* Named subpatterns are an extension copied from Python */
+
+ case 'P':
ptr += 3;
- length += 1;
- break;
+ if (*ptr == '<')
+ {
+ const uschar *p; /* Don't amalgamate; some compilers */
+ p = ++ptr; /* grumble at autoincrement in declaration */
+ while ((compile_block.ctypes[*ptr] & ctype_word) != 0) ptr++;
+ if (*ptr != '>')
+ {
+ *errorptr = ERR42;
+ goto PCRE_ERROR_RETURN;
+ }
+ name_count++;
+ if (ptr - p > max_name_size) max_name_size = (ptr - p);
+ break;
+ }
+
+ if (*ptr == '=' || *ptr == '>')
+ {
+ while ((compile_block.ctypes[*(++ptr)] & ctype_word) != 0);
+ if (*ptr != ')')
+ {
+ *errorptr = ERR42;
+ goto PCRE_ERROR_RETURN;
+ }
+ break;
+ }
+
+ /* Unknown character after (?P */
+
+ *errorptr = ERR41;
+ goto PCRE_ERROR_RETURN;
/* Lookbehinds are in Perl from version 5.005 */
case '<':
- if (ptr[3] == '=' || ptr[3] == '!')
+ ptr += 3;
+ if (*ptr == '=' || *ptr == '!')
{
- ptr += 3;
- branch_newextra = 3;
- length += 3; /* For the first branch */
+ branch_newextra = 1 + LINK_SIZE;
+ length += 1 + LINK_SIZE; /* For the first branch */
break;
}
*errorptr = ERR24;
@@ -2757,14 +5154,19 @@ while ((c = *(++ptr)) != 0)
/* Conditionals are in Perl from version 5.005. The bracket must either
be followed by a number (for bracket reference) or by an assertion
- group. */
+ group, or (a PCRE extension) by 'R' for a recursion test. */
case '(':
- if ((compile_block.ctypes[ptr[3]] & ctype_digit) != 0)
+ if (ptr[3] == 'R' && ptr[4] == ')')
+ {
+ ptr += 4;
+ length += 3;
+ }
+ else if ((digitab[ptr[3]] & ctype_digit) != 0)
{
ptr += 4;
length += 3;
- while ((compile_block.ctypes[*ptr] & ctype_digit) != 0) ptr++;
+ while ((digitab[*ptr] & ctype_digit) != 0) ptr++;
if (*ptr != ')')
{
*errorptr = ERR26;
@@ -2827,17 +5229,27 @@ while ((c = *(++ptr)) != 0)
optset = &unset;
continue;
- /* A termination by ')' indicates an options-setting-only item;
- this is global at top level; otherwise nothing is done here and
- it is handled during the compiling process on a per-bracket-group
- basis. */
+ /* A termination by ')' indicates an options-setting-only item; if
+ this is at the very start of the pattern (indicated by item_count
+ being zero), we use it to set the global options. This is helpful
+ when analyzing the pattern for first characters, etc. Otherwise
+ nothing is done here and it is handled during the compiling
+ process.
+
+ [Historical note: Up to Perl 5.8, options settings at top level
+ were always global settings, wherever they appeared in the pattern.
+ That is, they were equivalent to an external setting. From 5.8
+ onwards, they apply only to what follows (which is what you might
+ expect).] */
case ')':
- if (brastackptr == 0)
+ if (item_count == 0)
{
options = (options | set) & (~unset);
set = unset = 0; /* To save length */
+ item_count--; /* To allow for several */
}
+
/* Fall through */
/* A termination by ':' indicates the start of a nested group with
@@ -2879,7 +5291,8 @@ while ((c = *(++ptr)) != 0)
END_OPTIONS:
if (c == ')')
{
- if (branch_newextra == 2 && (branch_extra == 0 || branch_extra == 3))
+ if (branch_newextra == 2 &&
+ (branch_extra == 0 || branch_extra == 1+LINK_SIZE))
branch_extra += branch_newextra;
continue;
}
@@ -2891,9 +5304,11 @@ while ((c = *(++ptr)) != 0)
/* Extracting brackets must be counted so we can process escapes in a
Perlish way. If the number exceeds EXTRACT_BASIC_MAX we are going to
- need an additional 3 bytes of store per extracting bracket. */
+ need an additional 3 bytes of store per extracting bracket. However, if
+ PCRE_NO_AUTO)CAPTURE is set, unadorned brackets become non-capturing, so we
+ must leave the count alone (it will aways be zero). */
- else
+ else if ((options & PCRE_NO_AUTO_CAPTURE) == 0)
{
bracount++;
if (bracount > EXTRACT_BASIC_MAX) bracket_length += 3;
@@ -2924,134 +5339,118 @@ while ((c = *(++ptr)) != 0)
the branch_extra value. */
case ')':
- length += 3;
+ length += 1 + LINK_SIZE;
+ if (brastackptr > 0)
{
- int minval = 1;
- int maxval = 1;
- int duplength;
+ duplength = length - brastack[--brastackptr];
+ branch_extra = bralenstack[brastackptr];
+ }
+ else duplength = 0;
- if (brastackptr > 0)
- {
- duplength = length - brastack[--brastackptr];
- branch_extra = bralenstack[brastackptr];
- }
- else duplength = 0;
+ /* The following code is also used when a recursion such as (?3) is
+ followed by a quantifier, because in that case, it has to be wrapped inside
+ brackets so that the quantifier works. The value of duplength must be
+ set before arrival. */
- /* Leave ptr at the final char; for read_repeat_counts this happens
- automatically; for the others we need an increment. */
+ HANDLE_QUANTIFIED_BRACKETS:
- if ((c = ptr[1]) == '{' && is_counted_repeat(ptr+2, &compile_block))
- {
- ptr = read_repeat_counts(ptr+2, &minval, &maxval, errorptr,
- &compile_block);
- if (*errorptr != NULL) goto PCRE_ERROR_RETURN;
- }
- else if (c == '*') { minval = 0; maxval = -1; ptr++; }
- else if (c == '+') { maxval = -1; ptr++; }
- else if (c == '?') { minval = 0; ptr++; }
+ /* Leave ptr at the final char; for read_repeat_counts this happens
+ automatically; for the others we need an increment. */
- /* If the minimum is zero, we have to allow for an OP_BRAZERO before the
- group, and if the maximum is greater than zero, we have to replicate
- maxval-1 times; each replication acquires an OP_BRAZERO plus a nesting
- bracket set - hence the 7. */
+ if ((c = ptr[1]) == '{' && is_counted_repeat(ptr+2))
+ {
+ ptr = read_repeat_counts(ptr+2, &min, &max, errorptr);
+ if (*errorptr != NULL) goto PCRE_ERROR_RETURN;
+ }
+ else if (c == '*') { min = 0; max = -1; ptr++; }
+ else if (c == '+') { min = 1; max = -1; ptr++; }
+ else if (c == '?') { min = 0; max = 1; ptr++; }
+ else { min = 1; max = 1; }
- if (minval == 0)
- {
- length++;
- if (maxval > 0) length += (maxval - 1) * (duplength + 7);
- }
+ /* If the minimum is zero, we have to allow for an OP_BRAZERO before the
+ group, and if the maximum is greater than zero, we have to replicate
+ maxval-1 times; each replication acquires an OP_BRAZERO plus a nesting
+ bracket set. */
- /* When the minimum is greater than zero, 1 we have to replicate up to
- minval-1 times, with no additions required in the copies. Then, if
- there is a limited maximum we have to replicate up to maxval-1 times
- allowing for a BRAZERO item before each optional copy and nesting
- brackets for all but one of the optional copies. */
+ if (min == 0)
+ {
+ length++;
+ if (max > 0) length += (max - 1) * (duplength + 3 + 2*LINK_SIZE);
+ }
- else
- {
- length += (minval - 1) * duplength;
- if (maxval > minval) /* Need this test as maxval=-1 means no limit */
- length += (maxval - minval) * (duplength + 7) - 6;
- }
+ /* When the minimum is greater than zero, we have to replicate up to
+ minval-1 times, with no additions required in the copies. Then, if there
+ is a limited maximum we have to replicate up to maxval-1 times allowing
+ for a BRAZERO item before each optional copy and nesting brackets for all
+ but one of the optional copies. */
+
+ else
+ {
+ length += (min - 1) * duplength;
+ if (max > min) /* Need this test as max=-1 means no limit */
+ length += (max - min) * (duplength + 3 + 2*LINK_SIZE)
+ - (2 + 2*LINK_SIZE);
+ }
+
+ /* Allow space for once brackets for "possessive quantifier" */
+
+ if (ptr[1] == '+')
+ {
+ ptr++;
+ length += 2 + 2*LINK_SIZE;
}
continue;
- /* Non-special character. For a run of such characters the length required
- is the number of characters + 2, except that the maximum run length is 255.
- We won't get a skipped space or a non-data escape or the start of a #
- comment as the first character, so the length can't be zero. */
+ /* Non-special character. It won't be space or # in extended mode, so it is
+ always a genuine character. If we are in a \Q...\E sequence, check for the
+ end; if not, we have a literal. */
- NORMAL_CHAR:
default:
- length += 2;
- runlength = 0;
- do
+ NORMAL_CHAR:
+
+ if (inescq && c == '\\' && ptr[1] == 'E')
{
- if ((options & PCRE_EXTENDED) != 0)
- {
- if ((compile_block.ctypes[c] & ctype_space) != 0) continue;
- if (c == '#')
- {
- /* The space before the ; is to avoid a warning on a silly compiler
- on the Macintosh. */
- while ((c = *(++ptr)) != 0 && c != NEWLINE) ;
- continue;
- }
- }
+ inescq = FALSE;
+ ptr++;
+ continue;
+ }
- /* Backslash may introduce a data char or a metacharacter; stop the
- string before the latter. */
+ length += 2; /* For a one-byte character */
+ lastitemlength = 1; /* Default length of last item for repeats */
- if (c == '\\')
- {
- const uschar *saveptr = ptr;
- c = check_escape(&ptr, errorptr, bracount, options, FALSE,
- &compile_block);
- if (*errorptr != NULL) goto PCRE_ERROR_RETURN;
- if (c < 0) { ptr = saveptr; break; }
+ /* In UTF-8 mode, check for additional bytes. */
#ifdef SUPPORT_UTF8
- if (c > 127 && (options & PCRE_UTF8) != 0)
- {
- int i;
- for (i = 0; i < sizeof(utf8_table1)/sizeof(int); i++)
- if (c <= utf8_table1[i]) break;
- runlength += i;
- }
-#endif
+ if (utf8 && (c & 0xc0) == 0xc0)
+ {
+ while ((ptr[1] & 0xc0) == 0x80) /* Can't flow over the end */
+ { /* because the end is marked */
+ lastitemlength++; /* by a zero byte. */
+ length++;
+ ptr++;
}
-
- /* Ordinary character or single-char escape */
-
- runlength++;
}
+#endif
- /* This "while" is the end of the "do" above. */
-
- while (runlength < MAXLIT &&
- (compile_block.ctypes[c = *(++ptr)] & ctype_meta) == 0);
-
- ptr--;
- length += runlength;
continue;
}
}
-length += 4; /* For final KET and END */
+length += 2 + LINK_SIZE; /* For final KET and END */
+
+if ((options & PCRE_AUTO_CALLOUT) != 0)
+ length += 2 + 2*LINK_SIZE; /* For final callout */
-if (length > 65539)
+if (length > MAX_PATTERN_SIZE)
{
*errorptr = ERR20;
return NULL;
}
/* Compute the size of data block needed and get it, either from malloc or
-externally provided function. We specify "code[0]" in the offsetof() expression
-rather than just "code", because it has been reported that one broken compiler
-fails on "code" because it is also an independent variable. It should make no
-difference to the value of the offsetof(). */
+externally provided function. */
-size = length + offsetof(real_pcre, code[0]);
+size = length + sizeof(real_pcre) + name_count * (max_name_size + 3);
re = (real_pcre *)(pcre_malloc)(size);
if (re == NULL)
@@ -3060,25 +5459,47 @@ if (re == NULL)
return NULL;
}
-/* Put in the magic number, and save the size, options, and table pointer */
+/* Put in the magic number, and save the sizes, options, and character table
+pointer. NULL is used for the default character tables. The nullpad field is at
+the end; it's there to help in the case when a regex compiled on a system with
+4-byte pointers is run on another with 8-byte pointers. */
re->magic_number = MAGIC_NUMBER;
re->size = size;
re->options = options;
-re->tables = tables;
+re->dummy1 = re->dummy2 = 0;
+re->name_table_offset = sizeof(real_pcre);
+re->name_entry_size = max_name_size + 3;
+re->name_count = name_count;
+re->tables = (tables == pcre_default_tables)? NULL : tables;
+re->nullpad = NULL;
+
+/* The starting points of the name/number translation table and of the code are
+passed around in the compile data block. */
+
+compile_block.names_found = 0;
+compile_block.name_entry_size = max_name_size + 3;
+compile_block.name_table = (uschar *)re + re->name_table_offset;
+codestart = compile_block.name_table + re->name_entry_size * re->name_count;
+compile_block.start_code = codestart;
+compile_block.start_pattern = (const uschar *)pattern;
+compile_block.req_varyopt = 0;
+compile_block.nopartial = FALSE;
/* Set up a starting, non-extracting bracket, then compile the expression. On
error, *errorptr will be set non-NULL, so we don't need to look at the result
of the function here. */
ptr = (const uschar *)pattern;
-code = re->code;
+code = (uschar *)codestart;
*code = OP_BRA;
bracount = 0;
-(void)compile_regex(options, -1, &bracount, &code, &ptr, errorptr, FALSE, 0,
- &reqchar, &countlits, &compile_block);
+(void)compile_regex(options, options & PCRE_IMS, &bracount, &code, &ptr,
+ errorptr, FALSE, 0, &firstbyte, &reqbyte, NULL, &compile_block);
re->top_bracket = bracount;
-re->top_backref = top_backref;
+re->top_backref = compile_block.top_backref;
+
+if (compile_block.nopartial) re->options |= PCRE_NOPARTIAL;
/* If not reached end of pattern on success, there's an excess bracket. */
@@ -3090,15 +5511,15 @@ if debugging, leave the test till after things are printed out. */
*code++ = OP_END;
#ifndef DEBUG
-if (code - re->code > length) *errorptr = ERR23;
+if (code - codestart > length) *errorptr = ERR23;
#endif
/* Give an error if there's back reference to a non-existent capturing
subpattern. */
-if (top_backref > re->top_bracket) *errorptr = ERR15;
+if (re->top_backref > re->top_bracket) *errorptr = ERR15;
-/* Failed to compile */
+/* Failed to compile, or error while post-processing */
if (*errorptr != NULL)
{
@@ -3108,12 +5529,12 @@ if (*errorptr != NULL)
return NULL;
}
-/* If the anchored option was not passed, set flag if we can determine that the
-pattern is anchored by virtue of ^ characters or \A or anything else (such as
-starting with .* when DOTALL is set).
+/* If the anchored option was not passed, set the flag if we can determine that
+the pattern is anchored by virtue of ^ characters or \A or anything else (such
+as starting with .* when DOTALL is set).
-Otherwise, see if we can determine what the first character has to be, because
-that speeds up unanchored matches no end. If not, see if we can set the
+Otherwise, if we know what the first character has to be, save it, because that
+speeds up unanchored matches no end. If not, see if we can set the
PCRE_STARTLINE flag. This is helpful for multiline matches when all branches
start with ^. and also when all branches start with .* for non-DOTALL matches.
*/
@@ -3121,27 +5542,34 @@ start with ^. and also when all branches start with .* for non-DOTALL matches.
if ((options & PCRE_ANCHORED) == 0)
{
int temp_options = options;
- if (is_anchored(re->code, &temp_options))
+ if (is_anchored(codestart, &temp_options, 0, compile_block.backref_map))
re->options |= PCRE_ANCHORED;
else
{
- int ch = find_firstchar(re->code, &temp_options);
- if (ch >= 0)
+ if (firstbyte < 0)
+ firstbyte = find_firstassertedchar(codestart, &temp_options, FALSE);
+ if (firstbyte >= 0) /* Remove caseless flag for non-caseable chars */
{
- re->first_char = ch;
+ int ch = firstbyte & 255;
+ re->first_byte = ((firstbyte & REQ_CASELESS) != 0 &&
+ compile_block.fcc[ch] == ch)? ch : firstbyte;
re->options |= PCRE_FIRSTSET;
}
- else if (is_startline(re->code))
+ else if (is_startline(codestart, 0, compile_block.backref_map))
re->options |= PCRE_STARTLINE;
}
}
-/* Save the last required character if there are at least two literal
-characters on all paths, or if there is no first character setting. */
+/* For an anchored pattern, we use the "required byte" only if it follows a
+variable length item in the regex. Remove the caseless flag for non-caseable
+bytes. */
-if (reqchar >= 0 && (countlits > 1 || (re->options & PCRE_FIRSTSET) == 0))
+if (reqbyte >= 0 &&
+ ((re->options & PCRE_ANCHORED) == 0 || (reqbyte & REQ_VARY) != 0))
{
- re->req_char = reqchar;
+ int ch = reqbyte & 255;
+ re->req_byte = ((reqbyte & REQ_CASELESS) != 0 &&
+ compile_block.fcc[ch] == ch)? (reqbyte & ~REQ_CASELESS) : reqbyte;
re->options |= PCRE_REQCHSET;
}
@@ -3154,7 +5582,8 @@ printf("Length = %d top_bracket = %d top_backref = %d\n",
if (re->options != 0)
{
- printf("%s%s%s%s%s%s%s%s%s\n",
+ printf("%s%s%s%s%s%s%s%s%s%s\n",
+ ((re->options & PCRE_NOPARTIAL) != 0)? "nopartial " : "",
((re->options & PCRE_ANCHORED) != 0)? "anchored " : "",
((re->options & PCRE_CASELESS) != 0)? "caseless " : "",
((re->options & PCRE_ICHANGED) != 0)? "case state changed " : "",
@@ -3168,209 +5597,26 @@ if (re->options != 0)
if ((re->options & PCRE_FIRSTSET) != 0)
{
- if (isprint(re->first_char)) printf("First char = %c\n", re->first_char);
- else printf("First char = \\x%02x\n", re->first_char);
+ int ch = re->first_byte & 255;
+ const char *caseless = ((re->first_byte & REQ_CASELESS) == 0)? "" : " (caseless)";
+ if (isprint(ch)) printf("First char = %c%s\n", ch, caseless);
+ else printf("First char = \\x%02x%s\n", ch, caseless);
}
if ((re->options & PCRE_REQCHSET) != 0)
{
- if (isprint(re->req_char)) printf("Req char = %c\n", re->req_char);
- else printf("Req char = \\x%02x\n", re->req_char);
+ int ch = re->req_byte & 255;
+ const char *caseless = ((re->req_byte & REQ_CASELESS) == 0)? "" : " (caseless)";
+ if (isprint(ch)) printf("Req char = %c%s\n", ch, caseless);
+ else printf("Req char = \\x%02x%s\n", ch, caseless);
}
-code_end = code;
-code_base = code = re->code;
-
-while (code < code_end)
- {
- int charlength;
-
- printf("%3d ", code - code_base);
-
- if (*code >= OP_BRA)
- {
- if (*code - OP_BRA > EXTRACT_BASIC_MAX)
- printf("%3d Bra extra", (code[1] << 8) + code[2]);
- else
- printf("%3d Bra %d", (code[1] << 8) + code[2], *code - OP_BRA);
- code += 2;
- }
-
- else switch(*code)
- {
- case OP_OPT:
- printf(" %.2x %s", code[1], OP_names[*code]);
- code++;
- break;
-
- case OP_CHARS:
- charlength = *(++code);
- printf("%3d ", charlength);
- while (charlength-- > 0)
- if (isprint(c = *(++code))) printf("%c", c); else printf("\\x%02x", c);
- break;
-
- case OP_KETRMAX:
- case OP_KETRMIN:
- case OP_ALT:
- case OP_KET:
- case OP_ASSERT:
- case OP_ASSERT_NOT:
- case OP_ASSERTBACK:
- case OP_ASSERTBACK_NOT:
- case OP_ONCE:
- case OP_REVERSE:
- case OP_BRANUMBER:
- case OP_COND:
- case OP_CREF:
- printf("%3d %s", (code[1] << 8) + code[2], OP_names[*code]);
- code += 2;
- break;
-
- case OP_STAR:
- case OP_MINSTAR:
- case OP_PLUS:
- case OP_MINPLUS:
- case OP_QUERY:
- case OP_MINQUERY:
- case OP_TYPESTAR:
- case OP_TYPEMINSTAR:
- case OP_TYPEPLUS:
- case OP_TYPEMINPLUS:
- case OP_TYPEQUERY:
- case OP_TYPEMINQUERY:
- if (*code >= OP_TYPESTAR)
- printf(" %s", OP_names[code[1]]);
- else if (isprint(c = code[1])) printf(" %c", c);
- else printf(" \\x%02x", c);
- printf("%s", OP_names[*code++]);
- break;
-
- case OP_EXACT:
- case OP_UPTO:
- case OP_MINUPTO:
- if (isprint(c = code[3])) printf(" %c{", c);
- else printf(" \\x%02x{", c);
- if (*code != OP_EXACT) printf("0,");
- printf("%d}", (code[1] << 8) + code[2]);
- if (*code == OP_MINUPTO) printf("?");
- code += 3;
- break;
-
- case OP_TYPEEXACT:
- case OP_TYPEUPTO:
- case OP_TYPEMINUPTO:
- printf(" %s{", OP_names[code[3]]);
- if (*code != OP_TYPEEXACT) printf(",");
- printf("%d}", (code[1] << 8) + code[2]);
- if (*code == OP_TYPEMINUPTO) printf("?");
- code += 3;
- break;
-
- case OP_NOT:
- if (isprint(c = *(++code))) printf(" [^%c]", c);
- else printf(" [^\\x%02x]", c);
- break;
-
- case OP_NOTSTAR:
- case OP_NOTMINSTAR:
- case OP_NOTPLUS:
- case OP_NOTMINPLUS:
- case OP_NOTQUERY:
- case OP_NOTMINQUERY:
- if (isprint(c = code[1])) printf(" [^%c]", c);
- else printf(" [^\\x%02x]", c);
- printf("%s", OP_names[*code++]);
- break;
-
- case OP_NOTEXACT:
- case OP_NOTUPTO:
- case OP_NOTMINUPTO:
- if (isprint(c = code[3])) printf(" [^%c]{", c);
- else printf(" [^\\x%02x]{", c);
- if (*code != OP_NOTEXACT) printf(",");
- printf("%d}", (code[1] << 8) + code[2]);
- if (*code == OP_NOTMINUPTO) printf("?");
- code += 3;
- break;
-
- case OP_REF:
- printf(" \\%d", (code[1] << 8) | code[2]);
- code += 3;
- goto CLASS_REF_REPEAT;
-
- case OP_CLASS:
- {
- int i, min, max;
- code++;
- printf(" [");
-
- for (i = 0; i < 256; i++)
- {
- if ((code[i/8] & (1 << (i&7))) != 0)
- {
- int j;
- for (j = i+1; j < 256; j++)
- if ((code[j/8] & (1 << (j&7))) == 0) break;
- if (i == '-' || i == ']') printf("\\");
- if (isprint(i)) printf("%c", i); else printf("\\x%02x", i);
- if (--j > i)
- {
- printf("-");
- if (j == '-' || j == ']') printf("\\");
- if (isprint(j)) printf("%c", j); else printf("\\x%02x", j);
- }
- i = j;
- }
- }
- printf("]");
- code += 32;
-
- CLASS_REF_REPEAT:
-
- switch(*code)
- {
- case OP_CRSTAR:
- case OP_CRMINSTAR:
- case OP_CRPLUS:
- case OP_CRMINPLUS:
- case OP_CRQUERY:
- case OP_CRMINQUERY:
- printf("%s", OP_names[*code]);
- break;
-
- case OP_CRRANGE:
- case OP_CRMINRANGE:
- min = (code[1] << 8) + code[2];
- max = (code[3] << 8) + code[4];
- if (max == 0) printf("{%d,}", min);
- else printf("{%d,%d}", min, max);
- if (*code == OP_CRMINRANGE) printf("?");
- code += 4;
- break;
-
- default:
- code--;
- }
- }
- break;
-
- /* Anything else is just a one-node item */
-
- default:
- printf(" %s", OP_names[*code]);
- break;
- }
-
- code++;
- printf("\n");
- }
-printf("------------------------------------------------------------------\n");
+print_internals(re, stdout);
/* This check is done here in the debugging case so that the code that
was compiled can be seen. */
-if (code - re->code > length)
+if (code - codestart > length)
{
*errorptr = ERR23;
(pcre_free)(re);
@@ -3438,6 +5684,231 @@ return TRUE;
}
+#ifdef SUPPORT_UTF8
+/*************************************************
+* Match character against an XCLASS *
+*************************************************/
+
+/* This function is called from within the XCLASS code below, to match a
+character against an extended class which might match values > 255.
+
+Arguments:
+ c the character
+ data points to the flag byte of the XCLASS data
+
+Returns: TRUE if character matches, else FALSE
+*/
+
+static BOOL
+match_xclass(int c, const uschar *data)
+{
+int t;
+BOOL negated = (*data & XCL_NOT) != 0;
+
+/* Character values < 256 are matched against a bitmap, if one is present. If
+not, we still carry on, because there may be ranges that start below 256 in the
+additional data. */
+
+if (c < 256)
+ {
+ if ((*data & XCL_MAP) != 0 && (data[1 + c/8] & (1 << (c&7))) != 0)
+ return !negated; /* char found */
+ }
+
+/* First skip the bit map if present. Then match against the list of Unicode
+properties or large chars or ranges that end with a large char. We won't ever
+encounter XCL_PROP or XCL_NOTPROP when UCP support is not compiled. */
+
+if ((*data++ & XCL_MAP) != 0) data += 32;
+
+while ((t = *data++) != XCL_END)
+ {
+ int x, y;
+ if (t == XCL_SINGLE)
+ {
+ GETCHARINC(x, data);
+ if (c == x) return !negated;
+ }
+ else if (t == XCL_RANGE)
+ {
+ GETCHARINC(x, data);
+ GETCHARINC(y, data);
+ if (c >= x && c <= y) return !negated;
+ }
+
+#ifdef SUPPORT_UCP
+ else /* XCL_PROP & XCL_NOTPROP */
+ {
+ int chartype, othercase;
+ int rqdtype = *data++;
+ int category = ucp_findchar(c, &chartype, &othercase);
+ if (rqdtype >= 128)
+ {
+ if ((rqdtype - 128 == category) == (t == XCL_PROP)) return !negated;
+ }
+ else
+ {
+ if ((rqdtype == chartype) == (t == XCL_PROP)) return !negated;
+ }
+ }
+#endif /* SUPPORT_UCP */
+ }
+
+return negated; /* char did not match */
+}
+#endif
+
+
+/***************************************************************************
+****************************************************************************
+ RECURSION IN THE match() FUNCTION
+
+The match() function is highly recursive. Some regular expressions can cause
+it to recurse thousands of times. I was writing for Unix, so I just let it
+call itself recursively. This uses the stack for saving everything that has
+to be saved for a recursive call. On Unix, the stack can be large, and this
+works fine.
+
+It turns out that on non-Unix systems there are problems with programs that
+use a lot of stack. (This despite the fact that every last chip has oodles
+of memory these days, and techniques for extending the stack have been known
+for decades.) So....
+
+There is a fudge, triggered by defining NO_RECURSE, which avoids recursive
+calls by keeping local variables that need to be preserved in blocks of memory
+obtained from malloc instead instead of on the stack. Macros are used to
+achieve this so that the actual code doesn't look very different to what it
+always used to.
+****************************************************************************
+***************************************************************************/
+
+
+/* These versions of the macros use the stack, as normal */
+
+#ifndef NO_RECURSE
+#define REGISTER register
+#define RMATCH(rx,ra,rb,rc,rd,re,rf,rg) rx = match(ra,rb,rc,rd,re,rf,rg)
+#define RRETURN(ra) return ra
+#else
+
+
+/* These versions of the macros manage a private stack on the heap. Note
+that the rd argument of RMATCH isn't actually used. It's the md argument of
+match(), which never changes. */
+
+#define REGISTER
+
+#define RMATCH(rx,ra,rb,rc,rd,re,rf,rg)\
+ {\
+ heapframe *newframe = (pcre_stack_malloc)(sizeof(heapframe));\
+ if (setjmp(frame->Xwhere) == 0)\
+ {\
+ newframe->Xeptr = ra;\
+ newframe->Xecode = rb;\
+ newframe->Xoffset_top = rc;\
+ newframe->Xims = re;\
+ newframe->Xeptrb = rf;\
+ newframe->Xflags = rg;\
+ newframe->Xprevframe = frame;\
+ frame = newframe;\
+ DPRINTF(("restarting from line %d\n", __LINE__));\
+ goto HEAP_RECURSE;\
+ }\
+ else\
+ {\
+ DPRINTF(("longjumped back to line %d\n", __LINE__));\
+ frame = md->thisframe;\
+ rx = frame->Xresult;\
+ }\
+ }
+
+#define RRETURN(ra)\
+ {\
+ heapframe *newframe = frame;\
+ frame = newframe->Xprevframe;\
+ (pcre_stack_free)(newframe);\
+ if (frame != NULL)\
+ {\
+ frame->Xresult = ra;\
+ md->thisframe = frame;\
+ longjmp(frame->Xwhere, 1);\
+ }\
+ return ra;\
+ }
+
+
+/* Structure for remembering the local variables in a private frame */
+
+typedef struct heapframe {
+ struct heapframe *Xprevframe;
+
+ /* Function arguments that may change */
+
+ const uschar *Xeptr;
+ const uschar *Xecode;
+ int Xoffset_top;
+ long int Xims;
+ eptrblock *Xeptrb;
+ int Xflags;
+
+ /* Function local variables */
+
+ const uschar *Xcallpat;
+ const uschar *Xcharptr;
+ const uschar *Xdata;
+ const uschar *Xnext;
+ const uschar *Xpp;
+ const uschar *Xprev;
+ const uschar *Xsaved_eptr;
+
+ recursion_info Xnew_recursive;
+
+ BOOL Xcur_is_word;
+ BOOL Xcondition;
+ BOOL Xminimize;
+ BOOL Xprev_is_word;
+
+ unsigned long int Xoriginal_ims;
+
+#ifdef SUPPORT_UCP
+ int Xprop_type;
+ int Xprop_fail_result;
+ int Xprop_category;
+ int Xprop_chartype;
+ int Xprop_othercase;
+ int Xprop_test_against;
+ int *Xprop_test_variable;
+#endif
+
+ int Xctype;
+ int Xfc;
+ int Xfi;
+ int Xlength;
+ int Xmax;
+ int Xmin;
+ int Xnumber;
+ int Xoffset;
+ int Xop;
+ int Xsave_capture_last;
+ int Xsave_offset1, Xsave_offset2, Xsave_offset3;
+ int Xstacksave[REC_STACK_SAVE_MAX];
+
+ eptrblock Xnewptrb;
+
+ /* Place to pass back result, and where to jump back to */
+
+ int Xresult;
+ jmp_buf Xwhere;
+
+} heapframe;
+
+#endif
+
+
+/***************************************************************************
+***************************************************************************/
+
+
/*************************************************
* Match from current position *
@@ -3446,7 +5917,14 @@ return TRUE;
/* On entry ecode points to the first opcode, and eptr to the first character
in the subject string, while eptrb holds the value of eptr at the start of the
last bracketed group - used for breaking infinite loops matching zero-length
-strings.
+strings. This function is called recursively in many circumstances. Whenever it
+returns a negative (error) response, the outer incarnation must also return the
+same response.
+
+Performance note: It might be tempting to extract commonly used fields from the
+md structure (e.g. utf8, end_subject) into individual variables to improve
+performance. Tests using gcc on a SPARC disproved this; in the first case, it
+made performance worse.
Arguments:
eptr pointer in subject
@@ -3460,26 +5938,185 @@ Arguments:
match_condassert - this is an assertion condition
match_isgroup - this is the start of a bracketed group
-Returns: TRUE if matched
+Returns: MATCH_MATCH if matched ) these values are >= 0
+ MATCH_NOMATCH if failed to match )
+ a negative PCRE_ERROR_xxx value if aborted by an error condition
+ (e.g. stopped by recursion limit)
*/
-static BOOL
-match(register const uschar *eptr, register const uschar *ecode,
+static int
+match(REGISTER const uschar *eptr, REGISTER const uschar *ecode,
int offset_top, match_data *md, unsigned long int ims, eptrblock *eptrb,
int flags)
{
-unsigned long int original_ims = ims; /* Save for resetting on ')' */
+/* These variables do not need to be preserved over recursion in this function,
+so they can be ordinary variables in all cases. Mark them with "register"
+because they are used a lot in loops. */
+
+register int rrc; /* Returns from recursive calls */
+register int i; /* Used for loops not involving calls to RMATCH() */
+register int c; /* Character values not kept over RMATCH() calls */
+
+/* When recursion is not being used, all "local" variables that have to be
+preserved over calls to RMATCH() are part of a "frame" which is obtained from
+heap storage. Set up the top-level frame here; others are obtained from the
+heap whenever RMATCH() does a "recursion". See the macro definitions above. */
+
+#ifdef NO_RECURSE
+heapframe *frame = (pcre_stack_malloc)(sizeof(heapframe));
+frame->Xprevframe = NULL; /* Marks the top level */
+
+/* Copy in the original argument variables */
+
+frame->Xeptr = eptr;
+frame->Xecode = ecode;
+frame->Xoffset_top = offset_top;
+frame->Xims = ims;
+frame->Xeptrb = eptrb;
+frame->Xflags = flags;
+
+/* This is where control jumps back to to effect "recursion" */
+
+HEAP_RECURSE:
+
+/* Macros make the argument variables come from the current frame */
+
+#define eptr frame->Xeptr
+#define ecode frame->Xecode
+#define offset_top frame->Xoffset_top
+#define ims frame->Xims
+#define eptrb frame->Xeptrb
+#define flags frame->Xflags
+
+/* Ditto for the local variables */
+
+#ifdef SUPPORT_UTF8
+#define charptr frame->Xcharptr
+#endif
+#define callpat frame->Xcallpat
+#define data frame->Xdata
+#define next frame->Xnext
+#define pp frame->Xpp
+#define prev frame->Xprev
+#define saved_eptr frame->Xsaved_eptr
+
+#define new_recursive frame->Xnew_recursive
+
+#define cur_is_word frame->Xcur_is_word
+#define condition frame->Xcondition
+#define minimize frame->Xminimize
+#define prev_is_word frame->Xprev_is_word
+
+#define original_ims frame->Xoriginal_ims
+
+#ifdef SUPPORT_UCP
+#define prop_type frame->Xprop_type
+#define prop_fail_result frame->Xprop_fail_result
+#define prop_category frame->Xprop_category
+#define prop_chartype frame->Xprop_chartype
+#define prop_othercase frame->Xprop_othercase
+#define prop_test_against frame->Xprop_test_against
+#define prop_test_variable frame->Xprop_test_variable
+#endif
+
+#define ctype frame->Xctype
+#define fc frame->Xfc
+#define fi frame->Xfi
+#define length frame->Xlength
+#define max frame->Xmax
+#define min frame->Xmin
+#define number frame->Xnumber
+#define offset frame->Xoffset
+#define op frame->Xop
+#define save_capture_last frame->Xsave_capture_last
+#define save_offset1 frame->Xsave_offset1
+#define save_offset2 frame->Xsave_offset2
+#define save_offset3 frame->Xsave_offset3
+#define stacksave frame->Xstacksave
+
+#define newptrb frame->Xnewptrb
+
+/* When recursion is being used, local variables are allocated on the stack and
+get preserved during recursion in the normal way. In this environment, fi and
+i, and fc and c, can be the same variables. */
+
+#else
+#define fi i
+#define fc c
+
+
+#ifdef SUPPORT_UTF8 /* Many of these variables are used ony */
+const uschar *charptr; /* small blocks of the code. My normal */
+#endif /* style of coding would have declared */
+const uschar *callpat; /* them within each of those blocks. */
+const uschar *data; /* However, in order to accommodate the */
+const uschar *next; /* version of this code that uses an */
+const uschar *pp; /* external "stack" implemented on the */
+const uschar *prev; /* heap, it is easier to declare them */
+const uschar *saved_eptr; /* all here, so the declarations can */
+ /* be cut out in a block. The only */
+recursion_info new_recursive; /* declarations within blocks below are */
+ /* for variables that do not have to */
+BOOL cur_is_word; /* be preserved over a recursive call */
+BOOL condition; /* to RMATCH(). */
+BOOL minimize;
+BOOL prev_is_word;
+
+unsigned long int original_ims;
+
+#ifdef SUPPORT_UCP
+int prop_type;
+int prop_fail_result;
+int prop_category;
+int prop_chartype;
+int prop_othercase;
+int prop_test_against;
+int *prop_test_variable;
+#endif
+
+int ctype;
+int length;
+int max;
+int min;
+int number;
+int offset;
+int op;
+int save_capture_last;
+int save_offset1, save_offset2, save_offset3;
+int stacksave[REC_STACK_SAVE_MAX];
+
eptrblock newptrb;
+#endif
+
+/* These statements are here to stop the compiler complaining about unitialized
+variables. */
+
+#ifdef SUPPORT_UCP
+prop_fail_result = 0;
+prop_test_against = 0;
+prop_test_variable = NULL;
+#endif
+
+/* OK, now we can get on with the real code of the function. Recursion is
+specified by the macros RMATCH and RRETURN. When NO_RECURSE is *not* defined,
+these just turn into a recursive call to match() and a "return", respectively.
+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. */
+
+if (md->match_call_count++ >= md->match_limit) RRETURN(PCRE_ERROR_MATCHLIMIT);
+
+original_ims = ims; /* Save for resetting on ')' */
/* At the start of a bracketed group, add the current subject pointer to the
stack of such pointers, to be re-instated at the end of the group when we hit
the closing ket. When match() is called in other circumstances, we don't add to
-the stack. */
+this stack. */
if ((flags & match_isgroup) != 0)
{
- newptrb.prev = eptrb;
- newptrb.saved_eptr = eptr;
+ newptrb.epb_prev = eptrb;
+ newptrb.epb_saved_eptr = eptr;
eptrb = &newptrb;
}
@@ -3487,11 +6124,16 @@ if ((flags & match_isgroup) != 0)
for (;;)
{
- int op = (int)*ecode;
- int min, max, ctype;
- register int i;
- register int c;
- BOOL minimize = FALSE;
+ op = *ecode;
+ minimize = FALSE;
+
+ /* For partial matching, remember if we ever hit the end of the subject after
+ matching at least one subject character. */
+
+ if (md->partial &&
+ eptr >= md->end_subject &&
+ eptr > md->start_match)
+ md->hitend = TRUE;
/* Opening capturing bracket. If there is space in the offset vector, save
the current subject position in the working slot at the top of the vector. We
@@ -3509,13 +6151,13 @@ for (;;)
if (op > OP_BRA)
{
- int offset;
- int number = op - OP_BRA;
+ number = op - OP_BRA;
/* For extended extraction brackets (large number), we have to fish out the
number from a dummy opcode at the start. */
- if (number > EXTRACT_BASIC_MAX) number = (ecode[4] << 8) | ecode[5];
+ if (number > EXTRACT_BASIC_MAX)
+ number = GET2(ecode, 2+LINK_SIZE);
offset = number << 1;
#ifdef DEBUG
@@ -3526,18 +6168,21 @@ for (;;)
if (offset < md->offset_max)
{
- int save_offset1 = md->offset_vector[offset];
- int save_offset2 = md->offset_vector[offset+1];
- int save_offset3 = md->offset_vector[md->offset_end - number];
+ save_offset1 = md->offset_vector[offset];
+ save_offset2 = md->offset_vector[offset+1];
+ save_offset3 = md->offset_vector[md->offset_end - number];
+ 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;
do
{
- if (match(eptr, ecode+3, offset_top, md, ims, eptrb, match_isgroup))
- return TRUE;
- ecode += (ecode[1] << 8) + ecode[2];
+ RMATCH(rrc, eptr, ecode + 1 + LINK_SIZE, offset_top, md, ims, eptrb,
+ match_isgroup);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ md->capture_last = save_capture_last;
+ ecode += GET(ecode, 1);
}
while (*ecode == OP_ALT);
@@ -3547,7 +6192,7 @@ for (;;)
md->offset_vector[offset+1] = save_offset2;
md->offset_vector[md->offset_end - number] = save_offset3;
- return FALSE;
+ RRETURN(MATCH_NOMATCH);
}
/* Insufficient room for saving captured contents */
@@ -3563,13 +6208,14 @@ for (;;)
DPRINTF(("start bracket 0\n"));
do
{
- if (match(eptr, ecode+3, offset_top, md, ims, eptrb, match_isgroup))
- return TRUE;
- ecode += (ecode[1] << 8) + ecode[2];
+ RMATCH(rrc, eptr, ecode + 1 + LINK_SIZE, offset_top, md, ims, eptrb,
+ match_isgroup);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ ecode += GET(ecode, 1);
}
while (*ecode == OP_ALT);
DPRINTF(("bracket 0 failed\n"));
- return FALSE;
+ RRETURN(MATCH_NOMATCH);
/* Conditional group: compilation checked that there are no more than
two branches. If the condition is false, skipping the first branch takes us
@@ -3577,13 +6223,16 @@ for (;;)
exactly what going to the ket would do. */
case OP_COND:
- if (ecode[3] == OP_CREF) /* Condition is extraction test */
+ if (ecode[LINK_SIZE+1] == OP_CREF) /* Condition extract or recurse test */
{
- int offset = (ecode[4] << 9) | (ecode[5] << 1); /* Doubled ref number */
- return match(eptr,
- ecode + ((offset < offset_top && md->offset_vector[offset] >= 0)?
- 6 : 3 + (ecode[1] << 8) + ecode[2]),
+ offset = GET2(ecode, LINK_SIZE+2) << 1; /* Doubled ref number */
+ condition = (offset == CREF_RECURSE * 2)?
+ (md->recursive != NULL) :
+ (offset < offset_top && md->offset_vector[offset] >= 0);
+ RMATCH(rrc, eptr, ecode + (condition?
+ (LINK_SIZE + 4) : (LINK_SIZE + 1 + GET(ecode, 1))),
offset_top, md, ims, eptrb, match_isgroup);
+ RRETURN(rrc);
}
/* The condition is an assertion. Call match() to evaluate it - setting
@@ -3591,14 +6240,21 @@ for (;;)
else
{
- if (match(eptr, ecode+3, offset_top, md, ims, NULL,
- match_condassert | match_isgroup))
+ RMATCH(rrc, eptr, ecode + 1 + LINK_SIZE, offset_top, md, ims, NULL,
+ match_condassert | match_isgroup);
+ if (rrc == MATCH_MATCH)
+ {
+ ecode += 1 + LINK_SIZE + GET(ecode, LINK_SIZE+2);
+ while (*ecode == OP_ALT) ecode += GET(ecode, 1);
+ }
+ else if (rrc != MATCH_NOMATCH)
{
- ecode += 3 + (ecode[4] << 8) + ecode[5];
- while (*ecode == OP_ALT) ecode += (ecode[1] << 8) + ecode[2];
+ RRETURN(rrc); /* Need braces because of following else */
}
- else ecode += (ecode[1] << 8) + ecode[2];
- return match(eptr, ecode+3, offset_top, md, ims, eptrb, match_isgroup);
+ else ecode += GET(ecode, 1);
+ RMATCH(rrc, eptr, ecode + 1 + LINK_SIZE, offset_top, md, ims, eptrb,
+ match_isgroup);
+ RRETURN(rrc);
}
/* Control never reaches here */
@@ -3610,14 +6266,30 @@ for (;;)
ecode += 3;
break;
- /* End of the pattern. If PCRE_NOTEMPTY is set, fail if we have matched
- an empty string - recursion will then try other alternatives, if any. */
+ /* End of the pattern. If we are in a recursion, we should restore the
+ offsets appropriately and continue from after the call. */
case OP_END:
- if (md->notempty && eptr == md->start_match) return FALSE;
+ if (md->recursive != NULL && md->recursive->group_num == 0)
+ {
+ recursion_info *rec = md->recursive;
+ DPRINTF(("Hit the end in a (?0) recursion\n"));
+ md->recursive = rec->prevrec;
+ memmove(md->offset_vector, rec->offset_save,
+ rec->saved_max * sizeof(int));
+ md->start_match = rec->save_start;
+ ims = original_ims;
+ ecode = rec->after_call;
+ break;
+ }
+
+ /* Otherwise, if PCRE_NOTEMPTY is set, fail if we have matched an empty
+ string - backtracking will then try other alternatives, if any. */
+
+ if (md->notempty && eptr == md->start_match) RRETURN(MATCH_NOMATCH);
md->end_match_ptr = eptr; /* Record where we ended */
md->end_offset_top = offset_top; /* and how many extracts were taken */
- return TRUE;
+ RRETURN(MATCH_MATCH);
/* Change option settings */
@@ -3637,21 +6309,24 @@ for (;;)
case OP_ASSERTBACK:
do
{
- if (match(eptr, ecode+3, offset_top, md, ims, NULL, match_isgroup)) break;
- ecode += (ecode[1] << 8) + ecode[2];
+ RMATCH(rrc, eptr, ecode + 1 + LINK_SIZE, offset_top, md, ims, NULL,
+ match_isgroup);
+ if (rrc == MATCH_MATCH) break;
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ ecode += GET(ecode, 1);
}
while (*ecode == OP_ALT);
- if (*ecode == OP_KET) return FALSE;
+ if (*ecode == OP_KET) RRETURN(MATCH_NOMATCH);
- /* If checking an assertion for a condition, return TRUE. */
+ /* If checking an assertion for a condition, return MATCH_MATCH. */
- if ((flags & match_condassert) != 0) return TRUE;
+ if ((flags & match_condassert) != 0) RRETURN(MATCH_MATCH);
/* Continue from after the assertion, updating the offsets high water
mark, since extracts may have been taken during the assertion. */
- do ecode += (ecode[1] << 8) + ecode[2]; while (*ecode == OP_ALT);
- ecode += 3;
+ do ecode += GET(ecode,1); while (*ecode == OP_ALT);
+ ecode += 1 + LINK_SIZE;
offset_top = md->end_offset_top;
continue;
@@ -3661,15 +6336,17 @@ for (;;)
case OP_ASSERTBACK_NOT:
do
{
- if (match(eptr, ecode+3, offset_top, md, ims, NULL, match_isgroup))
- return FALSE;
- ecode += (ecode[1] << 8) + ecode[2];
+ RMATCH(rrc, eptr, ecode + 1 + LINK_SIZE, offset_top, md, ims, NULL,
+ match_isgroup);
+ if (rrc == MATCH_MATCH) RRETURN(MATCH_NOMATCH);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ ecode += GET(ecode,1);
}
while (*ecode == OP_ALT);
- if ((flags & match_condassert) != 0) return TRUE;
+ if ((flags & match_condassert) != 0) RRETURN(MATCH_MATCH);
- ecode += 3;
+ ecode += 1 + LINK_SIZE;
continue;
/* Move the subject pointer back. This occurs only at the start of
@@ -3679,97 +6356,176 @@ for (;;)
case OP_REVERSE:
#ifdef SUPPORT_UTF8
- c = (ecode[1] << 8) + ecode[2];
- for (i = 0; i < c; i++)
+ if (md->utf8)
{
- eptr--;
- BACKCHAR(eptr)
+ c = GET(ecode,1);
+ for (i = 0; i < c; i++)
+ {
+ eptr--;
+ if (eptr < md->start_subject) RRETURN(MATCH_NOMATCH);
+ BACKCHAR(eptr)
+ }
}
-#else
- eptr -= (ecode[1] << 8) + ecode[2];
+ else
#endif
- if (eptr < md->start_subject) return FALSE;
- ecode += 3;
+ /* No UTF-8 support, or not in UTF-8 mode: count is byte count */
+
+ {
+ eptr -= GET(ecode,1);
+ if (eptr < md->start_subject) RRETURN(MATCH_NOMATCH);
+ }
+
+ /* Skip to next op code */
+
+ ecode += 1 + LINK_SIZE;
break;
- /* Recursion matches the current regex, nested. If there are any capturing
- brackets started but not finished, we have to save their starting points
- and reinstate them after the recursion. However, we don't know how many
- such there are (offset_top records the completed total) so we just have
- to save all the potential data. There may be up to 99 such values, which
- is a bit large to put on the stack, but using malloc for small numbers
- seems expensive. As a compromise, the stack is used when there are fewer
- than 16 values to store; otherwise malloc is used. A problem is what to do
- if the malloc fails ... there is no way of returning to the top level with
- an error. Save the top 15 values on the stack, and accept that the rest
- may be wrong. */
+ /* The callout item calls an external function, if one is provided, passing
+ details of the match so far. This is mainly for debugging, though the
+ function is able to force a failure. */
+
+ case OP_CALLOUT:
+ if (pcre_callout != NULL)
+ {
+ pcre_callout_block cb;
+ cb.version = 1; /* Version 1 of the callout block */
+ cb.callout_number = ecode[1];
+ cb.offset_vector = md->offset_vector;
+ cb.subject = (const char *)md->start_subject;
+ cb.subject_length = md->end_subject - md->start_subject;
+ cb.start_match = md->start_match - md->start_subject;
+ cb.current_position = 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 < 0) RRETURN(rrc);
+ }
+ ecode += 2 + 2*LINK_SIZE;
+ break;
+
+ /* Recursion either matches the current regex, or some subexpression. The
+ offset data is the offset to the starting bracket from the start of the
+ whole pattern. (This is so that it works from duplicated subpatterns.)
+
+ If there are any capturing brackets started but not finished, we have to
+ save their starting points and reinstate them after the recursion. However,
+ we don't know how many such there are (offset_top records the completed
+ total) so we just have to save all the potential data. There may be up to
+ 65535 such values, which is too large to put on the stack, but using malloc
+ for small numbers seems expensive. As a compromise, the stack is used when
+ there are no more than REC_STACK_SAVE_MAX values to store; otherwise malloc
+ is used. A problem is what to do if the malloc fails ... there is no way of
+ returning to the top level with an error. Save the top REC_STACK_SAVE_MAX
+ values on the stack, and accept that the rest may be wrong.
+
+ There are also other values that have to be saved. We use a chained
+ sequence of blocks that actually live on the stack. Thanks to Robin Houston
+ for the original version of this logic. */
case OP_RECURSE:
{
- BOOL rc;
- int *save;
- int stacksave[15];
+ callpat = md->start_code + GET(ecode, 1);
+ new_recursive.group_num = *callpat - OP_BRA;
+
+ /* For extended extraction brackets (large number), we have to fish out
+ the number from a dummy opcode at the start. */
+
+ if (new_recursive.group_num > EXTRACT_BASIC_MAX)
+ new_recursive.group_num = GET2(callpat, 2+LINK_SIZE);
+
+ /* Add to "recursing stack" */
+
+ new_recursive.prevrec = md->recursive;
+ md->recursive = &new_recursive;
+
+ /* Find where to continue from afterwards */
+
+ ecode += 1 + LINK_SIZE;
+ new_recursive.after_call = ecode;
- c = md->offset_max;
+ /* Now save the offset data. */
- if (c < 16) save = stacksave; else
+ new_recursive.saved_max = md->offset_end;
+ if (new_recursive.saved_max <= REC_STACK_SAVE_MAX)
+ new_recursive.offset_save = stacksave;
+ else
{
- save = (int *)(pcre_malloc)((c+1) * sizeof(int));
- if (save == NULL)
- {
- save = stacksave;
- c = 15;
- }
+ new_recursive.offset_save =
+ (int *)(pcre_malloc)(new_recursive.saved_max * sizeof(int));
+ if (new_recursive.offset_save == NULL) RRETURN(PCRE_ERROR_NOMEMORY);
}
- for (i = 1; i <= c; i++)
- save[i] = md->offset_vector[md->offset_end - i];
- rc = match(eptr, md->start_pattern, offset_top, md, ims, eptrb,
- match_isgroup);
- for (i = 1; i <= c; i++)
- md->offset_vector[md->offset_end - i] = save[i];
- if (save != stacksave) (pcre_free)(save);
- if (!rc) return FALSE;
+ memcpy(new_recursive.offset_save, md->offset_vector,
+ new_recursive.saved_max * sizeof(int));
+ new_recursive.save_start = md->start_match;
+ md->start_match = eptr;
- /* In case the recursion has set more capturing values, save the final
- number, then move along the subject till after the recursive match,
- and advance one byte in the pattern code. */
+ /* OK, now we can do the recursion. For each top-level alternative we
+ restore the offset and recursion data. */
- offset_top = md->end_offset_top;
- eptr = md->end_match_ptr;
- ecode++;
+ DPRINTF(("Recursing into group %d\n", new_recursive.group_num));
+ do
+ {
+ RMATCH(rrc, eptr, callpat + 1 + LINK_SIZE, offset_top, md, ims,
+ eptrb, match_isgroup);
+ if (rrc == MATCH_MATCH)
+ {
+ md->recursive = new_recursive.prevrec;
+ if (new_recursive.offset_save != stacksave)
+ (pcre_free)(new_recursive.offset_save);
+ RRETURN(MATCH_MATCH);
+ }
+ else if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+
+ md->recursive = &new_recursive;
+ memcpy(md->offset_vector, new_recursive.offset_save,
+ new_recursive.saved_max * sizeof(int));
+ callpat += GET(callpat, 1);
+ }
+ while (*callpat == OP_ALT);
+
+ DPRINTF(("Recursion didn't match\n"));
+ md->recursive = new_recursive.prevrec;
+ if (new_recursive.offset_save != stacksave)
+ (pcre_free)(new_recursive.offset_save);
+ RRETURN(MATCH_NOMATCH);
}
- break;
+ /* Control never reaches here */
/* "Once" brackets are like assertion brackets except that after a match,
the point in the subject string is not moved back. Thus there can never be
- a move back into the brackets. 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. */
+ 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. */
case OP_ONCE:
{
- const uschar *prev = ecode;
- const uschar *saved_eptr = eptr;
+ prev = ecode;
+ saved_eptr = eptr;
do
{
- if (match(eptr, ecode+3, offset_top, md, ims, eptrb, match_isgroup))
- break;
- ecode += (ecode[1] << 8) + ecode[2];
+ RMATCH(rrc, eptr, ecode + 1 + LINK_SIZE, offset_top, md, ims,
+ eptrb, match_isgroup);
+ if (rrc == MATCH_MATCH) break;
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ ecode += GET(ecode,1);
}
while (*ecode == OP_ALT);
/* If hit the end of the group (which could be repeated), fail */
- if (*ecode != OP_ONCE && *ecode != OP_ALT) return FALSE;
+ if (*ecode != OP_ONCE && *ecode != OP_ALT) RRETURN(MATCH_NOMATCH);
/* Continue as from after the assertion, updating the offsets high water
mark, since extracts may have been taken. */
- do ecode += (ecode[1] << 8) + ecode[2]; while (*ecode == OP_ALT);
+ do ecode += GET(ecode,1); while (*ecode == OP_ALT);
offset_top = md->end_offset_top;
eptr = md->end_match_ptr;
@@ -3782,7 +6538,7 @@ for (;;)
if (*ecode == OP_KET || eptr == saved_eptr)
{
- ecode += 3;
+ ecode += 1+LINK_SIZE;
break;
}
@@ -3791,7 +6547,7 @@ for (;;)
that changed within the bracket before re-running it, so check the next
opcode. */
- if (ecode[3] == OP_OPT)
+ if (ecode[1+LINK_SIZE] == OP_OPT)
{
ims = (ims & ~PCRE_IMS) | ecode[4];
DPRINTF(("ims set to %02lx at group repeat\n", ims));
@@ -3799,23 +6555,26 @@ for (;;)
if (*ecode == OP_KETRMIN)
{
- if (match(eptr, ecode+3, offset_top, md, ims, eptrb, 0) ||
- match(eptr, prev, offset_top, md, ims, eptrb, match_isgroup))
- return TRUE;
+ RMATCH(rrc, eptr, ecode + 1 + LINK_SIZE, offset_top, md, ims, eptrb, 0);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ RMATCH(rrc, eptr, prev, offset_top, md, ims, eptrb, match_isgroup);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
}
else /* OP_KETRMAX */
{
- if (match(eptr, prev, offset_top, md, ims, eptrb, match_isgroup) ||
- match(eptr, ecode+3, offset_top, md, ims, eptrb, 0)) return TRUE;
+ RMATCH(rrc, eptr, prev, offset_top, md, ims, eptrb, match_isgroup);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ RMATCH(rrc, eptr, ecode + 1+LINK_SIZE, offset_top, md, ims, eptrb, 0);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
}
}
- return FALSE;
+ RRETURN(MATCH_NOMATCH);
/* An alternation is the end of a branch; scan along to find the end of the
bracketed group and go to there. */
case OP_ALT:
- do ecode += (ecode[1] << 8) + ecode[2]; while (*ecode == OP_ALT);
+ do ecode += GET(ecode,1); while (*ecode == OP_ALT);
break;
/* BRAZERO and BRAMINZERO occur just before a bracket group, indicating
@@ -3826,26 +6585,27 @@ for (;;)
case OP_BRAZERO:
{
- const uschar *next = ecode+1;
- if (match(eptr, next, offset_top, md, ims, eptrb, match_isgroup))
- return TRUE;
- do next += (next[1] << 8) + next[2]; while (*next == OP_ALT);
- ecode = next + 3;
+ next = ecode+1;
+ RMATCH(rrc, eptr, next, offset_top, md, ims, eptrb, match_isgroup);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ do next += GET(next,1); while (*next == OP_ALT);
+ ecode = next + 1+LINK_SIZE;
}
break;
case OP_BRAMINZERO:
{
- const uschar *next = ecode+1;
- do next += (next[1] << 8) + next[2]; while (*next == OP_ALT);
- if (match(eptr, next+3, offset_top, md, ims, eptrb, match_isgroup))
- return TRUE;
+ next = ecode+1;
+ do next += GET(next,1); while (*next == OP_ALT);
+ RMATCH(rrc, eptr, next + 1+LINK_SIZE, offset_top, md, ims, eptrb,
+ match_isgroup);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
ecode++;
}
break;
/* End of a group, repeated or non-repeating. If we are at the end of
- an assertion "group", stop matching and return TRUE, but record the
+ 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" (not-backup up) groups. */
@@ -3853,10 +6613,12 @@ for (;;)
case OP_KETRMIN:
case OP_KETRMAX:
{
- const uschar *prev = ecode - (ecode[1] << 8) - ecode[2];
- const uschar *saved_eptr = eptrb->saved_eptr;
+ prev = ecode - GET(ecode, 1);
+ saved_eptr = eptrb->epb_saved_eptr;
+
+ /* Back up the stack of bracket start pointers. */
- eptrb = eptrb->prev; /* Back up the stack of bracket start pointers */
+ eptrb = eptrb->epb_prev;
if (*prev == OP_ASSERT || *prev == OP_ASSERT_NOT ||
*prev == OP_ASSERTBACK || *prev == OP_ASSERTBACK_NOT ||
@@ -3864,7 +6626,7 @@ for (;;)
{
md->end_match_ptr = eptr; /* For ONCE */
md->end_offset_top = offset_top;
- return TRUE;
+ RRETURN(MATCH_MATCH);
}
/* In all other cases except a conditional group we have to check the
@@ -3873,13 +6635,12 @@ for (;;)
if (*prev != OP_COND)
{
- int offset;
- int number = *prev - OP_BRA;
+ number = *prev - OP_BRA;
/* For extended extraction brackets (large number), we have to fish out
the number from a dummy opcode at the start. */
- if (number > EXTRACT_BASIC_MAX) number = (prev[4] << 8) | prev[5];
+ if (number > EXTRACT_BASIC_MAX) number = GET2(prev, 2+LINK_SIZE);
offset = number << 1;
#ifdef DEBUG
@@ -3887,8 +6648,14 @@ for (;;)
printf("\n");
#endif
+ /* Test for a numbered group. This includes groups called as a result
+ of recursion. Note that whole-pattern recursion is coded as a recurse
+ into group 0, so it won't be picked up here. Instead, we catch it when
+ the OP_END is reached. */
+
if (number > 0)
{
+ md->capture_last = number;
if (offset >= md->offset_max) md->offset_overflow = TRUE; else
{
md->offset_vector[offset] =
@@ -3896,6 +6663,22 @@ for (;;)
md->offset_vector[offset+1] = eptr - md->start_subject;
if (offset_top <= offset) offset_top = offset + 2;
}
+
+ /* Handle a recursively called group. Restore the offsets
+ appropriately and continue from after the call. */
+
+ if (md->recursive != NULL && md->recursive->group_num == number)
+ {
+ recursion_info *rec = md->recursive;
+ DPRINTF(("Recursion (%d) succeeded - continuing\n", number));
+ md->recursive = rec->prevrec;
+ md->start_match = rec->save_start;
+ memcpy(md->offset_vector, rec->offset_save,
+ rec->saved_max * sizeof(int));
+ ecode = rec->after_call;
+ ims = original_ims;
+ break;
+ }
}
}
@@ -3913,7 +6696,7 @@ for (;;)
if (*ecode == OP_KET || eptr == saved_eptr)
{
- ecode += 3;
+ ecode += 1 + LINK_SIZE;
break;
}
@@ -3922,25 +6705,30 @@ for (;;)
if (*ecode == OP_KETRMIN)
{
- if (match(eptr, ecode+3, offset_top, md, ims, eptrb, 0) ||
- match(eptr, prev, offset_top, md, ims, eptrb, match_isgroup))
- return TRUE;
+ RMATCH(rrc, eptr, ecode + 1+LINK_SIZE, offset_top, md, ims, eptrb, 0);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ RMATCH(rrc, eptr, prev, offset_top, md, ims, eptrb, match_isgroup);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
}
else /* OP_KETRMAX */
{
- if (match(eptr, prev, offset_top, md, ims, eptrb, match_isgroup) ||
- match(eptr, ecode+3, offset_top, md, ims, eptrb, 0)) return TRUE;
+ RMATCH(rrc, eptr, prev, offset_top, md, ims, eptrb, match_isgroup);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ RMATCH(rrc, eptr, ecode + 1+LINK_SIZE, offset_top, md, ims, eptrb, 0);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
}
}
- return FALSE;
+
+ RRETURN(MATCH_NOMATCH);
/* Start of subject unless notbol, or after internal newline if multiline */
case OP_CIRC:
- if (md->notbol && eptr == md->start_subject) return FALSE;
+ if (md->notbol && eptr == md->start_subject) RRETURN(MATCH_NOMATCH);
if ((ims & PCRE_MULTILINE) != 0)
{
- if (eptr != md->start_subject && eptr[-1] != NEWLINE) return FALSE;
+ if (eptr != md->start_subject && eptr[-1] != NEWLINE)
+ RRETURN(MATCH_NOMATCH);
ecode++;
break;
}
@@ -3949,7 +6737,14 @@ for (;;)
/* Start of subject assertion */
case OP_SOD:
- if (eptr != md->start_subject) return FALSE;
+ if (eptr != md->start_subject) RRETURN(MATCH_NOMATCH);
+ ecode++;
+ break;
+
+ /* Start of match assertion */
+
+ case OP_SOM:
+ if (eptr != md->start_subject + md->start_offset) RRETURN(MATCH_NOMATCH);
ecode++;
break;
@@ -3959,19 +6754,21 @@ for (;;)
case OP_DOLL:
if ((ims & PCRE_MULTILINE) != 0)
{
- if (eptr < md->end_subject) { if (*eptr != NEWLINE) return FALSE; }
- else { if (md->noteol) return FALSE; }
+ if (eptr < md->end_subject)
+ { if (*eptr != NEWLINE) RRETURN(MATCH_NOMATCH); }
+ else
+ { if (md->noteol) RRETURN(MATCH_NOMATCH); }
ecode++;
break;
}
else
{
- if (md->noteol) return FALSE;
+ if (md->noteol) RRETURN(MATCH_NOMATCH);
if (!md->endonly)
{
if (eptr < md->end_subject - 1 ||
- (eptr == md->end_subject - 1 && *eptr != NEWLINE)) return FALSE;
-
+ (eptr == md->end_subject - 1 && *eptr != NEWLINE))
+ RRETURN(MATCH_NOMATCH);
ecode++;
break;
}
@@ -3981,7 +6778,7 @@ for (;;)
/* End of subject assertion (\z) */
case OP_EOD:
- if (eptr < md->end_subject) return FALSE;
+ if (eptr < md->end_subject) RRETURN(MATCH_NOMATCH);
ecode++;
break;
@@ -3989,7 +6786,7 @@ for (;;)
case OP_EODN:
if (eptr < md->end_subject - 1 ||
- (eptr == md->end_subject - 1 && *eptr != NEWLINE)) return FALSE;
+ (eptr == md->end_subject - 1 && *eptr != NEWLINE)) RRETURN(MATCH_NOMATCH);
ecode++;
break;
@@ -3998,13 +6795,44 @@ for (;;)
case OP_NOT_WORD_BOUNDARY:
case OP_WORD_BOUNDARY:
{
- BOOL prev_is_word = (eptr != md->start_subject) &&
- ((md->ctypes[eptr[-1]] & ctype_word) != 0);
- BOOL cur_is_word = (eptr < md->end_subject) &&
- ((md->ctypes[*eptr] & ctype_word) != 0);
+
+ /* Find out if the previous and current characters are "word" characters.
+ It takes a bit more work in UTF-8 mode. Characters > 255 are assumed to
+ be "non-word" characters. */
+
+#ifdef SUPPORT_UTF8
+ if (md->utf8)
+ {
+ if (eptr == md->start_subject) prev_is_word = FALSE; else
+ {
+ const uschar *lastptr = eptr - 1;
+ while((*lastptr & 0xc0) == 0x80) lastptr--;
+ GETCHAR(c, lastptr);
+ prev_is_word = c < 256 && (md->ctypes[c] & ctype_word) != 0;
+ }
+ if (eptr >= md->end_subject) cur_is_word = FALSE; else
+ {
+ GETCHAR(c, eptr);
+ cur_is_word = c < 256 && (md->ctypes[c] & ctype_word) != 0;
+ }
+ }
+ else
+#endif
+
+ /* More streamlined when not in UTF-8 mode */
+
+ {
+ prev_is_word = (eptr != md->start_subject) &&
+ ((md->ctypes[eptr[-1]] & ctype_word) != 0);
+ cur_is_word = (eptr < md->end_subject) &&
+ ((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)
- return FALSE;
+ RRETURN(MATCH_NOMATCH);
}
break;
@@ -4012,8 +6840,8 @@ for (;;)
case OP_ANY:
if ((ims & PCRE_DOTALL) == 0 && eptr < md->end_subject && *eptr == NEWLINE)
- return FALSE;
- if (eptr++ >= md->end_subject) return FALSE;
+ RRETURN(MATCH_NOMATCH);
+ if (eptr++ >= md->end_subject) RRETURN(MATCH_NOMATCH);
#ifdef SUPPORT_UTF8
if (md->utf8)
while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++;
@@ -4021,48 +6849,149 @@ for (;;)
ecode++;
break;
+ /* Match a single byte, even in UTF-8 mode. This opcode really does match
+ any byte, even newline, independent of the setting of PCRE_DOTALL. */
+
+ case OP_ANYBYTE:
+ if (eptr++ >= md->end_subject) RRETURN(MATCH_NOMATCH);
+ ecode++;
+ break;
+
case OP_NOT_DIGIT:
- if (eptr >= md->end_subject ||
- (md->ctypes[*eptr++] & ctype_digit) != 0)
- return FALSE;
+ if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
+ GETCHARINCTEST(c, eptr);
+ if (
+#ifdef SUPPORT_UTF8
+ c < 256 &&
+#endif
+ (md->ctypes[c] & ctype_digit) != 0
+ )
+ RRETURN(MATCH_NOMATCH);
ecode++;
break;
case OP_DIGIT:
- if (eptr >= md->end_subject ||
- (md->ctypes[*eptr++] & ctype_digit) == 0)
- return FALSE;
+ if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
+ GETCHARINCTEST(c, eptr);
+ if (
+#ifdef SUPPORT_UTF8
+ c >= 256 ||
+#endif
+ (md->ctypes[c] & ctype_digit) == 0
+ )
+ RRETURN(MATCH_NOMATCH);
ecode++;
break;
case OP_NOT_WHITESPACE:
- if (eptr >= md->end_subject ||
- (md->ctypes[*eptr++] & ctype_space) != 0)
- return FALSE;
+ if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
+ GETCHARINCTEST(c, eptr);
+ if (
+#ifdef SUPPORT_UTF8
+ c < 256 &&
+#endif
+ (md->ctypes[c] & ctype_space) != 0
+ )
+ RRETURN(MATCH_NOMATCH);
ecode++;
break;
case OP_WHITESPACE:
- if (eptr >= md->end_subject ||
- (md->ctypes[*eptr++] & ctype_space) == 0)
- return FALSE;
+ if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
+ GETCHARINCTEST(c, eptr);
+ if (
+#ifdef SUPPORT_UTF8
+ c >= 256 ||
+#endif
+ (md->ctypes[c] & ctype_space) == 0
+ )
+ RRETURN(MATCH_NOMATCH);
ecode++;
break;
case OP_NOT_WORDCHAR:
- if (eptr >= md->end_subject ||
- (md->ctypes[*eptr++] & ctype_word) != 0)
- return FALSE;
+ if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
+ GETCHARINCTEST(c, eptr);
+ if (
+#ifdef SUPPORT_UTF8
+ c < 256 &&
+#endif
+ (md->ctypes[c] & ctype_word) != 0
+ )
+ RRETURN(MATCH_NOMATCH);
ecode++;
break;
case OP_WORDCHAR:
- if (eptr >= md->end_subject ||
- (md->ctypes[*eptr++] & ctype_word) == 0)
- return FALSE;
+ if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
+ GETCHARINCTEST(c, eptr);
+ if (
+#ifdef SUPPORT_UTF8
+ c >= 256 ||
+#endif
+ (md->ctypes[c] & ctype_word) == 0
+ )
+ RRETURN(MATCH_NOMATCH);
ecode++;
break;
+#ifdef SUPPORT_UCP
+ /* Check the next character by Unicode property. We will get here only
+ if the support is in the binary; otherwise a compile-time error occurs. */
+
+ case OP_PROP:
+ case OP_NOTPROP:
+ if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
+ GETCHARINCTEST(c, eptr);
+ {
+ int chartype, rqdtype;
+ int othercase;
+ int category = ucp_findchar(c, &chartype, &othercase);
+
+ rqdtype = *(++ecode);
+ ecode++;
+
+ if (rqdtype >= 128)
+ {
+ if ((rqdtype - 128 != category) == (op == OP_PROP))
+ RRETURN(MATCH_NOMATCH);
+ }
+ else
+ {
+ if ((rqdtype != chartype) == (op == OP_PROP))
+ RRETURN(MATCH_NOMATCH);
+ }
+ }
+ break;
+
+ /* Match an extended Unicode sequence. We will get here only if the support
+ is in the binary; otherwise a compile-time error occurs. */
+
+ case OP_EXTUNI:
+ if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
+ GETCHARINCTEST(c, eptr);
+ {
+ int chartype;
+ int othercase;
+ int category = ucp_findchar(c, &chartype, &othercase);
+ if (category == ucp_M) RRETURN(MATCH_NOMATCH);
+ while (eptr < md->end_subject)
+ {
+ int len = 1;
+ if (!md->utf8) c = *eptr; else
+ {
+ GETCHARLEN(c, eptr, len);
+ }
+ category = ucp_findchar(c, &chartype, &othercase);
+ if (category != ucp_M) break;
+ eptr += len;
+ }
+ }
+ ecode++;
+ break;
+#endif
+
+
/* Match a back reference, possibly repeatedly. Look past the end of the
item to see if there is repeat information following. The code is similar
to that for character classes, but repeated for efficiency. Then obey
@@ -4073,9 +7002,8 @@ for (;;)
case OP_REF:
{
- int length;
- int offset = (ecode[1] << 9) | (ecode[2] << 1); /* Doubled ref number */
- ecode += 3; /* Advance past item */
+ offset = GET2(ecode, 1) << 1; /* Doubled ref number */
+ ecode += 3; /* Advance past item */
/* If the reference is unset, set the length to be longer than the amount
of subject left; this ensures that every attempt at a match fails. We
@@ -4106,14 +7034,14 @@ for (;;)
case OP_CRRANGE:
case OP_CRMINRANGE:
minimize = (*ecode == OP_CRMINRANGE);
- min = (ecode[1] << 8) + ecode[2];
- max = (ecode[3] << 8) + ecode[4];
+ min = GET2(ecode, 1);
+ max = GET2(ecode, 3);
if (max == 0) max = INT_MAX;
ecode += 5;
break;
default: /* No repeat follows */
- if (!match_ref(offset, eptr, length, md, ims)) return FALSE;
+ if (!match_ref(offset, eptr, length, md, ims)) RRETURN(MATCH_NOMATCH);
eptr += length;
continue; /* With the main loop */
}
@@ -4129,7 +7057,7 @@ for (;;)
for (i = 1; i <= min; i++)
{
- if (!match_ref(offset, eptr, length, md, ims)) return FALSE;
+ if (!match_ref(offset, eptr, length, md, ims)) RRETURN(MATCH_NOMATCH);
eptr += length;
}
@@ -4142,12 +7070,12 @@ for (;;)
if (minimize)
{
- for (i = min;; i++)
+ for (fi = min;; fi++)
{
- if (match(eptr, ecode, offset_top, md, ims, eptrb, 0))
- return TRUE;
- if (i >= max || !match_ref(offset, eptr, length, md, ims))
- return FALSE;
+ RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (fi >= max || !match_ref(offset, eptr, length, md, ims))
+ RRETURN(MATCH_NOMATCH);
eptr += length;
}
/* Control never gets here */
@@ -4157,7 +7085,7 @@ for (;;)
else
{
- const uschar *pp = eptr;
+ pp = eptr;
for (i = min; i < max; i++)
{
if (!match_ref(offset, eptr, length, md, ims)) break;
@@ -4165,24 +7093,32 @@ for (;;)
}
while (eptr >= pp)
{
- if (match(eptr, ecode, offset_top, md, ims, eptrb, 0))
- return TRUE;
+ RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
eptr -= length;
}
- return FALSE;
+ RRETURN(MATCH_NOMATCH);
}
}
/* Control never gets here */
- /* Match a character class, possibly repeatedly. Look past the end of the
- item to see if there is repeat information following. Then obey similar
- code to character type repeats - written out again for speed. */
+ /* Match a bit-mapped character class, possibly repeatedly. This op code is
+ used when all the characters in the class have values in the range 0-255,
+ and either the matching is caseful, or the characters are in the range
+ 0-127 when UTF-8 processing is enabled. The only difference between
+ OP_CLASS and OP_NCLASS occurs when a data character outside the range is
+ encountered.
+
+ First, look past the end of the item to see if there is repeat information
+ following. Then obey similar code to character type repeats - written out
+ again for speed. */
+ case OP_NCLASS:
case OP_CLASS:
{
- const uschar *data = ecode + 1; /* Save for matching */
+ data = ecode + 1; /* Save for matching */
ecode += 33; /* Advance past the item */
switch (*ecode)
@@ -4203,8 +7139,8 @@ for (;;)
case OP_CRRANGE:
case OP_CRMINRANGE:
minimize = (*ecode == OP_CRMINRANGE);
- min = (ecode[1] << 8) + ecode[2];
- max = (ecode[3] << 8) + ecode[4];
+ min = GET2(ecode, 1);
+ max = GET2(ecode, 3);
if (max == 0) max = INT_MAX;
ecode += 5;
break;
@@ -4216,18 +7152,34 @@ for (;;)
/* First, ensure the minimum number of matches are present. */
- for (i = 1; i <= min; i++)
- {
- if (eptr >= md->end_subject) return FALSE;
- GETCHARINC(c, eptr) /* Get character; increment eptr */
-
#ifdef SUPPORT_UTF8
- /* We do not yet support class members > 255 */
- if (c > 255) return FALSE;
+ /* UTF-8 mode */
+ if (md->utf8)
+ {
+ for (i = 1; i <= min; i++)
+ {
+ if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
+ GETCHARINC(c, eptr);
+ if (c > 255)
+ {
+ if (op == OP_CLASS) RRETURN(MATCH_NOMATCH);
+ }
+ else
+ {
+ if ((data[c/8] & (1 << (c&7))) == 0) RRETURN(MATCH_NOMATCH);
+ }
+ }
+ }
+ else
#endif
-
- if ((data[c/8] & (1 << (c&7))) != 0) continue;
- return FALSE;
+ /* Not UTF-8 mode */
+ {
+ for (i = 1; i <= min; i++)
+ {
+ if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
+ c = *eptr++;
+ if ((data[c/8] & (1 << (c&7))) == 0) RRETURN(MATCH_NOMATCH);
+ }
}
/* If max == min we can continue with the main loop without the
@@ -4240,19 +7192,164 @@ for (;;)
if (minimize)
{
- for (i = min;; i++)
+#ifdef SUPPORT_UTF8
+ /* UTF-8 mode */
+ if (md->utf8)
+ {
+ for (fi = min;; fi++)
+ {
+ RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (fi >= max || eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
+ GETCHARINC(c, eptr);
+ if (c > 255)
+ {
+ if (op == OP_CLASS) RRETURN(MATCH_NOMATCH);
+ }
+ else
+ {
+ if ((data[c/8] & (1 << (c&7))) == 0) RRETURN(MATCH_NOMATCH);
+ }
+ }
+ }
+ else
+#endif
+ /* Not UTF-8 mode */
{
- if (match(eptr, ecode, offset_top, md, ims, eptrb, 0))
- return TRUE;
- if (i >= max || eptr >= md->end_subject) return FALSE;
- GETCHARINC(c, eptr) /* Get character; increment eptr */
+ for (fi = min;; fi++)
+ {
+ RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (fi >= max || eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
+ c = *eptr++;
+ if ((data[c/8] & (1 << (c&7))) == 0) RRETURN(MATCH_NOMATCH);
+ }
+ }
+ /* Control never gets here */
+ }
+
+ /* If maximizing, find the longest possible run, then work backwards. */
+
+ else
+ {
+ pp = eptr;
#ifdef SUPPORT_UTF8
- /* We do not yet support class members > 255 */
- if (c > 255) return FALSE;
+ /* UTF-8 mode */
+ if (md->utf8)
+ {
+ for (i = min; i < max; i++)
+ {
+ int len = 1;
+ if (eptr >= md->end_subject) break;
+ GETCHARLEN(c, eptr, len);
+ if (c > 255)
+ {
+ if (op == OP_CLASS) break;
+ }
+ else
+ {
+ if ((data[c/8] & (1 << (c&7))) == 0) break;
+ }
+ eptr += len;
+ }
+ for (;;)
+ {
+ RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (eptr-- == pp) break; /* Stop if tried at original pos */
+ BACKCHAR(eptr);
+ }
+ }
+ else
#endif
- if ((data[c/8] & (1 << (c&7))) != 0) continue;
- return FALSE;
+ /* Not UTF-8 mode */
+ {
+ for (i = min; i < max; i++)
+ {
+ if (eptr >= md->end_subject) break;
+ c = *eptr;
+ if ((data[c/8] & (1 << (c&7))) == 0) break;
+ eptr++;
+ }
+ while (eptr >= pp)
+ {
+ RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0);
+ eptr--;
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ }
+ }
+
+ RRETURN(MATCH_NOMATCH);
+ }
+ }
+ /* Control never gets here */
+
+
+ /* Match an extended character class. This opcode is encountered only
+ in UTF-8 mode, because that's the only time it is compiled. */
+
+#ifdef SUPPORT_UTF8
+ case OP_XCLASS:
+ {
+ data = ecode + 1 + LINK_SIZE; /* Save for matching */
+ ecode += GET(ecode, 1); /* Advance past the item */
+
+ switch (*ecode)
+ {
+ case OP_CRSTAR:
+ case OP_CRMINSTAR:
+ case OP_CRPLUS:
+ case OP_CRMINPLUS:
+ case OP_CRQUERY:
+ case OP_CRMINQUERY:
+ c = *ecode++ - OP_CRSTAR;
+ minimize = (c & 1) != 0;
+ min = rep_min[c]; /* Pick up values from tables; */
+ max = rep_max[c]; /* zero for max => infinity */
+ if (max == 0) max = INT_MAX;
+ break;
+
+ case OP_CRRANGE:
+ case OP_CRMINRANGE:
+ minimize = (*ecode == OP_CRMINRANGE);
+ min = GET2(ecode, 1);
+ max = GET2(ecode, 3);
+ if (max == 0) max = INT_MAX;
+ ecode += 5;
+ break;
+
+ default: /* No repeat follows */
+ min = max = 1;
+ break;
+ }
+
+ /* First, ensure the minimum number of matches are present. */
+
+ for (i = 1; i <= min; i++)
+ {
+ if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
+ GETCHARINC(c, eptr);
+ if (!match_xclass(c, data)) RRETURN(MATCH_NOMATCH);
+ }
+
+ /* If max == min we can continue with the main loop without the
+ need to recurse. */
+
+ if (min == max) continue;
+
+ /* If minimizing, keep testing the rest of the expression and advancing
+ the pointer while it matches the class. */
+
+ if (minimize)
+ {
+ for (fi = min;; fi++)
+ {
+ RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (fi >= max || eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
+ GETCHARINC(c, eptr);
+ if (!match_xclass(c, data)) RRETURN(MATCH_NOMATCH);
}
/* Control never gets here */
}
@@ -4261,80 +7358,118 @@ for (;;)
else
{
- const uschar *pp = eptr;
- int len = 1;
+ pp = eptr;
for (i = min; i < max; i++)
{
+ int len = 1;
if (eptr >= md->end_subject) break;
- GETCHARLEN(c, eptr, len) /* Get character, set length if UTF-8 */
-
-#ifdef SUPPORT_UTF8
- /* We do not yet support class members > 255 */
- if (c > 255) break;
-#endif
- if ((data[c/8] & (1 << (c&7))) == 0) break;
+ GETCHARLEN(c, eptr, len);
+ if (!match_xclass(c, data)) break;
eptr += len;
}
-
- while (eptr >= pp)
+ for(;;)
{
- if (match(eptr--, ecode, offset_top, md, ims, eptrb, 0))
- return TRUE;
-
-#ifdef SUPPORT_UTF8
+ RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (eptr-- == pp) break; /* Stop if tried at original pos */
BACKCHAR(eptr)
-#endif
}
- return FALSE;
+ RRETURN(MATCH_NOMATCH);
}
+
+ /* Control never gets here */
}
- /* Control never gets here */
+#endif /* End of XCLASS */
- /* Match a run of characters */
+ /* Match a single character, casefully */
+
+ case OP_CHAR:
+#ifdef SUPPORT_UTF8
+ if (md->utf8)
+ {
+ length = 1;
+ ecode++;
+ GETCHARLEN(fc, ecode, length);
+ if (length > md->end_subject - eptr) RRETURN(MATCH_NOMATCH);
+ while (length-- > 0) if (*ecode++ != *eptr++) RRETURN(MATCH_NOMATCH);
+ }
+ else
+#endif
- case OP_CHARS:
+ /* Non-UTF-8 mode */
{
- register int length = ecode[1];
+ if (md->end_subject - eptr < 1) RRETURN(MATCH_NOMATCH);
+ if (ecode[1] != *eptr++) RRETURN(MATCH_NOMATCH);
ecode += 2;
+ }
+ break;
-#ifdef DEBUG /* Sigh. Some compilers never learn. */
- if (eptr >= md->end_subject)
- printf("matching subject <null> against pattern ");
- else
- {
- printf("matching subject ");
- pchars(eptr, length, TRUE, md);
- printf(" against pattern ");
- }
- pchars(ecode, length, FALSE, md);
- printf("\n");
-#endif
+ /* Match a single character, caselessly */
- if (length > md->end_subject - eptr) return FALSE;
- if ((ims & PCRE_CASELESS) != 0)
+ case OP_CHARNC:
+#ifdef SUPPORT_UTF8
+ if (md->utf8)
+ {
+ length = 1;
+ ecode++;
+ GETCHARLEN(fc, ecode, length);
+
+ if (length > md->end_subject - eptr) RRETURN(MATCH_NOMATCH);
+
+ /* If the pattern character's value is < 128, we have only one byte, and
+ can use the fast lookup table. */
+
+ if (fc < 128)
{
- while (length-- > 0)
- if (md->lcc[*ecode++] != md->lcc[*eptr++])
- return FALSE;
+ if (md->lcc[*ecode++] != md->lcc[*eptr++]) RRETURN(MATCH_NOMATCH);
}
+
+ /* Otherwise we must pick up the subject character */
+
else
{
- while (length-- > 0) if (*ecode++ != *eptr++) return FALSE;
+ int dc;
+ GETCHARINC(dc, eptr);
+ ecode += length;
+
+ /* If we have Unicode property support, we can use it to test the other
+ case of the character, if there is one. The result of ucp_findchar() is
+ < 0 if the char isn't found, and othercase is returned as zero if there
+ isn't one. */
+
+ if (fc != dc)
+ {
+#ifdef SUPPORT_UCP
+ int chartype;
+ int othercase;
+ if (ucp_findchar(fc, &chartype, &othercase) < 0 || dc != othercase)
+#endif
+ RRETURN(MATCH_NOMATCH);
+ }
}
}
+ else
+#endif /* SUPPORT_UTF8 */
+
+ /* Non-UTF-8 mode */
+ {
+ if (md->end_subject - eptr < 1) RRETURN(MATCH_NOMATCH);
+ if (md->lcc[ecode[1]] != md->lcc[*eptr++]) RRETURN(MATCH_NOMATCH);
+ ecode += 2;
+ }
break;
/* Match a single character repeatedly; different opcodes share code. */
case OP_EXACT:
- min = max = (ecode[1] << 8) + ecode[2];
+ min = max = GET2(ecode, 1);
ecode += 3;
goto REPEATCHAR;
case OP_UPTO:
case OP_MINUPTO:
min = 0;
- max = (ecode[1] << 8) + ecode[2];
+ max = GET2(ecode, 1);
minimize = *ecode == OP_MINUPTO;
ecode += 3;
goto REPEATCHAR;
@@ -4356,116 +7491,224 @@ for (;;)
the subject. */
REPEATCHAR:
- if (min > md->end_subject - eptr) return FALSE;
- c = *ecode++;
+#ifdef SUPPORT_UTF8
+ if (md->utf8)
+ {
+ length = 1;
+ charptr = ecode;
+ GETCHARLEN(fc, ecode, length);
+ if (min * length > md->end_subject - eptr) RRETURN(MATCH_NOMATCH);
+ ecode += length;
- /* The code is duplicated for the caseless and caseful cases, for speed,
- since matching characters is likely to be quite common. First, ensure the
- minimum number of matches are present. If min = max, continue at the same
- level without recursing. Otherwise, if minimizing, keep trying the rest of
- the expression and advancing one matching character if failing, up to the
- maximum. Alternatively, if maximizing, find the maximum number of
- characters and work backwards. */
+ /* Handle multibyte character matching specially here. There is
+ support for caseless matching if UCP support is present. */
+
+ if (length > 1)
+ {
+ int oclength = 0;
+ uschar occhars[8];
+
+#ifdef SUPPORT_UCP
+ int othercase;
+ int chartype;
+ if ((ims & PCRE_CASELESS) != 0 &&
+ ucp_findchar(fc, &chartype, &othercase) >= 0 &&
+ othercase > 0)
+ oclength = ord2utf8(othercase, occhars);
+#endif /* SUPPORT_UCP */
+
+ for (i = 1; i <= min; i++)
+ {
+ if (memcmp(eptr, charptr, length) == 0) eptr += length;
+ /* Need braces because of following else */
+ else if (oclength == 0) { RRETURN(MATCH_NOMATCH); }
+ else
+ {
+ if (memcmp(eptr, occhars, oclength) != 0) RRETURN(MATCH_NOMATCH);
+ eptr += oclength;
+ }
+ }
+
+ if (min == max) continue;
+
+ if (minimize)
+ {
+ for (fi = min;; fi++)
+ {
+ RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (fi >= max || eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
+ if (memcmp(eptr, charptr, length) == 0) eptr += length;
+ /* Need braces because of following else */
+ else if (oclength == 0) { RRETURN(MATCH_NOMATCH); }
+ else
+ {
+ if (memcmp(eptr, occhars, oclength) != 0) RRETURN(MATCH_NOMATCH);
+ eptr += oclength;
+ }
+ }
+ /* Control never gets here */
+ }
+ else
+ {
+ pp = eptr;
+ for (i = min; i < max; i++)
+ {
+ if (eptr > md->end_subject - length) break;
+ if (memcmp(eptr, charptr, length) == 0) eptr += length;
+ else if (oclength == 0) break;
+ else
+ {
+ if (memcmp(eptr, occhars, oclength) != 0) break;
+ eptr += oclength;
+ }
+ }
+ while (eptr >= pp)
+ {
+ RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ eptr -= length;
+ }
+ RRETURN(MATCH_NOMATCH);
+ }
+ /* Control never gets here */
+ }
- DPRINTF(("matching %c{%d,%d} against subject %.*s\n", c, min, max,
+ /* If the length of a UTF-8 character is 1, we fall through here, and
+ obey the code as for non-UTF-8 characters below, though in this case the
+ value of fc will always be < 128. */
+ }
+ else
+#endif /* SUPPORT_UTF8 */
+
+ /* When not in UTF-8 mode, load a single-byte character. */
+ {
+ if (min > md->end_subject - eptr) RRETURN(MATCH_NOMATCH);
+ fc = *ecode++;
+ }
+
+ /* The value of fc at this point is always less than 256, though we may or
+ may not be in UTF-8 mode. The code is duplicated for the caseless and
+ caseful cases, for speed, since matching characters is likely to be quite
+ common. First, ensure the minimum number of matches are present. If min =
+ max, continue at the same level without recursing. Otherwise, if
+ minimizing, keep trying the rest of the expression and advancing one
+ matching character if failing, up to the maximum. Alternatively, if
+ maximizing, find the maximum number of characters and work backwards. */
+
+ DPRINTF(("matching %c{%d,%d} against subject %.*s\n", fc, min, max,
max, eptr));
if ((ims & PCRE_CASELESS) != 0)
{
- c = md->lcc[c];
+ fc = md->lcc[fc];
for (i = 1; i <= min; i++)
- if (c != md->lcc[*eptr++]) return FALSE;
+ if (fc != md->lcc[*eptr++]) RRETURN(MATCH_NOMATCH);
if (min == max) continue;
if (minimize)
{
- for (i = min;; i++)
+ for (fi = min;; fi++)
{
- if (match(eptr, ecode, offset_top, md, ims, eptrb, 0))
- return TRUE;
- if (i >= max || eptr >= md->end_subject ||
- c != md->lcc[*eptr++])
- return FALSE;
+ RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (fi >= max || eptr >= md->end_subject ||
+ fc != md->lcc[*eptr++])
+ RRETURN(MATCH_NOMATCH);
}
/* Control never gets here */
}
else
{
- const uschar *pp = eptr;
+ pp = eptr;
for (i = min; i < max; i++)
{
- if (eptr >= md->end_subject || c != md->lcc[*eptr]) break;
+ if (eptr >= md->end_subject || fc != md->lcc[*eptr]) break;
eptr++;
}
while (eptr >= pp)
- if (match(eptr--, ecode, offset_top, md, ims, eptrb, 0))
- return TRUE;
- return FALSE;
+ {
+ RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0);
+ eptr--;
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ }
+ RRETURN(MATCH_NOMATCH);
}
/* Control never gets here */
}
- /* Caseful comparisons */
+ /* Caseful comparisons (includes all multi-byte characters) */
else
{
- for (i = 1; i <= min; i++) if (c != *eptr++) return FALSE;
+ for (i = 1; i <= min; i++) if (fc != *eptr++) RRETURN(MATCH_NOMATCH);
if (min == max) continue;
if (minimize)
{
- for (i = min;; i++)
+ for (fi = min;; fi++)
{
- if (match(eptr, ecode, offset_top, md, ims, eptrb, 0))
- return TRUE;
- if (i >= max || eptr >= md->end_subject || c != *eptr++) return FALSE;
+ RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (fi >= max || eptr >= md->end_subject || fc != *eptr++)
+ RRETURN(MATCH_NOMATCH);
}
/* Control never gets here */
}
else
{
- const uschar *pp = eptr;
+ pp = eptr;
for (i = min; i < max; i++)
{
- if (eptr >= md->end_subject || c != *eptr) break;
+ if (eptr >= md->end_subject || fc != *eptr) break;
eptr++;
}
while (eptr >= pp)
- if (match(eptr--, ecode, offset_top, md, ims, eptrb, 0))
- return TRUE;
- return FALSE;
+ {
+ RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0);
+ eptr--;
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ }
+ RRETURN(MATCH_NOMATCH);
}
}
/* Control never gets here */
- /* Match a negated single character */
+ /* Match a negated single one-byte character. The character we are
+ checking can be multibyte. */
case OP_NOT:
- if (eptr >= md->end_subject) return FALSE;
+ if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
ecode++;
+ GETCHARINCTEST(c, eptr);
if ((ims & PCRE_CASELESS) != 0)
{
- if (md->lcc[*ecode++] == md->lcc[*eptr++]) return FALSE;
+#ifdef SUPPORT_UTF8
+ if (c < 256)
+#endif
+ c = md->lcc[c];
+ if (md->lcc[*ecode++] == c) RRETURN(MATCH_NOMATCH);
}
else
{
- if (*ecode++ == *eptr++) return FALSE;
+ if (*ecode++ == c) RRETURN(MATCH_NOMATCH);
}
break;
- /* Match a negated single character repeatedly. This is almost a repeat of
- the code for a repeated single character, but I haven't found a nice way of
- commoning these up that doesn't require a test of the positive/negative
- option for each character match. Maybe that wouldn't add very much to the
- time taken, but character matching *is* what this is all about... */
+ /* Match a negated single one-byte character repeatedly. This is almost a
+ repeat of the code for a repeated single character, but I haven't found a
+ nice way of commoning these up that doesn't require a test of the
+ positive/negative option for each character match. Maybe that wouldn't add
+ very much to the time taken, but character matching *is* what this is all
+ about... */
case OP_NOTEXACT:
- min = max = (ecode[1] << 8) + ecode[2];
+ min = max = GET2(ecode, 1);
ecode += 3;
goto REPEATNOTCHAR;
case OP_NOTUPTO:
case OP_NOTMINUPTO:
min = 0;
- max = (ecode[1] << 8) + ecode[2];
+ max = GET2(ecode, 1);
minimize = *ecode == OP_NOTMINUPTO;
ecode += 3;
goto REPEATNOTCHAR;
@@ -4482,13 +7725,13 @@ for (;;)
max = rep_max[c]; /* zero for max => infinity */
if (max == 0) max = INT_MAX;
- /* Common code for all repeated single-character matches. We can give
- up quickly if there are fewer than the minimum number of characters left in
- the subject. */
+ /* Common code for all repeated single-byte matches. We can give up quickly
+ if there are fewer than the minimum number of bytes left in the
+ subject. */
REPEATNOTCHAR:
- if (min > md->end_subject - eptr) return FALSE;
- c = *ecode++;
+ if (min > md->end_subject - eptr) RRETURN(MATCH_NOMATCH);
+ fc = *ecode++;
/* The code is duplicated for the caseless and caseful cases, for speed,
since matching characters is likely to be quite common. First, ensure the
@@ -4498,39 +7741,114 @@ for (;;)
maximum. Alternatively, if maximizing, find the maximum number of
characters and work backwards. */
- DPRINTF(("negative matching %c{%d,%d} against subject %.*s\n", c, min, max,
+ DPRINTF(("negative matching %c{%d,%d} against subject %.*s\n", fc, min, max,
max, eptr));
if ((ims & PCRE_CASELESS) != 0)
{
- c = md->lcc[c];
- for (i = 1; i <= min; i++)
- if (c == md->lcc[*eptr++]) return FALSE;
+ fc = md->lcc[fc];
+
+#ifdef SUPPORT_UTF8
+ /* UTF-8 mode */
+ if (md->utf8)
+ {
+ register int d;
+ for (i = 1; i <= min; i++)
+ {
+ GETCHARINC(d, eptr);
+ if (d < 256) d = md->lcc[d];
+ if (fc == d) RRETURN(MATCH_NOMATCH);
+ }
+ }
+ else
+#endif
+
+ /* Not UTF-8 mode */
+ {
+ for (i = 1; i <= min; i++)
+ if (fc == md->lcc[*eptr++]) RRETURN(MATCH_NOMATCH);
+ }
+
if (min == max) continue;
+
if (minimize)
{
- for (i = min;; i++)
+#ifdef SUPPORT_UTF8
+ /* UTF-8 mode */
+ if (md->utf8)
+ {
+ register int d;
+ for (fi = min;; fi++)
+ {
+ RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ GETCHARINC(d, eptr);
+ if (d < 256) d = md->lcc[d];
+ if (fi >= max || eptr >= md->end_subject || fc == d)
+ RRETURN(MATCH_NOMATCH);
+ }
+ }
+ else
+#endif
+ /* Not UTF-8 mode */
{
- if (match(eptr, ecode, offset_top, md, ims, eptrb, 0))
- return TRUE;
- if (i >= max || eptr >= md->end_subject ||
- c == md->lcc[*eptr++])
- return FALSE;
+ for (fi = min;; fi++)
+ {
+ RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (fi >= max || eptr >= md->end_subject || fc == md->lcc[*eptr++])
+ RRETURN(MATCH_NOMATCH);
+ }
}
/* Control never gets here */
}
+
+ /* Maximize case */
+
else
{
- const uschar *pp = eptr;
- for (i = min; i < max; i++)
+ pp = eptr;
+
+#ifdef SUPPORT_UTF8
+ /* UTF-8 mode */
+ if (md->utf8)
{
- if (eptr >= md->end_subject || c == md->lcc[*eptr]) break;
- eptr++;
+ register int d;
+ for (i = min; i < max; i++)
+ {
+ int len = 1;
+ if (eptr >= md->end_subject) break;
+ GETCHARLEN(d, eptr, len);
+ if (d < 256) d = md->lcc[d];
+ if (fc == d) break;
+ eptr += len;
+ }
+ for(;;)
+ {
+ RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (eptr-- == pp) break; /* Stop if tried at original pos */
+ BACKCHAR(eptr);
+ }
}
- while (eptr >= pp)
- if (match(eptr--, ecode, offset_top, md, ims, eptrb, 0))
- return TRUE;
- return FALSE;
+ else
+#endif
+ /* Not UTF-8 mode */
+ {
+ for (i = min; i < max; i++)
+ {
+ if (eptr >= md->end_subject || fc == md->lcc[*eptr]) break;
+ eptr++;
+ }
+ while (eptr >= pp)
+ {
+ RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ eptr--;
+ }
+ }
+
+ RRETURN(MATCH_NOMATCH);
}
/* Control never gets here */
}
@@ -4539,30 +7857,103 @@ for (;;)
else
{
- for (i = 1; i <= min; i++) if (c == *eptr++) return FALSE;
+#ifdef SUPPORT_UTF8
+ /* UTF-8 mode */
+ if (md->utf8)
+ {
+ register int d;
+ for (i = 1; i <= min; i++)
+ {
+ GETCHARINC(d, eptr);
+ if (fc == d) RRETURN(MATCH_NOMATCH);
+ }
+ }
+ else
+#endif
+ /* Not UTF-8 mode */
+ {
+ for (i = 1; i <= min; i++)
+ if (fc == *eptr++) RRETURN(MATCH_NOMATCH);
+ }
+
if (min == max) continue;
+
if (minimize)
{
- for (i = min;; i++)
+#ifdef SUPPORT_UTF8
+ /* UTF-8 mode */
+ if (md->utf8)
+ {
+ register int d;
+ for (fi = min;; fi++)
+ {
+ RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ GETCHARINC(d, eptr);
+ if (fi >= max || eptr >= md->end_subject || fc == d)
+ RRETURN(MATCH_NOMATCH);
+ }
+ }
+ else
+#endif
+ /* Not UTF-8 mode */
{
- if (match(eptr, ecode, offset_top, md, ims, eptrb, 0))
- return TRUE;
- if (i >= max || eptr >= md->end_subject || c == *eptr++) return FALSE;
+ for (fi = min;; fi++)
+ {
+ RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (fi >= max || eptr >= md->end_subject || fc == *eptr++)
+ RRETURN(MATCH_NOMATCH);
+ }
}
/* Control never gets here */
}
+
+ /* Maximize case */
+
else
{
- const uschar *pp = eptr;
- for (i = min; i < max; i++)
+ pp = eptr;
+
+#ifdef SUPPORT_UTF8
+ /* UTF-8 mode */
+ if (md->utf8)
{
- if (eptr >= md->end_subject || c == *eptr) break;
- eptr++;
+ register int d;
+ for (i = min; i < max; i++)
+ {
+ int len = 1;
+ if (eptr >= md->end_subject) break;
+ GETCHARLEN(d, eptr, len);
+ if (fc == d) break;
+ eptr += len;
+ }
+ for(;;)
+ {
+ RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (eptr-- == pp) break; /* Stop if tried at original pos */
+ BACKCHAR(eptr);
+ }
}
- while (eptr >= pp)
- if (match(eptr--, ecode, offset_top, md, ims, eptrb, 0))
- return TRUE;
- return FALSE;
+ else
+#endif
+ /* Not UTF-8 mode */
+ {
+ for (i = min; i < max; i++)
+ {
+ if (eptr >= md->end_subject || fc == *eptr) break;
+ eptr++;
+ }
+ while (eptr >= pp)
+ {
+ RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ eptr--;
+ }
+ }
+
+ RRETURN(MATCH_NOMATCH);
}
}
/* Control never gets here */
@@ -4572,7 +7963,7 @@ for (;;)
repeat it in the interests of efficiency. */
case OP_TYPEEXACT:
- min = max = (ecode[1] << 8) + ecode[2];
+ min = max = GET2(ecode, 1);
minimize = TRUE;
ecode += 3;
goto REPEATTYPE;
@@ -4580,7 +7971,7 @@ for (;;)
case OP_TYPEUPTO:
case OP_TYPEMINUPTO:
min = 0;
- max = (ecode[1] << 8) + ecode[2];
+ max = GET2(ecode, 1);
minimize = *ecode == OP_TYPEMINUPTO;
ecode += 3;
goto REPEATTYPE;
@@ -4597,72 +7988,221 @@ for (;;)
max = rep_max[c]; /* zero for max => infinity */
if (max == 0) max = INT_MAX;
- /* Common code for all repeated single character type matches */
+ /* Common code for all repeated single character type matches. Note that
+ in UTF-8 mode, '.' matches a character of any length, but for the other
+ character types, the valid characters are all one-byte long. */
REPEATTYPE:
ctype = *ecode++; /* Code for the character type */
+#ifdef SUPPORT_UCP
+ if (ctype == OP_PROP || ctype == OP_NOTPROP)
+ {
+ prop_fail_result = ctype == OP_NOTPROP;
+ prop_type = *ecode++;
+ if (prop_type >= 128)
+ {
+ prop_test_against = prop_type - 128;
+ prop_test_variable = &prop_category;
+ }
+ else
+ {
+ prop_test_against = prop_type;
+ prop_test_variable = &prop_chartype;
+ }
+ }
+ else prop_type = -1;
+#endif
+
/* First, ensure the minimum number of matches are present. Use inline
code for maximizing the speed, and do the type test once at the start
(i.e. keep it out of the loop). Also we can test that there are at least
- the minimum number of bytes before we start, except when doing '.' in
- UTF8 mode. Leave the test in in all cases; in the special case we have
- to test after each character. */
+ the minimum number of bytes before we start. This isn't as effective in
+ UTF-8 mode, but it does no harm. Separate the UTF-8 code completely as that
+ is tidier. Also separate the UCP code, which can be the same for both UTF-8
+ and single-bytes. */
- if (min > md->end_subject - eptr) return FALSE;
- if (min > 0) switch(ctype)
+ if (min > md->end_subject - eptr) RRETURN(MATCH_NOMATCH);
+ if (min > 0)
{
- case OP_ANY:
+#ifdef SUPPORT_UCP
+ if (prop_type > 0)
+ {
+ for (i = 1; i <= min; i++)
+ {
+ GETCHARINC(c, eptr);
+ prop_category = ucp_findchar(c, &prop_chartype, &prop_othercase);
+ if ((*prop_test_variable == prop_test_against) == prop_fail_result)
+ RRETURN(MATCH_NOMATCH);
+ }
+ }
+
+ /* Match extended Unicode sequences. We will get here only if the
+ support is in the binary; otherwise a compile-time error occurs. */
+
+ else if (ctype == OP_EXTUNI)
+ {
+ for (i = 1; i <= min; i++)
+ {
+ GETCHARINCTEST(c, eptr);
+ prop_category = ucp_findchar(c, &prop_chartype, &prop_othercase);
+ if (prop_category == ucp_M) RRETURN(MATCH_NOMATCH);
+ while (eptr < md->end_subject)
+ {
+ int len = 1;
+ if (!md->utf8) c = *eptr; else
+ {
+ GETCHARLEN(c, eptr, len);
+ }
+ prop_category = ucp_findchar(c, &prop_chartype, &prop_othercase);
+ if (prop_category != ucp_M) break;
+ eptr += len;
+ }
+ }
+ }
+
+ else
+#endif /* SUPPORT_UCP */
+
+/* Handle all other cases when the coding is UTF-8 */
+
#ifdef SUPPORT_UTF8
- if (md->utf8)
+ if (md->utf8) switch(ctype)
{
+ case OP_ANY:
for (i = 1; i <= min; i++)
{
if (eptr >= md->end_subject ||
(*eptr++ == NEWLINE && (ims & PCRE_DOTALL) == 0))
- return FALSE;
+ RRETURN(MATCH_NOMATCH);
while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++;
}
break;
- }
-#endif
- /* Non-UTF8 can be faster */
- if ((ims & PCRE_DOTALL) == 0)
- { for (i = 1; i <= min; i++) if (*eptr++ == NEWLINE) return FALSE; }
- else eptr += min;
- break;
- case OP_NOT_DIGIT:
- for (i = 1; i <= min; i++)
- if ((md->ctypes[*eptr++] & ctype_digit) != 0) return FALSE;
- break;
+ case OP_ANYBYTE:
+ eptr += min;
+ break;
- case OP_DIGIT:
- for (i = 1; i <= min; i++)
- if ((md->ctypes[*eptr++] & ctype_digit) == 0) return FALSE;
- break;
+ case OP_NOT_DIGIT:
+ for (i = 1; i <= min; i++)
+ {
+ if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
+ GETCHARINC(c, eptr);
+ if (c < 128 && (md->ctypes[c] & ctype_digit) != 0)
+ RRETURN(MATCH_NOMATCH);
+ }
+ break;
- case OP_NOT_WHITESPACE:
- for (i = 1; i <= min; i++)
- if ((md->ctypes[*eptr++] & ctype_space) != 0) return FALSE;
- break;
+ case OP_DIGIT:
+ for (i = 1; i <= min; i++)
+ {
+ if (eptr >= md->end_subject ||
+ *eptr >= 128 || (md->ctypes[*eptr++] & ctype_digit) == 0)
+ RRETURN(MATCH_NOMATCH);
+ /* No need to skip more bytes - we know it's a 1-byte character */
+ }
+ break;
- case OP_WHITESPACE:
- for (i = 1; i <= min; i++)
- if ((md->ctypes[*eptr++] & ctype_space) == 0) return FALSE;
- break;
+ case OP_NOT_WHITESPACE:
+ for (i = 1; i <= min; i++)
+ {
+ if (eptr >= md->end_subject ||
+ (*eptr < 128 && (md->ctypes[*eptr++] & ctype_space) != 0))
+ RRETURN(MATCH_NOMATCH);
+ while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++;
+ }
+ break;
- case OP_NOT_WORDCHAR:
- for (i = 1; i <= min; i++)
- if ((md->ctypes[*eptr++] & ctype_word) != 0)
- return FALSE;
- break;
+ case OP_WHITESPACE:
+ for (i = 1; i <= min; i++)
+ {
+ if (eptr >= md->end_subject ||
+ *eptr >= 128 || (md->ctypes[*eptr++] & ctype_space) == 0)
+ RRETURN(MATCH_NOMATCH);
+ /* No need to skip more bytes - we know it's a 1-byte character */
+ }
+ break;
- case OP_WORDCHAR:
- for (i = 1; i <= min; i++)
- if ((md->ctypes[*eptr++] & ctype_word) == 0)
- return FALSE;
- break;
+ 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);
+ while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++;
+ }
+ break;
+
+ case OP_WORDCHAR:
+ for (i = 1; i <= min; i++)
+ {
+ if (eptr >= md->end_subject ||
+ *eptr >= 128 || (md->ctypes[*eptr++] & ctype_word) == 0)
+ RRETURN(MATCH_NOMATCH);
+ /* No need to skip more bytes - we know it's a 1-byte character */
+ }
+ break;
+
+ default:
+ RRETURN(PCRE_ERROR_INTERNAL);
+ } /* End switch(ctype) */
+
+ else
+#endif /* SUPPORT_UTF8 */
+
+ /* Code for the non-UTF-8 case for minimum matching of operators other
+ than OP_PROP and OP_NOTPROP. */
+
+ switch(ctype)
+ {
+ case OP_ANY:
+ if ((ims & PCRE_DOTALL) == 0)
+ {
+ for (i = 1; i <= min; i++)
+ if (*eptr++ == NEWLINE) RRETURN(MATCH_NOMATCH);
+ }
+ else eptr += min;
+ break;
+
+ case OP_ANYBYTE:
+ eptr += min;
+ break;
+
+ case OP_NOT_DIGIT:
+ for (i = 1; i <= min; i++)
+ if ((md->ctypes[*eptr++] & ctype_digit) != 0) RRETURN(MATCH_NOMATCH);
+ break;
+
+ case OP_DIGIT:
+ for (i = 1; i <= min; i++)
+ if ((md->ctypes[*eptr++] & ctype_digit) == 0) RRETURN(MATCH_NOMATCH);
+ break;
+
+ case OP_NOT_WHITESPACE:
+ for (i = 1; i <= min; i++)
+ if ((md->ctypes[*eptr++] & ctype_space) != 0) RRETURN(MATCH_NOMATCH);
+ break;
+
+ case OP_WHITESPACE:
+ for (i = 1; i <= min; i++)
+ if ((md->ctypes[*eptr++] & ctype_space) == 0) RRETURN(MATCH_NOMATCH);
+ break;
+
+ case OP_NOT_WORDCHAR:
+ for (i = 1; i <= min; i++)
+ if ((md->ctypes[*eptr++] & ctype_word) != 0)
+ RRETURN(MATCH_NOMATCH);
+ break;
+
+ case OP_WORDCHAR:
+ for (i = 1; i <= min; i++)
+ if ((md->ctypes[*eptr++] & ctype_word) == 0)
+ RRETURN(MATCH_NOMATCH);
+ break;
+
+ default:
+ RRETURN(PCRE_ERROR_INTERNAL);
+ }
}
/* If min = max, continue at the same level without recursing */
@@ -4670,180 +8210,495 @@ for (;;)
if (min == max) continue;
/* If minimizing, we have to test the rest of the pattern before each
- subsequent match. */
+ subsequent match. Again, separate the UTF-8 case for speed, and also
+ separate the UCP cases. */
if (minimize)
{
- for (i = min;; i++)
+#ifdef SUPPORT_UCP
+ if (prop_type > 0)
{
- if (match(eptr, ecode, offset_top, md, ims, eptrb, 0)) return TRUE;
- if (i >= max || eptr >= md->end_subject) return FALSE;
+ for (fi = min;; fi++)
+ {
+ RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (fi >= max || eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
+ GETCHARINC(c, eptr);
+ prop_category = ucp_findchar(c, &prop_chartype, &prop_othercase);
+ if ((*prop_test_variable == prop_test_against) == prop_fail_result)
+ RRETURN(MATCH_NOMATCH);
+ }
+ }
- c = *eptr++;
- switch(ctype)
+ /* Match extended Unicode sequences. We will get here only if the
+ support is in the binary; otherwise a compile-time error occurs. */
+
+ else if (ctype == OP_EXTUNI)
+ {
+ for (fi = min;; fi++)
{
- case OP_ANY:
- if ((ims & PCRE_DOTALL) == 0 && c == NEWLINE) return FALSE;
+ RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (fi >= max || eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
+ GETCHARINCTEST(c, eptr);
+ prop_category = ucp_findchar(c, &prop_chartype, &prop_othercase);
+ if (prop_category == ucp_M) RRETURN(MATCH_NOMATCH);
+ while (eptr < md->end_subject)
+ {
+ int len = 1;
+ if (!md->utf8) c = *eptr; else
+ {
+ GETCHARLEN(c, eptr, len);
+ }
+ prop_category = ucp_findchar(c, &prop_chartype, &prop_othercase);
+ if (prop_category != ucp_M) break;
+ eptr += len;
+ }
+ }
+ }
+
+ else
+#endif /* SUPPORT_UCP */
+
#ifdef SUPPORT_UTF8
- if (md->utf8)
- while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++;
+ /* UTF-8 mode */
+ if (md->utf8)
+ {
+ for (fi = min;; fi++)
+ {
+ RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (fi >= max || eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
+
+ GETCHARINC(c, eptr);
+ switch(ctype)
+ {
+ case OP_ANY:
+ if ((ims & PCRE_DOTALL) == 0 && c == NEWLINE) RRETURN(MATCH_NOMATCH);
+ break;
+
+ case OP_ANYBYTE:
+ break;
+
+ case OP_NOT_DIGIT:
+ if (c < 256 && (md->ctypes[c] & ctype_digit) != 0)
+ RRETURN(MATCH_NOMATCH);
+ break;
+
+ case OP_DIGIT:
+ if (c >= 256 || (md->ctypes[c] & ctype_digit) == 0)
+ RRETURN(MATCH_NOMATCH);
+ break;
+
+ case OP_NOT_WHITESPACE:
+ if (c < 256 && (md->ctypes[c] & ctype_space) != 0)
+ RRETURN(MATCH_NOMATCH);
+ break;
+
+ case OP_WHITESPACE:
+ if (c >= 256 || (md->ctypes[c] & ctype_space) == 0)
+ RRETURN(MATCH_NOMATCH);
+ break;
+
+ case OP_NOT_WORDCHAR:
+ if (c < 256 && (md->ctypes[c] & ctype_word) != 0)
+ RRETURN(MATCH_NOMATCH);
+ break;
+
+ case OP_WORDCHAR:
+ if (c >= 256 && (md->ctypes[c] & ctype_word) == 0)
+ RRETURN(MATCH_NOMATCH);
+ break;
+
+ default:
+ RRETURN(PCRE_ERROR_INTERNAL);
+ }
+ }
+ }
+ else
#endif
- break;
+ /* Not UTF-8 mode */
+ {
+ for (fi = min;; fi++)
+ {
+ RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (fi >= max || eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
+ c = *eptr++;
+ switch(ctype)
+ {
+ case OP_ANY:
+ if ((ims & PCRE_DOTALL) == 0 && c == NEWLINE) RRETURN(MATCH_NOMATCH);
+ break;
- case OP_NOT_DIGIT:
- if ((md->ctypes[c] & ctype_digit) != 0) return FALSE;
- break;
+ case OP_ANYBYTE:
+ break;
- case OP_DIGIT:
- if ((md->ctypes[c] & ctype_digit) == 0) return FALSE;
- break;
+ case OP_NOT_DIGIT:
+ if ((md->ctypes[c] & ctype_digit) != 0) RRETURN(MATCH_NOMATCH);
+ break;
- case OP_NOT_WHITESPACE:
- if ((md->ctypes[c] & ctype_space) != 0) return FALSE;
- break;
+ case OP_DIGIT:
+ if ((md->ctypes[c] & ctype_digit) == 0) RRETURN(MATCH_NOMATCH);
+ break;
- case OP_WHITESPACE:
- if ((md->ctypes[c] & ctype_space) == 0) return FALSE;
- break;
+ case OP_NOT_WHITESPACE:
+ if ((md->ctypes[c] & ctype_space) != 0) RRETURN(MATCH_NOMATCH);
+ break;
- case OP_NOT_WORDCHAR:
- if ((md->ctypes[c] & ctype_word) != 0) return FALSE;
- break;
+ case OP_WHITESPACE:
+ if ((md->ctypes[c] & ctype_space) == 0) RRETURN(MATCH_NOMATCH);
+ break;
- case OP_WORDCHAR:
- if ((md->ctypes[c] & ctype_word) == 0) return FALSE;
- break;
+ case OP_NOT_WORDCHAR:
+ if ((md->ctypes[c] & ctype_word) != 0) RRETURN(MATCH_NOMATCH);
+ break;
+
+ case OP_WORDCHAR:
+ if ((md->ctypes[c] & ctype_word) == 0) RRETURN(MATCH_NOMATCH);
+ break;
+
+ default:
+ RRETURN(PCRE_ERROR_INTERNAL);
+ }
}
}
/* Control never gets here */
}
/* If maximizing it is worth using inline code for speed, doing the type
- test once at the start (i.e. keep it out of the loop). */
+ test once at the start (i.e. keep it out of the loop). Again, keep the
+ UTF-8 and UCP stuff separate. */
else
{
- const uschar *pp = eptr;
- switch(ctype)
+ pp = eptr; /* Remember where we started */
+
+#ifdef SUPPORT_UCP
+ if (prop_type > 0)
{
- case OP_ANY:
+ for (i = min; i < max; i++)
+ {
+ int len = 1;
+ if (eptr >= md->end_subject) break;
+ GETCHARLEN(c, eptr, len);
+ prop_category = ucp_findchar(c, &prop_chartype, &prop_othercase);
+ if ((*prop_test_variable == prop_test_against) == prop_fail_result)
+ break;
+ eptr+= len;
+ }
- /* Special code is required for UTF8, but when the maximum is unlimited
- we don't need it. */
+ /* eptr is now past the end of the maximum run */
-#ifdef SUPPORT_UTF8
- if (md->utf8 && max < INT_MAX)
+ for(;;)
{
- if ((ims & PCRE_DOTALL) == 0)
+ RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (eptr-- == pp) break; /* Stop if tried at original pos */
+ BACKCHAR(eptr);
+ }
+ }
+
+ /* Match extended Unicode sequences. We will get here only if the
+ support is in the binary; otherwise a compile-time error occurs. */
+
+ else if (ctype == OP_EXTUNI)
+ {
+ for (i = min; i < max; i++)
+ {
+ if (eptr >= md->end_subject) break;
+ GETCHARINCTEST(c, eptr);
+ prop_category = ucp_findchar(c, &prop_chartype, &prop_othercase);
+ if (prop_category == ucp_M) break;
+ while (eptr < md->end_subject)
{
- for (i = min; i < max; i++)
+ int len = 1;
+ if (!md->utf8) c = *eptr; else
{
- if (eptr >= md->end_subject || *eptr++ == NEWLINE) break;
- while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++;
+ GETCHARLEN(c, eptr, len);
}
+ prop_category = ucp_findchar(c, &prop_chartype, &prop_othercase);
+ if (prop_category != ucp_M) break;
+ eptr += len;
}
- else
+ }
+
+ /* eptr is now past the end of the maximum run */
+
+ for(;;)
+ {
+ RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (eptr-- == pp) break; /* Stop if tried at original pos */
+ for (;;) /* Move back over one extended */
{
- for (i = min; i < max; i++)
+ int len = 1;
+ BACKCHAR(eptr);
+ if (!md->utf8) c = *eptr; else
{
- eptr++;
- while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++;
+ GETCHARLEN(c, eptr, len);
}
+ prop_category = ucp_findchar(c, &prop_chartype, &prop_othercase);
+ if (prop_category != ucp_M) break;
+ eptr--;
}
- break;
}
-#endif
- /* Non-UTF8 can be faster */
- if ((ims & PCRE_DOTALL) == 0)
+ }
+
+ else
+#endif /* SUPPORT_UCP */
+
+#ifdef SUPPORT_UTF8
+ /* UTF-8 mode */
+
+ if (md->utf8)
+ {
+ switch(ctype)
{
- for (i = min; i < max; i++)
+ case OP_ANY:
+
+ /* Special code is required for UTF8, but when the maximum is unlimited
+ we don't need it, so we repeat the non-UTF8 code. This is probably
+ worth it, because .* is quite a common idiom. */
+
+ if (max < INT_MAX)
{
- if (eptr >= md->end_subject || *eptr == NEWLINE) break;
- eptr++;
+ if ((ims & PCRE_DOTALL) == 0)
+ {
+ for (i = min; i < max; i++)
+ {
+ if (eptr >= md->end_subject || *eptr == NEWLINE) break;
+ eptr++;
+ while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++;
+ }
+ }
+ else
+ {
+ for (i = min; i < max; i++)
+ {
+ eptr++;
+ while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++;
+ }
+ }
}
- }
- else
- {
+
+ /* Handle unlimited UTF-8 repeat */
+
+ else
+ {
+ if ((ims & PCRE_DOTALL) == 0)
+ {
+ for (i = min; i < max; i++)
+ {
+ if (eptr >= md->end_subject || *eptr == NEWLINE) break;
+ eptr++;
+ }
+ break;
+ }
+ else
+ {
+ c = max - min;
+ if (c > md->end_subject - eptr) c = md->end_subject - eptr;
+ eptr += c;
+ }
+ }
+ break;
+
+ /* The byte case is the same as non-UTF8 */
+
+ case OP_ANYBYTE:
c = max - min;
if (c > md->end_subject - eptr) c = md->end_subject - eptr;
eptr += c;
- }
- break;
+ break;
- case OP_NOT_DIGIT:
- for (i = min; i < max; i++)
- {
- if (eptr >= md->end_subject || (md->ctypes[*eptr] & ctype_digit) != 0)
- break;
- eptr++;
- }
- break;
+ case OP_NOT_DIGIT:
+ for (i = min; i < max; i++)
+ {
+ int len = 1;
+ if (eptr >= md->end_subject) break;
+ GETCHARLEN(c, eptr, len);
+ if (c < 256 && (md->ctypes[c] & ctype_digit) != 0) break;
+ eptr+= len;
+ }
+ break;
- case OP_DIGIT:
- for (i = min; i < max; i++)
- {
- if (eptr >= md->end_subject || (md->ctypes[*eptr] & ctype_digit) == 0)
- break;
- eptr++;
- }
- break;
+ case OP_DIGIT:
+ for (i = min; i < max; i++)
+ {
+ int len = 1;
+ if (eptr >= md->end_subject) break;
+ GETCHARLEN(c, eptr, len);
+ if (c >= 256 ||(md->ctypes[c] & ctype_digit) == 0) break;
+ eptr+= len;
+ }
+ break;
- case OP_NOT_WHITESPACE:
- for (i = min; i < max; i++)
- {
- if (eptr >= md->end_subject || (md->ctypes[*eptr] & ctype_space) != 0)
- break;
- eptr++;
+ case OP_NOT_WHITESPACE:
+ for (i = min; i < max; i++)
+ {
+ int len = 1;
+ if (eptr >= md->end_subject) break;
+ GETCHARLEN(c, eptr, len);
+ if (c < 256 && (md->ctypes[c] & ctype_space) != 0) break;
+ eptr+= len;
+ }
+ break;
+
+ case OP_WHITESPACE:
+ for (i = min; i < max; i++)
+ {
+ int len = 1;
+ if (eptr >= md->end_subject) break;
+ GETCHARLEN(c, eptr, len);
+ if (c >= 256 ||(md->ctypes[c] & ctype_space) == 0) break;
+ eptr+= len;
+ }
+ break;
+
+ case OP_NOT_WORDCHAR:
+ for (i = min; i < max; i++)
+ {
+ int len = 1;
+ if (eptr >= md->end_subject) break;
+ GETCHARLEN(c, eptr, len);
+ if (c < 256 && (md->ctypes[c] & ctype_word) != 0) break;
+ eptr+= len;
+ }
+ break;
+
+ case OP_WORDCHAR:
+ for (i = min; i < max; i++)
+ {
+ int len = 1;
+ if (eptr >= md->end_subject) break;
+ GETCHARLEN(c, eptr, len);
+ if (c >= 256 || (md->ctypes[c] & ctype_word) == 0) break;
+ eptr+= len;
+ }
+ break;
+
+ default:
+ RRETURN(PCRE_ERROR_INTERNAL);
}
- break;
- case OP_WHITESPACE:
- for (i = min; i < max; i++)
+ /* eptr is now past the end of the maximum run */
+
+ for(;;)
{
- if (eptr >= md->end_subject || (md->ctypes[*eptr] & ctype_space) == 0)
- break;
- eptr++;
+ RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (eptr-- == pp) break; /* Stop if tried at original pos */
+ BACKCHAR(eptr);
}
- break;
+ }
+ else
+#endif
- case OP_NOT_WORDCHAR:
- for (i = min; i < max; i++)
+ /* Not UTF-8 mode */
+ {
+ switch(ctype)
{
- if (eptr >= md->end_subject || (md->ctypes[*eptr] & ctype_word) != 0)
+ case OP_ANY:
+ if ((ims & PCRE_DOTALL) == 0)
+ {
+ for (i = min; i < max; i++)
+ {
+ if (eptr >= md->end_subject || *eptr == NEWLINE) break;
+ eptr++;
+ }
break;
- eptr++;
+ }
+ /* For DOTALL case, fall through and treat as \C */
+
+ case OP_ANYBYTE:
+ c = max - min;
+ if (c > md->end_subject - eptr) c = md->end_subject - eptr;
+ eptr += c;
+ break;
+
+ case OP_NOT_DIGIT:
+ for (i = min; i < max; i++)
+ {
+ if (eptr >= md->end_subject || (md->ctypes[*eptr] & ctype_digit) != 0)
+ break;
+ eptr++;
+ }
+ break;
+
+ case OP_DIGIT:
+ for (i = min; i < max; i++)
+ {
+ if (eptr >= md->end_subject || (md->ctypes[*eptr] & ctype_digit) == 0)
+ break;
+ eptr++;
+ }
+ break;
+
+ case OP_NOT_WHITESPACE:
+ for (i = min; i < max; i++)
+ {
+ if (eptr >= md->end_subject || (md->ctypes[*eptr] & ctype_space) != 0)
+ break;
+ eptr++;
+ }
+ break;
+
+ case OP_WHITESPACE:
+ for (i = min; i < max; i++)
+ {
+ if (eptr >= md->end_subject || (md->ctypes[*eptr] & ctype_space) == 0)
+ break;
+ eptr++;
+ }
+ break;
+
+ case OP_NOT_WORDCHAR:
+ for (i = min; i < max; i++)
+ {
+ if (eptr >= md->end_subject || (md->ctypes[*eptr] & ctype_word) != 0)
+ break;
+ eptr++;
+ }
+ break;
+
+ case OP_WORDCHAR:
+ for (i = min; i < max; i++)
+ {
+ if (eptr >= md->end_subject || (md->ctypes[*eptr] & ctype_word) == 0)
+ break;
+ eptr++;
+ }
+ break;
+
+ default:
+ RRETURN(PCRE_ERROR_INTERNAL);
}
- break;
- case OP_WORDCHAR:
- for (i = min; i < max; i++)
+ /* eptr is now past the end of the maximum run */
+
+ while (eptr >= pp)
{
- if (eptr >= md->end_subject || (md->ctypes[*eptr] & ctype_word) == 0)
- break;
- eptr++;
+ RMATCH(rrc, eptr, ecode, offset_top, md, ims, eptrb, 0);
+ eptr--;
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
}
- break;
}
- while (eptr >= pp)
- {
- if (match(eptr--, ecode, offset_top, md, ims, eptrb, 0))
- return TRUE;
-#ifdef SUPPORT_UTF8
- if (md->utf8)
- while (eptr > pp && (*eptr & 0xc0) == 0x80) eptr--;
-#endif
- }
- return FALSE;
+ /* Get here if we can't make it match with any permitted repetitions */
+
+ RRETURN(MATCH_NOMATCH);
}
/* Control never gets here */
- /* There's been some horrible disaster. */
+ /* There's been some horrible disaster. Since all codes > OP_BRA are
+ for capturing brackets, and there shouldn't be any gaps between 0 and
+ OP_BRA, arrival here can only mean there is something seriously wrong
+ in the code above or the OP_xxx definitions. */
default:
DPRINTF(("Unknown opcode %d\n", *ecode));
- md->errorcode = PCRE_ERROR_UNKNOWN_NODE;
- return FALSE;
+ RRETURN(PCRE_ERROR_UNKNOWN_NODE);
}
/* Do not stick any code in here without much thought; it is assumed
@@ -4855,6 +8710,62 @@ for (;;)
}
+/***************************************************************************
+****************************************************************************
+ RECURSION IN THE match() FUNCTION
+
+Undefine all the macros that were defined above to handle this. */
+
+#ifdef NO_RECURSE
+#undef eptr
+#undef ecode
+#undef offset_top
+#undef ims
+#undef eptrb
+#undef flags
+
+#undef callpat
+#undef charptr
+#undef data
+#undef next
+#undef pp
+#undef prev
+#undef saved_eptr
+
+#undef new_recursive
+
+#undef cur_is_word
+#undef condition
+#undef minimize
+#undef prev_is_word
+
+#undef original_ims
+
+#undef ctype
+#undef length
+#undef max
+#undef min
+#undef number
+#undef offset
+#undef op
+#undef save_capture_last
+#undef save_offset1
+#undef save_offset2
+#undef save_offset3
+#undef stacksave
+
+#undef newptrb
+
+#endif
+
+/* These two are defined as macros in both cases */
+
+#undef fc
+#undef fi
+
+/***************************************************************************
+***************************************************************************/
+
/*************************************************
@@ -4866,8 +8777,8 @@ portions of the string if it matches. Two elements in the vector are set for
each substring: the offsets to the start and end of the substring.
Arguments:
- external_re points to the compiled expression
- external_extra points to "hints" from pcre_study() or is NULL
+ argument_re points to the compiled expression
+ extra_data points to extra data or is NULL
subject points to the subject string
length length of subject string (may contain binary zeros)
start_offset where to start in the subject string
@@ -4881,38 +8792,95 @@ Returns: > 0 => success; value is the number of elements filled in
< -1 => some kind of unexpected problem
*/
-int
-pcre_exec(const pcre *external_re, const pcre_extra *external_extra,
+EXPORT int
+pcre_exec(const pcre *argument_re, const pcre_extra *extra_data,
const char *subject, int length, int start_offset, int options, int *offsets,
int offsetcount)
{
-int resetcount, ocount;
-int first_char = -1;
-int req_char = -1;
-int req_char2 = -1;
+int rc, resetcount, ocount;
+int first_byte = -1;
+int req_byte = -1;
+int req_byte2 = -1;
unsigned long int ims = 0;
+BOOL using_temporary_offsets = FALSE;
+BOOL anchored;
+BOOL startline;
+BOOL first_byte_caseless = FALSE;
+BOOL req_byte_caseless = FALSE;
match_data match_block;
+const uschar *tables;
const uschar *start_bits = NULL;
const uschar *start_match = (const uschar *)subject + start_offset;
const uschar *end_subject;
-const uschar *req_char_ptr = start_match - 1;
-const real_pcre *re = (const real_pcre *)external_re;
-const real_pcre_extra *extra = (const real_pcre_extra *)external_extra;
-BOOL using_temporary_offsets = FALSE;
-BOOL anchored;
-BOOL startline;
+const uschar *req_byte_ptr = start_match - 1;
-if ((options & ~PUBLIC_EXEC_OPTIONS) != 0) return PCRE_ERROR_BADOPTION;
+pcre_study_data internal_study;
+const pcre_study_data *study;
+
+real_pcre internal_re;
+const real_pcre *external_re = (const real_pcre *)argument_re;
+const real_pcre *re = external_re;
+
+/* Plausibility checks */
+if ((options & ~PUBLIC_EXEC_OPTIONS) != 0) return PCRE_ERROR_BADOPTION;
if (re == NULL || subject == NULL ||
(offsets == NULL && offsetcount > 0)) return PCRE_ERROR_NULL;
-if (re->magic_number != MAGIC_NUMBER) return PCRE_ERROR_BADMAGIC;
+if (offsetcount < 0) return PCRE_ERROR_BADCOUNT;
+
+/* Fish out the optional data from the extra_data structure, first setting
+the default values. */
+
+study = NULL;
+match_block.match_limit = MATCH_LIMIT;
+match_block.callout_data = NULL;
+
+/* The table pointer is always in native byte order. */
+
+tables = external_re->tables;
+
+if (extra_data != NULL)
+ {
+ register unsigned int flags = extra_data->flags;
+ if ((flags & PCRE_EXTRA_STUDY_DATA) != 0)
+ study = (const pcre_study_data *)extra_data->study_data;
+ if ((flags & PCRE_EXTRA_MATCH_LIMIT) != 0)
+ match_block.match_limit = extra_data->match_limit;
+ if ((flags & PCRE_EXTRA_CALLOUT_DATA) != 0)
+ match_block.callout_data = extra_data->callout_data;
+ if ((flags & PCRE_EXTRA_TABLES) != 0) tables = extra_data->tables;
+ }
+
+/* If the exec call supplied NULL for tables, use the inbuilt ones. This
+is a feature that makes it possible to save compiled regex and re-use them
+in other programs later. */
+
+if (tables == NULL) tables = pcre_default_tables;
+
+/* Check that the first field in the block is the magic number. If it is not,
+test for a regex that was compiled on a host of opposite endianness. If this is
+the case, flipped values are put in internal_re and internal_study if there was
+study data too. */
+
+if (re->magic_number != MAGIC_NUMBER)
+ {
+ re = try_flipped(re, &internal_re, study, &internal_study);
+ if (re == NULL) return PCRE_ERROR_BADMAGIC;
+ if (study != NULL) study = &internal_study;
+ }
+
+/* Set up other data */
anchored = ((re->options | options) & PCRE_ANCHORED) != 0;
startline = (re->options & PCRE_STARTLINE) != 0;
-match_block.start_pattern = re->code;
+/* The code starts after the real_pcre block and the capture name table. */
+
+match_block.start_code = (const uschar *)external_re + re->name_table_offset +
+ re->name_count * re->name_entry_size;
+
match_block.start_subject = (const uschar *)subject;
+match_block.start_offset = start_offset;
match_block.end_subject = match_block.start_subject + length;
end_subject = match_block.end_subject;
@@ -4922,11 +8890,39 @@ match_block.utf8 = (re->options & PCRE_UTF8) != 0;
match_block.notbol = (options & PCRE_NOTBOL) != 0;
match_block.noteol = (options & PCRE_NOTEOL) != 0;
match_block.notempty = (options & PCRE_NOTEMPTY) != 0;
+match_block.partial = (options & PCRE_PARTIAL) != 0;
+match_block.hitend = FALSE;
+
+match_block.recursive = NULL; /* No recursion at top level */
-match_block.errorcode = PCRE_ERROR_NOMATCH; /* Default error */
+match_block.lcc = tables + lcc_offset;
+match_block.ctypes = tables + ctypes_offset;
-match_block.lcc = re->tables + lcc_offset;
-match_block.ctypes = re->tables + ctypes_offset;
+/* Partial matching is supported only for a restricted set of regexes at the
+moment. */
+
+if (match_block.partial && (re->options & PCRE_NOPARTIAL) != 0)
+ return PCRE_ERROR_BADPARTIAL;
+
+/* Check a UTF-8 string if required. Unfortunately there's no way of passing
+back the character offset. */
+
+#ifdef SUPPORT_UTF8
+if (match_block.utf8 && (options & PCRE_NO_UTF8_CHECK) == 0)
+ {
+ if (valid_utf8((uschar *)subject, length) >= 0)
+ return PCRE_ERROR_BADUTF8;
+ if (start_offset > 0 && start_offset < length)
+ {
+ int tb = ((uschar *)subject)[start_offset];
+ if (tb > 127)
+ {
+ tb &= 0xc0;
+ if (tb != 0 && tb != 0xc0) return PCRE_ERROR_BADUTF8_OFFSET;
+ }
+ }
+ }
+#endif
/* The ims options can vary during the matching as a result of the presence
of (?ims) items in the pattern. They are kept in a local variable so that
@@ -4935,7 +8931,7 @@ restoring at the exit of a group is easy. */
ims = re->options & (PCRE_CASELESS|PCRE_MULTILINE|PCRE_DOTALL);
/* If the expression has got more back references than the offsets supplied can
-hold, we get a temporary bit of working store to use during the matching.
+hold, we get a temporary chunk of working store to use during the matching.
Otherwise, we can use the vector supplied, rounding down its size to a multiple
of 3. */
@@ -4954,6 +8950,7 @@ else match_block.offset_vector = offsets;
match_block.offset_end = ocount;
match_block.offset_max = (2*ocount)/3;
match_block.offset_overflow = FALSE;
+match_block.capture_last = -1;
/* Compute the minimum number of offsets that we need to reset each time. Doing
this makes a huge difference to execution time when there aren't many brackets
@@ -4973,7 +8970,7 @@ if (match_block.offset_vector != NULL)
while (--iptr >= iend) *iptr = -1;
}
-/* Set up the first character to match, if available. The first_char value is
+/* Set up the first character to match, if available. The first_byte value is
never set for an anchored regular expression, but the anchoring may be forced
at run time, so we have to test for anchoring. The first char may be unset for
an unanchored pattern, of course. If there's no first char and the pattern was
@@ -4983,28 +8980,24 @@ if (!anchored)
{
if ((re->options & PCRE_FIRSTSET) != 0)
{
- first_char = re->first_char;
- if ((ims & PCRE_CASELESS) != 0) first_char = match_block.lcc[first_char];
+ first_byte = re->first_byte & 255;
+ if ((first_byte_caseless = ((re->first_byte & REQ_CASELESS) != 0)) == TRUE)
+ first_byte = match_block.lcc[first_byte];
}
else
- if (!startline && extra != NULL &&
- (extra->options & PCRE_STUDY_MAPPED) != 0)
- start_bits = extra->start_bits;
+ if (!startline && study != NULL &&
+ (study->options & PCRE_STUDY_MAPPED) != 0)
+ start_bits = study->start_bits;
}
/* For anchored or unanchored matches, there may be a "last known required
-character" set. If the PCRE_CASELESS is set, implying that the match starts
-caselessly, or if there are any changes of this flag within the regex, set up
-both cases of the character. Otherwise set the two values the same, which will
-avoid duplicate testing (which takes significant time). This covers the vast
-majority of cases. It will be suboptimal when the case flag changes in a regex
-and the required character in fact is caseful. */
+character" set. */
if ((re->options & PCRE_REQCHSET) != 0)
{
- req_char = re->req_char;
- req_char2 = ((re->options & (PCRE_CASELESS | PCRE_ICHANGED)) != 0)?
- (re->tables + fcc_offset)[req_char] : req_char;
+ req_byte = re->req_byte & 255;
+ req_byte_caseless = (re->req_byte & REQ_CASELESS) != 0;
+ req_byte2 = (tables + fcc_offset)[req_byte]; /* case flipped */
}
/* Loop for handling unanchored repeated matching attempts; for anchored regexs
@@ -5012,24 +9005,25 @@ the loop runs just once. */
do
{
- int rc;
- register int *iptr = match_block.offset_vector;
- register int *iend = iptr + resetcount;
-
/* Reset the maximum number of extractions we might see. */
- while (iptr < iend) *iptr++ = -1;
+ if (match_block.offset_vector != NULL)
+ {
+ register int *iptr = match_block.offset_vector;
+ register int *iend = iptr + resetcount;
+ while (iptr < iend) *iptr++ = -1;
+ }
/* Advance to a unique first char if possible */
- if (first_char >= 0)
+ if (first_byte >= 0)
{
- if ((ims & PCRE_CASELESS) != 0)
+ if (first_byte_caseless)
while (start_match < end_subject &&
- match_block.lcc[*start_match] != first_char)
+ match_block.lcc[*start_match] != first_byte)
start_match++;
else
- while (start_match < end_subject && *start_match != first_char)
+ while (start_match < end_subject && *start_match != first_byte)
start_match++;
}
@@ -5050,7 +9044,7 @@ do
{
while (start_match < end_subject)
{
- register int c = *start_match;
+ register unsigned int c = *start_match;
if ((start_bits[c/8] & (1 << (c&7))) == 0) start_match++; else break;
}
}
@@ -5061,44 +9055,46 @@ do
printf("\n");
#endif
- /* If req_char is set, we know that that character must appear in the subject
- for the match to succeed. If the first character is set, req_char must be
+ /* If req_byte is set, we know that that character must appear in the subject
+ for the match to succeed. If the first character is set, req_byte must be
later in the subject; otherwise the test starts at the match point. This
optimization can save a huge amount of backtracking in patterns with nested
- unlimited repeats that aren't going to match. We don't know what the state of
- case matching may be when this character is hit, so test for it in both its
- cases if necessary. However, the different cased versions will not be set up
- unless PCRE_CASELESS was given or the casing state changes within the regex.
- Writing separate code makes it go faster, as does using an autoincrement and
- backing off on a match. */
-
- if (req_char >= 0)
+ unlimited repeats that aren't going to match. Writing separate code for
+ cased/caseless versions makes it go faster, as does using an autoincrement
+ and backing off on a match.
+
+ HOWEVER: when the subject string is very, very long, searching to its end can
+ take a long time, and give bad performance on quite ordinary patterns. This
+ showed up when somebody was matching /^C/ on a 32-megabyte string... so we
+ don't do this when the string is sufficiently long.
+
+ ALSO: this processing is disabled when partial matching is requested.
+ */
+
+ if (req_byte >= 0 &&
+ end_subject - start_match < REQ_BYTE_MAX &&
+ !match_block.partial)
{
- register const uschar *p = start_match + ((first_char >= 0)? 1 : 0);
+ register const uschar *p = start_match + ((first_byte >= 0)? 1 : 0);
/* We don't need to repeat the search if we haven't yet reached the
place we found it at last time. */
- if (p > req_char_ptr)
+ if (p > req_byte_ptr)
{
- /* Do a single test if no case difference is set up */
-
- if (req_char == req_char2)
+ if (req_byte_caseless)
{
while (p < end_subject)
{
- if (*p++ == req_char) { p--; break; }
+ register int pp = *p++;
+ if (pp == req_byte || pp == req_byte2) { p--; break; }
}
}
-
- /* Otherwise test for either case */
-
else
{
while (p < end_subject)
{
- register int pp = *p++;
- if (pp == req_char || pp == req_char2) { p--; break; }
+ if (*p++ == req_byte) { p--; break; }
}
}
@@ -5110,7 +9106,7 @@ do
found it, so that we don't search again next time round the loop if
the start hasn't passed this character yet. */
- req_char_ptr = p;
+ req_byte_ptr = p;
}
}
@@ -5122,10 +9118,30 @@ do
if certain parts of the pattern were not used. */
match_block.start_match = start_match;
- if (!match(start_match, re->code, 2, &match_block, ims, NULL, match_isgroup))
+ match_block.match_call_count = 0;
+
+ rc = match(start_match, match_block.start_code, 2, &match_block, ims, NULL,
+ match_isgroup);
+
+ if (rc == MATCH_NOMATCH)
+ {
+ start_match++;
+#ifdef SUPPORT_UTF8
+ if (match_block.utf8)
+ while(start_match < end_subject && (*start_match & 0xc0) == 0x80)
+ start_match++;
+#endif
continue;
+ }
- /* Copy the offset information from temporary store if necessary */
+ if (rc != MATCH_MATCH)
+ {
+ DPRINTF((">>>> error: returning %d\n", rc));
+ return rc;
+ }
+
+ /* We have a match! Copy the offset information from temporary store if
+ necessary */
if (using_temporary_offsets)
{
@@ -5156,9 +9172,7 @@ do
/* This "while" is the end of the "do" above */
-while (!anchored &&
- match_block.errorcode == PCRE_ERROR_NOMATCH &&
- start_match++ < end_subject);
+while (!anchored && start_match <= end_subject);
if (using_temporary_offsets)
{
@@ -5166,9 +9180,16 @@ if (using_temporary_offsets)
(pcre_free)(match_block.offset_vector);
}
-DPRINTF((">>>> returning %d\n", match_block.errorcode));
-
-return match_block.errorcode;
+if (match_block.partial && match_block.hitend)
+ {
+ DPRINTF((">>>> returning PCRE_ERROR_PARTIAL\n"));
+ return PCRE_ERROR_PARTIAL;
+ }
+else
+ {
+ DPRINTF((">>>> returning PCRE_ERROR_NOMATCH\n"));
+ return PCRE_ERROR_NOMATCH;
+ }
}
/* End of pcre.c */
diff --git a/srclib/pcre/pcre.def b/srclib/pcre/pcre.def
index 0e8cf3f442..4f6c4bff40 100644
--- a/srclib/pcre/pcre.def
+++ b/srclib/pcre/pcre.def
@@ -8,7 +8,10 @@ pcre_copy_substring
pcre_exec
pcre_get_substring
pcre_get_substring_list
+pcre_free_substring
+pcre_free_substring_list
pcre_info
+pcre_fullinfo
pcre_maketables
pcre_study
pcre_version
diff --git a/srclib/pcre/pcre.in b/srclib/pcre/pcre.in
index ef3756905e..163cf94be2 100644
--- a/srclib/pcre/pcre.in
+++ b/srclib/pcre/pcre.in
@@ -2,7 +2,39 @@
* Perl-Compatible Regular Expressions *
*************************************************/
-/* Copyright (c) 1997-2001 University of Cambridge */
+/* In its original form, this is the .in file that is transformed by
+"configure" into pcre.h.
+
+ Copyright (c) 1997-2004 University of Cambridge
+
+-----------------------------------------------------------------------------
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------------
+*/
#ifndef _PCRE_H
#define _PCRE_H
@@ -17,13 +49,18 @@ make changes to pcre.in. */
/* Win32 uses DLL by default */
#ifdef _WIN32
-# ifdef STATIC
-# define PCRE_DL_IMPORT
-# else
-# define PCRE_DL_IMPORT __declspec(dllimport)
-# endif
-#else
-# define PCRE_DL_IMPORT
+# ifdef PCRE_DEFINITION
+# ifdef DLL_EXPORT
+# define PCRE_DATA_SCOPE __declspec(dllexport)
+# endif
+# else
+# ifndef PCRE_STATIC
+# define PCRE_DATA_SCOPE extern __declspec(dllimport)
+# endif
+# endif
+#endif
+#ifndef PCRE_DATA_SCOPE
+# define PCRE_DATA_SCOPE extern
#endif
/* Have to include stdlib.h in order to ensure that size_t is defined;
@@ -39,69 +76,158 @@ extern "C" {
/* Options */
-#define PCRE_CASELESS 0x0001
-#define PCRE_MULTILINE 0x0002
-#define PCRE_DOTALL 0x0004
-#define PCRE_EXTENDED 0x0008
-#define PCRE_ANCHORED 0x0010
-#define PCRE_DOLLAR_ENDONLY 0x0020
-#define PCRE_EXTRA 0x0040
-#define PCRE_NOTBOL 0x0080
-#define PCRE_NOTEOL 0x0100
-#define PCRE_UNGREEDY 0x0200
-#define PCRE_NOTEMPTY 0x0400
-#define PCRE_UTF8 0x0800
-
-/* Exec-time and get-time error codes */
-
-#define PCRE_ERROR_NOMATCH (-1)
-#define PCRE_ERROR_NULL (-2)
-#define PCRE_ERROR_BADOPTION (-3)
-#define PCRE_ERROR_BADMAGIC (-4)
-#define PCRE_ERROR_UNKNOWN_NODE (-5)
-#define PCRE_ERROR_NOMEMORY (-6)
-#define PCRE_ERROR_NOSUBSTRING (-7)
+#define PCRE_CASELESS 0x0001
+#define PCRE_MULTILINE 0x0002
+#define PCRE_DOTALL 0x0004
+#define PCRE_EXTENDED 0x0008
+#define PCRE_ANCHORED 0x0010
+#define PCRE_DOLLAR_ENDONLY 0x0020
+#define PCRE_EXTRA 0x0040
+#define PCRE_NOTBOL 0x0080
+#define PCRE_NOTEOL 0x0100
+#define PCRE_UNGREEDY 0x0200
+#define PCRE_NOTEMPTY 0x0400
+#define PCRE_UTF8 0x0800
+#define PCRE_NO_AUTO_CAPTURE 0x1000
+#define PCRE_NO_UTF8_CHECK 0x2000
+#define PCRE_AUTO_CALLOUT 0x4000
+#define PCRE_PARTIAL 0x8000
+
+/* Exec-time and get/set-time error codes */
+
+#define PCRE_ERROR_NOMATCH (-1)
+#define PCRE_ERROR_NULL (-2)
+#define PCRE_ERROR_BADOPTION (-3)
+#define PCRE_ERROR_BADMAGIC (-4)
+#define PCRE_ERROR_UNKNOWN_NODE (-5)
+#define PCRE_ERROR_NOMEMORY (-6)
+#define PCRE_ERROR_NOSUBSTRING (-7)
+#define PCRE_ERROR_MATCHLIMIT (-8)
+#define PCRE_ERROR_CALLOUT (-9) /* Never used by PCRE itself */
+#define PCRE_ERROR_BADUTF8 (-10)
+#define PCRE_ERROR_BADUTF8_OFFSET (-11)
+#define PCRE_ERROR_PARTIAL (-12)
+#define PCRE_ERROR_BADPARTIAL (-13)
+#define PCRE_ERROR_INTERNAL (-14)
+#define PCRE_ERROR_BADCOUNT (-15)
/* Request types for pcre_fullinfo() */
-#define PCRE_INFO_OPTIONS 0
-#define PCRE_INFO_SIZE 1
-#define PCRE_INFO_CAPTURECOUNT 2
-#define PCRE_INFO_BACKREFMAX 3
-#define PCRE_INFO_FIRSTCHAR 4
-#define PCRE_INFO_FIRSTTABLE 5
-#define PCRE_INFO_LASTLITERAL 6
+#define PCRE_INFO_OPTIONS 0
+#define PCRE_INFO_SIZE 1
+#define PCRE_INFO_CAPTURECOUNT 2
+#define PCRE_INFO_BACKREFMAX 3
+#define PCRE_INFO_FIRSTBYTE 4
+#define PCRE_INFO_FIRSTCHAR 4 /* For backwards compatibility */
+#define PCRE_INFO_FIRSTTABLE 5
+#define PCRE_INFO_LASTLITERAL 6
+#define PCRE_INFO_NAMEENTRYSIZE 7
+#define PCRE_INFO_NAMECOUNT 8
+#define PCRE_INFO_NAMETABLE 9
+#define PCRE_INFO_STUDYSIZE 10
+#define PCRE_INFO_DEFAULT_TABLES 11
+
+/* Request types for pcre_config() */
+
+#define PCRE_CONFIG_UTF8 0
+#define PCRE_CONFIG_NEWLINE 1
+#define PCRE_CONFIG_LINK_SIZE 2
+#define PCRE_CONFIG_POSIX_MALLOC_THRESHOLD 3
+#define PCRE_CONFIG_MATCH_LIMIT 4
+#define PCRE_CONFIG_STACKRECURSE 5
+#define PCRE_CONFIG_UNICODE_PROPERTIES 6
+
+/* Bit flags for the pcre_extra structure */
+
+#define PCRE_EXTRA_STUDY_DATA 0x0001
+#define PCRE_EXTRA_MATCH_LIMIT 0x0002
+#define PCRE_EXTRA_CALLOUT_DATA 0x0004
+#define PCRE_EXTRA_TABLES 0x0008
/* Types */
-struct real_pcre; /* declaration; the definition is private */
-struct real_pcre_extra; /* declaration; the definition is private */
-
+struct real_pcre; /* declaration; the definition is private */
typedef struct real_pcre pcre;
-typedef struct real_pcre_extra pcre_extra;
-
-/* Store get and free functions. These can be set to alternative malloc/free
-functions if required. Some magic is required for Win32 DLL; it is null on
-other OS. */
-
-PCRE_DL_IMPORT extern void *(*pcre_malloc)(size_t);
-PCRE_DL_IMPORT extern void (*pcre_free)(void *);
-
-#undef PCRE_DL_IMPORT
-
-/* Functions */
-extern pcre *pcre_compile(const char *, int, const char **, int *,
- const unsigned char *);
-extern int pcre_copy_substring(const char *, int *, int, int, char *, int);
-extern int pcre_exec(const pcre *, const pcre_extra *, const char *,
- int, int, int, int *, int);
+/* The structure for passing additional data to pcre_exec(). This is defined in
+such as way as to be extensible. Always add new fields at the end, in order to
+remain compatible. */
+
+typedef struct pcre_extra {
+ unsigned long int flags; /* Bits for which fields are set */
+ void *study_data; /* Opaque data from pcre_study() */
+ unsigned long int match_limit; /* Maximum number of calls to match() */
+ void *callout_data; /* Data passed back in callouts */
+ const unsigned char *tables; /* Pointer to character tables */
+} pcre_extra;
+
+/* The structure for passing out data via the pcre_callout_function. We use a
+structure so that new fields can be added on the end in future versions,
+without changing the API of the function, thereby allowing old clients to work
+without modification. */
+
+typedef struct pcre_callout_block {
+ int version; /* Identifies version of block */
+ /* ------------------------ Version 0 ------------------------------- */
+ int callout_number; /* Number compiled into pattern */
+ int *offset_vector; /* The offset vector */
+ const char *subject; /* The subject being matched */
+ int subject_length; /* The length of the subject */
+ int start_match; /* Offset to start of this match attempt */
+ int current_position; /* Where we currently are in the subject */
+ int capture_top; /* Max current capture */
+ int capture_last; /* Most recently closed capture */
+ void *callout_data; /* Data passed in with the call */
+ /* ------------------- Added for Version 1 -------------------------- */
+ int pattern_position; /* Offset to next item in the pattern */
+ int next_item_length; /* Length of next item in the pattern */
+ /* ------------------------------------------------------------------ */
+} pcre_callout_block;
+
+/* Indirection for store get and free functions. These can be set to
+alternative malloc/free functions if required. Special ones are used in the
+non-recursive case for "frames". There is also an optional callout function
+that is triggered by the (?) regex item. Some magic is required for Win32 DLL;
+it is null on other OS. For Virtual Pascal, these have to be different again.
+*/
+
+#ifndef VPCOMPAT
+PCRE_DATA_SCOPE void *(*pcre_malloc)(size_t);
+PCRE_DATA_SCOPE void (*pcre_free)(void *);
+PCRE_DATA_SCOPE void *(*pcre_stack_malloc)(size_t);
+PCRE_DATA_SCOPE void (*pcre_stack_free)(void *);
+PCRE_DATA_SCOPE int (*pcre_callout)(pcre_callout_block *);
+#else /* VPCOMPAT */
+extern void *pcre_malloc(size_t);
+extern void pcre_free(void *);
+extern void *pcre_stack_malloc(size_t);
+extern void pcre_stack_free(void *);
+extern int pcre_callout(pcre_callout_block *);
+#endif /* VPCOMPAT */
+
+/* Exported PCRE functions */
+
+extern pcre *pcre_compile(const char *, int, const char **,
+ int *, const unsigned char *);
+extern int pcre_config(int, void *);
+extern int pcre_copy_named_substring(const pcre *, const char *,
+ int *, int, const char *, char *, int);
+extern int pcre_copy_substring(const char *, int *, int, int,
+ char *, int);
+extern int pcre_exec(const pcre *, const pcre_extra *,
+ const char *, int, int, int, int *, int);
extern void pcre_free_substring(const char *);
extern void pcre_free_substring_list(const char **);
-extern int pcre_get_substring(const char *, int *, int, int, const char **);
-extern int pcre_get_substring_list(const char *, int *, int, const char ***);
+extern int pcre_fullinfo(const pcre *, const pcre_extra *, int,
+ void *);
+extern int pcre_get_named_substring(const pcre *, const char *,
+ int *, int, const char *, const char **);
+extern int pcre_get_stringnumber(const pcre *, const char *);
+extern int pcre_get_substring(const char *, int *, int, int,
+ const char **);
+extern int pcre_get_substring_list(const char *, int *, int,
+ const char ***);
extern int pcre_info(const pcre *, int *, int *);
-extern int pcre_fullinfo(const pcre *, const pcre_extra *, int, void *);
extern const unsigned char *pcre_maketables(void);
extern pcre_extra *pcre_study(const pcre *, int, const char **);
extern const char *pcre_version(void);
diff --git a/srclib/pcre/pcredemo.c b/srclib/pcre/pcredemo.c
index cb4e46f137..3817203b5f 100644
--- a/srclib/pcre/pcredemo.c
+++ b/srclib/pcre/pcredemo.c
@@ -1,32 +1,80 @@
+/*************************************************
+* PCRE DEMONSTRATION PROGRAM *
+*************************************************/
+
+/* This is a demonstration program to illustrate the most straightforward ways
+of calling the PCRE regular expression library from a C program. See the
+pcresample documentation for a short discussion.
+
+Compile thuswise:
+ gcc -Wall pcredemo.c -I/usr/local/include -L/usr/local/lib \
+ -R/usr/local/lib -lpcre
+
+Replace "/usr/local/include" and "/usr/local/lib" with wherever the include and
+library files for PCRE are installed on your system. Only some operating
+systems (e.g. Solaris) use the -R option.
+*/
+
+
#include <stdio.h>
#include <string.h>
#include <pcre.h>
-/* Compile thuswise:
- gcc -Wall pcredemo.c -I/opt/local/include -L/opt/local/lib \
- -R/opt/local/lib -lpcre
-*/
-
#define OVECCOUNT 30 /* should be a multiple of 3 */
+
int main(int argc, char **argv)
{
pcre *re;
const char *error;
+char *pattern;
+char *subject;
+unsigned char *name_table;
int erroffset;
+int find_all;
+int namecount;
+int name_entry_size;
int ovector[OVECCOUNT];
+int subject_length;
int rc, i;
-if (argc != 3)
+
+/**************************************************************************
+* First, sort out the command line. There is only one possible option at *
+* the moment, "-g" to request repeated matching to find all occurrences, *
+* like Perl's /g option. We set the variable find_all to a non-zero value *
+* if the -g option is present. Apart from that, there must be exactly two *
+* arguments. *
+**************************************************************************/
+
+find_all = 0;
+for (i = 1; i < argc; i++)
+ {
+ if (strcmp(argv[i], "-g") == 0) find_all = 1;
+ else break;
+ }
+
+/* After the options, we require exactly two arguments, which are the pattern,
+and the subject string. */
+
+if (argc - i != 2)
{
printf("Two arguments required: a regex and a subject string\n");
return 1;
}
-/* Compile the regular expression in the first argument */
+pattern = argv[i];
+subject = argv[i+1];
+subject_length = (int)strlen(subject);
+
+
+/*************************************************************************
+* Now we are going to compile the regular expression pattern, and handle *
+* and errors that are detected. *
+*************************************************************************/
re = pcre_compile(
- argv[1], /* the pattern */
+ pattern, /* the pattern */
0, /* default options */
&error, /* for error message */
&erroffset, /* for error offset */
@@ -40,13 +88,18 @@ if (re == NULL)
return 1;
}
-/* Compilation succeeded: match the subject in the second argument */
+
+/*************************************************************************
+* If the compilation succeeded, we call PCRE again, in order to do a *
+* pattern match against the subject string. This does just ONE match. If *
+* further matching is needed, it will be done below. *
+*************************************************************************/
rc = pcre_exec(
re, /* the compiled pattern */
NULL, /* no extra data - we didn't study the pattern */
- argv[2], /* the subject string */
- (int)strlen(argv[2]), /* the length of the subject */
+ subject, /* the subject string */
+ subject_length, /* the length of the subject */
0, /* start at offset 0 in the subject */
0, /* default options */
ovector, /* output vector for substring information */
@@ -64,12 +117,20 @@ if (rc < 0)
*/
default: printf("Matching error %d\n", rc); break;
}
+ free(re); /* Release memory used for the compiled pattern */
return 1;
}
/* Match succeded */
-printf("Match succeeded\n");
+printf("\nMatch succeeded at offset %d\n", ovector[0]);
+
+
+/*************************************************************************
+* We have found the first match within the subject string. If the output *
+* vector wasn't big enough, set its size to the maximum. Then output any *
+* substrings that were captured. *
+*************************************************************************/
/* The output vector wasn't big enough */
@@ -79,16 +140,185 @@ if (rc == 0)
printf("ovector only has room for %d captured substrings\n", rc - 1);
}
-/* Show substrings stored in the output vector */
+/* Show substrings stored in the output vector by number. Obviously, in a real
+application you might want to do things other than print them. */
for (i = 0; i < rc; i++)
{
- char *substring_start = argv[2] + ovector[2*i];
+ char *substring_start = subject + ovector[2*i];
int substring_length = ovector[2*i+1] - ovector[2*i];
printf("%2d: %.*s\n", i, substring_length, substring_start);
}
+
+/**************************************************************************
+* That concludes the basic part of this demonstration program. We have *
+* compiled a pattern, and performed a single match. The code that follows *
+* first shows how to access named substrings, and then how to code for *
+* repeated matches on the same subject. *
+**************************************************************************/
+
+/* See if there are any named substrings, and if so, show them by name. First
+we have to extract the count of named parentheses from the pattern. */
+
+(void)pcre_fullinfo(
+ re, /* the compiled pattern */
+ NULL, /* no extra data - we didn't study the pattern */
+ PCRE_INFO_NAMECOUNT, /* number of named substrings */
+ &namecount); /* where to put the answer */
+
+if (namecount <= 0) printf("No named substrings\n"); else
+ {
+ unsigned char *tabptr;
+ printf("Named substrings\n");
+
+ /* Before we can access the substrings, we must extract the table for
+ translating names to numbers, and the size of each entry in the table. */
+
+ (void)pcre_fullinfo(
+ re, /* the compiled pattern */
+ NULL, /* no extra data - we didn't study the pattern */
+ PCRE_INFO_NAMETABLE, /* address of the table */
+ &name_table); /* where to put the answer */
+
+ (void)pcre_fullinfo(
+ re, /* the compiled pattern */
+ NULL, /* no extra data - we didn't study the pattern */
+ PCRE_INFO_NAMEENTRYSIZE, /* size of each entry in the table */
+ &name_entry_size); /* where to put the answer */
+
+ /* Now we can scan the table and, for each entry, print the number, the name,
+ and the substring itself. */
+
+ tabptr = name_table;
+ for (i = 0; i < namecount; i++)
+ {
+ int n = (tabptr[0] << 8) | tabptr[1];
+ printf("(%d) %*s: %.*s\n", n, name_entry_size - 3, tabptr + 2,
+ ovector[2*n+1] - ovector[2*n], subject + ovector[2*n]);
+ tabptr += name_entry_size;
+ }
+ }
+
+
+/*************************************************************************
+* If the "-g" option was given on the command line, we want to continue *
+* to search for additional matches in the subject string, in a similar *
+* way to the /g option in Perl. This turns out to be trickier than you *
+* might think because of the possibility of matching an empty string. *
+* What happens is as follows: *
+* *
+* If the previous match was NOT for an empty string, we can just start *
+* the next match at the end of the previous one. *
+* *
+* If the previous match WAS for an empty string, we can't do that, as it *
+* would lead to an infinite loop. Instead, a special call of pcre_exec() *
+* is made with the PCRE_NOTEMPTY and PCRE_ANCHORED flags set. The first *
+* of these tells PCRE that an empty string is not a valid match; other *
+* possibilities must be tried. The second flag restricts PCRE to one *
+* match attempt at the initial string position. If this match succeeds, *
+* an alternative to the empty string match has been found, and we can *
+* proceed round the loop. *
+*************************************************************************/
+
+if (!find_all)
+ {
+ free(re); /* Release the memory used for the compiled pattern */
+ return 0; /* Finish unless -g was given */
+ }
+
+/* Loop for second and subsequent matches */
+
+for (;;)
+ {
+ int options = 0; /* Normally no options */
+ int start_offset = ovector[1]; /* Start at end of previous match */
+
+ /* If the previous match was for an empty string, we are finished if we are
+ at the end of the subject. Otherwise, arrange to run another match at the
+ same point to see if a non-empty match can be found. */
+
+ if (ovector[0] == ovector[1])
+ {
+ if (ovector[0] == subject_length) break;
+ options = PCRE_NOTEMPTY | PCRE_ANCHORED;
+ }
+
+ /* Run the next matching operation */
+
+ rc = pcre_exec(
+ re, /* the compiled pattern */
+ NULL, /* no extra data - we didn't study the pattern */
+ subject, /* the subject string */
+ subject_length, /* the length of the subject */
+ start_offset, /* starting offset in the subject */
+ options, /* options */
+ ovector, /* output vector for substring information */
+ OVECCOUNT); /* number of elements in the output vector */
+
+ /* This time, a result of NOMATCH isn't an error. If the value in "options"
+ is zero, it just means we have found all possible matches, so the loop ends.
+ Otherwise, it means we have failed to find a non-empty-string match at a
+ point where there was a previous empty-string match. In this case, we do what
+ Perl does: advance the matching position by one, and continue. We do this by
+ setting the "end of previous match" offset, because that is picked up at the
+ top of the loop as the point at which to start again. */
+
+ if (rc == PCRE_ERROR_NOMATCH)
+ {
+ if (options == 0) break;
+ ovector[1] = start_offset + 1;
+ continue; /* Go round the loop again */
+ }
+
+ /* Other matching errors are not recoverable. */
+
+ if (rc < 0)
+ {
+ printf("Matching error %d\n", rc);
+ free(re); /* Release memory used for the compiled pattern */
+ return 1;
+ }
+
+ /* Match succeded */
+
+ printf("\nMatch succeeded again at offset %d\n", ovector[0]);
+
+ /* The match succeeded, but the output vector wasn't big enough. */
+
+ if (rc == 0)
+ {
+ rc = OVECCOUNT/3;
+ printf("ovector only has room for %d captured substrings\n", rc - 1);
+ }
+
+ /* As before, show substrings stored in the output vector by number, and then
+ also any named substrings. */
+
+ for (i = 0; i < rc; i++)
+ {
+ char *substring_start = subject + ovector[2*i];
+ int substring_length = ovector[2*i+1] - ovector[2*i];
+ printf("%2d: %.*s\n", i, substring_length, substring_start);
+ }
+
+ if (namecount <= 0) printf("No named substrings\n"); else
+ {
+ unsigned char *tabptr = name_table;
+ printf("Named substrings\n");
+ for (i = 0; i < namecount; i++)
+ {
+ int n = (tabptr[0] << 8) | tabptr[1];
+ printf("(%d) %*s: %.*s\n", n, name_entry_size - 3, tabptr + 2,
+ ovector[2*n+1] - ovector[2*n], subject + ovector[2*n]);
+ tabptr += name_entry_size;
+ }
+ }
+ } /* End of loop to find second and subsequent matches */
+
+printf("\n");
+free(re); /* Release memory used for the compiled pattern */
return 0;
}
-
+/* End of pcredemo.c */
diff --git a/srclib/pcre/pcregrep.c b/srclib/pcre/pcregrep.c
index b50ed0780b..21b2a9bbae 100644
--- a/srclib/pcre/pcregrep.c
+++ b/srclib/pcre/pcregrep.c
@@ -3,7 +3,39 @@
*************************************************/
/* This is a grep program that uses the PCRE regular expression library to do
-its pattern matching. On a Unix system it can recurse into directories. */
+its pattern matching. On a Unix or Win32 system it can recurse into
+directories.
+
+ Copyright (c) 1997-2004 University of Cambridge
+
+-----------------------------------------------------------------------------
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------------
+*/
#include <ctype.h>
#include <stdio.h>
@@ -18,7 +50,7 @@ its pattern matching. On a Unix system it can recurse into directories. */
typedef int BOOL;
-#define VERSION "2.0 01-Aug-2001"
+#define VERSION "3.0 14-Jan-2003"
#define MAX_PATTERN_COUNT 100
@@ -44,8 +76,8 @@ static BOOL whole_lines = FALSE;
typedef struct option_item {
int one_char;
- char *long_name;
- char *help_text;
+ const char *long_name;
+ const char *help_text;
} option_item;
static option_item optionlist[] = {
@@ -57,6 +89,7 @@ static option_item optionlist[] = {
{ 'n', "line-number", "print line number with output lines" },
{ 'r', "recursive", "recursively scan sub-directories" },
{ 's', "no-messages", "suppress error messages" },
+ { 'u', "utf-8", "use UTF-8 mode" },
{ 'V', "version", "print version information and exit" },
{ 'v', "invert-match", "select non-matching lines" },
{ 'x', "line-regex", "force PATTERN to match only whole lines" },
@@ -70,8 +103,8 @@ static option_item optionlist[] = {
*************************************************/
/* These functions are defined so that they can be made system specific,
-although at present the only ones are for Unix, and for "no directory recursion
-support". */
+although at present the only ones are for Unix, Win32, and for "no directory
+recursion support". */
/************* Directory scanning in Unix ***********/
@@ -83,7 +116,7 @@ support". */
typedef DIR directory_type;
-int
+static int
isdirectory(char *filename)
{
struct stat statbuf;
@@ -92,13 +125,13 @@ if (stat(filename, &statbuf) < 0)
return ((statbuf.st_mode & S_IFMT) == S_IFDIR)? '/' : 0;
}
-directory_type *
+static directory_type *
opendirectory(char *filename)
{
return opendir(filename);
}
-char *
+static char *
readdirectory(directory_type *dir)
{
for (;;)
@@ -111,20 +144,112 @@ for (;;)
return NULL; /* Keep compiler happy; never executed */
}
-void
+static void
closedirectory(directory_type *dir)
{
closedir(dir);
}
-#else
+/************* Directory scanning in Win32 ***********/
+
+/* I (Philip Hazel) have no means of testing this code. It was contributed by
+Lionel Fourquaux. */
+
+
+#elif HAVE_WIN32API
+
+#ifndef STRICT
+# define STRICT
+#endif
+#ifndef WIN32_LEAN_AND_MEAN
+# define WIN32_LEAN_AND_MEAN
+#endif
+#include <windows.h>
+
+typedef struct directory_type
+{
+HANDLE handle;
+BOOL first;
+WIN32_FIND_DATA data;
+} directory_type;
+
+int
+isdirectory(char *filename)
+{
+DWORD attr = GetFileAttributes(filename);
+if (attr == INVALID_FILE_ATTRIBUTES)
+ return 0;
+return ((attr & FILE_ATTRIBUTE_DIRECTORY) != 0) ? '/' : 0;
+}
+
+directory_type *
+opendirectory(char *filename)
+{
+size_t len;
+char *pattern;
+directory_type *dir;
+DWORD err;
+len = strlen(filename);
+pattern = (char *) malloc(len + 3);
+dir = (directory_type *) malloc(sizeof(*dir));
+if ((pattern == NULL) || (dir == NULL))
+ {
+ fprintf(stderr, "pcregrep: malloc failed\n");
+ exit(2);
+ }
+memcpy(pattern, filename, len);
+memcpy(&(pattern[len]), "\\*", 3);
+dir->handle = FindFirstFile(pattern, &(dir->data));
+if (dir->handle != INVALID_HANDLE_VALUE)
+ {
+ free(pattern);
+ dir->first = TRUE;
+ return dir;
+ }
+err = GetLastError();
+free(pattern);
+free(dir);
+errno = (err == ERROR_ACCESS_DENIED) ? EACCES : ENOENT;
+return NULL;
+}
+
+char *
+readdirectory(directory_type *dir)
+{
+for (;;)
+ {
+ if (!dir->first)
+ {
+ if (!FindNextFile(dir->handle, &(dir->data)))
+ return NULL;
+ }
+ else
+ {
+ dir->first = FALSE;
+ }
+ if (strcmp(dir->data.cFileName, ".") != 0 && strcmp(dir->data.cFileName, "..") != 0)
+ return dir->data.cFileName;
+ }
+#ifndef _MSC_VER
+return NULL; /* Keep compiler happy; never executed */
+#endif
+}
+
+void
+closedirectory(directory_type *dir)
+{
+FindClose(dir->handle);
+free(dir);
+}
/************* Directory scanning when we can't do it ***********/
/* The type is void, and apart from isdirectory(), the functions do nothing. */
+#else
+
typedef void directory_type;
int isdirectory(char *filename) { return FALSE; }
@@ -226,7 +351,7 @@ return rc;
*************************************************/
static int
-grep_or_recurse(char *filename, BOOL recurse, BOOL show_filenames,
+grep_or_recurse(char *filename, BOOL dir_recurse, BOOL show_filenames,
BOOL only_one_at_top)
{
int rc = 1;
@@ -236,7 +361,7 @@ FILE *in;
/* If the file is a directory and we are recursing, scan each file within it.
The scanning code is localized so it can be made system-specific. */
-if ((sep = isdirectory(filename)) != 0 && recurse)
+if ((sep = isdirectory(filename)) != 0 && dir_recurse)
{
char buffer[1024];
char *nextfile;
@@ -253,7 +378,7 @@ if ((sep = isdirectory(filename)) != 0 && recurse)
{
int frc;
sprintf(buffer, "%.512s%c%.128s", filename, sep, nextfile);
- frc = grep_or_recurse(buffer, recurse, TRUE, FALSE);
+ frc = grep_or_recurse(buffer, dir_recurse, TRUE, FALSE);
if (frc == 0 && rc == 1) rc = 0;
}
@@ -262,8 +387,9 @@ if ((sep = isdirectory(filename)) != 0 && recurse)
}
/* If the file is not a directory, or we are not recursing, scan it. If this is
-the first and only argument at top level, we don't show the file name.
-Otherwise, control is via the show_filenames variable. */
+the first and only argument at top level, we don't show the file name (unless
+we are only showing the file name). Otherwise, control is via the
+show_filenames variable. */
in = fopen(filename, "r");
if (in == NULL)
@@ -272,7 +398,8 @@ if (in == NULL)
return 2;
}
-rc = pcregrep(in, (show_filenames && !only_one_at_top)? filename : NULL);
+rc = pcregrep(in, (filenames_only || (show_filenames && !only_one_at_top))?
+ filename : NULL);
fclose(in);
return rc;
}
@@ -287,7 +414,7 @@ return rc;
static int
usage(int rc)
{
-fprintf(stderr, "Usage: pcregrep [-Vcfhilnrsvx] [long-options] pattern [file] ...\n");
+fprintf(stderr, "Usage: pcregrep [-Vcfhilnrsvx] [long-options] [pattern] [file1 file2 ...]\n");
fprintf(stderr, "Type `pcregrep --help' for more information.\n");
return rc;
}
@@ -304,8 +431,9 @@ help(void)
{
option_item *op;
-printf("Usage: pcregrep [OPTION]... PATTERN [FILE] ...\n");
+printf("Usage: pcregrep [OPTION]... [PATTERN] [FILE1 FILE2 ...]\n");
printf("Search for PATTERN in each FILE or standard input.\n");
+printf("PATTERN must be present if -f is not used.\n");
printf("Example: pcregrep -i 'hello.*world' menu.h main.c\n\n");
printf("Options:\n");
@@ -350,6 +478,7 @@ switch(letter)
case 'n': number = TRUE; break;
case 'r': recurse = TRUE; break;
case 's': silent = TRUE; break;
+ case 'u': options |= PCRE_UTF8; break;
case 'v': invert = TRUE; break;
case 'x': whole_lines = TRUE; options |= PCRE_ANCHORED; break;
@@ -390,6 +519,10 @@ for (i = 1; i < argc; i++)
{
if (argv[i][0] != '-') break;
+ /* Missing options */
+
+ if (argv[i][1] == 0) exit(usage(2));
+
/* Long name options */
if (argv[i][1] == '-')
@@ -443,8 +576,8 @@ for (i = 1; i < argc; i++)
}
}
-pattern_list = malloc(MAX_PATTERN_COUNT * sizeof(pcre *));
-hints_list = malloc(MAX_PATTERN_COUNT * sizeof(pcre_extra *));
+pattern_list = (pcre **)malloc(MAX_PATTERN_COUNT * sizeof(pcre *));
+hints_list = (pcre_extra **)malloc(MAX_PATTERN_COUNT * sizeof(pcre_extra *));
if (pattern_list == NULL || hints_list == NULL)
{
@@ -492,7 +625,7 @@ if (pattern_filename != NULL)
else
{
- if (i >= argc) return usage(0);
+ if (i >= argc) return usage(2);
pattern_list[0] = pcre_compile(argv[i++], options, &error, &errptr, NULL);
if (pattern_list[0] == NULL)
{
diff --git a/srclib/pcre/pcreposix.c b/srclib/pcre/pcreposix.c
index 29f2e01740..1e8b6a72b1 100644
--- a/srclib/pcre/pcreposix.c
+++ b/srclib/pcre/pcreposix.c
@@ -12,26 +12,34 @@ functions.
Written by: Philip Hazel <ph10@cam.ac.uk>
- Copyright (c) 1997-2001 University of Cambridge
+ Copyright (c) 1997-2004 University of Cambridge
-----------------------------------------------------------------------------
-Permission is granted to anyone to use this software for any purpose on any
-computer system, and to redistribute it freely, subject to the following
-restrictions:
-
-1. This software is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-2. The origin of this software must not be misrepresented, either by
- explicit claim or by omission.
-
-3. Altered versions must be plainly marked as such, and must not be
- misrepresented as being the original software.
-
-4. If PCRE is embedded in any software that is released under the GNU
- General Purpose Licence (GPL), then the terms of that licence shall
- supersede any condition above with which it is incompatible.
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
-----------------------------------------------------------------------------
*/
@@ -43,13 +51,14 @@ restrictions:
/* Corresponding tables of PCRE error messages and POSIX error codes. */
-static const char *estring[] = {
+static const char *const estring[] = {
ERR1, ERR2, ERR3, ERR4, ERR5, ERR6, ERR7, ERR8, ERR9, ERR10,
ERR11, ERR12, ERR13, ERR14, ERR15, ERR16, ERR17, ERR18, ERR19, ERR20,
ERR21, ERR22, ERR23, ERR24, ERR25, ERR26, ERR27, ERR29, ERR29, ERR30,
- ERR31 };
+ ERR31, ERR32, ERR33, ERR34, ERR35, ERR36, ERR37, ERR38, ERR39, ERR40,
+ ERR41, ERR42, ERR43, ERR44, ERR45, ERR46, ERR47 };
-static int eint[] = {
+static const int eint[] = {
REG_EESCAPE, /* "\\ at end of pattern" */
REG_EESCAPE, /* "\\c at end of pattern" */
REG_EESCAPE, /* "unrecognized character follows \\" */
@@ -62,9 +71,9 @@ static int eint[] = {
REG_BADRPT, /* "operand of unlimited repeat could match the empty string" */
REG_ASSERT, /* "internal error: unexpected repeat" */
REG_BADPAT, /* "unrecognized character after (?" */
- REG_ASSERT, /* "unused error" */
+ REG_BADPAT, /* "POSIX named classes are supported only within a class" */
REG_EPAREN, /* "missing )" */
- REG_ESUBREG, /* "back reference to non-existent subpattern" */
+ REG_ESUBREG, /* "reference to non-existent subpattern" */
REG_INVARG, /* "erroffset passed as NULL" */
REG_INVARG, /* "unknown option bit(s) set" */
REG_EPAREN, /* "missing ) after comment" */
@@ -78,18 +87,30 @@ static int eint[] = {
REG_BADPAT, /* "malformed number after (?(" */
REG_BADPAT, /* "conditional group containe more than two branches" */
REG_BADPAT, /* "assertion expected after (?(" */
- REG_BADPAT, /* "(?p must be followed by )" */
+ REG_BADPAT, /* "(?R or (?digits must be followed by )" */
REG_ECTYPE, /* "unknown POSIX class name" */
REG_BADPAT, /* "POSIX collating elements are not supported" */
REG_INVARG, /* "this version of PCRE is not compiled with PCRE_UTF8 support" */
- REG_BADPAT, /* "characters with values > 255 are not yet supported in classes" */
+ REG_BADPAT, /* "spare error" */
REG_BADPAT, /* "character value in \x{...} sequence is too large" */
- REG_BADPAT /* "invalid condition (?(0)" */
+ REG_BADPAT, /* "invalid condition (?(0)" */
+ REG_BADPAT, /* "\\C not allowed in lookbehind assertion" */
+ REG_EESCAPE, /* "PCRE does not support \\L, \\l, \\N, \\U, or \\u" */
+ REG_BADPAT, /* "number after (?C is > 255" */
+ REG_BADPAT, /* "closing ) for (?C expected" */
+ REG_BADPAT, /* "recursive call could loop indefinitely" */
+ REG_BADPAT, /* "unrecognized character after (?P" */
+ REG_BADPAT, /* "syntax error after (?P" */
+ REG_BADPAT, /* "two named groups have the same name" */
+ REG_BADPAT, /* "invalid UTF-8 string" */
+ REG_BADPAT, /* "support for \\P, \\p, and \\X has not been compiled" */
+ REG_BADPAT, /* "malformed \\P or \\p sequence" */
+ REG_BADPAT /* "unknown property name after \\P or \\p" */
};
/* Table of texts corresponding to POSIX error codes */
-static const char *pstring[] = {
+static const char *const pstring[] = {
"", /* Dummy for value 0 */
"internal error", /* REG_ASSERT */
"invalid repeat counts in {}", /* BADBR */
@@ -135,7 +156,7 @@ return REG_ASSERT;
* Translate error code to string *
*************************************************/
-size_t
+EXPORT size_t
regerror(int errcode, const regex_t *preg, char *errbuf, size_t errbuf_size)
{
const char *message, *addmessage;
@@ -170,7 +191,7 @@ return length + addlength;
* Free store held by a regex *
*************************************************/
-void
+EXPORT void
regfree(regex_t *preg)
{
(pcre_free)(preg->re_pcre);
@@ -193,7 +214,7 @@ Returns: 0 on success
various non-zero codes on failure
*/
-int
+EXPORT int
regcomp(regex_t *preg, const char *pattern, int cflags)
{
const char *errorptr;
@@ -208,7 +229,7 @@ preg->re_erroffset = erroffset;
if (preg->re_pcre == NULL) return pcre_posix_error_code(errorptr);
-preg->re_nsub = pcre_info(preg->re_pcre, NULL, NULL);
+preg->re_nsub = pcre_info((const pcre *)preg->re_pcre, NULL, NULL);
return 0;
}
@@ -222,59 +243,48 @@ return 0;
/* Unfortunately, PCRE requires 3 ints of working space for each captured
substring, so we have to get and release working store instead of just using
the POSIX structures as was done in earlier releases when PCRE needed only 2
-ints. */
+ints. However, if the number of possible capturing brackets is small, use a
+block of store on the stack, to reduce the use of malloc/free. The threshold is
+in a macro that can be changed at configure time. */
-#define SMALL_NMATCH 5
-int
-regexec(regex_t *preg, const char *string, size_t nmatch,
+EXPORT int
+regexec(const regex_t *preg, const char *string, size_t nmatch,
regmatch_t pmatch[], int eflags)
{
int rc;
int options = 0;
-/* NOTE: The code related to the "SMALL_NMATCH" optimization
- * currently is unique to the httpd-2.0 copy of PCRE 3.9. I've
- * submitted the patch to the PCRE maintainer for inclusion in
- * the next PCRE release, slated for late 2002. At that time,
- * we can merge the new PCRE version into the httpd-2.0/srclib
- * tree. --brianp 3/20/2002
- */
-int small_ovector[SMALL_NMATCH * 3];
int *ovector = NULL;
-int allocated_ovector = 0;
+int small_ovector[POSIX_MALLOC_THRESHOLD * 3];
+BOOL allocated_ovector = FALSE;
if ((eflags & REG_NOTBOL) != 0) options |= PCRE_NOTBOL;
if ((eflags & REG_NOTEOL) != 0) options |= PCRE_NOTEOL;
-#if 0
-/* This causes a memory segfault after locking the const, thread-shared *preg
- * generated at compile time, and is entirely unnecessary.
- */
-preg->re_erroffset = (size_t)(-1); /* Only has meaning after compile */
-#endif
+((regex_t *)preg)->re_erroffset = (size_t)(-1); /* Only has meaning after compile */
if (nmatch > 0)
{
- if (nmatch <= SMALL_NMATCH)
- {
- ovector = &(small_ovector[0]);
- }
- else
- {
- ovector = (int *)malloc(sizeof(int) * nmatch * 3);
- if (ovector == NULL) return REG_ESPACE;
- allocated_ovector = 1;
- }
+ if (nmatch <= POSIX_MALLOC_THRESHOLD)
+ {
+ ovector = &(small_ovector[0]);
+ }
+ else
+ {
+ ovector = (int *)malloc(sizeof(int) * nmatch * 3);
+ if (ovector == NULL) return REG_ESPACE;
+ allocated_ovector = TRUE;
+ }
}
-rc = pcre_exec(preg->re_pcre, NULL, string, (int)strlen(string), 0, options,
- ovector, nmatch * 3);
+rc = pcre_exec((const pcre *)preg->re_pcre, NULL, string, (int)strlen(string),
+ 0, options, ovector, nmatch * 3);
if (rc == 0) rc = nmatch; /* All captured slots were filled in */
if (rc >= 0)
{
size_t i;
- for (i = 0; i < (size_t) rc; i++)
+ for (i = 0; i < (size_t)rc; i++)
{
pmatch[i].rm_so = ovector[i*2];
pmatch[i].rm_eo = ovector[i*2+1];
@@ -295,6 +305,9 @@ else
case PCRE_ERROR_BADMAGIC: return REG_INVARG;
case PCRE_ERROR_UNKNOWN_NODE: return REG_ASSERT;
case PCRE_ERROR_NOMEMORY: return REG_ESPACE;
+ case PCRE_ERROR_MATCHLIMIT: return REG_ESPACE;
+ case PCRE_ERROR_BADUTF8: return REG_INVARG;
+ case PCRE_ERROR_BADUTF8_OFFSET: return REG_INVARG;
default: return REG_ASSERT;
}
}
diff --git a/srclib/pcre/pcreposix.h b/srclib/pcre/pcreposix.h
index e70af2de84..a8056bd77c 100644
--- a/srclib/pcre/pcreposix.h
+++ b/srclib/pcre/pcreposix.h
@@ -2,14 +2,43 @@
* Perl-Compatible Regular Expressions *
*************************************************/
-/* Copyright (c) 1997-2001 University of Cambridge */
-
#ifndef _PCREPOSIX_H
#define _PCREPOSIX_H
/* This is the header for the POSIX wrapper interface to the PCRE Perl-
Compatible Regular Expression library. It defines the things POSIX says should
-be there. I hope. */
+be there. I hope.
+
+ Copyright (c) 1997-2004 University of Cambridge
+
+-----------------------------------------------------------------------------
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------------
+*/
/* Have to include stdlib.h in order to ensure that size_t is defined. */
@@ -77,7 +106,7 @@ typedef struct {
/* The functions */
extern int regcomp(regex_t *, const char *, int);
-extern int regexec(regex_t *, const char *, size_t, regmatch_t *, int);
+extern int regexec(const regex_t *, const char *, size_t, regmatch_t *, int);
extern size_t regerror(int, const regex_t *, char *, size_t);
extern void regfree(regex_t *);
diff --git a/srclib/pcre/pcretest.c b/srclib/pcre/pcretest.c
index f04443ab30..e531cc134e 100644
--- a/srclib/pcre/pcretest.c
+++ b/srclib/pcre/pcretest.c
@@ -2,15 +2,52 @@
* PCRE testing program *
*************************************************/
+/* This program was hacked up as a tester for PCRE. I really should have
+written it more tidily in the first place. Will I ever learn? It has grown and
+been extended and consequently is now rather untidy in places.
+
+-----------------------------------------------------------------------------
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------------
+*/
+
+
#include <ctype.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include <locale.h>
+#include <errno.h>
-/* Use the internal info for displaying the results of pcre_study(). */
+/* We need the internal info for displaying the results of pcre_study(). Also
+for getting the opcodes for showing compiled code. */
+#define PCRE_SPY /* For Win32 build, import data, not export */
#include "internal.h"
/* It is possible to compile this test program without including support for
@@ -29,25 +66,83 @@ Makefile. */
#endif
#endif
-#define LOOPREPEAT 20000
+#define LOOPREPEAT 500000
+
+#define BUFFER_SIZE 30000
+#define PBUFFER_SIZE BUFFER_SIZE
+#define DBUFFER_SIZE BUFFER_SIZE
static FILE *outfile;
static int log_store = 0;
+static int callout_count;
+static int callout_extra;
+static int callout_fail_count;
+static int callout_fail_id;
+static int first_callout;
+static int show_malloc;
+static int use_utf8;
static size_t gotten_store;
+static uschar *pbuffer = NULL;
-static int utf8_table1[] = {
+static const int utf8_table1[] = {
0x0000007f, 0x000007ff, 0x0000ffff, 0x001fffff, 0x03ffffff, 0x7fffffff};
-static int utf8_table2[] = {
+static const int utf8_table2[] = {
0, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc};
-static int utf8_table3[] = {
+static const int utf8_table3[] = {
0xff, 0x1f, 0x0f, 0x07, 0x03, 0x01};
+
+/*************************************************
+* Print compiled regex *
+*************************************************/
+
+/* The code for doing this is held in a separate file that is also included in
+pcre.c when it is compiled with the debug switch. It defines a function called
+print_internals(), which uses a table of opcode lengths defined by the macro
+OP_LENGTHS, whose name must be OP_lengths. It also uses a table that translates
+Unicode property names to numbers; this is kept in a separate file. */
+
+static uschar OP_lengths[] = { OP_LENGTHS };
+
+#include "ucp.h"
+#include "ucptypetable.c"
+#include "printint.c"
+
+
+
+/*************************************************
+* Read number from string *
+*************************************************/
+
+/* We don't use strtoul() because SunOS4 doesn't have it. Rather than mess
+around with conditional compilation, just do the job by hand. It is only used
+for unpicking the -o argument, so just keep it simple.
+
+Arguments:
+ str string to be converted
+ endptr where to put the end pointer
+
+Returns: the unsigned long
+*/
+
+static int
+get_value(unsigned char *str, unsigned char **endptr)
+{
+int result = 0;
+while(*str != 0 && isspace(*str)) str++;
+while (isdigit(*str)) result = result * 10 + (int)(*str++ - '0');
+*endptr = str;
+return(result);
+}
+
+
+
/*************************************************
* Convert character value to UTF-8 *
*************************************************/
@@ -100,7 +195,7 @@ Returns: > 0 => the number of bytes consumed
-6 to 0 => malformed UTF-8 character at offset = (-return)
*/
-int
+static int
utf82ord(unsigned char *buffer, int *vptr)
{
int c = *buffer++;
@@ -143,271 +238,204 @@ return i+1;
+/*************************************************
+* Print character string *
+*************************************************/
+/* Character string printing function. Must handle UTF-8 strings in utf8
+mode. Yields number of characters printed. If handed a NULL file, just counts
+chars without printing. */
-
-/* Debugging function to print the internal form of the regex. This is the same
-code as contained in pcre.c under the DEBUG macro. */
-
-static const char *OP_names[] = {
- "End", "\\A", "\\B", "\\b", "\\D", "\\d",
- "\\S", "\\s", "\\W", "\\w", "\\Z", "\\z",
- "Opt", "^", "$", "Any", "chars", "not",
- "*", "*?", "+", "+?", "?", "??", "{", "{", "{",
- "*", "*?", "+", "+?", "?", "??", "{", "{", "{",
- "*", "*?", "+", "+?", "?", "??", "{", "{", "{",
- "*", "*?", "+", "+?", "?", "??", "{", "{",
- "class", "Ref", "Recurse",
- "Alt", "Ket", "KetRmax", "KetRmin", "Assert", "Assert not",
- "AssertB", "AssertB not", "Reverse", "Once", "Cond", "Cref",
- "Brazero", "Braminzero", "Branumber", "Bra"
-};
-
-
-static void print_internals(pcre *re)
+static int pchars(unsigned char *p, int length, FILE *f)
{
-unsigned char *code = ((real_pcre *)re)->code;
-
-fprintf(outfile, "------------------------------------------------------------------\n");
+int c;
+int yield = 0;
-for(;;)
+while (length-- > 0)
{
- int c;
- int charlength;
-
- fprintf(outfile, "%3d ", (int)(code - ((real_pcre *)re)->code));
-
- if (*code >= OP_BRA)
+ if (use_utf8)
{
- if (*code - OP_BRA > EXTRACT_BASIC_MAX)
- fprintf(outfile, "%3d Bra extra", (code[1] << 8) + code[2]);
- else
- fprintf(outfile, "%3d Bra %d", (code[1] << 8) + code[2], *code - OP_BRA);
- code += 2;
- }
+ int rc = utf82ord(p, &c);
- else switch(*code)
- {
- case OP_END:
- fprintf(outfile, " %s\n", OP_names[*code]);
- fprintf(outfile, "------------------------------------------------------------------\n");
- return;
-
- case OP_OPT:
- fprintf(outfile, " %.2x %s", code[1], OP_names[*code]);
- code++;
- break;
-
- case OP_CHARS:
- charlength = *(++code);
- fprintf(outfile, "%3d ", charlength);
- while (charlength-- > 0)
- if (isprint(c = *(++code))) fprintf(outfile, "%c", c);
- else fprintf(outfile, "\\x%02x", c);
- break;
-
- case OP_KETRMAX:
- case OP_KETRMIN:
- case OP_ALT:
- case OP_KET:
- case OP_ASSERT:
- case OP_ASSERT_NOT:
- case OP_ASSERTBACK:
- case OP_ASSERTBACK_NOT:
- case OP_ONCE:
- case OP_COND:
- case OP_BRANUMBER:
- case OP_REVERSE:
- case OP_CREF:
- fprintf(outfile, "%3d %s", (code[1] << 8) + code[2], OP_names[*code]);
- code += 2;
- break;
-
- case OP_STAR:
- case OP_MINSTAR:
- case OP_PLUS:
- case OP_MINPLUS:
- case OP_QUERY:
- case OP_MINQUERY:
- case OP_TYPESTAR:
- case OP_TYPEMINSTAR:
- case OP_TYPEPLUS:
- case OP_TYPEMINPLUS:
- case OP_TYPEQUERY:
- case OP_TYPEMINQUERY:
- if (*code >= OP_TYPESTAR)
- fprintf(outfile, " %s", OP_names[code[1]]);
- else if (isprint(c = code[1])) fprintf(outfile, " %c", c);
- else fprintf(outfile, " \\x%02x", c);
- fprintf(outfile, "%s", OP_names[*code++]);
- break;
-
- case OP_EXACT:
- case OP_UPTO:
- case OP_MINUPTO:
- if (isprint(c = code[3])) fprintf(outfile, " %c{", c);
- else fprintf(outfile, " \\x%02x{", c);
- if (*code != OP_EXACT) fprintf(outfile, ",");
- fprintf(outfile, "%d}", (code[1] << 8) + code[2]);
- if (*code == OP_MINUPTO) fprintf(outfile, "?");
- code += 3;
- break;
-
- case OP_TYPEEXACT:
- case OP_TYPEUPTO:
- case OP_TYPEMINUPTO:
- fprintf(outfile, " %s{", OP_names[code[3]]);
- if (*code != OP_TYPEEXACT) fprintf(outfile, "0,");
- fprintf(outfile, "%d}", (code[1] << 8) + code[2]);
- if (*code == OP_TYPEMINUPTO) fprintf(outfile, "?");
- code += 3;
- break;
-
- case OP_NOT:
- if (isprint(c = *(++code))) fprintf(outfile, " [^%c]", c);
- else fprintf(outfile, " [^\\x%02x]", c);
- break;
-
- case OP_NOTSTAR:
- case OP_NOTMINSTAR:
- case OP_NOTPLUS:
- case OP_NOTMINPLUS:
- case OP_NOTQUERY:
- case OP_NOTMINQUERY:
- if (isprint(c = code[1])) fprintf(outfile, " [^%c]", c);
- else fprintf(outfile, " [^\\x%02x]", c);
- fprintf(outfile, "%s", OP_names[*code++]);
- break;
-
- case OP_NOTEXACT:
- case OP_NOTUPTO:
- case OP_NOTMINUPTO:
- if (isprint(c = code[3])) fprintf(outfile, " [^%c]{", c);
- else fprintf(outfile, " [^\\x%02x]{", c);
- if (*code != OP_NOTEXACT) fprintf(outfile, ",");
- fprintf(outfile, "%d}", (code[1] << 8) + code[2]);
- if (*code == OP_NOTMINUPTO) fprintf(outfile, "?");
- code += 3;
- break;
-
- case OP_REF:
- fprintf(outfile, " \\%d", (code[1] << 8) | code[2]);
- code += 3;
- goto CLASS_REF_REPEAT;
-
- case OP_CLASS:
+ if (rc > 0 && rc <= length + 1) /* Mustn't run over the end */
{
- int i, min, max;
- code++;
- fprintf(outfile, " [");
-
- for (i = 0; i < 256; i++)
+ length -= rc - 1;
+ p += rc;
+ if (c < 256 && isprint(c))
{
- if ((code[i/8] & (1 << (i&7))) != 0)
- {
- int j;
- for (j = i+1; j < 256; j++)
- if ((code[j/8] & (1 << (j&7))) == 0) break;
- if (i == '-' || i == ']') fprintf(outfile, "\\");
- if (isprint(i)) fprintf(outfile, "%c", i); else fprintf(outfile, "\\x%02x", i);
- if (--j > i)
- {
- fprintf(outfile, "-");
- if (j == '-' || j == ']') fprintf(outfile, "\\");
- if (isprint(j)) fprintf(outfile, "%c", j); else fprintf(outfile, "\\x%02x", j);
- }
- i = j;
- }
+ if (f != NULL) fprintf(f, "%c", c);
+ yield++;
}
- fprintf(outfile, "]");
- code += 32;
-
- CLASS_REF_REPEAT:
-
- switch(*code)
+ else
{
- case OP_CRSTAR:
- case OP_CRMINSTAR:
- case OP_CRPLUS:
- case OP_CRMINPLUS:
- case OP_CRQUERY:
- case OP_CRMINQUERY:
- fprintf(outfile, "%s", OP_names[*code]);
- break;
-
- case OP_CRRANGE:
- case OP_CRMINRANGE:
- min = (code[1] << 8) + code[2];
- max = (code[3] << 8) + code[4];
- if (max == 0) fprintf(outfile, "{%d,}", min);
- else fprintf(outfile, "{%d,%d}", min, max);
- if (*code == OP_CRMINRANGE) fprintf(outfile, "?");
- code += 4;
- break;
-
- default:
- code--;
+ int n;
+ if (f != NULL) fprintf(f, "\\x{%02x}%n", c, &n);
+ yield += n;
}
+ continue;
}
- break;
+ }
- /* Anything else is just a one-node item */
+ /* Not UTF-8, or malformed UTF-8 */
- default:
- fprintf(outfile, " %s", OP_names[*code]);
- break;
+ if (isprint(c = *(p++)))
+ {
+ if (f != NULL) fprintf(f, "%c", c);
+ yield++;
+ }
+ else
+ {
+ if (f != NULL) fprintf(f, "\\x%02x", c);
+ yield += 4;
}
-
- code++;
- fprintf(outfile, "\n");
}
+
+return yield;
}
-/* Character string printing function. A "normal" and a UTF-8 version. */
+/*************************************************
+* Callout function *
+*************************************************/
+
+/* Called from PCRE as a result of the (?C) item. We print out where we are in
+the match. Yield zero unless more callouts than the fail count, or the callout
+data is not zero. */
-static void pchars(unsigned char *p, int length, int utf8)
+static int callout(pcre_callout_block *cb)
{
-int c;
-while (length-- > 0)
+FILE *f = (first_callout | callout_extra)? outfile : NULL;
+int i, pre_start, post_start, subject_length;
+
+if (callout_extra)
{
- if (utf8)
+ fprintf(f, "Callout %d: last capture = %d\n",
+ cb->callout_number, cb->capture_last);
+
+ for (i = 0; i < cb->capture_top * 2; i += 2)
{
- int rc = utf82ord(p, &c);
- if (rc > 0)
+ if (cb->offset_vector[i] < 0)
+ fprintf(f, "%2d: <unset>\n", i/2);
+ else
{
- length -= rc - 1;
- p += rc;
- if (c < 256 && isprint(c)) fprintf(outfile, "%c", c);
- else fprintf(outfile, "\\x{%02x}", c);
- continue;
+ fprintf(f, "%2d: ", i/2);
+ (void)pchars((unsigned char *)cb->subject + cb->offset_vector[i],
+ cb->offset_vector[i+1] - cb->offset_vector[i], f);
+ fprintf(f, "\n");
}
}
+ }
- /* Not UTF-8, or malformed UTF-8 */
+/* Re-print the subject in canonical form, the first time or if giving full
+datails. On subsequent calls in the same match, we use pchars just to find the
+printed lengths of the substrings. */
+
+if (f != NULL) fprintf(f, "--->");
+
+pre_start = pchars((unsigned char *)cb->subject, cb->start_match, f);
+post_start = pchars((unsigned char *)(cb->subject + cb->start_match),
+ cb->current_position - cb->start_match, f);
+
+subject_length = pchars((unsigned char *)cb->subject, cb->subject_length, NULL);
+
+(void)pchars((unsigned char *)(cb->subject + cb->current_position),
+ cb->subject_length - cb->current_position, f);
- if (isprint(c = *(p++))) fprintf(outfile, "%c", c);
- else fprintf(outfile, "\\x%02x", c);
+if (f != NULL) fprintf(f, "\n");
+
+/* Always print appropriate indicators, with callout number if not already
+shown. For automatic callouts, show the pattern offset. */
+
+if (cb->callout_number == 255)
+ {
+ fprintf(outfile, "%+3d ", cb->pattern_position);
+ if (cb->pattern_position > 99) fprintf(outfile, "\n ");
}
+else
+ {
+ if (callout_extra) fprintf(outfile, " ");
+ else fprintf(outfile, "%3d ", cb->callout_number);
+ }
+
+for (i = 0; i < pre_start; i++) fprintf(outfile, " ");
+fprintf(outfile, "^");
+
+if (post_start > 0)
+ {
+ for (i = 0; i < post_start - 1; i++) fprintf(outfile, " ");
+ fprintf(outfile, "^");
+ }
+
+for (i = 0; i < subject_length - pre_start - post_start + 4; i++)
+ fprintf(outfile, " ");
+
+fprintf(outfile, "%.*s", (cb->next_item_length == 0)? 1 : cb->next_item_length,
+ pbuffer + cb->pattern_position);
+
+fprintf(outfile, "\n");
+first_callout = 0;
+
+if (cb->callout_data != NULL)
+ {
+ int callout_data = *((int *)(cb->callout_data));
+ if (callout_data != 0)
+ {
+ fprintf(outfile, "Callout data = %d\n", callout_data);
+ return callout_data;
+ }
+ }
+
+return (cb->callout_number != callout_fail_id)? 0 :
+ (++callout_count >= callout_fail_count)? 1 : 0;
}
+/*************************************************
+* Local malloc functions *
+*************************************************/
/* Alternative malloc function, to test functionality and show the size of the
compiled re. */
static void *new_malloc(size_t size)
{
+void *block = malloc(size);
gotten_store = size;
-if (log_store)
- fprintf(outfile, "Memory allocation (code space): %d\n",
- (int)((int)size - offsetof(real_pcre, code[0])));
-return malloc(size);
+if (show_malloc)
+ fprintf(outfile, "malloc %3d %p\n", size, block);
+return block;
+}
+
+static void new_free(void *block)
+{
+if (show_malloc)
+ fprintf(outfile, "free %p\n", block);
+free(block);
}
+/* For recursion malloc/free, to test stacking calls */
+static void *stack_malloc(size_t size)
+{
+void *block = malloc(size);
+if (show_malloc)
+ fprintf(outfile, "stack_malloc %3d %p\n", size, block);
+return block;
+}
+
+static void stack_free(void *block)
+{
+if (show_malloc)
+ fprintf(outfile, "stack_free %p\n", block);
+free(block);
+}
+
+
+/*************************************************
+* Call pcre_fullinfo() *
+*************************************************/
/* Get one piece of information from the pcre_fullinfo() function */
@@ -420,6 +448,26 @@ if ((rc = pcre_fullinfo(re, study, option, ptr)) < 0)
+/*************************************************
+* Byte flipping function *
+*************************************************/
+
+static long int
+byteflip(long int value, int n)
+{
+if (n == 2) return ((value & 0x00ff) << 8) | ((value & 0xff00) >> 8);
+return ((value & 0x000000ff) << 24) |
+ ((value & 0x0000ff00) << 8) |
+ ((value & 0x00ff0000) >> 8) |
+ ((value & 0xff000000) >> 24);
+}
+
+
+
+
+/*************************************************
+* Main Program *
+*************************************************/
/* Read lines from named file or stdin and write to named file or stdout; lines
consist of a regular expression, in delimiters and optionally followed by
@@ -442,10 +490,24 @@ int posix = 0;
#endif
int debug = 0;
int done = 0;
-unsigned char buffer[30000];
-unsigned char dbuffer[1024];
-/* Static so that new_malloc can use it. */
+unsigned char *buffer;
+unsigned char *dbuffer;
+
+/* Get buffers from malloc() so that Electric Fence will check their misuse
+when I am debugging. */
+
+buffer = (unsigned char *)malloc(BUFFER_SIZE);
+dbuffer = (unsigned char *)malloc(DBUFFER_SIZE);
+pbuffer = (unsigned char *)malloc(PBUFFER_SIZE);
+
+/* The outfile variable is static so that new_malloc can use it. The _setmode()
+stuff is some magic that I don't understand, but which apparently does good
+things in Windows. It's related to line terminations. */
+
+#if defined(_WIN32) || defined(WIN32)
+_setmode( _fileno( stdout ), 0x8000 );
+#endif /* defined(_WIN32) || defined(WIN32) */
outfile = stdout;
@@ -453,7 +515,7 @@ outfile = stdout;
while (argc > 1 && argv[op][0] == '-')
{
- char *endptr;
+ unsigned char *endptr;
if (strcmp(argv[op], "-s") == 0 || strcmp(argv[op], "-m") == 0)
showstore = 1;
@@ -461,7 +523,8 @@ while (argc > 1 && argv[op][0] == '-')
else if (strcmp(argv[op], "-i") == 0) showinfo = 1;
else if (strcmp(argv[op], "-d") == 0) showinfo = debug = 1;
else if (strcmp(argv[op], "-o") == 0 && argc > 2 &&
- ((size_offsets = (int)strtoul(argv[op+1], &endptr, 10)), *endptr == 0))
+ ((size_offsets = get_value((unsigned char *)argv[op+1], &endptr)),
+ *endptr == 0))
{
op++;
argc--;
@@ -469,17 +532,40 @@ while (argc > 1 && argv[op][0] == '-')
#if !defined NOPOSIX
else if (strcmp(argv[op], "-p") == 0) posix = 1;
#endif
+ else if (strcmp(argv[op], "-C") == 0)
+ {
+ int rc;
+ printf("PCRE version %s\n", pcre_version());
+ printf("Compiled with\n");
+ (void)pcre_config(PCRE_CONFIG_UTF8, &rc);
+ printf(" %sUTF-8 support\n", rc? "" : "No ");
+ (void)pcre_config(PCRE_CONFIG_UNICODE_PROPERTIES, &rc);
+ printf(" %sUnicode properties support\n", rc? "" : "No ");
+ (void)pcre_config(PCRE_CONFIG_NEWLINE, &rc);
+ printf(" Newline character is %s\n", (rc == '\r')? "CR" : "LF");
+ (void)pcre_config(PCRE_CONFIG_LINK_SIZE, &rc);
+ printf(" Internal link size = %d\n", rc);
+ (void)pcre_config(PCRE_CONFIG_POSIX_MALLOC_THRESHOLD, &rc);
+ printf(" POSIX malloc threshold = %d\n", rc);
+ (void)pcre_config(PCRE_CONFIG_MATCH_LIMIT, &rc);
+ printf(" Default match limit = %d\n", rc);
+ (void)pcre_config(PCRE_CONFIG_STACKRECURSE, &rc);
+ printf(" Match recursion uses %s\n", rc? "stack" : "heap");
+ exit(0);
+ }
else
{
printf("** Unknown or malformed option %s\n", argv[op]);
printf("Usage: pcretest [-d] [-i] [-o <n>] [-p] [-s] [-t] [<input> [<output>]]\n");
+ printf(" -C show PCRE compile-time options and exit\n");
printf(" -d debug: show compiled code; implies -i\n"
" -i show information about compiled pattern\n"
+ " -m output memory used information\n"
" -o <n> set size of offsets vector to <n>\n");
#if !defined NOPOSIX
printf(" -p use POSIX interface\n");
#endif
- printf(" -s output store information\n"
+ printf(" -s output store (memory) used information\n"
" -t time compilation and execution\n");
return 1;
}
@@ -490,7 +576,7 @@ while (argc > 1 && argv[op][0] == '-')
/* Get the store for the offsets vector, and remember what it was */
size_offsets_max = size_offsets;
-offsets = malloc(size_offsets_max * sizeof(int));
+offsets = (int *)malloc(size_offsets_max * sizeof(int));
if (offsets == NULL)
{
printf("** Failed to get %d bytes of memory for offsets vector\n",
@@ -502,7 +588,7 @@ if (offsets == NULL)
if (argc > 1)
{
- infile = fopen(argv[op], "r");
+ infile = fopen(argv[op], "rb");
if (infile == NULL)
{
printf("** Failed to open %s\n", argv[op]);
@@ -512,7 +598,7 @@ if (argc > 1)
if (argc > 2)
{
- outfile = fopen(argv[op+1], "w");
+ outfile = fopen(argv[op+1], "wb");
if (outfile == NULL)
{
printf("** Failed to open %s\n", argv[op+1]);
@@ -523,6 +609,9 @@ if (argc > 2)
/* Set alternative malloc function */
pcre_malloc = new_malloc;
+pcre_free = new_free;
+pcre_stack_malloc = stack_malloc;
+pcre_stack_free = stack_free;
/* Heading line, then prompt for first regex if stdin */
@@ -542,26 +631,117 @@ while (!done)
const char *error;
unsigned char *p, *pp, *ppp;
+ unsigned char *to_file = NULL;
const unsigned char *tables = NULL;
+ unsigned long int true_size, true_study_size = 0;
+ size_t size, regex_gotten_store;
int do_study = 0;
int do_debug = debug;
int do_G = 0;
int do_g = 0;
int do_showinfo = showinfo;
int do_showrest = 0;
- int utf8 = 0;
+ int do_flip = 0;
int erroroffset, len, delimiter;
+ use_utf8 = 0;
+
if (infile == stdin) printf(" re> ");
- if (fgets((char *)buffer, sizeof(buffer), infile) == NULL) break;
+ if (fgets((char *)buffer, BUFFER_SIZE, infile) == NULL) break;
if (infile != stdin) fprintf(outfile, "%s", (char *)buffer);
+ fflush(outfile);
p = buffer;
while (isspace(*p)) p++;
if (*p == 0) continue;
- /* Get the delimiter and seek the end of the pattern; if is isn't
- complete, read more. */
+ /* See if the pattern is to be loaded pre-compiled from a file. */
+
+ if (*p == '<' && strchr((char *)(p+1), '<') == NULL)
+ {
+ unsigned long int magic;
+ uschar sbuf[8];
+ FILE *f;
+
+ p++;
+ pp = p + (int)strlen((char *)p);
+ while (isspace(pp[-1])) pp--;
+ *pp = 0;
+
+ f = fopen((char *)p, "rb");
+ if (f == NULL)
+ {
+ fprintf(outfile, "Failed to open %s: %s\n", p, strerror(errno));
+ continue;
+ }
+
+ if (fread(sbuf, 1, 8, f) != 8) goto FAIL_READ;
+
+ true_size =
+ (sbuf[0] << 24) | (sbuf[1] << 16) | (sbuf[2] << 8) | sbuf[3];
+ true_study_size =
+ (sbuf[4] << 24) | (sbuf[5] << 16) | (sbuf[6] << 8) | sbuf[7];
+
+ re = (real_pcre *)new_malloc(true_size);
+ regex_gotten_store = gotten_store;
+
+ if (fread(re, 1, true_size, f) != true_size) goto FAIL_READ;
+
+ magic = ((real_pcre *)re)->magic_number;
+ if (magic != MAGIC_NUMBER)
+ {
+ if (byteflip(magic, sizeof(magic)) == MAGIC_NUMBER)
+ {
+ do_flip = 1;
+ }
+ else
+ {
+ fprintf(outfile, "Data in %s is not a compiled PCRE regex\n", p);
+ fclose(f);
+ continue;
+ }
+ }
+
+ fprintf(outfile, "Compiled regex%s loaded from %s\n",
+ do_flip? " (byte-inverted)" : "", p);
+
+ /* Need to know if UTF-8 for printing data strings */
+
+ new_info(re, NULL, PCRE_INFO_OPTIONS, &options);
+ use_utf8 = (options & PCRE_UTF8) != 0;
+
+ /* Now see if there is any following study data */
+
+ if (true_study_size != 0)
+ {
+ pcre_study_data *psd;
+
+ extra = (pcre_extra *)new_malloc(sizeof(pcre_extra) + true_study_size);
+ extra->flags = PCRE_EXTRA_STUDY_DATA;
+
+ psd = (pcre_study_data *)(((char *)extra) + sizeof(pcre_extra));
+ extra->study_data = psd;
+
+ if (fread(psd, 1, true_study_size, f) != true_study_size)
+ {
+ FAIL_READ:
+ fprintf(outfile, "Failed to read data from %s\n", p);
+ if (extra != NULL) new_free(extra);
+ if (re != NULL) new_free(re);
+ fclose(f);
+ continue;
+ }
+ fprintf(outfile, "Study data loaded from %s\n", p);
+ do_study = 1; /* To get the data output if requested */
+ }
+ else fprintf(outfile, "No study data\n");
+
+ fclose(f);
+ goto SHOW_INFO;
+ }
+
+ /* In-line pattern (the usual case). Get the delimiter and seek the end of
+ the pattern; if is isn't complete, read more. */
delimiter = *p++;
@@ -583,7 +763,7 @@ while (!done)
}
if (*pp != 0) break;
- len = sizeof(buffer) - (pp - buffer);
+ len = BUFFER_SIZE - (pp - buffer);
if (len < 256)
{
fprintf(outfile, "** Expression too long - missing delimiter?\n");
@@ -606,9 +786,11 @@ while (!done)
if (pp[1] == '\\') *pp++ = '\\';
- /* Terminate the pattern at the delimiter */
+ /* Terminate the pattern at the delimiter, and save a copy of the pattern
+ for callouts. */
*pp++ = 0;
+ strcpy((char *)pbuffer, (char *)p);
/* Look for options after final delimiter */
@@ -628,11 +810,14 @@ while (!done)
case '+': do_showrest = 1; break;
case 'A': options |= PCRE_ANCHORED; break;
+ case 'C': options |= PCRE_AUTO_CALLOUT; break;
case 'D': do_debug = do_showinfo = 1; break;
case 'E': options |= PCRE_DOLLAR_ENDONLY; break;
+ case 'F': do_flip = 1; break;
case 'G': do_G = 1; break;
case 'I': do_showinfo = 1; break;
case 'M': log_store = 1; break;
+ case 'N': options |= PCRE_NO_AUTO_CAPTURE; break;
#if !defined NOPOSIX
case 'P': do_posix = 1; break;
@@ -641,7 +826,8 @@ while (!done)
case 'S': do_study = 1; break;
case 'U': options |= PCRE_UNGREEDY; break;
case 'X': options |= PCRE_EXTRA; break;
- case '8': options |= PCRE_UTF8; utf8 = 1; break;
+ case '8': options |= PCRE_UTF8; use_utf8 = 1; break;
+ case '?': options |= PCRE_NO_UTF8_CHECK; break;
case 'L':
ppp = pp;
@@ -656,7 +842,15 @@ while (!done)
pp = ppp;
break;
+ case '>':
+ to_file = pp;
+ while (*pp != 0) pp++;
+ while (isspace(pp[-1])) pp--;
+ *pp = 0;
+ break;
+
case '\n': case ' ': break;
+
default:
fprintf(outfile, "** Unknown option '%c'\n", pp[-1]);
goto SKIP_DATA;
@@ -672,6 +866,7 @@ while (!done)
{
int rc;
int cflags = 0;
+
if ((options & PCRE_CASELESS) != 0) cflags |= REG_ICASE;
if ((options & PCRE_MULTILINE) != 0) cflags |= REG_NEWLINE;
rc = regcomp(&preg, (char *)p, cflags);
@@ -681,7 +876,7 @@ while (!done)
if (rc != 0)
{
- (void)regerror(rc, &preg, (char *)buffer, sizeof(buffer));
+ (void)regerror(rc, &preg, (char *)buffer, BUFFER_SIZE);
fprintf(outfile, "Failed: POSIX code %d: %s\n", rc, buffer);
goto SKIP_DATA;
}
@@ -705,8 +900,8 @@ while (!done)
}
time_taken = clock() - start_time;
fprintf(outfile, "Compile time %.3f milliseconds\n",
- ((double)time_taken * 1000.0) /
- ((double)LOOPREPEAT * (double)CLOCKS_PER_SEC));
+ (((double)time_taken * 1000.0) / (double)LOOPREPEAT) /
+ (double)CLOCKS_PER_SEC);
}
re = pcre_compile((char *)p, options, &error, &erroroffset, tables);
@@ -722,7 +917,7 @@ while (!done)
{
for (;;)
{
- if (fgets((char *)buffer, sizeof(buffer), infile) == NULL)
+ if (fgets((char *)buffer, BUFFER_SIZE, infile) == NULL)
{
done = 1;
goto CONTINUE;
@@ -740,21 +935,99 @@ while (!done)
info-returning functions. The old one has a limited interface and
returns only limited data. Check that it agrees with the newer one. */
+ if (log_store)
+ fprintf(outfile, "Memory allocation (code space): %d\n",
+ (int)(gotten_store -
+ sizeof(real_pcre) -
+ ((real_pcre *)re)->name_count * ((real_pcre *)re)->name_entry_size));
+
+ /* Extract the size for possible writing before possibly flipping it,
+ and remember the store that was got. */
+
+ true_size = ((real_pcre *)re)->size;
+ regex_gotten_store = gotten_store;
+
+ /* If /S was present, study the regexp to generate additional info to
+ help with the matching. */
+
+ if (do_study)
+ {
+ if (timeit)
+ {
+ register int i;
+ clock_t time_taken;
+ clock_t start_time = clock();
+ for (i = 0; i < LOOPREPEAT; i++)
+ extra = pcre_study(re, study_options, &error);
+ time_taken = clock() - start_time;
+ if (extra != NULL) free(extra);
+ fprintf(outfile, " Study time %.3f milliseconds\n",
+ (((double)time_taken * 1000.0) / (double)LOOPREPEAT) /
+ (double)CLOCKS_PER_SEC);
+ }
+ extra = pcre_study(re, study_options, &error);
+ if (error != NULL)
+ fprintf(outfile, "Failed to study: %s\n", error);
+ else if (extra != NULL)
+ true_study_size = ((pcre_study_data *)(extra->study_data))->size;
+ }
+
+ /* If the 'F' option was present, we flip the bytes of all the integer
+ fields in the regex data block and the study block. This is to make it
+ possible to test PCRE's handling of byte-flipped patterns, e.g. those
+ compiled on a different architecture. */
+
+ if (do_flip)
+ {
+ real_pcre *rre = (real_pcre *)re;
+ rre->magic_number = byteflip(rre->magic_number, sizeof(rre->magic_number));
+ rre->size = byteflip(rre->size, sizeof(rre->size));
+ rre->options = byteflip(rre->options, sizeof(rre->options));
+ rre->top_bracket = byteflip(rre->top_bracket, sizeof(rre->top_bracket));
+ rre->top_backref = byteflip(rre->top_backref, sizeof(rre->top_backref));
+ rre->first_byte = byteflip(rre->first_byte, sizeof(rre->first_byte));
+ rre->req_byte = byteflip(rre->req_byte, sizeof(rre->req_byte));
+ rre->name_table_offset = byteflip(rre->name_table_offset,
+ sizeof(rre->name_table_offset));
+ rre->name_entry_size = byteflip(rre->name_entry_size,
+ sizeof(rre->name_entry_size));
+ rre->name_count = byteflip(rre->name_count, sizeof(rre->name_count));
+
+ if (extra != NULL)
+ {
+ pcre_study_data *rsd = (pcre_study_data *)(extra->study_data);
+ rsd->size = byteflip(rsd->size, sizeof(rsd->size));
+ rsd->options = byteflip(rsd->options, sizeof(rsd->options));
+ }
+ }
+
+ /* Extract information from the compiled data if required */
+
+ SHOW_INFO:
+
if (do_showinfo)
{
- unsigned long int get_options;
+ unsigned long int get_options, all_options;
int old_first_char, old_options, old_count;
int count, backrefmax, first_char, need_char;
- size_t size;
+ int nameentrysize, namecount;
+ const uschar *nametable;
- if (do_debug) print_internals(re);
+ if (do_debug)
+ {
+ fprintf(outfile, "------------------------------------------------------------------\n");
+ print_internals(re, outfile);
+ }
new_info(re, NULL, PCRE_INFO_OPTIONS, &get_options);
new_info(re, NULL, PCRE_INFO_SIZE, &size);
new_info(re, NULL, PCRE_INFO_CAPTURECOUNT, &count);
new_info(re, NULL, PCRE_INFO_BACKREFMAX, &backrefmax);
- new_info(re, NULL, PCRE_INFO_FIRSTCHAR, &first_char);
+ new_info(re, NULL, PCRE_INFO_FIRSTBYTE, &first_char);
new_info(re, NULL, PCRE_INFO_LASTLITERAL, &need_char);
+ new_info(re, NULL, PCRE_INFO_NAMEENTRYSIZE, &nameentrysize);
+ new_info(re, NULL, PCRE_INFO_NAMECOUNT, &namecount);
+ new_info(re, NULL, PCRE_INFO_NAMETABLE, (void *)&nametable);
old_count = pcre_info(re, &old_options, &old_first_char);
if (count < 0) fprintf(outfile,
@@ -774,15 +1047,40 @@ while (!done)
get_options, old_options);
}
- if (size != gotten_store) fprintf(outfile,
+ if (size != regex_gotten_store) fprintf(outfile,
"Size disagreement: pcre_fullinfo=%d call to malloc for %d\n",
- size, gotten_store);
+ size, regex_gotten_store);
fprintf(outfile, "Capturing subpattern count = %d\n", count);
if (backrefmax > 0)
fprintf(outfile, "Max back reference = %d\n", backrefmax);
+
+ if (namecount > 0)
+ {
+ fprintf(outfile, "Named capturing subpatterns:\n");
+ while (namecount-- > 0)
+ {
+ fprintf(outfile, " %s %*s%3d\n", nametable + 2,
+ nameentrysize - 3 - (int)strlen((char *)nametable + 2), "",
+ GET2(nametable, 0));
+ nametable += nameentrysize;
+ }
+ }
+
+ /* The NOPARTIAL bit is a private bit in the options, so we have
+ to fish it out via out back door */
+
+ all_options = ((real_pcre *)re)->options;
+ if (do_flip)
+ {
+ all_options = byteflip(all_options, sizeof(all_options));
+ }
+
+ if ((all_options & PCRE_NOPARTIAL) != 0)
+ fprintf(outfile, "Partial matching not supported\n");
+
if (get_options == 0) fprintf(outfile, "No options\n");
- else fprintf(outfile, "Options:%s%s%s%s%s%s%s%s%s\n",
+ else fprintf(outfile, "Options:%s%s%s%s%s%s%s%s%s%s\n",
((get_options & PCRE_ANCHORED) != 0)? " anchored" : "",
((get_options & PCRE_CASELESS) != 0)? " caseless" : "",
((get_options & PCRE_EXTENDED) != 0)? " extended" : "",
@@ -791,7 +1089,8 @@ while (!done)
((get_options & PCRE_DOLLAR_ENDONLY) != 0)? " dollar_endonly" : "",
((get_options & PCRE_EXTRA) != 0)? " extra" : "",
((get_options & PCRE_UNGREEDY) != 0)? " ungreedy" : "",
- ((get_options & PCRE_UTF8) != 0)? " utf8" : "");
+ ((get_options & PCRE_UTF8) != 0)? " utf8" : "",
+ ((get_options & PCRE_NO_UTF8_CHECK) != 0)? " no_utf8_check" : "");
if (((((real_pcre *)re)->options) & PCRE_ICHANGED) != 0)
fprintf(outfile, "Case state changes\n");
@@ -806,10 +1105,13 @@ while (!done)
}
else
{
- if (isprint(first_char))
- fprintf(outfile, "First char = \'%c\'\n", first_char);
+ int ch = first_char & 255;
+ const char *caseless = ((first_char & REQ_CASELESS) == 0)?
+ "" : " (caseless)";
+ if (isprint(ch))
+ fprintf(outfile, "First char = \'%c\'%s\n", ch, caseless);
else
- fprintf(outfile, "First char = %d\n", first_char);
+ fprintf(outfile, "First char = %d%s\n", ch, caseless);
}
if (need_char < 0)
@@ -818,75 +1120,111 @@ while (!done)
}
else
{
- if (isprint(need_char))
- fprintf(outfile, "Need char = \'%c\'\n", need_char);
+ int ch = need_char & 255;
+ const char *caseless = ((need_char & REQ_CASELESS) == 0)?
+ "" : " (caseless)";
+ if (isprint(ch))
+ fprintf(outfile, "Need char = \'%c\'%s\n", ch, caseless);
else
- fprintf(outfile, "Need char = %d\n", need_char);
+ fprintf(outfile, "Need char = %d%s\n", ch, caseless);
}
- }
- /* If /S was present, study the regexp to generate additional info to
- help with the matching. */
+ /* Don't output study size; at present it is in any case a fixed
+ value, but it varies, depending on the computer architecture, and
+ so messes up the test suite. (And with the /F option, it might be
+ flipped.) */
- if (do_study)
- {
- if (timeit)
+ if (do_study)
{
- register int i;
- clock_t time_taken;
- clock_t start_time = clock();
- for (i = 0; i < LOOPREPEAT; i++)
- extra = pcre_study(re, study_options, &error);
- time_taken = clock() - start_time;
- if (extra != NULL) free(extra);
- fprintf(outfile, " Study time %.3f milliseconds\n",
- ((double)time_taken * 1000.0)/
- ((double)LOOPREPEAT * (double)CLOCKS_PER_SEC));
+ if (extra == NULL)
+ fprintf(outfile, "Study returned NULL\n");
+ else
+ {
+ uschar *start_bits = NULL;
+ new_info(re, extra, PCRE_INFO_FIRSTTABLE, &start_bits);
+
+ if (start_bits == NULL)
+ fprintf(outfile, "No starting byte set\n");
+ else
+ {
+ int i;
+ int c = 24;
+ fprintf(outfile, "Starting byte set: ");
+ for (i = 0; i < 256; i++)
+ {
+ if ((start_bits[i/8] & (1<<(i&7))) != 0)
+ {
+ if (c > 75)
+ {
+ fprintf(outfile, "\n ");
+ c = 2;
+ }
+ if (isprint(i) && i != ' ')
+ {
+ fprintf(outfile, "%c ", i);
+ c += 2;
+ }
+ else
+ {
+ fprintf(outfile, "\\x%02x ", i);
+ c += 5;
+ }
+ }
+ }
+ fprintf(outfile, "\n");
+ }
+ }
}
+ }
- extra = pcre_study(re, study_options, &error);
- if (error != NULL)
- fprintf(outfile, "Failed to study: %s\n", error);
- else if (extra == NULL)
- fprintf(outfile, "Study returned NULL\n");
+ /* If the '>' option was present, we write out the regex to a file, and
+ that is all. The first 8 bytes of the file are the regex length and then
+ the study length, in big-endian order. */
- else if (do_showinfo)
+ if (to_file != NULL)
+ {
+ FILE *f = fopen((char *)to_file, "wb");
+ if (f == NULL)
{
- uschar *start_bits = NULL;
- new_info(re, extra, PCRE_INFO_FIRSTTABLE, &start_bits);
- if (start_bits == NULL)
- fprintf(outfile, "No starting character set\n");
+ fprintf(outfile, "Unable to open %s: %s\n", to_file, strerror(errno));
+ }
+ else
+ {
+ uschar sbuf[8];
+ sbuf[0] = (true_size >> 24) & 255;
+ sbuf[1] = (true_size >> 16) & 255;
+ sbuf[2] = (true_size >> 8) & 255;
+ sbuf[3] = (true_size) & 255;
+
+ sbuf[4] = (true_study_size >> 24) & 255;
+ sbuf[5] = (true_study_size >> 16) & 255;
+ sbuf[6] = (true_study_size >> 8) & 255;
+ sbuf[7] = (true_study_size) & 255;
+
+ if (fwrite(sbuf, 1, 8, f) < 8 ||
+ fwrite(re, 1, true_size, f) < true_size)
+ {
+ fprintf(outfile, "Write error on %s: %s\n", to_file, strerror(errno));
+ }
else
{
- int i;
- int c = 24;
- fprintf(outfile, "Starting character set: ");
- for (i = 0; i < 256; i++)
+ fprintf(outfile, "Compiled regex written to %s\n", to_file);
+ if (extra != NULL)
{
- if ((start_bits[i/8] & (1<<(i%8))) != 0)
+ if (fwrite(extra->study_data, 1, true_study_size, f) <
+ true_study_size)
{
- if (c > 75)
- {
- fprintf(outfile, "\n ");
- c = 2;
- }
- if (isprint(i) && i != ' ')
- {
- fprintf(outfile, "%c ", i);
- c += 2;
- }
- else
- {
- fprintf(outfile, "\\x%02x ", i);
- c += 5;
- }
+ fprintf(outfile, "Write error on %s: %s\n", to_file,
+ strerror(errno));
}
+ else fprintf(outfile, "Study data written to %s\n", to_file);
}
- fprintf(outfile, "\n");
}
+ fclose(f);
}
+ continue; /* With next regex */
}
- }
+ } /* End of non-POSIX compile */
/* Read data lines and test them */
@@ -896,8 +1234,11 @@ while (!done)
unsigned char *bptr = dbuffer;
int *use_offsets = offsets;
int use_size_offsets = size_offsets;
+ int callout_data = 0;
+ int callout_data_set = 0;
int count, c;
int copystrings = 0;
+ int find_match_limit = 0;
int getstrings = 0;
int getlist = 0;
int gmatched = 0;
@@ -906,8 +1247,16 @@ while (!done)
options = 0;
+ pcre_callout = callout;
+ first_callout = 1;
+ callout_extra = 0;
+ callout_count = 0;
+ callout_fail_count = 999999;
+ callout_fail_id = -1;
+ show_malloc = 0;
+
if (infile == stdin) printf("data> ");
- if (fgets((char *)buffer, sizeof(buffer), infile) == NULL)
+ if (fgets((char *)buffer, BUFFER_SIZE, infile) == NULL)
{
done = 1;
goto CONTINUE;
@@ -927,6 +1276,7 @@ while (!done)
{
int i = 0;
int n = 0;
+
if (c == '\\') switch ((c = *p++))
{
case 'a': c = 7; break;
@@ -957,11 +1307,11 @@ while (!done)
c = c * 16 + tolower(*pt) - ((isdigit(*pt))? '0' : 'W');
if (*pt == '}')
{
- unsigned char buffer[8];
+ unsigned char buff8[8];
int ii, utn;
- utn = ord2utf8(c, buffer);
- for (ii = 0; ii < utn - 1; ii++) *q++ = buffer[ii];
- c = buffer[ii]; /* Last byte */
+ utn = ord2utf8(c, buff8);
+ for (ii = 0; ii < utn - 1; ii++) *q++ = buff8[ii];
+ c = buff8[ii]; /* Last byte */
p = pt + 1;
break;
}
@@ -978,10 +1328,14 @@ while (!done)
}
break;
- case 0: /* Allows for an empty line */
+ case 0: /* \ followed by EOF allows for an empty line */
p--;
continue;
+ case '>':
+ while(isdigit(*p)) start_offset = start_offset * 10 + *p++ - '0';
+ continue;
+
case 'A': /* Option setting */
options |= PCRE_ANCHORED;
continue;
@@ -991,19 +1345,85 @@ while (!done)
continue;
case 'C':
- while(isdigit(*p)) n = n * 10 + *p++ - '0';
- copystrings |= 1 << n;
+ if (isdigit(*p)) /* Set copy string */
+ {
+ while(isdigit(*p)) n = n * 10 + *p++ - '0';
+ copystrings |= 1 << n;
+ }
+ else if (isalnum(*p))
+ {
+ uschar name[256];
+ uschar *npp = name;
+ while (isalnum(*p)) *npp++ = *p++;
+ *npp = 0;
+ n = pcre_get_stringnumber(re, (char *)name);
+ if (n < 0)
+ fprintf(outfile, "no parentheses with name \"%s\"\n", name);
+ else copystrings |= 1 << n;
+ }
+ else if (*p == '+')
+ {
+ callout_extra = 1;
+ p++;
+ }
+ else if (*p == '-')
+ {
+ pcre_callout = NULL;
+ p++;
+ }
+ else if (*p == '!')
+ {
+ callout_fail_id = 0;
+ p++;
+ while(isdigit(*p))
+ callout_fail_id = callout_fail_id * 10 + *p++ - '0';
+ callout_fail_count = 0;
+ if (*p == '!')
+ {
+ p++;
+ while(isdigit(*p))
+ callout_fail_count = callout_fail_count * 10 + *p++ - '0';
+ }
+ }
+ else if (*p == '*')
+ {
+ int sign = 1;
+ callout_data = 0;
+ if (*(++p) == '-') { sign = -1; p++; }
+ while(isdigit(*p))
+ callout_data = callout_data * 10 + *p++ - '0';
+ callout_data *= sign;
+ callout_data_set = 1;
+ }
continue;
case 'G':
- while(isdigit(*p)) n = n * 10 + *p++ - '0';
- getstrings |= 1 << n;
+ if (isdigit(*p))
+ {
+ while(isdigit(*p)) n = n * 10 + *p++ - '0';
+ getstrings |= 1 << n;
+ }
+ else if (isalnum(*p))
+ {
+ uschar name[256];
+ uschar *npp = name;
+ while (isalnum(*p)) *npp++ = *p++;
+ *npp = 0;
+ n = pcre_get_stringnumber(re, (char *)name);
+ if (n < 0)
+ fprintf(outfile, "no parentheses with name \"%s\"\n", name);
+ else getstrings |= 1 << n;
+ }
continue;
case 'L':
getlist = 1;
continue;
+ case 'M':
+ find_match_limit = 1;
+ continue;
+
case 'N':
options |= PCRE_NOTEMPTY;
continue;
@@ -1014,7 +1434,7 @@ while (!done)
{
size_offsets_max = n;
free(offsets);
- use_offsets = offsets = malloc(size_offsets_max * sizeof(int));
+ use_offsets = offsets = (int *)malloc(size_offsets_max * sizeof(int));
if (offsets == NULL)
{
printf("** Failed to get %d bytes of memory for offsets vector\n",
@@ -1023,12 +1443,24 @@ while (!done)
}
}
use_size_offsets = n;
- if (n == 0) use_offsets = NULL;
+ if (n == 0) use_offsets = NULL; /* Ensures it can't write to it */
+ continue;
+
+ case 'P':
+ options |= PCRE_PARTIAL;
+ continue;
+
+ case 'S':
+ show_malloc = 1;
continue;
case 'Z':
options |= PCRE_NOTEOL;
continue;
+
+ case '?':
+ options |= PCRE_NO_UTF8_CHECK;
+ continue;
}
*q++ = c;
}
@@ -1036,14 +1468,16 @@ while (!done)
len = q - dbuffer;
/* Handle matching via the POSIX interface, which does not
- support timing. */
+ support timing or playing with the match limit or callout data. */
#if !defined NOPOSIX
if (posix || do_posix)
{
int rc;
int eflags = 0;
- regmatch_t *pmatch = malloc(sizeof(regmatch_t) * use_size_offsets);
+ regmatch_t *pmatch = NULL;
+ if (use_size_offsets > 0)
+ pmatch = (regmatch_t *)malloc(sizeof(regmatch_t) * use_size_offsets);
if ((options & PCRE_NOTBOL) != 0) eflags |= REG_NOTBOL;
if ((options & PCRE_NOTEOL) != 0) eflags |= REG_NOTEOL;
@@ -1051,24 +1485,25 @@ while (!done)
if (rc != 0)
{
- (void)regerror(rc, &preg, (char *)buffer, sizeof(buffer));
+ (void)regerror(rc, &preg, (char *)buffer, BUFFER_SIZE);
fprintf(outfile, "No match: POSIX code %d: %s\n", rc, buffer);
}
else
{
size_t i;
- for (i = 0; i < use_size_offsets; i++)
+ for (i = 0; i < (size_t)use_size_offsets; i++)
{
if (pmatch[i].rm_so >= 0)
{
fprintf(outfile, "%2d: ", (int)i);
- pchars(dbuffer + pmatch[i].rm_so,
- pmatch[i].rm_eo - pmatch[i].rm_so, utf8);
+ (void)pchars(dbuffer + pmatch[i].rm_so,
+ pmatch[i].rm_eo - pmatch[i].rm_so, outfile);
fprintf(outfile, "\n");
if (i == 0 && do_showrest)
{
fprintf(outfile, " 0+ ");
- pchars(dbuffer + pmatch[i].rm_eo, len - pmatch[i].rm_eo, utf8);
+ (void)pchars(dbuffer + pmatch[i].rm_eo, len - pmatch[i].rm_eo,
+ outfile);
fprintf(outfile, "\n");
}
}
@@ -1094,12 +1529,79 @@ while (!done)
start_offset, options | g_notempty, use_offsets, use_size_offsets);
time_taken = clock() - start_time;
fprintf(outfile, "Execute time %.3f milliseconds\n",
- ((double)time_taken * 1000.0)/
- ((double)LOOPREPEAT * (double)CLOCKS_PER_SEC));
+ (((double)time_taken * 1000.0) / (double)LOOPREPEAT) /
+ (double)CLOCKS_PER_SEC);
+ }
+
+ /* If find_match_limit is set, we want to do repeated matches with
+ varying limits in order to find the minimum value. */
+
+ if (find_match_limit)
+ {
+ int min = 0;
+ int mid = 64;
+ int max = -1;
+
+ if (extra == NULL)
+ {
+ extra = (pcre_extra *)malloc(sizeof(pcre_extra));
+ extra->flags = 0;
+ }
+ extra->flags |= PCRE_EXTRA_MATCH_LIMIT;
+
+ for (;;)
+ {
+ extra->match_limit = mid;
+ count = pcre_exec(re, extra, (char *)bptr, len, start_offset,
+ options | g_notempty, use_offsets, use_size_offsets);
+ if (count == PCRE_ERROR_MATCHLIMIT)
+ {
+ /* fprintf(outfile, "Testing match limit = %d\n", mid); */
+ min = mid;
+ mid = (mid == max - 1)? max : (max > 0)? (min + max)/2 : mid*2;
+ }
+ else if (count >= 0 || count == PCRE_ERROR_NOMATCH ||
+ count == PCRE_ERROR_PARTIAL)
+ {
+ if (mid == min + 1)
+ {
+ fprintf(outfile, "Minimum match limit = %d\n", mid);
+ break;
+ }
+ /* fprintf(outfile, "Testing match limit = %d\n", mid); */
+ max = mid;
+ mid = (min + mid)/2;
+ }
+ else break; /* Some other error */
+ }
+
+ extra->flags &= ~PCRE_EXTRA_MATCH_LIMIT;
}
- count = pcre_exec(re, extra, (char *)bptr, len,
- start_offset, options | g_notempty, use_offsets, use_size_offsets);
+ /* If callout_data is set, use the interface with additional data */
+
+ else if (callout_data_set)
+ {
+ if (extra == NULL)
+ {
+ extra = (pcre_extra *)malloc(sizeof(pcre_extra));
+ extra->flags = 0;
+ }
+ extra->flags |= PCRE_EXTRA_CALLOUT_DATA;
+ extra->callout_data = &callout_data;
+ count = pcre_exec(re, extra, (char *)bptr, len, start_offset,
+ options | g_notempty, use_offsets, use_size_offsets);
+ extra->flags &= ~PCRE_EXTRA_CALLOUT_DATA;
+ }
+
+ /* The normal case is just to do the match once, with the default
+ value of match_limit. */
+
+ else
+ {
+ count = pcre_exec(re, extra, (char *)bptr, len,
+ start_offset, options | g_notempty, use_offsets, use_size_offsets);
+ }
if (count == 0)
{
@@ -1119,14 +1621,16 @@ while (!done)
else
{
fprintf(outfile, "%2d: ", i/2);
- pchars(bptr + use_offsets[i], use_offsets[i+1] - use_offsets[i], utf8);
+ (void)pchars(bptr + use_offsets[i],
+ use_offsets[i+1] - use_offsets[i], outfile);
fprintf(outfile, "\n");
if (i == 0)
{
if (do_showrest)
{
fprintf(outfile, " 0+ ");
- pchars(bptr + use_offsets[i+1], len - use_offsets[i+1], utf8);
+ (void)pchars(bptr + use_offsets[i+1], len - use_offsets[i+1],
+ outfile);
fprintf(outfile, "\n");
}
}
@@ -1184,26 +1688,46 @@ while (!done)
}
}
+ /* There was a partial match */
+
+ else if (count == PCRE_ERROR_PARTIAL)
+ {
+ fprintf(outfile, "Partial match\n");
+ break; /* Out of the /g loop */
+ }
+
/* Failed to match. If this is a /g or /G loop and we previously set
g_notempty after a null match, this is not necessarily the end.
- We want to advance the start offset, and continue. Fudge the offset
- values to achieve this. We won't be at the end of the string - that
- was checked before setting g_notempty. */
+ We want to advance the start offset, and continue. In the case of UTF-8
+ matching, the advance must be one character, not one byte. Fudge the
+ offset values to achieve this. We won't be at the end of the string -
+ that was checked before setting g_notempty. */
else
{
if (g_notempty != 0)
{
+ int onechar = 1;
use_offsets[0] = start_offset;
- use_offsets[1] = start_offset + 1;
+ if (use_utf8)
+ {
+ while (start_offset + onechar < len)
+ {
+ int tb = bptr[start_offset+onechar];
+ if (tb <= 127) break;
+ tb &= 0xc0;
+ if (tb != 0 && tb != 0xc0) onechar++;
+ }
+ }
+ use_offsets[1] = start_offset + onechar;
}
else
{
- if (gmatched == 0) /* Error if no previous matches */
+ if (count == PCRE_ERROR_NOMATCH)
{
- if (count == -1) fprintf(outfile, "No match\n");
- else fprintf(outfile, "Error %d\n", count);
+ if (gmatched == 0) fprintf(outfile, "No match\n");
}
+ else fprintf(outfile, "Error %d\n", count);
break; /* Out of the /g loop */
}
}
@@ -1255,7 +1779,7 @@ while (!done)
}
}
-fprintf(outfile, "\n");
+if (infile == stdin) fprintf(outfile, "\n");
return 0;
}
diff --git a/srclib/pcre/perltest b/srclib/pcre/perltest
index e6f797498c..44afbea63c 100755
--- a/srclib/pcre/perltest
+++ b/srclib/pcre/perltest
@@ -1,19 +1,39 @@
#! /usr/bin/perl
# Program for testing regular expressions with perl to check that PCRE handles
-# them the same.
+# them the same. This is the version that supports /8 for UTF-8 testing. As it
+# stands, it requires at least Perl 5.8 for UTF-8 support. For Perl 5.6, it
+# can be used as is for non-UTF-8 testing, but you have to uncomment the
+# "use utf8" lines in order to to UTF-8 stuff (and you mustn't uncomment them
+# for non-UTF-8 use).
-# Function for turning a string into a string of printing chars
+# Function for turning a string into a string of printing chars. There are
+# currently problems with UTF-8 strings; this fudges round them.
sub pchars {
my($t) = "";
-foreach $c (split(//, $_[0]))
+if ($utf8)
{
- if (ord $c >= 32 && ord $c < 127) { $t .= $c; }
- else { $t .= sprintf("\\x%02x", ord $c); }
+# use utf8; <=============== For UTF-8 in Perl 5.6
+ @p = unpack('U*', $_[0]);
+ foreach $c (@p)
+ {
+ if ($c >= 32 && $c < 127) { $t .= chr $c; }
+ else { $t .= sprintf("\\x{%02x}", $c); }
+ }
}
+
+else
+ {
+ foreach $c (split(//, $_[0]))
+ {
+ if (ord $c >= 32 && ord $c < 127) { $t .= $c; }
+ else { $t .= sprintf("\\x%02x", ord $c); }
+ }
+ }
+
$t;
}
@@ -64,14 +84,27 @@ for (;;)
chomp($pattern);
$pattern =~ s/\s+$//;
- # The private /+ modifier means "print $' afterwards". We use it
- # only on the end of patterns to make it easy to chop off here.
+ # The private /+ modifier means "print $' afterwards".
$showrest = ($pattern =~ s/\+(?=[a-z]*$)//);
+ # The private /8 modifier means "operate in UTF-8". Currently, Perl
+ # has bugs that we try to work around using this flag.
+
+ $utf8 = ($pattern =~ s/8(?=[a-z]*$)//);
+
# Check that the pattern is valid
- eval "\$_ =~ ${pattern}";
+ if ($utf8)
+ {
+# use utf8; <=============== For UTF-8 in Perl 5.6
+ eval "\$_ =~ ${pattern}";
+ }
+ else
+ {
+ eval "\$_ =~ ${pattern}";
+ }
+
if ($@)
{
printf $outfile "Error: $@";
@@ -112,8 +145,7 @@ for (;;)
@subs = ();
- eval "${cmd} (\$x =~ ${pattern}) {" .
- "push \@subs,\$&;" .
+ $pushes = "push \@subs,\$&;" .
"push \@subs,\$1;" .
"push \@subs,\$2;" .
"push \@subs,\$3;" .
@@ -132,6 +164,16 @@ for (;;)
"push \@subs,\$16;" .
"push \@subs,\$'; }";
+ if ($utf8)
+ {
+# use utf8; <=============== For UTF-8 in Perl 5.6
+ eval "${cmd} (\$x =~ ${pattern}) {" . $pushes;
+ }
+ else
+ {
+ eval "${cmd} (\$x =~ ${pattern}) {" . $pushes;
+ }
+
if ($@)
{
printf $outfile "Error: $@\n";
@@ -164,6 +206,6 @@ for (;;)
}
}
-printf $outfile "\n";
+# printf $outfile "\n";
# End
diff --git a/srclib/pcre/printint.c b/srclib/pcre/printint.c
new file mode 100644
index 0000000000..8e5da42684
--- /dev/null
+++ b/srclib/pcre/printint.c
@@ -0,0 +1,461 @@
+/*************************************************
+* Perl-Compatible Regular Expressions *
+*************************************************/
+
+/*
+This is a library of functions to support regular expressions whose syntax
+and semantics are as close as possible to those of the Perl 5 language. See
+the file Tech.Notes for some information on the internals.
+
+Written by: Philip Hazel <ph10@cam.ac.uk>
+
+ Copyright (c) 1997-2004 University of Cambridge
+
+-----------------------------------------------------------------------------
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------------
+*/
+
+
+/* This module contains a debugging function for printing out the internal form
+of a compiled regular expression. It is kept in a separate file so that it can
+be #included both in the pcretest program, and in the library itself when
+compiled with the debugging switch. */
+
+
+static const char *OP_names[] = { OP_NAME_LIST };
+
+
+/*************************************************
+* Print single- or multi-byte character *
+*************************************************/
+
+/* These tables are actually copies of ones in pcre.c. If we compile the
+library with debugging, they are included twice, but that isn't really a
+problem - compiling with debugging is pretty rare and these are very small. */
+
+static const int utf8_t3[] = { 0xff, 0x1f, 0x0f, 0x07, 0x03, 0x01};
+
+static const uschar utf8_t4[] = {
+ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+ 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
+ 3,3,3,3,3,3,3,3,4,4,4,4,5,5,5,5 };
+
+static int
+print_char(FILE *f, uschar *ptr, BOOL utf8)
+{
+int c = *ptr;
+
+if (!utf8 || (c & 0xc0) != 0xc0)
+ {
+ if (isprint(c)) fprintf(f, "%c", c); else fprintf(f, "\\x%02x", c);
+ return 0;
+ }
+else
+ {
+ int i;
+ int a = utf8_t4[c & 0x3f]; /* Number of additional bytes */
+ int s = 6*a;
+ c = (c & utf8_t3[a]) << s;
+ for (i = 1; i <= a; i++)
+ {
+ /* This is a check for malformed UTF-8; it should only occur if the sanity
+ check has been turned off. Rather than swallow random bytes, just stop if
+ we hit a bad one. Print it with \X instead of \x as an indication. */
+
+ if ((ptr[i] & 0xc0) != 0x80)
+ {
+ fprintf(f, "\\X{%x}", c);
+ return i - 1;
+ }
+
+ /* The byte is OK */
+
+ s -= 6;
+ c |= (ptr[i] & 0x3f) << s;
+ }
+ if (c < 128) fprintf(f, "\\x%02x", c); else fprintf(f, "\\x{%x}", c);
+ return a;
+ }
+}
+
+
+
+
+/*************************************************
+* Find Unicode property name *
+*************************************************/
+
+static const char *
+get_ucpname(int property)
+{
+int i;
+for (i = sizeof(utt)/sizeof(ucp_type_table); i >= 0; i--)
+ {
+ if (property == utt[i].value) break;
+ }
+return (i >= 0)? utt[i].name : "??";
+}
+
+
+
+/*************************************************
+* Print compiled regex *
+*************************************************/
+
+/* Make this function work for a regex with integers either byte order.
+However, we assume that what we are passed is a compiled regex. */
+
+static void
+print_internals(pcre *external_re, FILE *f)
+{
+real_pcre *re = (real_pcre *)external_re;
+uschar *codestart, *code;
+BOOL utf8;
+
+unsigned int options = re->options;
+int offset = re->name_table_offset;
+int count = re->name_count;
+int size = re->name_entry_size;
+
+if (re->magic_number != MAGIC_NUMBER)
+ {
+ offset = ((offset << 8) & 0xff00) | ((offset >> 8) & 0xff);
+ count = ((count << 8) & 0xff00) | ((count >> 8) & 0xff);
+ size = ((size << 8) & 0xff00) | ((size >> 8) & 0xff);
+ options = ((options << 24) & 0xff000000) |
+ ((options << 8) & 0x00ff0000) |
+ ((options >> 8) & 0x0000ff00) |
+ ((options >> 24) & 0x000000ff);
+ }
+
+code = codestart = (uschar *)re + offset + count * size;
+utf8 = (options & PCRE_UTF8) != 0;
+
+for(;;)
+ {
+ uschar *ccode;
+ int c;
+ int extra = 0;
+
+ fprintf(f, "%3d ", code - codestart);
+
+ if (*code >= OP_BRA)
+ {
+ if (*code - OP_BRA > EXTRACT_BASIC_MAX)
+ fprintf(f, "%3d Bra extra\n", GET(code, 1));
+ else
+ fprintf(f, "%3d Bra %d\n", GET(code, 1), *code - OP_BRA);
+ code += OP_lengths[OP_BRA];
+ continue;
+ }
+
+ switch(*code)
+ {
+ case OP_END:
+ fprintf(f, " %s\n", OP_names[*code]);
+ fprintf(f, "------------------------------------------------------------------\n");
+ return;
+
+ case OP_OPT:
+ fprintf(f, " %.2x %s", code[1], OP_names[*code]);
+ break;
+
+ case OP_CHAR:
+ {
+ fprintf(f, " ");
+ do
+ {
+ code++;
+ code += 1 + print_char(f, code, utf8);
+ }
+ while (*code == OP_CHAR);
+ fprintf(f, "\n");
+ continue;
+ }
+ break;
+
+ case OP_CHARNC:
+ {
+ fprintf(f, " NC ");
+ do
+ {
+ code++;
+ code += 1 + print_char(f, code, utf8);
+ }
+ while (*code == OP_CHARNC);
+ fprintf(f, "\n");
+ continue;
+ }
+ break;
+
+ case OP_KETRMAX:
+ case OP_KETRMIN:
+ case OP_ALT:
+ case OP_KET:
+ case OP_ASSERT:
+ case OP_ASSERT_NOT:
+ case OP_ASSERTBACK:
+ case OP_ASSERTBACK_NOT:
+ case OP_ONCE:
+ case OP_COND:
+ case OP_REVERSE:
+ fprintf(f, "%3d %s", GET(code, 1), OP_names[*code]);
+ break;
+
+ case OP_BRANUMBER:
+ printf("%3d %s", GET2(code, 1), OP_names[*code]);
+ break;
+
+ case OP_CREF:
+ if (GET2(code, 1) == CREF_RECURSE)
+ fprintf(f, " Cond recurse");
+ else
+ fprintf(f, "%3d %s", GET2(code,1), OP_names[*code]);
+ break;
+
+ case OP_STAR:
+ case OP_MINSTAR:
+ case OP_PLUS:
+ case OP_MINPLUS:
+ case OP_QUERY:
+ case OP_MINQUERY:
+ case OP_TYPESTAR:
+ case OP_TYPEMINSTAR:
+ case OP_TYPEPLUS:
+ case OP_TYPEMINPLUS:
+ case OP_TYPEQUERY:
+ case OP_TYPEMINQUERY:
+ fprintf(f, " ");
+ if (*code >= OP_TYPESTAR)
+ {
+ fprintf(f, "%s", OP_names[code[1]]);
+ if (code[1] == OP_PROP || code[1] == OP_NOTPROP)
+ {
+ fprintf(f, " %s ", get_ucpname(code[2]));
+ extra = 1;
+ }
+ }
+ else extra = print_char(f, code+1, utf8);
+ fprintf(f, "%s", OP_names[*code]);
+ break;
+
+ case OP_EXACT:
+ case OP_UPTO:
+ case OP_MINUPTO:
+ fprintf(f, " ");
+ extra = print_char(f, code+3, utf8);
+ fprintf(f, "{");
+ if (*code != OP_EXACT) fprintf(f, ",");
+ fprintf(f, "%d}", GET2(code,1));
+ if (*code == OP_MINUPTO) fprintf(f, "?");
+ break;
+
+ case OP_TYPEEXACT:
+ case OP_TYPEUPTO:
+ case OP_TYPEMINUPTO:
+ fprintf(f, " %s", OP_names[code[3]]);
+ if (code[3] == OP_PROP || code[3] == OP_NOTPROP)
+ {
+ fprintf(f, " %s ", get_ucpname(code[4]));
+ extra = 1;
+ }
+ fprintf(f, "{");
+ if (*code != OP_TYPEEXACT) fprintf(f, "0,");
+ fprintf(f, "%d}", GET2(code,1));
+ if (*code == OP_TYPEMINUPTO) fprintf(f, "?");
+ break;
+
+ case OP_NOT:
+ if (isprint(c = code[1])) fprintf(f, " [^%c]", c);
+ else fprintf(f, " [^\\x%02x]", c);
+ break;
+
+ case OP_NOTSTAR:
+ case OP_NOTMINSTAR:
+ case OP_NOTPLUS:
+ case OP_NOTMINPLUS:
+ case OP_NOTQUERY:
+ case OP_NOTMINQUERY:
+ if (isprint(c = code[1])) fprintf(f, " [^%c]", c);
+ else fprintf(f, " [^\\x%02x]", c);
+ fprintf(f, "%s", OP_names[*code]);
+ break;
+
+ case OP_NOTEXACT:
+ case OP_NOTUPTO:
+ case OP_NOTMINUPTO:
+ if (isprint(c = code[3])) fprintf(f, " [^%c]{", c);
+ else fprintf(f, " [^\\x%02x]{", c);
+ if (*code != OP_NOTEXACT) fprintf(f, ",");
+ fprintf(f, "%d}", GET2(code,1));
+ if (*code == OP_NOTMINUPTO) fprintf(f, "?");
+ break;
+
+ case OP_RECURSE:
+ fprintf(f, "%3d %s", GET(code, 1), OP_names[*code]);
+ break;
+
+ case OP_REF:
+ fprintf(f, " \\%d", GET2(code,1));
+ ccode = code + OP_lengths[*code];
+ goto CLASS_REF_REPEAT;
+
+ case OP_CALLOUT:
+ fprintf(f, " %s %d %d %d", OP_names[*code], code[1], GET(code,2),
+ GET(code, 2 + LINK_SIZE));
+ break;
+
+ case OP_PROP:
+ case OP_NOTPROP:
+ fprintf(f, " %s %s", OP_names[*code], get_ucpname(code[1]));
+ break;
+
+ /* OP_XCLASS can only occur in UTF-8 mode. However, there's no harm in
+ having this code always here, and it makes it less messy without all those
+ #ifdefs. */
+
+ case OP_CLASS:
+ case OP_NCLASS:
+ case OP_XCLASS:
+ {
+ int i, min, max;
+ BOOL printmap;
+
+ fprintf(f, " [");
+
+ if (*code == OP_XCLASS)
+ {
+ extra = GET(code, 1);
+ ccode = code + LINK_SIZE + 1;
+ printmap = (*ccode & XCL_MAP) != 0;
+ if ((*ccode++ & XCL_NOT) != 0) fprintf(f, "^");
+ }
+ else
+ {
+ printmap = TRUE;
+ ccode = code + 1;
+ }
+
+ /* Print a bit map */
+
+ if (printmap)
+ {
+ for (i = 0; i < 256; i++)
+ {
+ if ((ccode[i/8] & (1 << (i&7))) != 0)
+ {
+ int j;
+ for (j = i+1; j < 256; j++)
+ if ((ccode[j/8] & (1 << (j&7))) == 0) break;
+ if (i == '-' || i == ']') fprintf(f, "\\");
+ if (isprint(i)) fprintf(f, "%c", i); else fprintf(f, "\\x%02x", i);
+ if (--j > i)
+ {
+ if (j != i + 1) fprintf(f, "-");
+ if (j == '-' || j == ']') fprintf(f, "\\");
+ if (isprint(j)) fprintf(f, "%c", j); else fprintf(f, "\\x%02x", j);
+ }
+ i = j;
+ }
+ }
+ ccode += 32;
+ }
+
+ /* For an XCLASS there is always some additional data */
+
+ if (*code == OP_XCLASS)
+ {
+ int ch;
+ while ((ch = *ccode++) != XCL_END)
+ {
+ if (ch == XCL_PROP)
+ {
+ fprintf(f, "\\p{%s}", get_ucpname(*ccode++));
+ }
+ else if (ch == XCL_NOTPROP)
+ {
+ fprintf(f, "\\P{%s}", get_ucpname(*ccode++));
+ }
+ else
+ {
+ ccode += 1 + print_char(f, ccode, TRUE);
+ if (ch == XCL_RANGE)
+ {
+ fprintf(f, "-");
+ ccode += 1 + print_char(f, ccode, TRUE);
+ }
+ }
+ }
+ }
+
+ /* Indicate a non-UTF8 class which was created by negation */
+
+ fprintf(f, "]%s", (*code == OP_NCLASS)? " (neg)" : "");
+
+ /* Handle repeats after a class or a back reference */
+
+ CLASS_REF_REPEAT:
+ switch(*ccode)
+ {
+ case OP_CRSTAR:
+ case OP_CRMINSTAR:
+ case OP_CRPLUS:
+ case OP_CRMINPLUS:
+ case OP_CRQUERY:
+ case OP_CRMINQUERY:
+ fprintf(f, "%s", OP_names[*ccode]);
+ extra += OP_lengths[*ccode];
+ break;
+
+ case OP_CRRANGE:
+ case OP_CRMINRANGE:
+ min = GET2(ccode,1);
+ max = GET2(ccode,3);
+ if (max == 0) fprintf(f, "{%d,}", min);
+ else fprintf(f, "{%d,%d}", min, max);
+ if (*ccode == OP_CRMINRANGE) fprintf(f, "?");
+ extra += OP_lengths[*ccode];
+ break;
+ }
+ }
+ break;
+
+ /* Anything else is just an item with no data*/
+
+ default:
+ fprintf(f, " %s", OP_names[*code]);
+ break;
+ }
+
+ code += OP_lengths[*code] + extra;
+ fprintf(f, "\n");
+ }
+}
+
+/* End of printint.c */
diff --git a/srclib/pcre/study.c b/srclib/pcre/study.c
index f924543d21..d99b8a992e 100644
--- a/srclib/pcre/study.c
+++ b/srclib/pcre/study.c
@@ -9,26 +9,34 @@ the file Tech.Notes for some information on the internals.
Written by: Philip Hazel <ph10@cam.ac.uk>
- Copyright (c) 1997-2001 University of Cambridge
+ Copyright (c) 1997-2004 University of Cambridge
-----------------------------------------------------------------------------
-Permission is granted to anyone to use this software for any purpose on any
-computer system, and to redistribute it freely, subject to the following
-restrictions:
-
-1. This software is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-2. The origin of this software must not be misrepresented, either by
- explicit claim or by omission.
-
-3. Altered versions must be plainly marked as such, and must not be
- misrepresented as being the original software.
-
-4. If PCRE is embedded in any software that is released under the GNU
- General Purpose Licence (GPL), then the terms of that licence shall
- supersede any condition above with which it is incompatible.
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
-----------------------------------------------------------------------------
*/
@@ -57,7 +65,7 @@ Returns: nothing
*/
static void
-set_bit(uschar *start_bits, int c, BOOL caseless, compile_data *cd)
+set_bit(uschar *start_bits, unsigned int c, BOOL caseless, compile_data *cd)
{
start_bits[c/8] |= (1 << (c&7));
if (caseless && (cd->ctypes[c] & ctype_letter) != 0)
@@ -78,6 +86,7 @@ Arguments:
code points to an expression
start_bits points to a 32-byte table, initialized to 0
caseless the current state of the caseless flag
+ utf8 TRUE if in UTF-8 mode
cd the block with char table pointers
Returns: TRUE if table built, FALSE otherwise
@@ -85,7 +94,7 @@ Returns: TRUE if table built, FALSE otherwise
static BOOL
set_start_bits(const uschar *code, uschar *start_bits, BOOL caseless,
- compile_data *cd)
+ BOOL utf8, compile_data *cd)
{
register int c;
@@ -99,7 +108,7 @@ volatile int dummy;
do
{
- const uschar *tcode = code + 3;
+ const uschar *tcode = code + 1 + LINK_SIZE;
BOOL try_next = TRUE;
while (try_next)
@@ -109,7 +118,7 @@ do
if ((int)*tcode >= OP_BRA || *tcode == OP_ASSERT)
{
- if (!set_start_bits(tcode, start_bits, caseless, cd))
+ if (!set_start_bits(tcode, start_bits, caseless, utf8, cd))
return FALSE;
try_next = FALSE;
}
@@ -119,6 +128,12 @@ do
default:
return FALSE;
+ /* Skip over callout */
+
+ case OP_CALLOUT:
+ tcode += 2 + 2*LINK_SIZE;
+ break;
+
/* Skip over extended extraction bracket number */
case OP_BRANUMBER:
@@ -130,8 +145,8 @@ do
case OP_ASSERT_NOT:
case OP_ASSERTBACK:
case OP_ASSERTBACK_NOT:
- do tcode += (tcode[1] << 8) + tcode[2]; while (*tcode == OP_ALT);
- tcode += 3;
+ do tcode += GET(tcode, 1); while (*tcode == OP_ALT);
+ tcode += 1+LINK_SIZE;
break;
/* Skip over an option setting, changing the caseless flag */
@@ -145,11 +160,11 @@ do
case OP_BRAZERO:
case OP_BRAMINZERO:
- if (!set_start_bits(++tcode, start_bits, caseless, cd))
+ if (!set_start_bits(++tcode, start_bits, caseless, utf8, cd))
return FALSE;
dummy = 1;
- do tcode += (tcode[1] << 8) + tcode[2]; while (*tcode == OP_ALT);
- tcode += 3;
+ do tcode += GET(tcode,1); while (*tcode == OP_ALT);
+ tcode += 1+LINK_SIZE;
break;
/* Single-char * or ? sets the bit and tries the next item */
@@ -160,6 +175,9 @@ do
case OP_MINQUERY:
set_bit(start_bits, tcode[1], caseless, cd);
tcode += 2;
+#ifdef SUPPORT_UTF8
+ if (utf8) while ((*tcode & 0xc0) == 0x80) tcode++;
+#endif
break;
/* Single-char upto sets the bit and tries the next */
@@ -168,16 +186,18 @@ do
case OP_MINUPTO:
set_bit(start_bits, tcode[3], caseless, cd);
tcode += 4;
+#ifdef SUPPORT_UTF8
+ if (utf8) while ((*tcode & 0xc0) == 0x80) tcode++;
+#endif
break;
/* At least one single char sets the bit and stops */
case OP_EXACT: /* Fall through */
- tcode++;
-
- case OP_CHARS: /* Fall through */
- tcode++;
+ tcode += 2;
+ case OP_CHAR:
+ case OP_CHARNC:
case OP_PLUS:
case OP_MINPLUS:
set_bit(start_bits, tcode[1], caseless, cd);
@@ -247,6 +267,9 @@ do
case OP_TYPEMINQUERY:
switch(tcode[1])
{
+ case OP_ANY:
+ return FALSE;
+
case OP_NOT_DIGIT:
for (c = 0; c < 32; c++)
start_bits[c] |= ~cd->cbits[c+cbit_digit];
@@ -281,13 +304,53 @@ do
tcode += 2;
break;
- /* Character class: set the bits and either carry on or not,
- according to the repeat count. */
+ /* Character class where all the information is in a bit map: set the
+ bits and either carry on or not, according to the repeat count. If it was
+ a negative class, and we are operating with UTF-8 characters, any byte
+ with a value >= 0xc4 is a potentially valid starter because it starts a
+ character with a value > 255. */
+
+ case OP_NCLASS:
+ if (utf8)
+ {
+ start_bits[24] |= 0xf0; /* Bits for 0xc4 - 0xc8 */
+ memset(start_bits+25, 0xff, 7); /* Bits for 0xc9 - 0xff */
+ }
+ /* Fall through */
case OP_CLASS:
{
tcode++;
- for (c = 0; c < 32; c++) start_bits[c] |= tcode[c];
+
+ /* In UTF-8 mode, the bits in a bit map correspond to character
+ values, not to byte values. However, the bit map we are constructing is
+ for byte values. So we have to do a conversion for characters whose
+ value is > 127. In fact, there are only two possible starting bytes for
+ characters in the range 128 - 255. */
+
+ if (utf8)
+ {
+ for (c = 0; c < 16; c++) start_bits[c] |= tcode[c];
+ for (c = 128; c < 256; c++)
+ {
+ if ((tcode[c/8] && (1 << (c&7))) != 0)
+ {
+ int d = (c >> 6) | 0xc0; /* Set bit for this starter */
+ start_bits[d/8] |= (1 << (d&7)); /* and then skip on to the */
+ c = (c & 0xc0) + 0x40 - 1; /* next relevant character. */
+ }
+ }
+ }
+
+ /* In non-UTF-8 mode, the two bit maps are completely compatible. */
+
+ else
+ {
+ for (c = 0; c < 32; c++) start_bits[c] |= tcode[c];
+ }
+
+ /* Advance past the bit map, and act on what follows */
+
tcode += 32;
switch (*tcode)
{
@@ -309,12 +372,12 @@ do
break;
}
}
- break; /* End of class handling */
+ break; /* End of bitmap class handling */
} /* End of switch */
} /* End of try_next loop */
- code += (code[1] << 8) + code[2]; /* Advance to next branch */
+ code += GET(code, 1); /* Advance to next branch */
}
while (*code == OP_ALT);
return TRUE;
@@ -336,16 +399,21 @@ Arguments:
errorptr points to where to place error messages;
set NULL unless error
-Returns: pointer to a pcre_extra block,
+Returns: pointer to a pcre_extra block, with study_data filled in and the
+ appropriate flag set;
NULL on error or if no optimization possible
*/
-pcre_extra *
+EXPORT pcre_extra *
pcre_study(const pcre *external_re, int options, const char **errorptr)
{
uschar start_bits[32];
-real_pcre_extra *extra;
+pcre_extra *extra;
+pcre_study_data *study;
+const uschar *tables;
const real_pcre *re = (const real_pcre *)external_re;
+uschar *code = (uschar *)re + re->name_table_offset +
+ (re->name_count * re->name_entry_size);
compile_data compile_block;
*errorptr = NULL;
@@ -362,29 +430,39 @@ if ((options & ~PUBLIC_STUDY_OPTIONS) != 0)
return NULL;
}
-/* For an anchored pattern, or an unchored pattern that has a first char, or a
-multiline pattern that matches only at "line starts", no further processing at
-present. */
+/* For an anchored pattern, or an unanchored pattern that has a first char, or
+a multiline pattern that matches only at "line starts", no further processing
+at present. */
if ((re->options & (PCRE_ANCHORED|PCRE_FIRSTSET|PCRE_STARTLINE)) != 0)
return NULL;
-/* Set the character tables in the block which is passed around */
+/* Set the character tables in the block that is passed around */
+
+tables = re->tables;
+if (tables == NULL)
+ (void)pcre_fullinfo(external_re, NULL, PCRE_INFO_DEFAULT_TABLES, &tables);
-compile_block.lcc = re->tables + lcc_offset;
-compile_block.fcc = re->tables + fcc_offset;
-compile_block.cbits = re->tables + cbits_offset;
-compile_block.ctypes = re->tables + ctypes_offset;
+compile_block.lcc = tables + lcc_offset;
+compile_block.fcc = tables + fcc_offset;
+compile_block.cbits = tables + cbits_offset;
+compile_block.ctypes = tables + ctypes_offset;
/* See if we can find a fixed set of initial characters for the pattern. */
memset(start_bits, 0, 32 * sizeof(uschar));
-if (!set_start_bits(re->code, start_bits, (re->options & PCRE_CASELESS) != 0,
- &compile_block)) return NULL;
+if (!set_start_bits(code, start_bits, (re->options & PCRE_CASELESS) != 0,
+ (re->options & PCRE_UTF8) != 0, &compile_block)) return NULL;
-/* Get an "extra" block and put the information therein. */
+/* Get a pcre_extra block and a pcre_study_data block. The study data is put in
+the latter, which is pointed to by the former, which may also get additional
+data set later by the calling program. At the moment, the size of
+pcre_study_data is fixed. We nevertheless save it in a field for returning via
+the pcre_fullinfo() function so that if it becomes variable in the future, we
+don't have to change that code. */
-extra = (real_pcre_extra *)(pcre_malloc)(sizeof(real_pcre_extra));
+extra = (pcre_extra *)(pcre_malloc)
+ (sizeof(pcre_extra) + sizeof(pcre_study_data));
if (extra == NULL)
{
@@ -392,10 +470,15 @@ if (extra == NULL)
return NULL;
}
-extra->options = PCRE_STUDY_MAPPED;
-memcpy(extra->start_bits, start_bits, sizeof(start_bits));
+study = (pcre_study_data *)((char *)extra + sizeof(pcre_extra));
+extra->flags = PCRE_EXTRA_STUDY_DATA;
+extra->study_data = study;
+
+study->size = sizeof(pcre_study_data);
+study->options = PCRE_STUDY_MAPPED;
+memcpy(study->start_bits, start_bits, sizeof(start_bits));
-return (pcre_extra *)extra;
+return extra;
}
/* End of study.c */
diff --git a/srclib/pcre/testdata/testinput1 b/srclib/pcre/testdata/testinput1
index 66df9b3d79..c4b99c66b4 100644
--- a/srclib/pcre/testdata/testinput1
+++ b/srclib/pcre/testdata/testinput1
@@ -1357,7 +1357,7 @@
/^[W-c]+$/
WXY_^abc
- ***Failers
+ *** Failers
wxy
/^[W-c]+$/i
@@ -1517,7 +1517,7 @@
/(abc)[\1]de/
abc\1de
-/a.b(?s)/
+/(?s)a.b/
a\nb
/^([^a])([^\b])([^c]*)([^d]{3,4})/
@@ -1947,4 +1947,1895 @@
/(AB)*\1/
ABABAB
+/(?<!bar)foo/
+ foo
+ catfood
+ arfootle
+ rfoosh
+ *** Failers
+ barfoo
+ towbarfoo
+
+/\w{3}(?<!bar)foo/
+ catfood
+ *** Failers
+ foo
+ barfoo
+ towbarfoo
+
+/(?<=(foo)a)bar/
+ fooabar
+ *** Failers
+ bar
+ foobbar
+
+/\Aabc\z/m
+ abc
+ *** Failers
+ abc\n
+ qqq\nabc
+ abc\nzzz
+ qqq\nabc\nzzz
+
+"(?>.*/)foo"
+ /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/it/you/see/
+
+"(?>.*/)foo"
+ /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo
+
+/(?>(\.\d\d[1-9]?))\d+/
+ 1.230003938
+ 1.875000282
+ *** Failers
+ 1.235
+
+/^((?>\w+)|(?>\s+))*$/
+ now is the time for all good men to come to the aid of the party
+ *** Failers
+ this is not a line with only words and spaces!
+
+/(\d+)(\w)/
+ 12345a
+ 12345+
+
+/((?>\d+))(\w)/
+ 12345a
+ *** Failers
+ 12345+
+
+/(?>a+)b/
+ aaab
+
+/((?>a+)b)/
+ aaab
+
+/(?>(a+))b/
+ aaab
+
+/(?>b)+/
+ aaabbbccc
+
+/(?>a+|b+|c+)*c/
+ aaabbbbccccd
+
+/((?>[^()]+)|\([^()]*\))+/
+ ((abc(ade)ufh()()x
+
+/\(((?>[^()]+)|\([^()]+\))+\)/
+ (abc)
+ (abc(def)xyz)
+ *** Failers
+ ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+
+/a(?-i)b/i
+ ab
+ Ab
+ *** Failers
+ aB
+ AB
+
+/(a (?x)b c)d e/
+ a bcd e
+ *** Failers
+ a b cd e
+ abcd e
+ a bcde
+
+/(a b(?x)c d (?-x)e f)/
+ a bcde f
+ *** Failers
+ abcdef
+
+/(a(?i)b)c/
+ abc
+ aBc
+ *** Failers
+ abC
+ aBC
+ Abc
+ ABc
+ ABC
+ AbC
+
+/a(?i:b)c/
+ abc
+ aBc
+ *** Failers
+ ABC
+ abC
+ aBC
+
+/a(?i:b)*c/
+ aBc
+ aBBc
+ *** Failers
+ aBC
+ aBBC
+
+/a(?=b(?i)c)\w\wd/
+ abcd
+ abCd
+ *** Failers
+ aBCd
+ abcD
+
+/(?s-i:more.*than).*million/i
+ more than million
+ more than MILLION
+ more \n than Million
+ *** Failers
+ MORE THAN MILLION
+ more \n than \n million
+
+/(?:(?s-i)more.*than).*million/i
+ more than million
+ more than MILLION
+ more \n than Million
+ *** Failers
+ MORE THAN MILLION
+ more \n than \n million
+
+/(?>a(?i)b+)+c/
+ abc
+ aBbc
+ aBBc
+ *** Failers
+ Abc
+ abAb
+ abbC
+
+/(?=a(?i)b)\w\wc/
+ abc
+ aBc
+ *** Failers
+ Ab
+ abC
+ aBC
+
+/(?<=a(?i)b)(\w\w)c/
+ abxxc
+ aBxxc
+ *** Failers
+ Abxxc
+ ABxxc
+ abxxC
+
+/(?:(a)|b)(?(1)A|B)/
+ aA
+ bB
+ *** Failers
+ aB
+ bA
+
+/^(a)?(?(1)a|b)+$/
+ aa
+ b
+ bb
+ *** Failers
+ ab
+
+/^(?(?=abc)\w{3}:|\d\d)$/
+ abc:
+ 12
+ *** Failers
+ 123
+ xyz
+
+/^(?(?!abc)\d\d|\w{3}:)$/
+ abc:
+ 12
+ *** Failers
+ 123
+ xyz
+
+/(?(?<=foo)bar|cat)/
+ foobar
+ cat
+ fcat
+ focat
+ *** Failers
+ foocat
+
+/(?(?<!foo)cat|bar)/
+ foobar
+ cat
+ fcat
+ focat
+ *** Failers
+ foocat
+
+/( \( )? [^()]+ (?(1) \) |) /x
+ abcd
+ (abcd)
+ the quick (abcd) fox
+ (abcd
+
+/( \( )? [^()]+ (?(1) \) ) /x
+ abcd
+ (abcd)
+ the quick (abcd) fox
+ (abcd
+
+/^(?(2)a|(1)(2))+$/
+ 12
+ 12a
+ 12aa
+ *** Failers
+ 1234
+
+/((?i)blah)\s+\1/
+ blah blah
+ BLAH BLAH
+ Blah Blah
+ blaH blaH
+ *** Failers
+ blah BLAH
+ Blah blah
+ blaH blah
+
+/((?i)blah)\s+(?i:\1)/
+ blah blah
+ BLAH BLAH
+ Blah Blah
+ blaH blaH
+ blah BLAH
+ Blah blah
+ blaH blah
+
+/(?>a*)*/
+ a
+ aa
+ aaaa
+
+/(abc|)+/
+ abc
+ abcabc
+ abcabcabc
+ xyz
+
+/([a]*)*/
+ a
+ aaaaa
+
+/([ab]*)*/
+ a
+ b
+ ababab
+ aaaabcde
+ bbbb
+
+/([^a]*)*/
+ b
+ bbbb
+ aaa
+
+/([^ab]*)*/
+ cccc
+ abab
+
+/([a]*?)*/
+ a
+ aaaa
+
+/([ab]*?)*/
+ a
+ b
+ abab
+ baba
+
+/([^a]*?)*/
+ b
+ bbbb
+ aaa
+
+/([^ab]*?)*/
+ c
+ cccc
+ baba
+
+/(?>a*)*/
+ a
+ aaabcde
+
+/((?>a*))*/
+ aaaaa
+ aabbaa
+
+/((?>a*?))*/
+ aaaaa
+ aabbaa
+
+/(?(?=[^a-z]+[a-z]) \d{2}-[a-z]{3}-\d{2} | \d{2}-\d{2}-\d{2} ) /x
+ 12-sep-98
+ 12-09-98
+ *** Failers
+ sep-12-98
+
+/(?<=(foo))bar\1/
+ foobarfoo
+ foobarfootling
+ *** Failers
+ foobar
+ barfoo
+
+/(?i:saturday|sunday)/
+ saturday
+ sunday
+ Saturday
+ Sunday
+ SATURDAY
+ SUNDAY
+ SunDay
+
+/(a(?i)bc|BB)x/
+ abcx
+ aBCx
+ bbx
+ BBx
+ *** Failers
+ abcX
+ aBCX
+ bbX
+ BBX
+
+/^([ab](?i)[cd]|[ef])/
+ ac
+ aC
+ bD
+ elephant
+ Europe
+ frog
+ France
+ *** Failers
+ Africa
+
+/^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)/
+ ab
+ aBd
+ xy
+ xY
+ zebra
+ Zambesi
+ *** Failers
+ aCD
+ XY
+
+/(?<=foo\n)^bar/m
+ foo\nbar
+ *** Failers
+ bar
+ baz\nbar
+
+/(?<=(?<!foo)bar)baz/
+ barbaz
+ barbarbaz
+ koobarbaz
+ *** Failers
+ baz
+ foobarbaz
+
+/The case of aaaaaa is missed out below because I think Perl 5.005_02 gets/
+/it wrong; it sets $1 to aaa rather than aa. Compare the following test,/
+/where it does set $1 to aa when matching aaaaaa./
+
+/^(a\1?){4}$/
+ a
+ aa
+ aaa
+ aaaa
+ aaaaa
+ aaaaaaa
+ aaaaaaaa
+ aaaaaaaaa
+ aaaaaaaaaa
+ aaaaaaaaaaa
+ aaaaaaaaaaaa
+ aaaaaaaaaaaaa
+ aaaaaaaaaaaaaa
+ aaaaaaaaaaaaaaa
+ aaaaaaaaaaaaaaaa
+
+/^(a\1?)(a\1?)(a\2?)(a\3?)$/
+ a
+ aa
+ aaa
+ aaaa
+ aaaaa
+ aaaaaa
+ aaaaaaa
+ aaaaaaaa
+ aaaaaaaaa
+ aaaaaaaaaa
+ aaaaaaaaaaa
+ aaaaaaaaaaaa
+ aaaaaaaaaaaaa
+ aaaaaaaaaaaaaa
+ aaaaaaaaaaaaaaa
+ aaaaaaaaaaaaaaaa
+
+/The following tests are taken from the Perl 5.005 test suite; some of them/
+/are compatible with 5.004, but I'd rather not have to sort them out./
+
+/abc/
+ abc
+ xabcy
+ ababc
+ *** Failers
+ xbc
+ axc
+ abx
+
+/ab*c/
+ abc
+
+/ab*bc/
+ abc
+ abbc
+ abbbbc
+
+/.{1}/
+ abbbbc
+
+/.{3,4}/
+ abbbbc
+
+/ab{0,}bc/
+ abbbbc
+
+/ab+bc/
+ abbc
+ *** Failers
+ abc
+ abq
+
+/ab{1,}bc/
+
+/ab+bc/
+ abbbbc
+
+/ab{1,}bc/
+ abbbbc
+
+/ab{1,3}bc/
+ abbbbc
+
+/ab{3,4}bc/
+ abbbbc
+
+/ab{4,5}bc/
+ *** Failers
+ abq
+ abbbbc
+
+/ab?bc/
+ abbc
+ abc
+
+/ab{0,1}bc/
+ abc
+
+/ab?bc/
+
+/ab?c/
+ abc
+
+/ab{0,1}c/
+ abc
+
+/^abc$/
+ abc
+ *** Failers
+ abbbbc
+ abcc
+
+/^abc/
+ abcc
+
+/^abc$/
+
+/abc$/
+ aabc
+ *** Failers
+ aabc
+ aabcd
+
+/^/
+ abc
+
+/$/
+ abc
+
+/a.c/
+ abc
+ axc
+
+/a.*c/
+ axyzc
+
+/a[bc]d/
+ abd
+ *** Failers
+ axyzd
+ abc
+
+/a[b-d]e/
+ ace
+
+/a[b-d]/
+ aac
+
+/a[-b]/
+ a-
+
+/a[b-]/
+ a-
+
+/a]/
+ a]
+
+/a[]]b/
+ a]b
+
+/a[^bc]d/
+ aed
+ *** Failers
+ abd
+ abd
+
+/a[^-b]c/
+ adc
+
+/a[^]b]c/
+ adc
+ *** Failers
+ a-c
+ a]c
+
+/\ba\b/
+ a-
+ -a
+ -a-
+
+/\by\b/
+ *** Failers
+ xy
+ yz
+ xyz
+
+/\Ba\B/
+ *** Failers
+ a-
+ -a
+ -a-
+
+/\By\b/
+ xy
+
+/\by\B/
+ yz
+
+/\By\B/
+ xyz
+
+/\w/
+ a
+
+/\W/
+ -
+ *** Failers
+ -
+ a
+
+/a\sb/
+ a b
+
+/a\Sb/
+ a-b
+ *** Failers
+ a-b
+ a b
+
+/\d/
+ 1
+
+/\D/
+ -
+ *** Failers
+ -
+ 1
+
+/[\w]/
+ a
+
+/[\W]/
+ -
+ *** Failers
+ -
+ a
+
+/a[\s]b/
+ a b
+
+/a[\S]b/
+ a-b
+ *** Failers
+ a-b
+ a b
+
+/[\d]/
+ 1
+
+/[\D]/
+ -
+ *** Failers
+ -
+ 1
+
+/ab|cd/
+ abc
+ abcd
+
+/()ef/
+ def
+
+/$b/
+
+/a\(b/
+ a(b
+
+/a\(*b/
+ ab
+ a((b
+
+/a\\b/
+ a\b
+
+/((a))/
+ abc
+
+/(a)b(c)/
+ abc
+
+/a+b+c/
+ aabbabc
+
+/a{1,}b{1,}c/
+ aabbabc
+
+/a.+?c/
+ abcabc
+
+/(a+|b)*/
+ ab
+
+/(a+|b){0,}/
+ ab
+
+/(a+|b)+/
+ ab
+
+/(a+|b){1,}/
+ ab
+
+/(a+|b)?/
+ ab
+
+/(a+|b){0,1}/
+ ab
+
+/[^ab]*/
+ cde
+
+/abc/
+ *** Failers
+ b
+
+
+/a*/
+
+
+/([abc])*d/
+ abbbcd
+
+/([abc])*bcd/
+ abcd
+
+/a|b|c|d|e/
+ e
+
+/(a|b|c|d|e)f/
+ ef
+
+/abcd*efg/
+ abcdefg
+
+/ab*/
+ xabyabbbz
+ xayabbbz
+
+/(ab|cd)e/
+ abcde
+
+/[abhgefdc]ij/
+ hij
+
+/^(ab|cd)e/
+
+/(abc|)ef/
+ abcdef
+
+/(a|b)c*d/
+ abcd
+
+/(ab|ab*)bc/
+ abc
+
+/a([bc]*)c*/
+ abc
+
+/a([bc]*)(c*d)/
+ abcd
+
+/a([bc]+)(c*d)/
+ abcd
+
+/a([bc]*)(c+d)/
+ abcd
+
+/a[bcd]*dcdcde/
+ adcdcde
+
+/a[bcd]+dcdcde/
+ *** Failers
+ abcde
+ adcdcde
+
+/(ab|a)b*c/
+ abc
+
+/((a)(b)c)(d)/
+ abcd
+
+/[a-zA-Z_][a-zA-Z0-9_]*/
+ alpha
+
+/^a(bc+|b[eh])g|.h$/
+ abh
+
+/(bc+d$|ef*g.|h?i(j|k))/
+ effgz
+ ij
+ reffgz
+ *** Failers
+ effg
+ bcdd
+
+/((((((((((a))))))))))/
+ a
+
+/((((((((((a))))))))))\10/
+ aa
+
+/(((((((((a)))))))))/
+ a
+
+/multiple words of text/
+ *** Failers
+ aa
+ uh-uh
+
+/multiple words/
+ multiple words, yeah
+
+/(.*)c(.*)/
+ abcde
+
+/\((.*), (.*)\)/
+ (a, b)
+
+/[k]/
+
+/abcd/
+ abcd
+
+/a(bc)d/
+ abcd
+
+/a[-]?c/
+ ac
+
+/(abc)\1/
+ abcabc
+
+/([a-c]*)\1/
+ abcabc
+
+/(a)|\1/
+ a
+ *** Failers
+ ab
+ x
+
+/(([a-c])b*?\2)*/
+ ababbbcbc
+
+/(([a-c])b*?\2){3}/
+ ababbbcbc
+
+/((\3|b)\2(a)x)+/
+ aaaxabaxbaaxbbax
+
+/((\3|b)\2(a)){2,}/
+ bbaababbabaaaaabbaaaabba
+
+/abc/i
+ ABC
+ XABCY
+ ABABC
+ *** Failers
+ aaxabxbaxbbx
+ XBC
+ AXC
+ ABX
+
+/ab*c/i
+ ABC
+
+/ab*bc/i
+ ABC
+ ABBC
+
+/ab*?bc/i
+ ABBBBC
+
+/ab{0,}?bc/i
+ ABBBBC
+
+/ab+?bc/i
+ ABBC
+
+/ab+bc/i
+ *** Failers
+ ABC
+ ABQ
+
+/ab{1,}bc/i
+
+/ab+bc/i
+ ABBBBC
+
+/ab{1,}?bc/i
+ ABBBBC
+
+/ab{1,3}?bc/i
+ ABBBBC
+
+/ab{3,4}?bc/i
+ ABBBBC
+
+/ab{4,5}?bc/i
+ *** Failers
+ ABQ
+ ABBBBC
+
+/ab??bc/i
+ ABBC
+ ABC
+
+/ab{0,1}?bc/i
+ ABC
+
+/ab??bc/i
+
+/ab??c/i
+ ABC
+
+/ab{0,1}?c/i
+ ABC
+
+/^abc$/i
+ ABC
+ *** Failers
+ ABBBBC
+ ABCC
+
+/^abc/i
+ ABCC
+
+/^abc$/i
+
+/abc$/i
+ AABC
+
+/^/i
+ ABC
+
+/$/i
+ ABC
+
+/a.c/i
+ ABC
+ AXC
+
+/a.*?c/i
+ AXYZC
+
+/a.*c/i
+ *** Failers
+ AABC
+ AXYZD
+
+/a[bc]d/i
+ ABD
+
+/a[b-d]e/i
+ ACE
+ *** Failers
+ ABC
+ ABD
+
+/a[b-d]/i
+ AAC
+
+/a[-b]/i
+ A-
+
+/a[b-]/i
+ A-
+
+/a]/i
+ A]
+
+/a[]]b/i
+ A]B
+
+/a[^bc]d/i
+ AED
+
+/a[^-b]c/i
+ ADC
+ *** Failers
+ ABD
+ A-C
+
+/a[^]b]c/i
+ ADC
+
+/ab|cd/i
+ ABC
+ ABCD
+
+/()ef/i
+ DEF
+
+/$b/i
+ *** Failers
+ A]C
+ B
+
+/a\(b/i
+ A(B
+
+/a\(*b/i
+ AB
+ A((B
+
+/a\\b/i
+ A\B
+
+/((a))/i
+ ABC
+
+/(a)b(c)/i
+ ABC
+
+/a+b+c/i
+ AABBABC
+
+/a{1,}b{1,}c/i
+ AABBABC
+
+/a.+?c/i
+ ABCABC
+
+/a.*?c/i
+ ABCABC
+
+/a.{0,5}?c/i
+ ABCABC
+
+/(a+|b)*/i
+ AB
+
+/(a+|b){0,}/i
+ AB
+
+/(a+|b)+/i
+ AB
+
+/(a+|b){1,}/i
+ AB
+
+/(a+|b)?/i
+ AB
+
+/(a+|b){0,1}/i
+ AB
+
+/(a+|b){0,1}?/i
+ AB
+
+/[^ab]*/i
+ CDE
+
+/abc/i
+
+/a*/i
+
+
+/([abc])*d/i
+ ABBBCD
+
+/([abc])*bcd/i
+ ABCD
+
+/a|b|c|d|e/i
+ E
+
+/(a|b|c|d|e)f/i
+ EF
+
+/abcd*efg/i
+ ABCDEFG
+
+/ab*/i
+ XABYABBBZ
+ XAYABBBZ
+
+/(ab|cd)e/i
+ ABCDE
+
+/[abhgefdc]ij/i
+ HIJ
+
+/^(ab|cd)e/i
+ ABCDE
+
+/(abc|)ef/i
+ ABCDEF
+
+/(a|b)c*d/i
+ ABCD
+
+/(ab|ab*)bc/i
+ ABC
+
+/a([bc]*)c*/i
+ ABC
+
+/a([bc]*)(c*d)/i
+ ABCD
+
+/a([bc]+)(c*d)/i
+ ABCD
+
+/a([bc]*)(c+d)/i
+ ABCD
+
+/a[bcd]*dcdcde/i
+ ADCDCDE
+
+/a[bcd]+dcdcde/i
+
+/(ab|a)b*c/i
+ ABC
+
+/((a)(b)c)(d)/i
+ ABCD
+
+/[a-zA-Z_][a-zA-Z0-9_]*/i
+ ALPHA
+
+/^a(bc+|b[eh])g|.h$/i
+ ABH
+
+/(bc+d$|ef*g.|h?i(j|k))/i
+ EFFGZ
+ IJ
+ REFFGZ
+ *** Failers
+ ADCDCDE
+ EFFG
+ BCDD
+
+/((((((((((a))))))))))/i
+ A
+
+/((((((((((a))))))))))\10/i
+ AA
+
+/(((((((((a)))))))))/i
+ A
+
+/(?:(?:(?:(?:(?:(?:(?:(?:(?:(a))))))))))/i
+ A
+
+/(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))/i
+ C
+
+/multiple words of text/i
+ *** Failers
+ AA
+ UH-UH
+
+/multiple words/i
+ MULTIPLE WORDS, YEAH
+
+/(.*)c(.*)/i
+ ABCDE
+
+/\((.*), (.*)\)/i
+ (A, B)
+
+/[k]/i
+
+/abcd/i
+ ABCD
+
+/a(bc)d/i
+ ABCD
+
+/a[-]?c/i
+ AC
+
+/(abc)\1/i
+ ABCABC
+
+/([a-c]*)\1/i
+ ABCABC
+
+/a(?!b)./
+ abad
+
+/a(?=d)./
+ abad
+
+/a(?=c|d)./
+ abad
+
+/a(?:b|c|d)(.)/
+ ace
+
+/a(?:b|c|d)*(.)/
+ ace
+
+/a(?:b|c|d)+?(.)/
+ ace
+ acdbcdbe
+
+/a(?:b|c|d)+(.)/
+ acdbcdbe
+
+/a(?:b|c|d){2}(.)/
+ acdbcdbe
+
+/a(?:b|c|d){4,5}(.)/
+ acdbcdbe
+
+/a(?:b|c|d){4,5}?(.)/
+ acdbcdbe
+
+/((foo)|(bar))*/
+ foobar
+
+/a(?:b|c|d){6,7}(.)/
+ acdbcdbe
+
+/a(?:b|c|d){6,7}?(.)/
+ acdbcdbe
+
+/a(?:b|c|d){5,6}(.)/
+ acdbcdbe
+
+/a(?:b|c|d){5,6}?(.)/
+ acdbcdbe
+
+/a(?:b|c|d){5,7}(.)/
+ acdbcdbe
+
+/a(?:b|c|d){5,7}?(.)/
+ acdbcdbe
+
+/a(?:b|(c|e){1,2}?|d)+?(.)/
+ ace
+
+/^(.+)?B/
+ AB
+
+/^([^a-z])|(\^)$/
+ .
+
+/^[<>]&/
+ <&OUT
+
+/^(a\1?){4}$/
+ aaaaaaaaaa
+ *** Failers
+ AB
+ aaaaaaaaa
+ aaaaaaaaaaa
+
+/^(a(?(1)\1)){4}$/
+ aaaaaaaaaa
+ *** Failers
+ aaaaaaaaa
+ aaaaaaaaaaa
+
+/(?:(f)(o)(o)|(b)(a)(r))*/
+ foobar
+
+/(?<=a)b/
+ ab
+ *** Failers
+ cb
+ b
+
+/(?<!c)b/
+ ab
+ b
+ b
+
+/(?:..)*a/
+ aba
+
+/(?:..)*?a/
+ aba
+
+/^(?:b|a(?=(.)))*\1/
+ abc
+
+/^(){3,5}/
+ abc
+
+/^(a+)*ax/
+ aax
+
+/^((a|b)+)*ax/
+ aax
+
+/^((a|bc)+)*ax/
+ aax
+
+/(a|x)*ab/
+ cab
+
+/(a)*ab/
+ cab
+
+/(?:(?i)a)b/
+ ab
+
+/((?i)a)b/
+ ab
+
+/(?:(?i)a)b/
+ Ab
+
+/((?i)a)b/
+ Ab
+
+/(?:(?i)a)b/
+ *** Failers
+ cb
+ aB
+
+/((?i)a)b/
+
+/(?i:a)b/
+ ab
+
+/((?i:a))b/
+ ab
+
+/(?i:a)b/
+ Ab
+
+/((?i:a))b/
+ Ab
+
+/(?i:a)b/
+ *** Failers
+ aB
+ aB
+
+/((?i:a))b/
+
+/(?:(?-i)a)b/i
+ ab
+
+/((?-i)a)b/i
+ ab
+
+/(?:(?-i)a)b/i
+ aB
+
+/((?-i)a)b/i
+ aB
+
+/(?:(?-i)a)b/i
+ *** Failers
+ aB
+ Ab
+
+/((?-i)a)b/i
+
+/(?:(?-i)a)b/i
+ aB
+
+/((?-i)a)b/i
+ aB
+
+/(?:(?-i)a)b/i
+ *** Failers
+ Ab
+ AB
+
+/((?-i)a)b/i
+
+/(?-i:a)b/i
+ ab
+
+/((?-i:a))b/i
+ ab
+
+/(?-i:a)b/i
+ aB
+
+/((?-i:a))b/i
+ aB
+
+/(?-i:a)b/i
+ *** Failers
+ AB
+ Ab
+
+/((?-i:a))b/i
+
+/(?-i:a)b/i
+ aB
+
+/((?-i:a))b/i
+ aB
+
+/(?-i:a)b/i
+ *** Failers
+ Ab
+ AB
+
+/((?-i:a))b/i
+
+/((?-i:a.))b/i
+ *** Failers
+ AB
+ a\nB
+
+/((?s-i:a.))b/i
+ a\nB
+
+/(?:c|d)(?:)(?:a(?:)(?:b)(?:b(?:))(?:b(?:)(?:b)))/
+ cabbbb
+
+/(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))/
+ caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+
+/(ab)\d\1/i
+ Ab4ab
+ ab4Ab
+
+/foo\w*\d{4}baz/
+ foobar1234baz
+
+/x(~~)*(?:(?:F)?)?/
+ x~~
+
+/^a(?#xxx){3}c/
+ aaac
+
+/^a (?#xxx) (?#yyy) {3}c/x
+ aaac
+
+/(?<![cd])b/
+ *** Failers
+ B\nB
+ dbcb
+
+/(?<![cd])[ab]/
+ dbaacb
+
+/(?<!(c|d))b/
+
+/(?<!(c|d))[ab]/
+ dbaacb
+
+/(?<!cd)[ab]/
+ cdaccb
+
+/^(?:a?b?)*$/
+ *** Failers
+ dbcb
+ a--
+
+/((?s)^a(.))((?m)^b$)/
+ a\nb\nc\n
+
+/((?m)^b$)/
+ a\nb\nc\n
+
+/(?m)^b/
+ a\nb\n
+
+/(?m)^(b)/
+ a\nb\n
+
+/((?m)^b)/
+ a\nb\n
+
+/\n((?m)^b)/
+ a\nb\n
+
+/((?s).)c(?!.)/
+ a\nb\nc\n
+ a\nb\nc\n
+
+/((?s)b.)c(?!.)/
+ a\nb\nc\n
+ a\nb\nc\n
+
+/^b/
+
+/()^b/
+ *** Failers
+ a\nb\nc\n
+ a\nb\nc\n
+
+/((?m)^b)/
+ a\nb\nc\n
+
+/(?(1)a|b)/
+
+/(?(1)b|a)/
+ a
+
+/(x)?(?(1)a|b)/
+ *** Failers
+ a
+ a
+
+/(x)?(?(1)b|a)/
+ a
+
+/()?(?(1)b|a)/
+ a
+
+/()(?(1)b|a)/
+
+/()?(?(1)a|b)/
+ a
+
+/^(\()?blah(?(1)(\)))$/
+ (blah)
+ blah
+ *** Failers
+ a
+ blah)
+ (blah
+
+/^(\(+)?blah(?(1)(\)))$/
+ (blah)
+ blah
+ *** Failers
+ blah)
+ (blah
+
+/(?(?!a)a|b)/
+
+/(?(?!a)b|a)/
+ a
+
+/(?(?=a)b|a)/
+ *** Failers
+ a
+ a
+
+/(?(?=a)a|b)/
+ a
+
+/(?=(a+?))(\1ab)/
+ aaab
+
+/^(?=(a+?))\1ab/
+
+/(\w+:)+/
+ one:
+
+/$(?<=^(a))/
+ a
+
+/(?=(a+?))(\1ab)/
+ aaab
+
+/^(?=(a+?))\1ab/
+ *** Failers
+ aaab
+ aaab
+
+/([\w:]+::)?(\w+)$/
+ abcd
+ xy:z:::abcd
+
+/^[^bcd]*(c+)/
+ aexycd
+
+/(a*)b+/
+ caab
+
+/([\w:]+::)?(\w+)$/
+ abcd
+ xy:z:::abcd
+ *** Failers
+ abcd:
+ abcd:
+
+/^[^bcd]*(c+)/
+ aexycd
+
+/(>a+)ab/
+
+/(?>a+)b/
+ aaab
+
+/([[:]+)/
+ a:[b]:
+
+/([[=]+)/
+ a=[b]=
+
+/([[.]+)/
+ a.[b].
+
+/((?>a+)b)/
+ aaab
+
+/(?>(a+))b/
+ aaab
+
+/((?>[^()]+)|\([^()]*\))+/
+ ((abc(ade)ufh()()x
+
+/a\Z/
+ *** Failers
+ aaab
+ a\nb\n
+
+/b\Z/
+ a\nb\n
+
+/b\z/
+
+/b\Z/
+ a\nb
+
+/b\z/
+ a\nb
+ *** Failers
+
+/^(?>(?(1)\.|())[^\W_](?>[a-z0-9-]*[^\W_])?)+$/
+ a
+ abc
+ a-b
+ 0-9
+ a.b
+ 5.6.7
+ the.quick.brown.fox
+ a100.b200.300c
+ 12-ab.1245
+ *** Failers
+ \
+ .a
+ -a
+ a-
+ a.
+ a_b
+ a.-
+ a..
+ ab..bc
+ the.quick.brown.fox-
+ the.quick.brown.fox.
+ the.quick.brown.fox_
+ the.quick.brown.fox+
+
+/(?>.*)(?<=(abcd|wxyz))/
+ alphabetabcd
+ endingwxyz
+ *** Failers
+ a rather long string that doesn't end with one of them
+
+/word (?>(?:(?!otherword)[a-zA-Z0-9]+ ){0,30})otherword/
+ word cat dog elephant mussel cow horse canary baboon snake shark otherword
+ word cat dog elephant mussel cow horse canary baboon snake shark
+
+/word (?>[a-zA-Z0-9]+ ){0,30}otherword/
+ word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope
+
+/(?<=\d{3}(?!999))foo/
+ 999foo
+ 123999foo
+ *** Failers
+ 123abcfoo
+
+/(?<=(?!...999)\d{3})foo/
+ 999foo
+ 123999foo
+ *** Failers
+ 123abcfoo
+
+/(?<=\d{3}(?!999)...)foo/
+ 123abcfoo
+ 123456foo
+ *** Failers
+ 123999foo
+
+/(?<=\d{3}...)(?<!999)foo/
+ 123abcfoo
+ 123456foo
+ *** Failers
+ 123999foo
+
+/<a[\s]+href[\s]*=[\s]* # find <a href=
+ ([\"\'])? # find single or double quote
+ (?(1) (.*?)\1 | ([^\s]+)) # if quote found, match up to next matching
+ # quote, otherwise match up to next space
+/isx
+ <a href=abcd xyz
+ <a href=\"abcd xyz pqr\" cats
+ <a href=\'abcd xyz pqr\' cats
+
+/<a\s+href\s*=\s* # find <a href=
+ (["'])? # find single or double quote
+ (?(1) (.*?)\1 | (\S+)) # if quote found, match up to next matching
+ # quote, otherwise match up to next space
+/isx
+ <a href=abcd xyz
+ <a href=\"abcd xyz pqr\" cats
+ <a href = \'abcd xyz pqr\' cats
+
+/<a\s+href(?>\s*)=(?>\s*) # find <a href=
+ (["'])? # find single or double quote
+ (?(1) (.*?)\1 | (\S+)) # if quote found, match up to next matching
+ # quote, otherwise match up to next space
+/isx
+ <a href=abcd xyz
+ <a href=\"abcd xyz pqr\" cats
+ <a href = \'abcd xyz pqr\' cats
+
+/((Z)+|A)*/
+ ZABCDEFG
+
+/(Z()|A)*/
+ ZABCDEFG
+
+/(Z(())|A)*/
+ ZABCDEFG
+
+/((?>Z)+|A)*/
+ ZABCDEFG
+
+/((?>)+|A)*/
+ ZABCDEFG
+
+/a*/g
+ abbab
+
+/^[a-\d]/
+ abcde
+ -things
+ 0digit
+ *** Failers
+ bcdef
+
+/^[\d-a]/
+ abcde
+ -things
+ 0digit
+ *** Failers
+ bcdef
+
+/[[:space:]]+/
+ > \x09\x0a\x0c\x0d\x0b<
+
+/[[:blank:]]+/
+ > \x09\x0a\x0c\x0d\x0b<
+
+/[\s]+/
+ > \x09\x0a\x0c\x0d\x0b<
+
+/\s+/
+ > \x09\x0a\x0c\x0d\x0b<
+
+/a b/x
+ ab
+
+/(?!\A)x/m
+ a\nxb\n
+
+/(?!^)x/m
+ a\nxb\n
+
+/abc\Qabc\Eabc/
+ abcabcabc
+
+/abc\Q(*+|\Eabc/
+ abc(*+|abc
+
+/ abc\Q abc\Eabc/x
+ abc abcabc
+ *** Failers
+ abcabcabc
+
+/abc#comment
+ \Q#not comment
+ literal\E/x
+ abc#not comment\n literal
+
+/abc#comment
+ \Q#not comment
+ literal/x
+ abc#not comment\n literal
+
+/abc#comment
+ \Q#not comment
+ literal\E #more comment
+ /x
+ abc#not comment\n literal
+
+/abc#comment
+ \Q#not comment
+ literal\E #more comment/x
+ abc#not comment\n literal
+
+/\Qabc\$xyz\E/
+ abc\\\$xyz
+
+/\Qabc\E\$\Qxyz\E/
+ abc\$xyz
+
+/\Gabc/
+ abc
+ *** Failers
+ xyzabc
+
+/\Gabc./g
+ abc1abc2xyzabc3
+
+/abc./g
+ abc1abc2xyzabc3
+
+/a(?x: b c )d/
+ XabcdY
+ *** Failers
+ Xa b c d Y
+
+/((?x)x y z | a b c)/
+ XabcY
+ AxyzB
+
+/(?i)AB(?-i)C/
+ XabCY
+ *** Failers
+ XabcY
+
+/((?i)AB(?-i)C|D)E/
+ abCE
+ DE
+ *** Failers
+ abcE
+ abCe
+ dE
+ De
+
+/(.*)\d+\1/
+ abc123abc
+ abc123bc
+
+/(.*)\d+\1/s
+ abc123abc
+ abc123bc
+
+/((.*))\d+\1/
+ abc123abc
+ abc123bc
+
+/-- This tests for an IPv6 address in the form where it can have up to --/
+/-- eight components, one and only one of which is empty. This must be --/
+/-- an internal component. --/
+
+/^(?!:) # colon disallowed at start
+ (?: # start of item
+ (?: [0-9a-f]{1,4} | # 1-4 hex digits or
+ (?(1)0 | () ) ) # if null previously matched, fail; else null
+ : # followed by colon
+ ){1,7} # end item; 1-7 of them required
+ [0-9a-f]{1,4} $ # final hex number at end of string
+ (?(1)|.) # check that there was an empty component
+ /xi
+ a123::a123
+ a123:b342::abcd
+ a123:b342::324e:abcd
+ a123:ddde:b342::324e:abcd
+ a123:ddde:b342::324e:dcba:abcd
+ a123:ddde:9999:b342::324e:dcba:abcd
+ *** Failers
+ 1:2:3:4:5:6:7:8
+ a123:bce:ddde:9999:b342::324e:dcba:abcd
+ a123::9999:b342::324e:dcba:abcd
+ abcde:2:3:4:5:6:7:8
+ ::1
+ abcd:fee0:123::
+ :1
+ 1:
+
+/[z\Qa-d]\E]/
+ z
+ a
+ -
+ d
+ ]
+ *** Failers
+ b
+
+/[\z\C]/
+ z
+ C
+
+/\M/
+ M
+
+/(a+)*b/
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+
+/(?i)reg(?:ul(?:[aä]|ae)r|ex)/
+ REGular
+ regulaer
+ Regex
+ regulär
+
+/Åæåä[à-ÿÀ-ß]+/
+ Åæåäà
+ Åæåäÿ
+ ÅæåäÀ
+ Åæåäß
+
+/(?<=Z)X./
+ \x84XAZXB
+
/ End of testinput1 /
diff --git a/srclib/pcre/testdata/testinput2 b/srclib/pcre/testdata/testinput2
index f41478e104..d118daf8f1 100644
--- a/srclib/pcre/testdata/testinput2
+++ b/srclib/pcre/testdata/testinput2
@@ -38,7 +38,7 @@
/[abcd/
-/[\B]/
+/(?X)[\B]/
/[z-a]/
@@ -173,7 +173,7 @@
/<.*>/U
abc<def>ghi<klm>nop
-/<.*>(?U)/
+/(?U)<.*>/
abc<def>ghi<klm>nop
/<.*?>/U
@@ -266,6 +266,18 @@
/(?!alphabet)[ab]/S
/(?<=foo\n)^bar/m
+ foo\nbarbar
+ ***Failers
+ rhubarb
+ barbell
+ abc\nbarton
+
+/^(?<=foo\n)bar/m
+ foo\nbarbar
+ ***Failers
+ rhubarb
+ barbell
+ abc\nbarton
/(?>^abc)/m
abc
@@ -654,10 +666,18 @@
/^[[:alnum:]]/D
+/^[[:^alnum:]]/D
+
/^[[:alpha:]]/D
+
+/^[[:^alpha:]]/D
/^[[:ascii:]]/D
+/^[[:^ascii:]]/D
+
+/^[[:blank:]]/D
+
/^[[:cntrl:]]/D
/^[[:digit:]]/D
@@ -682,6 +702,8 @@
/^[12[:^digit:]]/D
+/^[[:^blank:]]/D
+
/[01[:alpha:]%]/D
/[[.ch.]]/
@@ -720,4 +742,655 @@
mainmain
mainOmain
+/These are all cases where Perl does it differently (nested captures)/
+
+/^(a(b)?)+$/
+ aba
+
+/^(aa(bb)?)+$/
+ aabbaa
+
+/^(aa|aa(bb))+$/
+ aabbaa
+
+/^(aa(bb)??)+$/
+ aabbaa
+
+/^(?:aa(bb)?)+$/
+ aabbaa
+
+/^(aa(b(b))?)+$/
+ aabbaa
+
+/^(?:aa(b(b))?)+$/
+ aabbaa
+
+/^(?:aa(b(?:b))?)+$/
+ aabbaa
+
+/^(?:aa(bb(?:b))?)+$/
+ aabbbaa
+
+/^(?:aa(b(?:bb))?)+$/
+ aabbbaa
+
+/^(?:aa(?:b(b))?)+$/
+ aabbaa
+
+/^(?:aa(?:b(bb))?)+$/
+ aabbbaa
+
+/^(aa(b(bb))?)+$/
+ aabbbaa
+
+/^(aa(bb(bb))?)+$/
+ aabbbbaa
+
+/--------------------------------------------------------------------/
+
+/#/xMD
+
+/a#/xMD
+
+/[\s]/D
+
+/[\S]/D
+
+/a(?i)b/D
+ ab
+ aB
+ *** Failers
+ AB
+
+/(a(?i)b)/D
+ ab
+ aB
+ *** Failers
+ AB
+
+/ (?i)abc/xD
+
+/#this is a comment
+ (?i)abc/xD
+
+/123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890/D
+
+/\Q123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890/D
+
+/\Q\E/D
+ \
+
+/\Q\Ex/D
+
+/ \Q\E/D
+
+/a\Q\E/D
+ abc
+ bca
+ bac
+
+/a\Q\Eb/D
+ abc
+
+/\Q\Eabc/D
+
+/x*+\w/D
+ *** Failers
+ xxxxx
+
+/x?+/D
+
+/x++/D
+
+/x{1,3}+/D
+
+/(x)*+/D
+
+/^(\w++|\s++)*$/
+ now is the time for all good men to come to the aid of the party
+ *** Failers
+ this is not a line with only words and spaces!
+
+/(\d++)(\w)/
+ 12345a
+ *** Failers
+ 12345+
+
+/a++b/
+ aaab
+
+/(a++b)/
+ aaab
+
+/(a++)b/
+ aaab
+
+/([^()]++|\([^()]*\))+/
+ ((abc(ade)ufh()()x
+
+/\(([^()]++|\([^()]+\))+\)/
+ (abc)
+ (abc(def)xyz)
+ *** Failers
+ ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+
+/(abc){1,3}+/D
+
+/a+?+/
+
+/a{2,3}?+b/
+
+/(?U)a+?+/
+
+/a{2,3}?+b/U
+
+/x(?U)a++b/D
+ xaaaab
+
+/(?U)xa++b/D
+ xaaaab
+
+/^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/D
+
+/^x(?U)a+b/D
+
+/^x(?U)(a+)b/D
+
+/[.x.]/
+
+/[=x=]/
+
+/[:x:]/
+
+/\l/
+
+/\L/
+
+/\N{name}/
+
+/\u/
+
+/\U/
+
+/[/
+
+/[a-/
+
+/[[:space:]/
+
+/[\s]/DM
+
+/[[:space:]]/DM
+
+/[[:space:]abcde]/DM
+
+/< (?: (?(R) \d++ | [^<>]*+) | (?R)) * >/x
+ <>
+ <abcd>
+ <abc <123> hij>
+ <abc <def> hij>
+ <abc<>def>
+ <abc<>
+ *** Failers
+ <abc
+
+|8J\$WE\<\.rX\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\<EjmhUZ\?\.akp2dF\>qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b|DM
+
+|\$\<\.X\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\<EjmhUZ\?\.akp2dF\>qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b|DM
+
+/(.*)\d+\1/I
+
+/(.*)\d+/I
+
+/(.*)\d+\1/Is
+
+/(.*)\d+/Is
+
+/(.*(xyz))\d+\2/I
+
+/((.*))\d+\1/I
+ abc123bc
+
+/a[b]/I
+
+/(?=a).*/I
+
+/(?=abc).xyz/iI
+
+/(?=abc)(?i).xyz/I
+
+/(?=a)(?=b)/I
+
+/(?=.)a/I
+
+/((?=abcda)a)/I
+
+/((?=abcda)ab)/I
+
+/()a/I
+
+/(?(1)ab|ac)/I
+
+/(?(1)abz|acz)/I
+
+/(?(1)abz)/I
+
+/(?(1)abz)123/I
+
+/(a)+/I
+
+/(a){2,3}/I
+
+/(a)*/I
+
+/[a]/I
+
+/[ab]/I
+
+/[ab]/IS
+
+/[^a]/I
+
+/\d456/I
+
+/\d456/IS
+
+/a^b/I
+
+/^a/mI
+ abcde
+ xy\nabc
+ *** Failers
+ xyabc
+
+/c|abc/I
+
+/(?i)[ab]/IS
+
+/[ab](?i)cd/IS
+
+/abc(?C)def/
+ abcdef
+ 1234abcdef
+ *** Failers
+ abcxyz
+ abcxyzf
+
+/abc(?C)de(?C1)f/
+ 123abcdef
+
+/(?C1)\dabc(?C2)def/
+ 1234abcdef
+ *** Failers
+ abcdef
+
+/(?C255)ab/
+
+/(?C256)ab/
+
+/(?Cab)xx/
+
+/(?C12vr)x/
+
+/abc(?C)def/
+ *** Failers
+ \x83\x0\x61bcdef
+
+/(abc)(?C)de(?C1)f/
+ 123abcdef
+ 123abcdef\C+
+ 123abcdef\C-
+ *** Failers
+ 123abcdef\C!1
+
+/(?C0)(abc(?C1))*/
+ abcabcabc
+ abcabc\C!1!3
+ *** Failers
+ abcabcabc\C!1!3
+
+/(\d{3}(?C))*/
+ 123\C+
+ 123456\C+
+ 123456789\C+
+
+/((xyz)(?C)p|(?C1)xyzabc)/
+ xyzabc\C+
+
+/(X)((xyz)(?C)p|(?C1)xyzabc)/
+ Xxyzabc\C+
+
+/(?=(abc))(?C)abcdef/
+ abcdef\C+
+
+/(?!(abc)(?C1)d)(?C2)abcxyz/
+ abcxyz\C+
+
+/(?<=(abc)(?C))xyz/
+ abcxyz\C+
+
+/(?C)abc/
+
+/(?C)^abc/
+
+/(?C)a|b/S
+
+/(?R)/
+
+/(a|(?R))/
+
+/(ab|(bc|(de|(?R))))/
+
+/x(ab|(bc|(de|(?R))))/
+ xab
+ xbc
+ xde
+ xxab
+ xxxab
+ *** Failers
+ xyab
+
+/(ab|(bc|(de|(?1))))/
+
+/x(ab|(bc|(de|(?1)x)x)x)/
+
+/^([^()]|\((?1)*\))*$/
+ abc
+ a(b)c
+ a(b(c))d
+ *** Failers)
+ a(b(c)d
+
+/^>abc>([^()]|\((?1)*\))*<xyz<$/
+ >abc>123<xyz<
+ >abc>1(2)3<xyz<
+ >abc>(1(2)3)<xyz<
+
+/(a(?1)b)/D
+
+/(a(?1)+b)/D
+
+/^\W*(?:((.)\W*(?1)\W*\2|)|((.)\W*(?3)\W*\4|\W*.\W*))\W*$/i
+ 1221
+ Satan, oscillate my metallic sonatas!
+ A man, a plan, a canal: Panama!
+ Able was I ere I saw Elba.
+ *** Failers
+ The quick brown fox
+
+/^(\d+|\((?1)([+*-])(?1)\)|-(?1))$/
+ 12
+ (((2+2)*-3)-7)
+ -12
+ *** Failers
+ ((2+2)*-3)-7)
+
+/^(x(y|(?1){2})z)/
+ xyz
+ xxyzxyzz
+ *** Failers
+ xxyzz
+ xxyzxyzxyzz
+
+/((< (?: (?(R) \d++ | [^<>]*+) | (?2)) * >))/x
+ <>
+ <abcd>
+ <abc <123> hij>
+ <abc <def> hij>
+ <abc<>def>
+ <abc<>
+ *** Failers
+ <abc
+
+/(?1)/
+
+/((?2)(abc)/
+
+/^(abc)def(?1)/
+ abcdefabc
+
+/^(a|b|c)=(?1)+/
+ a=a
+ a=b
+ a=bc
+
+/^(a|b|c)=((?1))+/
+ a=a
+ a=b
+ a=bc
+
+/a(?P<name1>b|c)d(?P<longername2>e)/D
+ abde
+ acde
+
+/(?:a(?P<c>c(?P<d>d)))(?P<a>a)/D
+
+/(?P<a>a)...(?P=a)bbb(?P>a)d/D
+
+/^\W*(?:(?P<one>(?P<two>.)\W*(?P>one)\W*(?P=two)|)|(?P<three>(?P<four>.)\W*(?P>three)\W*(?P=four)|\W*.\W*))\W*$/i
+ 1221
+ Satan, oscillate my metallic sonatas!
+ A man, a plan, a canal: Panama!
+ Able was I ere I saw Elba.
+ *** Failers
+ The quick brown fox
+
+/((?(R)a|b))\1(?1)?/
+ bb
+ bbaa
+
+/(.*)a/sI
+
+/(.*)a\1/sI
+
+/(.*)a(b)\2/sI
+
+/((.*)a|(.*)b)z/sI
+
+/((.*)a|(.*)b)z\1/sI
+
+/((.*)a|(.*)b)z\2/sI
+
+/((.*)a|(.*)b)z\3/sI
+
+/((.*)a|^(.*)b)z\3/sI
+
+/(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a/sI
+
+/(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a\31/sI
+
+/(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a\32/sI
+
+/(a)(bc)/ND
+ abc
+
+/(?P<one>a)(bc)/ND
+ abc
+
+/(a)(?P<named>bc)/ND
+
+/(a+)*zz/
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaazzbbbbbb\M
+ aaaaaaaaaaaaaz\M
+
+/(aaa(?C1)bbb|ab)/
+ aaabbb
+ aaabbb\C*0
+ aaabbb\C*1
+ aaabbb\C*-1
+
+/ab(?P<one>cd)ef(?P<two>gh)/
+ abcdefgh
+ abcdefgh\C1\Gtwo
+ abcdefgh\Cone\Ctwo
+ abcdefgh\Cthree
+
+/(?P<Tes>)(?P<Test>)/D
+
+/(?P<Test>)(?P<Tes>)/D
+
+/(?P<Z>zz)(?P<A>aa)/
+ zzaa\CZ
+ zzaa\CA
+
+/(?P<x>eks)(?P<x>eccs)/
+
+/(?P<abc>abc(?P<def>def)(?P<abc>xyz))/
+
+"\[((?P<elem>\d+)(,(?P>elem))*)\]"
+ [10,20,30,5,5,4,4,2,43,23,4234]
+ *** Failers
+ []
+
+"\[((?P<elem>\d+)(,(?P>elem))*)?\]"
+ [10,20,30,5,5,4,4,2,43,23,4234]
+ []
+
+/(a(b(?2)c))?/D
+
+/(a(b(?2)c))*/D
+
+/(a(b(?2)c)){0,2}/D
+
+/[ab]{1}+/D
+
+/((w\/|-|with)*(free|immediate)*.*?shipping\s*[!.-]*)/i
+ Baby Bjorn Active Carrier - With free SHIPPING!!
+
+/((w\/|-|with)*(free|immediate)*.*?shipping\s*[!.-]*)/iS
+ Baby Bjorn Active Carrier - With free SHIPPING!!
+
+/a*.*b/SD
+
+/(a|b)*.?c/SD
+
+/abc(?C255)de(?C)f/D
+
+/abcde/CD
+ abcde
+ abcdfe
+
+/a*b/CD
+ ab
+ aaaab
+ aaaacb
+
+/a+b/CD
+ ab
+ aaaab
+ aaaacb
+
+/(abc|def)x/CD
+ abcx
+ defx
+ abcdefzx
+
+/(ab|cd){3,4}/C
+ ababab
+ abcdabcd
+ abcdcdcdcdcd
+
+/([ab]{,4}c|xy)/CD
+ Note: that { does NOT introduce a quantifier
+
+/([ab]{1,4}c|xy){4,5}?123/CD
+ aacaacaacaacaac123
+
+/\b.*/I
+ ab cd\>1
+
+/\b.*/Is
+ ab cd\>1
+
+/(?!.bcd).*/I
+ Xbcd12345
+
+/abcde/
+ ab\P
+ abc\P
+ abcd\P
+ abcde\P
+ the quick brown abc\P
+ ** Failers\P
+ the quick brown abxyz fox\P
+
+"^(0?[1-9]|[12][0-9]|3[01])/(0?[1-9]|1[012])/(20)?\d\d$"
+ 13/05/04\P
+ 13/5/2004\P
+ 02/05/09\P
+ 1\P
+ 1/2\P
+ 1/2/0\P
+ 1/2/04\P
+ 0\P
+ 02/\P
+ 02/0\P
+ 02/1\P
+ ** Failers\P
+ \P
+ 123\P
+ 33/4/04\P
+ 3/13/04\P
+ 0/1/2003\P
+ 0/\P
+ 02/0/\P
+ 02/13\P
+
+/0{0,2}ABC/I
+
+/\d{3,}ABC/I
+
+/\d*ABC/I
+
+/[abc]+DE/I
+
+/[abc]?123/
+ 123\P
+ a\P
+ b\P
+ c\P
+ c12\P
+ c123\P
+
+/^(?:\d){3,5}X/
+ 1\P
+ 123\P
+ 123X
+ 1234\P
+ 1234X
+ 12345\P
+ 12345X
+ *** Failers
+ 1X
+ 123456\P
+
+/abc/>testsavedregex
+<testsavedregex
+ abc
+ ** Failers
+ bca
+
+/abc/F>testsavedregex
+<testsavedregex
+ abc
+ ** Failers
+ bca
+
+/(a|b)/S>testsavedregex
+<testsavedregex
+ abc
+ ** Failers
+ def
+
+/(a|b)/SF>testsavedregex
+<testsavedregex
+ abc
+ ** Failers
+ def
+
+~<(\w+)/?>(.)*</(\1)>~smg
+ <!DOCTYPE seite SYSTEM "http://www.lco.lineas.de/xmlCms.dtd">\n<seite>\n<dokumenteninformation>\n<seitentitel>Partner der LCO</seitentitel>\n<sprache>de</sprache>\n<seitenbeschreibung>Partner der LINEAS Consulting\nGmbH</seitenbeschreibung>\n<schluesselworte>LINEAS Consulting GmbH Hamburg\nPartnerfirmen</schluesselworte>\n<revisit>30 days</revisit>\n<robots>index,follow</robots>\n<menueinformation>\n<aktiv>ja</aktiv>\n<menueposition>3</menueposition>\n<menuetext>Partner</menuetext>\n</menueinformation>\n<lastedited>\n<autor>LCO</autor>\n<firma>LINEAS Consulting</firma>\n<datum>15.10.2003</datum>\n</lastedited>\n</dokumenteninformation>\n<inhalt>\n\n<absatzueberschrift>Die Partnerfirmen der LINEAS Consulting\nGmbH</absatzueberschrift>\n\n<absatz><link ziel="http://www.ca.com/" zielfenster="_blank">\n<bild name="logo_ca.gif" rahmen="no"/></link> <link\nziel="http://www.ey.com/" zielfenster="_blank"><bild\nname="logo_euy.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><link ziel="http://www.cisco.de/" zielfenster="_blank">\n<bild name="logo_cisco.gif" rahmen="ja"/></link></absatz>\n\n<absatz><link ziel="http://www.atelion.de/"\nzielfenster="_blank"><bild\nname="logo_atelion.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><link ziel="http://www.line-information.de/"\nzielfenster="_blank">\n<bild name="logo_line_information.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><bild name="logo_aw.gif" rahmen="no"/></absatz>\n\n<absatz><link ziel="http://www.incognis.de/"\nzielfenster="_blank"><bild\nname="logo_incognis.gif" rahmen="no"/></link></absatz>\n\n<absatz><link ziel="http://www.addcraft.com/"\nzielfenster="_blank"><bild\nname="logo_addcraft.gif" rahmen="no"/></link></absatz>\n\n<absatz><link ziel="http://www.comendo.com/"\nzielfenster="_blank"><bild\nname="logo_comendo.gif" rahmen="no"/></link></absatz>\n\n</inhalt>\n</seite>
+
+/^a/IF
+
/ End of testinput2 /
diff --git a/srclib/pcre/testdata/testinput3 b/srclib/pcre/testdata/testinput3
index d3bd74fdd3..c2abdbfdb5 100644
--- a/srclib/pcre/testdata/testinput3
+++ b/srclib/pcre/testdata/testinput3
@@ -1,1724 +1,65 @@
-/(?<!bar)foo/
- foo
- catfood
- arfootle
- rfoosh
+/^[\w]+/
*** Failers
- barfoo
- towbarfoo
+ École
-/\w{3}(?<!bar)foo/
- catfood
- *** Failers
- foo
- barfoo
- towbarfoo
-
-/(?<=(foo)a)bar/
- fooabar
- *** Failers
- bar
- foobbar
-
-/\Aabc\z/m
- abc
- *** Failers
- abc\n
- qqq\nabc
- abc\nzzz
- qqq\nabc\nzzz
-
-"(?>.*/)foo"
- /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/it/you/see/
-
-"(?>.*/)foo"
- /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo
-
-/(?>(\.\d\d[1-9]?))\d+/
- 1.230003938
- 1.875000282
- *** Failers
- 1.235
-
-/^((?>\w+)|(?>\s+))*$/
- now is the time for all good men to come to the aid of the party
- *** Failers
- this is not a line with only words and spaces!
-
-/(\d+)(\w)/
- 12345a
- 12345+
-
-/((?>\d+))(\w)/
- 12345a
- *** Failers
- 12345+
-
-/(?>a+)b/
- aaab
-
-/((?>a+)b)/
- aaab
-
-/(?>(a+))b/
- aaab
-
-/(?>b)+/
- aaabbbccc
-
-/(?>a+|b+|c+)*c/
- aaabbbbccccd
-
-/((?>[^()]+)|\([^()]*\))+/
- ((abc(ade)ufh()()x
-
-/\(((?>[^()]+)|\([^()]+\))+\)/
- (abc)
- (abc(def)xyz)
- *** Failers
- ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-
-/a(?-i)b/i
- ab
- *** Failers
- Ab
- aB
- AB
-
-/(a (?x)b c)d e/
- a bcd e
- *** Failers
- a b cd e
- abcd e
- a bcde
-
-/(a b(?x)c d (?-x)e f)/
- a bcde f
- *** Failers
- abcdef
-
-/(a(?i)b)c/
- abc
- aBc
- *** Failers
- abC
- aBC
- Abc
- ABc
- ABC
- AbC
-
-/a(?i:b)c/
- abc
- aBc
- *** Failers
- ABC
- abC
- aBC
-
-/a(?i:b)*c/
- aBc
- aBBc
- *** Failers
- aBC
- aBBC
-
-/a(?=b(?i)c)\w\wd/
- abcd
- abCd
- *** Failers
- aBCd
- abcD
-
-/(?s-i:more.*than).*million/i
- more than million
- more than MILLION
- more \n than Million
- *** Failers
- MORE THAN MILLION
- more \n than \n million
-
-/(?:(?s-i)more.*than).*million/i
- more than million
- more than MILLION
- more \n than Million
- *** Failers
- MORE THAN MILLION
- more \n than \n million
-
-/(?>a(?i)b+)+c/
- abc
- aBbc
- aBBc
- *** Failers
- Abc
- abAb
- abbC
-
-/(?=a(?i)b)\w\wc/
- abc
- aBc
- *** Failers
- Ab
- abC
- aBC
-
-/(?<=a(?i)b)(\w\w)c/
- abxxc
- aBxxc
- *** Failers
- Abxxc
- ABxxc
- abxxC
-
-/(?:(a)|b)(?(1)A|B)/
- aA
- bB
- *** Failers
- aB
- bA
-
-/^(a)?(?(1)a|b)+$/
- aa
- b
- bb
- *** Failers
- ab
-
-/^(?(?=abc)\w{3}:|\d\d)$/
- abc:
- 12
- *** Failers
- 123
- xyz
-
-/^(?(?!abc)\d\d|\w{3}:)$/
- abc:
- 12
- *** Failers
- 123
- xyz
-
-/(?(?<=foo)bar|cat)/
- foobar
- cat
- fcat
- focat
- *** Failers
- foocat
+/^[\w]+/Lfr_FR
+ École
-/(?(?<!foo)cat|bar)/
- foobar
- cat
- fcat
- focat
+/^[\w]+/
*** Failers
- foocat
+ École
-/( \( )? [^()]+ (?(1) \) |) /x
- abcd
- (abcd)
- the quick (abcd) fox
- (abcd
+/^[\W]+/
+ École
-/( \( )? [^()]+ (?(1) \) ) /x
- abcd
- (abcd)
- the quick (abcd) fox
- (abcd
-
-/^(?(2)a|(1)(2))+$/
- 12
- 12a
- 12aa
+/^[\W]+/Lfr_FR
*** Failers
- 1234
+ École
-/((?i)blah)\s+\1/
- blah blah
- BLAH BLAH
- Blah Blah
- blaH blaH
+/[\b]/
+ \b
*** Failers
- blah BLAH
- Blah blah
- blaH blah
-
-/((?i)blah)\s+(?i:\1)/
- blah blah
- BLAH BLAH
- Blah Blah
- blaH blaH
- blah BLAH
- Blah blah
- blaH blah
-
-/(?>a*)*/
a
- aa
- aaaa
-
-/(abc|)+/
- abc
- abcabc
- abcabcabc
- xyz
-
-/([a]*)*/
- a
- aaaaa
-
-/([ab]*)*/
- a
- b
- ababab
- aaaabcde
- bbbb
-
-/([^a]*)*/
- b
- bbbb
- aaa
-
-/([^ab]*)*/
- cccc
- abab
-
-/([a]*?)*/
- a
- aaaa
-
-/([ab]*?)*/
- a
- b
- abab
- baba
-
-/([^a]*?)*/
- b
- bbbb
- aaa
-
-/([^ab]*?)*/
- c
- cccc
- baba
-
-/(?>a*)*/
- a
- aaabcde
-
-/((?>a*))*/
- aaaaa
- aabbaa
-
-/((?>a*?))*/
- aaaaa
- aabbaa
-
-/(?(?=[^a-z]+[a-z]) \d{2}-[a-z]{3}-\d{2} | \d{2}-\d{2}-\d{2} ) /x
- 12-sep-98
- 12-09-98
- *** Failers
- sep-12-98
-
-/(?<=(foo))bar\1/
- foobarfoo
- foobarfootling
- *** Failers
- foobar
- barfoo
-
-/(?i:saturday|sunday)/
- saturday
- sunday
- Saturday
- Sunday
- SATURDAY
- SUNDAY
- SunDay
-
-/(a(?i)bc|BB)x/
- abcx
- aBCx
- bbx
- BBx
- *** Failers
- abcX
- aBCX
- bbX
- BBX
-
-/^([ab](?i)[cd]|[ef])/
- ac
- aC
- bD
- elephant
- Europe
- frog
- France
- *** Failers
- Africa
-
-/^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)/
- ab
- aBd
- xy
- xY
- zebra
- Zambesi
- *** Failers
- aCD
- XY
-
-/(?<=foo\n)^bar/m
- foo\nbar
- *** Failers
- bar
- baz\nbar
-/(?<=(?<!foo)bar)baz/
- barbaz
- barbarbaz
- koobarbaz
+/[\b]/Lfr_FR
+ \b
*** Failers
- baz
- foobarbaz
-
-/The case of aaaaaa is missed out below because I think Perl 5.005_02 gets/
-/it wrong; it sets $1 to aaa rather than aa. Compare the following test,/
-/where it does set $1 to aa when matching aaaaaa./
-
-/^(a\1?){4}$/
- a
- aa
- aaa
- aaaa
- aaaaa
- aaaaaaa
- aaaaaaaa
- aaaaaaaaa
- aaaaaaaaaa
- aaaaaaaaaaa
- aaaaaaaaaaaa
- aaaaaaaaaaaaa
- aaaaaaaaaaaaaa
- aaaaaaaaaaaaaaa
- aaaaaaaaaaaaaaaa
-
-/^(a\1?)(a\1?)(a\2?)(a\3?)$/
a
- aa
- aaa
- aaaa
- aaaaa
- aaaaaa
- aaaaaaa
- aaaaaaaa
- aaaaaaaaa
- aaaaaaaaaa
- aaaaaaaaaaa
- aaaaaaaaaaaa
- aaaaaaaaaaaaa
- aaaaaaaaaaaaaa
- aaaaaaaaaaaaaaa
- aaaaaaaaaaaaaaaa
-
-/The following tests are taken from the Perl 5.005 test suite; some of them/
-/are compatible with 5.004, but I'd rather not have to sort them out./
-
-/abc/
- abc
- xabcy
- ababc
- *** Failers
- xbc
- axc
- abx
-
-/ab*c/
- abc
-
-/ab*bc/
- abc
- abbc
- abbbbc
-
-/.{1}/
- abbbbc
-
-/.{3,4}/
- abbbbc
-
-/ab{0,}bc/
- abbbbc
-
-/ab+bc/
- abbc
- *** Failers
- abc
- abq
-
-/ab{1,}bc/
-
-/ab+bc/
- abbbbc
-
-/ab{1,}bc/
- abbbbc
-
-/ab{1,3}bc/
- abbbbc
-
-/ab{3,4}bc/
- abbbbc
-
-/ab{4,5}bc/
- *** Failers
- abq
- abbbbc
-
-/ab?bc/
- abbc
- abc
-
-/ab{0,1}bc/
- abc
-
-/ab?bc/
-
-/ab?c/
- abc
-
-/ab{0,1}c/
- abc
-
-/^abc$/
- abc
- *** Failers
- abbbbc
- abcc
-
-/^abc/
- abcc
-
-/^abc$/
-/abc$/
- aabc
+/^\w+/
*** Failers
- aabc
- aabcd
+ École
-/^/
- abc
+/^\w+/Lfr_FR
+ École
-/$/
- abc
+/(.+)\b(.+)/
+ École
-/a.c/
- abc
- axc
-
-/a.*c/
- axyzc
-
-/a[bc]d/
- abd
- *** Failers
- axyzd
- abc
-
-/a[b-d]e/
- ace
-
-/a[b-d]/
- aac
-
-/a[-b]/
- a-
-
-/a[b-]/
- a-
-
-/a]/
- a]
-
-/a[]]b/
- a]b
-
-/a[^bc]d/
- aed
- *** Failers
- abd
- abd
-
-/a[^-b]c/
- adc
-
-/a[^]b]c/
- adc
- *** Failers
- a-c
- a]c
-
-/\ba\b/
- a-
- -a
- -a-
-
-/\by\b/
+/(.+)\b(.+)/Lfr_FR
*** Failers
- xy
- yz
- xyz
+ École
-/\Ba\B/
+/École/i
+ École
*** Failers
- a-
- -a
- -a-
+ école
-/\By\b/
- xy
+/École/iLfr_FR
+ École
+ école
-/\by\B/
- yz
+/\w/IS
-/\By\B/
- xyz
+/\w/ISLfr_FR
-/\w/
- a
-
-/\W/
- -
- *** Failers
- -
- a
-
-/a\sb/
- a b
-
-/a\Sb/
- a-b
- *** Failers
- a-b
- a b
-
-/\d/
- 1
-
-/\D/
- -
- *** Failers
- -
- 1
-
-/[\w]/
- a
-
-/[\W]/
- -
- *** Failers
- -
- a
-
-/a[\s]b/
- a b
-
-/a[\S]b/
- a-b
- *** Failers
- a-b
- a b
-
-/[\d]/
- 1
-
-/[\D]/
- -
- *** Failers
- -
- 1
-
-/ab|cd/
- abc
- abcd
-
-/()ef/
- def
-
-/$b/
-
-/a\(b/
- a(b
-
-/a\(*b/
- ab
- a((b
-
-/a\\b/
- a\b
-
-/((a))/
- abc
-
-/(a)b(c)/
- abc
-
-/a+b+c/
- aabbabc
-
-/a{1,}b{1,}c/
- aabbabc
-
-/a.+?c/
- abcabc
-
-/(a+|b)*/
- ab
-
-/(a+|b){0,}/
- ab
-
-/(a+|b)+/
- ab
-
-/(a+|b){1,}/
- ab
-
-/(a+|b)?/
- ab
-
-/(a+|b){0,1}/
- ab
-
-/[^ab]*/
- cde
-
-/abc/
- *** Failers
- b
-
-
-/a*/
-
-
-/([abc])*d/
- abbbcd
-
-/([abc])*bcd/
- abcd
-
-/a|b|c|d|e/
- e
-
-/(a|b|c|d|e)f/
- ef
-
-/abcd*efg/
- abcdefg
-
-/ab*/
- xabyabbbz
- xayabbbz
-
-/(ab|cd)e/
- abcde
-
-/[abhgefdc]ij/
- hij
-
-/^(ab|cd)e/
-
-/(abc|)ef/
- abcdef
-
-/(a|b)c*d/
- abcd
-
-/(ab|ab*)bc/
- abc
-
-/a([bc]*)c*/
- abc
-
-/a([bc]*)(c*d)/
- abcd
-
-/a([bc]+)(c*d)/
- abcd
-
-/a([bc]*)(c+d)/
- abcd
-
-/a[bcd]*dcdcde/
- adcdcde
-
-/a[bcd]+dcdcde/
- *** Failers
- abcde
- adcdcde
-
-/(ab|a)b*c/
- abc
-
-/((a)(b)c)(d)/
- abcd
-
-/[a-zA-Z_][a-zA-Z0-9_]*/
- alpha
-
-/^a(bc+|b[eh])g|.h$/
- abh
-
-/(bc+d$|ef*g.|h?i(j|k))/
- effgz
- ij
- reffgz
- *** Failers
- effg
- bcdd
-
-/((((((((((a))))))))))/
- a
-
-/((((((((((a))))))))))\10/
- aa
-
-/(((((((((a)))))))))/
- a
-
-/multiple words of text/
- *** Failers
- aa
- uh-uh
-
-/multiple words/
- multiple words, yeah
-
-/(.*)c(.*)/
- abcde
-
-/\((.*), (.*)\)/
- (a, b)
-
-/[k]/
-
-/abcd/
- abcd
-
-/a(bc)d/
- abcd
-
-/a[-]?c/
- ac
-
-/(abc)\1/
- abcabc
-
-/([a-c]*)\1/
- abcabc
-
-/(a)|\1/
- a
- *** Failers
- ab
- x
-
-/(([a-c])b*?\2)*/
- ababbbcbc
-
-/(([a-c])b*?\2){3}/
- ababbbcbc
-
-/((\3|b)\2(a)x)+/
- aaaxabaxbaaxbbax
-
-/((\3|b)\2(a)){2,}/
- bbaababbabaaaaabbaaaabba
-
-/abc/i
- ABC
- XABCY
- ABABC
- *** Failers
- aaxabxbaxbbx
- XBC
- AXC
- ABX
-
-/ab*c/i
- ABC
-
-/ab*bc/i
- ABC
- ABBC
-
-/ab*?bc/i
- ABBBBC
-
-/ab{0,}?bc/i
- ABBBBC
-
-/ab+?bc/i
- ABBC
-
-/ab+bc/i
- *** Failers
- ABC
- ABQ
-
-/ab{1,}bc/i
-
-/ab+bc/i
- ABBBBC
-
-/ab{1,}?bc/i
- ABBBBC
-
-/ab{1,3}?bc/i
- ABBBBC
-
-/ab{3,4}?bc/i
- ABBBBC
-
-/ab{4,5}?bc/i
- *** Failers
- ABQ
- ABBBBC
-
-/ab??bc/i
- ABBC
- ABC
-
-/ab{0,1}?bc/i
- ABC
-
-/ab??bc/i
-
-/ab??c/i
- ABC
-
-/ab{0,1}?c/i
- ABC
-
-/^abc$/i
- ABC
- *** Failers
- ABBBBC
- ABCC
-
-/^abc/i
- ABCC
-
-/^abc$/i
-
-/abc$/i
- AABC
-
-/^/i
- ABC
-
-/$/i
- ABC
-
-/a.c/i
- ABC
- AXC
-
-/a.*?c/i
- AXYZC
-
-/a.*c/i
- *** Failers
- AABC
- AXYZD
-
-/a[bc]d/i
- ABD
-
-/a[b-d]e/i
- ACE
- *** Failers
- ABC
- ABD
-
-/a[b-d]/i
- AAC
-
-/a[-b]/i
- A-
-
-/a[b-]/i
- A-
-
-/a]/i
- A]
-
-/a[]]b/i
- A]B
-
-/a[^bc]d/i
- AED
-
-/a[^-b]c/i
- ADC
- *** Failers
- ABD
- A-C
-
-/a[^]b]c/i
- ADC
-
-/ab|cd/i
- ABC
- ABCD
-
-/()ef/i
- DEF
-
-/$b/i
- *** Failers
- A]C
- B
+/^[\xc8-\xc9]/iLfr_FR
+ École
+ école
-/a\(b/i
- A(B
-
-/a\(*b/i
- AB
- A((B
-
-/a\\b/i
- A\B
-
-/((a))/i
- ABC
-
-/(a)b(c)/i
- ABC
-
-/a+b+c/i
- AABBABC
-
-/a{1,}b{1,}c/i
- AABBABC
-
-/a.+?c/i
- ABCABC
-
-/a.*?c/i
- ABCABC
-
-/a.{0,5}?c/i
- ABCABC
-
-/(a+|b)*/i
- AB
-
-/(a+|b){0,}/i
- AB
-
-/(a+|b)+/i
- AB
-
-/(a+|b){1,}/i
- AB
-
-/(a+|b)?/i
- AB
-
-/(a+|b){0,1}/i
- AB
-
-/(a+|b){0,1}?/i
- AB
-
-/[^ab]*/i
- CDE
-
-/abc/i
-
-/a*/i
-
-
-/([abc])*d/i
- ABBBCD
-
-/([abc])*bcd/i
- ABCD
-
-/a|b|c|d|e/i
- E
-
-/(a|b|c|d|e)f/i
- EF
-
-/abcd*efg/i
- ABCDEFG
-
-/ab*/i
- XABYABBBZ
- XAYABBBZ
-
-/(ab|cd)e/i
- ABCDE
-
-/[abhgefdc]ij/i
- HIJ
-
-/^(ab|cd)e/i
- ABCDE
-
-/(abc|)ef/i
- ABCDEF
-
-/(a|b)c*d/i
- ABCD
-
-/(ab|ab*)bc/i
- ABC
-
-/a([bc]*)c*/i
- ABC
-
-/a([bc]*)(c*d)/i
- ABCD
-
-/a([bc]+)(c*d)/i
- ABCD
-
-/a([bc]*)(c+d)/i
- ABCD
-
-/a[bcd]*dcdcde/i
- ADCDCDE
-
-/a[bcd]+dcdcde/i
-
-/(ab|a)b*c/i
- ABC
-
-/((a)(b)c)(d)/i
- ABCD
-
-/[a-zA-Z_][a-zA-Z0-9_]*/i
- ALPHA
-
-/^a(bc+|b[eh])g|.h$/i
- ABH
-
-/(bc+d$|ef*g.|h?i(j|k))/i
- EFFGZ
- IJ
- REFFGZ
- *** Failers
- ADCDCDE
- EFFG
- BCDD
-
-/((((((((((a))))))))))/i
- A
-
-/((((((((((a))))))))))\10/i
- AA
-
-/(((((((((a)))))))))/i
- A
-
-/(?:(?:(?:(?:(?:(?:(?:(?:(?:(a))))))))))/i
- A
-
-/(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))/i
- C
-
-/multiple words of text/i
- *** Failers
- AA
- UH-UH
-
-/multiple words/i
- MULTIPLE WORDS, YEAH
-
-/(.*)c(.*)/i
- ABCDE
-
-/\((.*), (.*)\)/i
- (A, B)
-
-/[k]/i
-
-/abcd/i
- ABCD
-
-/a(bc)d/i
- ABCD
-
-/a[-]?c/i
- AC
-
-/(abc)\1/i
- ABCABC
-
-/([a-c]*)\1/i
- ABCABC
-
-/a(?!b)./
- abad
-
-/a(?=d)./
- abad
-
-/a(?=c|d)./
- abad
-
-/a(?:b|c|d)(.)/
- ace
-
-/a(?:b|c|d)*(.)/
- ace
-
-/a(?:b|c|d)+?(.)/
- ace
- acdbcdbe
-
-/a(?:b|c|d)+(.)/
- acdbcdbe
-
-/a(?:b|c|d){2}(.)/
- acdbcdbe
-
-/a(?:b|c|d){4,5}(.)/
- acdbcdbe
-
-/a(?:b|c|d){4,5}?(.)/
- acdbcdbe
-
-/((foo)|(bar))*/
- foobar
-
-/a(?:b|c|d){6,7}(.)/
- acdbcdbe
-
-/a(?:b|c|d){6,7}?(.)/
- acdbcdbe
-
-/a(?:b|c|d){5,6}(.)/
- acdbcdbe
-
-/a(?:b|c|d){5,6}?(.)/
- acdbcdbe
-
-/a(?:b|c|d){5,7}(.)/
- acdbcdbe
-
-/a(?:b|c|d){5,7}?(.)/
- acdbcdbe
-
-/a(?:b|(c|e){1,2}?|d)+?(.)/
- ace
-
-/^(.+)?B/
- AB
-
-/^([^a-z])|(\^)$/
- .
-
-/^[<>]&/
- <&OUT
-
-/^(a\1?){4}$/
- aaaaaaaaaa
- *** Failers
- AB
- aaaaaaaaa
- aaaaaaaaaaa
-
-/^(a(?(1)\1)){4}$/
- aaaaaaaaaa
- *** Failers
- aaaaaaaaa
- aaaaaaaaaaa
-
-/(?:(f)(o)(o)|(b)(a)(r))*/
- foobar
-
-/(?<=a)b/
- ab
- *** Failers
- cb
- b
-
-/(?<!c)b/
- ab
- b
- b
-
-/(?:..)*a/
- aba
-
-/(?:..)*?a/
- aba
-
-/^(?:b|a(?=(.)))*\1/
- abc
-
-/^(){3,5}/
- abc
-
-/^(a+)*ax/
- aax
-
-/^((a|b)+)*ax/
- aax
-
-/^((a|bc)+)*ax/
- aax
-
-/(a|x)*ab/
- cab
-
-/(a)*ab/
- cab
-
-/(?:(?i)a)b/
- ab
-
-/((?i)a)b/
- ab
-
-/(?:(?i)a)b/
- Ab
-
-/((?i)a)b/
- Ab
-
-/(?:(?i)a)b/
- *** Failers
- cb
- aB
-
-/((?i)a)b/
-
-/(?i:a)b/
- ab
-
-/((?i:a))b/
- ab
-
-/(?i:a)b/
- Ab
-
-/((?i:a))b/
- Ab
-
-/(?i:a)b/
- *** Failers
- aB
- aB
-
-/((?i:a))b/
-
-/(?:(?-i)a)b/i
- ab
-
-/((?-i)a)b/i
- ab
-
-/(?:(?-i)a)b/i
- aB
-
-/((?-i)a)b/i
- aB
-
-/(?:(?-i)a)b/i
- *** Failers
- aB
- Ab
-
-/((?-i)a)b/i
-
-/(?:(?-i)a)b/i
- aB
-
-/((?-i)a)b/i
- aB
-
-/(?:(?-i)a)b/i
- *** Failers
- Ab
- AB
-
-/((?-i)a)b/i
-
-/(?-i:a)b/i
- ab
-
-/((?-i:a))b/i
- ab
-
-/(?-i:a)b/i
- aB
-
-/((?-i:a))b/i
- aB
-
-/(?-i:a)b/i
- *** Failers
- AB
- Ab
-
-/((?-i:a))b/i
-
-/(?-i:a)b/i
- aB
-
-/((?-i:a))b/i
- aB
-
-/(?-i:a)b/i
- *** Failers
- Ab
- AB
-
-/((?-i:a))b/i
-
-/((?-i:a.))b/i
- *** Failers
- AB
- a\nB
-
-/((?s-i:a.))b/i
- a\nB
-
-/(?:c|d)(?:)(?:a(?:)(?:b)(?:b(?:))(?:b(?:)(?:b)))/
- cabbbb
-
-/(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))/
- caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
-
-/(ab)\d\1/i
- Ab4ab
- ab4Ab
-
-/foo\w*\d{4}baz/
- foobar1234baz
-
-/x(~~)*(?:(?:F)?)?/
- x~~
-
-/^a(?#xxx){3}c/
- aaac
-
-/^a (?#xxx) (?#yyy) {3}c/x
- aaac
-
-/(?<![cd])b/
- *** Failers
- B\nB
- dbcb
-
-/(?<![cd])[ab]/
- dbaacb
-
-/(?<!(c|d))b/
-
-/(?<!(c|d))[ab]/
- dbaacb
-
-/(?<!cd)[ab]/
- cdaccb
-
-/^(?:a?b?)*$/
- *** Failers
- dbcb
- a--
-
-/((?s)^a(.))((?m)^b$)/
- a\nb\nc\n
-
-/((?m)^b$)/
- a\nb\nc\n
-
-/(?m)^b/
- a\nb\n
-
-/(?m)^(b)/
- a\nb\n
-
-/((?m)^b)/
- a\nb\n
-
-/\n((?m)^b)/
- a\nb\n
-
-/((?s).)c(?!.)/
- a\nb\nc\n
- a\nb\nc\n
-
-/((?s)b.)c(?!.)/
- a\nb\nc\n
- a\nb\nc\n
-
-/^b/
-
-/()^b/
- *** Failers
- a\nb\nc\n
- a\nb\nc\n
-
-/((?m)^b)/
- a\nb\nc\n
-
-/(?(1)a|b)/
-
-/(?(1)b|a)/
- a
-
-/(x)?(?(1)a|b)/
- *** Failers
- a
- a
-
-/(x)?(?(1)b|a)/
- a
-
-/()?(?(1)b|a)/
- a
-
-/()(?(1)b|a)/
-
-/()?(?(1)a|b)/
- a
-
-/^(\()?blah(?(1)(\)))$/
- (blah)
- blah
- *** Failers
- a
- blah)
- (blah
-
-/^(\(+)?blah(?(1)(\)))$/
- (blah)
- blah
- *** Failers
- blah)
- (blah
-
-/(?(?!a)a|b)/
-
-/(?(?!a)b|a)/
- a
-
-/(?(?=a)b|a)/
- *** Failers
- a
- a
-
-/(?(?=a)a|b)/
- a
-
-/(?=(a+?))(\1ab)/
- aaab
-
-/^(?=(a+?))\1ab/
-
-/(\w+:)+/
- one:
-
-/$(?<=^(a))/
- a
-
-/(?=(a+?))(\1ab)/
- aaab
-
-/^(?=(a+?))\1ab/
- *** Failers
- aaab
- aaab
-
-/([\w:]+::)?(\w+)$/
- abcd
- xy:z:::abcd
-
-/^[^bcd]*(c+)/
- aexycd
-
-/(a*)b+/
- caab
-
-/([\w:]+::)?(\w+)$/
- abcd
- xy:z:::abcd
- *** Failers
- abcd:
- abcd:
-
-/^[^bcd]*(c+)/
- aexycd
-
-/(>a+)ab/
-
-/(?>a+)b/
- aaab
-
-/([[:]+)/
- a:[b]:
-
-/([[=]+)/
- a=[b]=
-
-/([[.]+)/
- a.[b].
-
-/((?>a+)b)/
- aaab
-
-/(?>(a+))b/
- aaab
-
-/((?>[^()]+)|\([^()]*\))+/
- ((abc(ade)ufh()()x
-
-/a\Z/
- *** Failers
- aaab
- a\nb\n
-
-/b\Z/
- a\nb\n
-
-/b\z/
-
-/b\Z/
- a\nb
-
-/b\z/
- a\nb
- *** Failers
-
-/^(?>(?(1)\.|())[^\W_](?>[a-z0-9-]*[^\W_])?)+$/
- a
- abc
- a-b
- 0-9
- a.b
- 5.6.7
- the.quick.brown.fox
- a100.b200.300c
- 12-ab.1245
- ***Failers
- \
- .a
- -a
- a-
- a.
- a_b
- a.-
- a..
- ab..bc
- the.quick.brown.fox-
- the.quick.brown.fox.
- the.quick.brown.fox_
- the.quick.brown.fox+
-
-/(?>.*)(?<=(abcd|wxyz))/
- alphabetabcd
- endingwxyz
- *** Failers
- a rather long string that doesn't end with one of them
-
-/word (?>(?:(?!otherword)[a-zA-Z0-9]+ ){0,30})otherword/
- word cat dog elephant mussel cow horse canary baboon snake shark otherword
- word cat dog elephant mussel cow horse canary baboon snake shark
-
-/word (?>[a-zA-Z0-9]+ ){0,30}otherword/
- word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope
-
-/(?<=\d{3}(?!999))foo/
- 999foo
- 123999foo
- *** Failers
- 123abcfoo
-
-/(?<=(?!...999)\d{3})foo/
- 999foo
- 123999foo
- *** Failers
- 123abcfoo
-
-/(?<=\d{3}(?!999)...)foo/
- 123abcfoo
- 123456foo
- *** Failers
- 123999foo
-
-/(?<=\d{3}...)(?<!999)foo/
- 123abcfoo
- 123456foo
- *** Failers
- 123999foo
-
-/<a[\s]+href[\s]*=[\s]* # find <a href=
- ([\"\'])? # find single or double quote
- (?(1) (.*?)\1 | ([^\s]+)) # if quote found, match up to next matching
- # quote, otherwise match up to next space
-/isx
- <a href=abcd xyz
- <a href=\"abcd xyz pqr\" cats
- <a href=\'abcd xyz pqr\' cats
-
-/<a\s+href\s*=\s* # find <a href=
- (["'])? # find single or double quote
- (?(1) (.*?)\1 | (\S+)) # if quote found, match up to next matching
- # quote, otherwise match up to next space
-/isx
- <a href=abcd xyz
- <a href=\"abcd xyz pqr\" cats
- <a href = \'abcd xyz pqr\' cats
-
-/<a\s+href(?>\s*)=(?>\s*) # find <a href=
- (["'])? # find single or double quote
- (?(1) (.*?)\1 | (\S+)) # if quote found, match up to next matching
- # quote, otherwise match up to next space
-/isx
- <a href=abcd xyz
- <a href=\"abcd xyz pqr\" cats
- <a href = \'abcd xyz pqr\' cats
-
-/((Z)+|A)*/
- ZABCDEFG
-
-/(Z()|A)*/
- ZABCDEFG
-
-/(Z(())|A)*/
- ZABCDEFG
-
-/((?>Z)+|A)*/
- ZABCDEFG
-
-/((?>)+|A)*/
- ZABCDEFG
-
-/a*/g
- abbab
-
-/^[a-\d]/
- abcde
- -things
- 0digit
- *** Failers
- bcdef
-
-/^[\d-a]/
- abcde
- -things
- 0digit
- *** Failers
- bcdef
+/^[\xc8-\xc9]/Lfr_FR
+ École
+ *** Failers
+ école
-/ End of testinput3 /
+/ End of testinput3 /
diff --git a/srclib/pcre/testdata/testinput4 b/srclib/pcre/testdata/testinput4
index f2878965f6..c16e9d9983 100644
--- a/srclib/pcre/testdata/testinput4
+++ b/srclib/pcre/testdata/testinput4
@@ -1,65 +1,513 @@
-/^[\w]+/
+/-- Do not use the \x{} construct except with patterns that have the --/
+/-- /8 option set, because PCRE doesn't recognize them as UTF-8 unless --/
+/-- that option is set. However, the latest Perls recognize them always. --/
+
+/a.b/8
+ acb
+ a\x7fb
+ a\x{100}b
+ *** Failers
+ a\nb
+
+/a(.{3})b/8
+ a\x{4000}xyb
+ a\x{4000}\x7fyb
+ a\x{4000}\x{100}yb
*** Failers
- École
+ a\x{4000}b
+ ac\ncb
+
+/a(.*?)(.)/
+ a\xc0\x88b
+
+/a(.*?)(.)/8
+ a\x{100}b
+
+/a(.*)(.)/
+ a\xc0\x88b
+
+/a(.*)(.)/8
+ a\x{100}b
-/^[\w]+/Lfr
- École
+/a(.)(.)/
+ a\xc0\x92bcd
-/^[\w]+/
+/a(.)(.)/8
+ a\x{240}bcd
+
+/a(.?)(.)/
+ a\xc0\x92bcd
+
+/a(.?)(.)/8
+ a\x{240}bcd
+
+/a(.??)(.)/
+ a\xc0\x92bcd
+
+/a(.??)(.)/8
+ a\x{240}bcd
+
+/a(.{3})b/8
+ a\x{1234}xyb
+ a\x{1234}\x{4321}yb
+ a\x{1234}\x{4321}\x{3412}b
*** Failers
- École
+ a\x{1234}b
+ ac\ncb
-/^[\W]+/
- École
+/a(.{3,})b/8
+ a\x{1234}xyb
+ a\x{1234}\x{4321}yb
+ a\x{1234}\x{4321}\x{3412}b
+ axxxxbcdefghijb
+ a\x{1234}\x{4321}\x{3412}\x{3421}b
+ *** Failers
+ a\x{1234}b
-/^[\W]+/Lfr
+/a(.{3,}?)b/8
+ a\x{1234}xyb
+ a\x{1234}\x{4321}yb
+ a\x{1234}\x{4321}\x{3412}b
+ axxxxbcdefghijb
+ a\x{1234}\x{4321}\x{3412}\x{3421}b
*** Failers
- École
+ a\x{1234}b
+
+/a(.{3,5})b/8
+ a\x{1234}xyb
+ a\x{1234}\x{4321}yb
+ a\x{1234}\x{4321}\x{3412}b
+ axxxxbcdefghijb
+ a\x{1234}\x{4321}\x{3412}\x{3421}b
+ axbxxbcdefghijb
+ axxxxxbcdefghijb
+ *** Failers
+ a\x{1234}b
+ axxxxxxbcdefghijb
+
+/a(.{3,5}?)b/8
+ a\x{1234}xyb
+ a\x{1234}\x{4321}yb
+ a\x{1234}\x{4321}\x{3412}b
+ axxxxbcdefghijb
+ a\x{1234}\x{4321}\x{3412}\x{3421}b
+ axbxxbcdefghijb
+ axxxxxbcdefghijb
+ *** Failers
+ a\x{1234}b
+ axxxxxxbcdefghijb
+
+/^[a\x{c0}]/8
+ *** Failers
+ \x{100}
+
+/(?<=aXb)cd/8
+ aXbcd
+
+/(?<=a\x{100}b)cd/8
+ a\x{100}bcd
+
+/(?<=a\x{100000}b)cd/8
+ a\x{100000}bcd
+
+/(?:\x{100}){3}b/8
+ \x{100}\x{100}\x{100}b
+ *** Failers
+ \x{100}\x{100}b
+
+/\x{ab}/8
+ \x{ab}
+ \xc2\xab
+ *** Failers
+ \x00{ab}
-/[\b]/
- \b
+/(?<=(.))X/8
+ WXYZ
+ \x{256}XYZ
*** Failers
- a
+ XYZ
-/[\b]/Lfr
- \b
+/X(\C{3})/8
+ X\x{1234}
+
+/X(\C{4})/8
+ X\x{1234}YZ
+
+/X\C*/8
+ XYZabcdce
+
+/X\C*?/8
+ XYZabcde
+
+/X\C{3,5}/8
+ Xabcdefg
+ X\x{1234}
+ X\x{1234}YZ
+ X\x{1234}\x{512}
+ X\x{1234}\x{512}YZ
+
+/X\C{3,5}?/8
+ Xabcdefg
+ X\x{1234}
+ X\x{1234}YZ
+ X\x{1234}\x{512}
+
+/[^a]+/8g
+ bcd
+ \x{100}aY\x{256}Z
+
+/^[^a]{2}/8
+ \x{100}bc
+
+/^[^a]{2,}/8
+ \x{100}bcAa
+
+/^[^a]{2,}?/8
+ \x{100}bca
+
+/[^a]+/8ig
+ bcd
+ \x{100}aY\x{256}Z
+
+/^[^a]{2}/8i
+ \x{100}bc
+
+/^[^a]{2,}/8i
+ \x{100}bcAa
+
+/^[^a]{2,}?/8i
+ \x{100}bca
+
+/\x{100}{0,0}/8
+ abcd
+
+/\x{100}?/8
+ abcd
+ \x{100}\x{100}
+
+/\x{100}{0,3}/8
+ \x{100}\x{100}
+ \x{100}\x{100}\x{100}\x{100}
+
+/\x{100}*/8
+ abce
+ \x{100}\x{100}\x{100}\x{100}
+
+/\x{100}{1,1}/8
+ abcd\x{100}\x{100}\x{100}\x{100}
+
+/\x{100}{1,3}/8
+ abcd\x{100}\x{100}\x{100}\x{100}
+
+/\x{100}+/8
+ abcd\x{100}\x{100}\x{100}\x{100}
+
+/\x{100}{3}/8
+ abcd\x{100}\x{100}\x{100}XX
+
+/\x{100}{3,5}/8
+ abcd\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}XX
+
+/\x{100}{3,}/8
+ abcd\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}XX
+
+/(?<=a\x{100}{2}b)X/8+
+ Xyyya\x{100}\x{100}bXzzz
+
+/\D*/8
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+
+/\D*/8
+ \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
+
+/\D/8
+ 1X2
+ 1\x{100}2
+
+/>\S/8
+ > >X Y
+ > >\x{100} Y
+
+/\d/8
+ \x{100}3
+
+/\s/8
+ \x{100} X
+
+/\D+/8
+ 12abcd34
*** Failers
- a
+ 1234
+
+/\D{2,3}/8
+ 12abcd34
+ 12ab34
+ *** Failers
+ 1234
+ 12a34
-/^\w+/
+/\D{2,3}?/8
+ 12abcd34
+ 12ab34
+ *** Failers
+ 1234
+ 12a34
+
+/\d+/8
+ 12abcd34
*** Failers
- École
-/^\w+/Lfr
- École
+/\d{2,3}/8
+ 12abcd34
+ 1234abcd
+ *** Failers
+ 1.4
-/(.+)\b(.+)/
- École
+/\d{2,3}?/8
+ 12abcd34
+ 1234abcd
+ *** Failers
+ 1.4
-/(.+)\b(.+)/Lfr
+/\S+/8
+ 12abcd34
*** Failers
- École
+ \ \
-/École/i
- École
+/\S{2,3}/8
+ 12abcd34
+ 1234abcd
*** Failers
- école
+ \ \
-/École/iLfr
- École
- école
+/\S{2,3}?/8
+ 12abcd34
+ 1234abcd
+ *** Failers
+ \ \
-/\w/IS
+/>\s+</8+
+ 12> <34
+ *** Failers
-/\w/ISLfr
+/>\s{2,3}</8+
+ ab> <cd
+ ab> <ce
+ *** Failers
+ ab> <cd
-/^[\xc8-\xc9]/iLfr
- École
- école
+/>\s{2,3}?</8+
+ ab> <cd
+ ab> <ce
+ *** Failers
+ ab> <cd
-/^[\xc8-\xc9]/Lfr
- École
+/\w+/8
+ 12 34
+ *** Failers
+ +++=*!
+
+/\w{2,3}/8
+ ab cd
+ abcd ce
+ *** Failers
+ a.b.c
+
+/\w{2,3}?/8
+ ab cd
+ abcd ce
+ *** Failers
+ a.b.c
+
+/\W+/8
+ 12====34
+ *** Failers
+ abcd
+
+/\W{2,3}/8
+ ab====cd
+ ab==cd
+ *** Failers
+ a.b.c
+
+/\W{2,3}?/8
+ ab====cd
+ ab==cd
+ *** Failers
+ a.b.c
+
+/[\x{100}]/8
+ \x{100}
+ Z\x{100}
+ \x{100}Z
+ *** Failers
+
+/[Z\x{100}]/8
+ Z\x{100}
+ \x{100}
+ \x{100}Z
*** Failers
- école
+
+/[\x{100}\x{200}]/8
+ ab\x{100}cd
+ ab\x{200}cd
+ *** Failers
+
+/[\x{100}-\x{200}]/8
+ ab\x{100}cd
+ ab\x{200}cd
+ ab\x{111}cd
+ *** Failers
+
+/[z-\x{200}]/8
+ ab\x{100}cd
+ ab\x{200}cd
+ ab\x{111}cd
+ abzcd
+ ab|cd
+ *** Failers
+
+/[Q\x{100}\x{200}]/8
+ ab\x{100}cd
+ ab\x{200}cd
+ Q?
+ *** Failers
+
+/[Q\x{100}-\x{200}]/8
+ ab\x{100}cd
+ ab\x{200}cd
+ ab\x{111}cd
+ Q?
+ *** Failers
+
+/[Qz-\x{200}]/8
+ ab\x{100}cd
+ ab\x{200}cd
+ ab\x{111}cd
+ abzcd
+ ab|cd
+ Q?
+ *** Failers
+
+/[\x{100}\x{200}]{1,3}/8
+ ab\x{100}cd
+ ab\x{200}cd
+ ab\x{200}\x{100}\x{200}\x{100}cd
+ *** Failers
+
+/[\x{100}\x{200}]{1,3}?/8
+ ab\x{100}cd
+ ab\x{200}cd
+ ab\x{200}\x{100}\x{200}\x{100}cd
+ *** Failers
+
+/[Q\x{100}\x{200}]{1,3}/8
+ ab\x{100}cd
+ ab\x{200}cd
+ ab\x{200}\x{100}\x{200}\x{100}cd
+ *** Failers
+
+/[Q\x{100}\x{200}]{1,3}?/8
+ ab\x{100}cd
+ ab\x{200}cd
+ ab\x{200}\x{100}\x{200}\x{100}cd
+ *** Failers
+
+/(?<=[\x{100}\x{200}])X/8
+ abc\x{200}X
+ abc\x{100}X
+ *** Failers
+ X
+
+/(?<=[Q\x{100}\x{200}])X/8
+ abc\x{200}X
+ abc\x{100}X
+ abQX
+ *** Failers
+ X
+
+/(?<=[\x{100}\x{200}]{3})X/8
+ abc\x{100}\x{200}\x{100}X
+ *** Failers
+ abc\x{200}X
+ X
+
+/[^\x{100}\x{200}]X/8
+ AX
+ \x{150}X
+ \x{500}X
+ *** Failers
+ \x{100}X
+ \x{200}X
+
+/[^Q\x{100}\x{200}]X/8
+ AX
+ \x{150}X
+ \x{500}X
+ *** Failers
+ \x{100}X
+ \x{200}X
+ QX
+
+/[^\x{100}-\x{200}]X/8
+ AX
+ \x{500}X
+ *** Failers
+ \x{100}X
+ \x{150}X
+ \x{200}X
+
+/a\Cb/
+ aXb
+ a\nb
+
+/a\Cb/8
+ aXb
+ a\nb
+ *** Failers
+ a\x{100}b
+
+/[z-\x{100}]/8i
+ z
+ Z
+ \x{100}
+ *** Failers
+ \x{102}
+ y
+
+/[\xFF]/
+ >\xff<
+
+/[\xff]/8
+ >\x{ff}<
+
+/[^\xFF]/
+ XYZ
+
+/[^\xff]/8
+ XYZ
+ \x{123}
+
+/^[ac]*b/8
+ xb
+
+/^[ac\x{100}]*b/8
+ xb
+
+/^[^x]*b/8i
+ xb
+
+/^[^x]*b/8
+ xb
+
+/^\d*b/8
+ xb
+
+/(|a)/g8
+ catac
+ a\x{256}a
+
+/^\x{85}$/8i
+ \x{85}
/ End of testinput4 /
diff --git a/srclib/pcre/testdata/testinput5 b/srclib/pcre/testdata/testinput5
index d66cfbddf3..fe6ee3e656 100644
--- a/srclib/pcre/testdata/testinput5
+++ b/srclib/pcre/testdata/testinput5
@@ -1,118 +1,263 @@
-/-- Because of problems with Perl 5.6 in handling UTF-8 vs non UTF-8 --/
-/-- strings automatically, do not use the \x{} construct except with --/
-/-- patterns that have the /8 option set, and don't use them without! --/
-
-/a.b/8
- acb
- a\x7fb
- a\x{100}b
- *** Failers
- a\nb
+/\x{100}/8DM
-/a(.{3})b/8
- a\x{4000}xyb
- a\x{4000}\x7fyb
- a\x{4000}\x{100}yb
- *** Failers
- a\x{4000}b
- ac\ncb
+/\x{1000}/8DM
-/a(.*?)(.)/
- a\xc0\x88b
+/\x{10000}/8DM
-/a(.*?)(.)/8
- a\x{100}b
+/\x{100000}/8DM
-/a(.*)(.)/
- a\xc0\x88b
+/\x{1000000}/8DM
-/a(.*)(.)/8
- a\x{100}b
+/\x{4000000}/8DM
-/a(.)(.)/
- a\xc0\x92bcd
+/\x{7fffFFFF}/8DM
-/a(.)(.)/8
- a\x{240}bcd
+/[\x{ff}]/8DM
-/a(.?)(.)/
- a\xc0\x92bcd
+/[\x{100}]/8DM
-/a(.?)(.)/8
- a\x{240}bcd
+/\x{ffffffff}/8
-/a(.??)(.)/
- a\xc0\x92bcd
+/\x{100000000}/8
-/a(.??)(.)/8
- a\x{240}bcd
+/^\x{100}a\x{1234}/8
+ \x{100}a\x{1234}bcd
-/a(.{3})b/8
- a\x{1234}xyb
- a\x{1234}\x{4321}yb
- a\x{1234}\x{4321}\x{3412}b
- *** Failers
- a\x{1234}b
- ac\ncb
-
-/a(.{3,})b/8
- a\x{1234}xyb
- a\x{1234}\x{4321}yb
- a\x{1234}\x{4321}\x{3412}b
- axxxxbcdefghijb
- a\x{1234}\x{4321}\x{3412}\x{3421}b
- *** Failers
- a\x{1234}b
-
-/a(.{3,}?)b/8
- a\x{1234}xyb
- a\x{1234}\x{4321}yb
- a\x{1234}\x{4321}\x{3412}b
- axxxxbcdefghijb
- a\x{1234}\x{4321}\x{3412}\x{3421}b
- *** Failers
- a\x{1234}b
-
-/a(.{3,5})b/8
- a\x{1234}xyb
- a\x{1234}\x{4321}yb
- a\x{1234}\x{4321}\x{3412}b
- axxxxbcdefghijb
- a\x{1234}\x{4321}\x{3412}\x{3421}b
- axbxxbcdefghijb
- axxxxxbcdefghijb
+/\x80/8D
+
+/\xff/8D
+
+/\x{0041}\x{2262}\x{0391}\x{002e}/D8
+ \x{0041}\x{2262}\x{0391}\x{002e}
+
+/\x{D55c}\x{ad6d}\x{C5B4}/D8
+ \x{D55c}\x{ad6d}\x{C5B4}
+
+/\x{65e5}\x{672c}\x{8a9e}/D8
+ \x{65e5}\x{672c}\x{8a9e}
+
+/\x{80}/D8
+
+/\x{084}/D8
+
+/\x{104}/D8
+
+/\x{861}/D8
+
+/\x{212ab}/D8
+
+/.{3,5}X/D8
+ \x{212ab}\x{212ab}\x{212ab}\x{861}X
+
+
+/.{3,5}?/D8
+ \x{212ab}\x{212ab}\x{212ab}\x{861}
+
+/-- These tests are here rather than in testinput4 because Perl 5.6 has --/
+/-- some problems with UTF-8 support, in the area of \x{..} where the --/
+/-- value is < 255. It grumbles about invalid UTF-8 strings. --/
+
+/^[a\x{c0}]b/8
+ \x{c0}b
+
+/^([a\x{c0}]*?)aa/8
+ a\x{c0}aaaa/
+
+/^([a\x{c0}]*?)aa/8
+ a\x{c0}aaaa/
+ a\x{c0}a\x{c0}aaa/
+
+/^([a\x{c0}]*)aa/8
+ a\x{c0}aaaa/
+ a\x{c0}a\x{c0}aaa/
+
+/^([a\x{c0}]*)a\x{c0}/8
+ a\x{c0}aaaa/
+ a\x{c0}a\x{c0}aaa/
+
+/-- --/
+
+/(?<=\C)X/8
+ Should produce an error diagnostic
+
+/-- This one is here not because it's different to Perl, but because the --/
+/-- way the captured single-byte is displayed. (In Perl it becomes a --/
+/-- character, and you can't tell the difference.) --/
+
+/X(\C)(.*)/8
+ X\x{1234}
+ X\nabc
+
+/^[ab]/8D
+ bar
*** Failers
- a\x{1234}b
- axxxxxxbcdefghijb
-
-/a(.{3,5}?)b/8
- a\x{1234}xyb
- a\x{1234}\x{4321}yb
- a\x{1234}\x{4321}\x{3412}b
- axxxxbcdefghijb
- a\x{1234}\x{4321}\x{3412}\x{3421}b
- axbxxbcdefghijb
- axxxxxbcdefghijb
+ c
+ \x{ff}
+ \x{100}
+
+/^[^ab]/8D
+ c
+ \x{ff}
+ \x{100}
+ *** Failers
+ aaa
+
+/[^ab\xC0-\xF0]/8SD
+ \x{f1}
+ \x{bf}
+ \x{100}
+ \x{1000}
*** Failers
- a\x{1234}b
- axxxxxxbcdefghijb
+ \x{c0}
+ \x{f0}
+
+/Ä€{3,4}/8SD
+ \x{100}\x{100}\x{100}\x{100\x{100}
+
+/(\x{100}+|x)/8SD
+
+/(\x{100}*a|x)/8SD
+
+/(\x{100}{0,2}a|x)/8SD
+
+/(\x{100}{1,2}a|x)/8SD
+
+/\x{100}*(\d+|"(?1)")/8
+ 1234
+ "1234"
+ \x{100}1234
+ "\x{100}1234"
+ \x{100}\x{100}12ab
+ \x{100}\x{100}"12"
+ *** Failers
+ \x{100}\x{100}abcd
+
+/\x{100}/8D
-/^[a\x{c0}]/8
+/\x{100}*/8D
+
+/a\x{100}*/8D
+
+/ab\x{100}*/8D
+
+/a\x{100}\x{101}*/8D
+
+/a\x{100}\x{101}+/8D
+
+/\x{100}*A/8D
+ A
+
+/\x{100}*\d(?R)/8D
+
+/[^\x{c4}]/D
+
+/[^\x{c4}]/8D
+
+/[\x{100}]/8DM
+ \x{100}
+ Z\x{100}
+ \x{100}Z
+ *** Failers
+
+/[Z\x{100}]/8DM
+ Z\x{100}
+ \x{100}
+ \x{100}Z
+ *** Failers
+
+/[\x{200}-\x{100}]/8
+
+/[Ä€-Ä„]/8
+ \x{100}
+ \x{104}
*** Failers
+ \x{105}
+ \x{ff}
+
+/[z-\x{100}]/8D
+
+/[z\Qa-d]Ä€\E]/8D
\x{100}
+ Ā
-/(?<=aXb)cd/8
- aXbcd
+/[\xFF]/D
+ >\xff<
-/(?<=a\x{100}b)cd/8
- a\x{100}bcd
+/[\xff]/D8
+ >\x{ff}<
-/(?<=a\x{100000}b)cd/8
- a\x{100000}bcd
+/[^\xFF]/D
+
+/[^\xff]/8D
+
+/[Ä-Ü]/8
+ Ö # Matches without Study
+ \x{d6}
-/(?:\x{100}){3}b/8
- \x{100}\x{100}\x{100}b
- *** Failers
- \x{100}\x{100}b
+/[Ä-Ü]/8S
+ Ö <-- Same with Study
+ \x{d6}
+
+/[\x{c4}-\x{dc}]/8
+ Ö # Matches without Study
+ \x{d6}
+
+/[\x{c4}-\x{dc}]/8S
+ Ö <-- Same with Study
+ \x{d6}
+
+/[Ã]/8
+
+/Ã/8
+
+/ÃÃÃxxx/8
+
+/ÃÃÃxxx/8?D
+
+/abc/8
+ Ã]
+ Ã
+ ÃÃÃ
+ ÃÃÃ\?
+
+/anything/8
+ \xc0\x80
+ \xc1\x8f
+ \xe0\x9f\x80
+ \xf0\x8f\x80\x80
+ \xf8\x87\x80\x80\x80
+ \xfc\x83\x80\x80\x80\x80
+ \xfe\x80\x80\x80\x80\x80
+ \xff\x80\x80\x80\x80\x80
+ \xc3\x8f
+ \xe0\xaf\x80
+ \xe1\x80\x80
+ \xf0\x9f\x80\x80
+ \xf1\x8f\x80\x80
+ \xf8\x88\x80\x80\x80
+ \xf9\x87\x80\x80\x80
+ \xfc\x84\x80\x80\x80\x80
+ \xfd\x83\x80\x80\x80\x80
+
+/\x{100}abc(xyz(?1))/8D
+
+/[^\x{100}]abc(xyz(?1))/8D
+
+/[ab\x{100}]abc(xyz(?1))/8D
+
+/(\x{100}(b(?2)c))?/D8
+
+/(\x{100}(b(?2)c)){0,2}/D8
+
+/(\x{100}(b(?1)c))?/D8
+
+/(\x{100}(b(?1)c)){0,2}/D8
+
+/\W/8
+ A.B
+ A\x{100}B
+
+/\w/8
+ \x{100}X
/ End of testinput5 /
diff --git a/srclib/pcre/testdata/testinput6 b/srclib/pcre/testdata/testinput6
index 00748513c6..01a39477ac 100644
--- a/srclib/pcre/testdata/testinput6
+++ b/srclib/pcre/testdata/testinput6
@@ -1,78 +1,517 @@
-/\x{100}/8DM
+/^\pC\pL\pM\pN\pP\pS\pZ</8
+ \x7f\x{c0}\x{30f}\x{660}\x{66c}\x{f01}\x{1680}<
+ \np\x{300}9!\$ <
+ ** Failers
+ ap\x{300}9!\$ <
+
+/^\PC/8
+ X
+ ** Failers
+ \x7f
+
+/^\PL/8
+ 9
+ ** Failers
+ \x{c0}
+
+/^\PM/8
+ X
+ ** Failers
+ \x{30f}
+
+/^\PN/8
+ X
+ ** Failers
+ \x{660}
+
+/^\PP/8
+ X
+ ** Failers
+ \x{66c}
+
+/^\PS/8
+ X
+ ** Failers
+ \x{f01}
+
+/^\PZ/8
+ X
+ ** Failers
+ \x{1680}
+
+/^\p{Cc}/8
+ \x{017}
+ \x{09f}
+ ** Failers
+ \x{0600}
+
+/^\p{Cf}/8
+ \x{601}
+ ** Failers
+ \x{09f}
+
+/^\p{Cn}/8
+ ** Failers
+ \x{09f}
+
+/^\p{Co}/8
+ \x{f8ff}
+ ** Failers
+ \x{09f}
+
+/^\p{Cs}/8
+ \x{dfff}
+ ** Failers
+ \x{09f}
+
+/^\p{Ll}/8
+ a
+ ** Failers
+ Z
+ \x{dfff}
+
+/^\p{Lm}/8
+ \x{2b0}
+ ** Failers
+ a
+
+/^\p{Lo}/8
+ \x{1bb}
+ ** Failers
+ a
+ \x{2b0}
+
+/^\p{Lt}/8
+ \x{1c5}
+ ** Failers
+ a
+ \x{2b0}
+
+/^\p{Lu}/8
+ A
+ ** Failers
+ \x{2b0}
+
+/^\p{Mc}/8
+ \x{903}
+ ** Failers
+ X
+ \x{300}
+
+/^\p{Me}/8
+ \x{488}
+ ** Failers
+ X
+ \x{903}
+ \x{300}
+
+/^\p{Mn}/8
+ \x{300}
+ ** Failers
+ X
+ \x{903}
+
+/^\p{Nd}+/8
+ 0123456789\x{660}\x{661}\x{662}\x{663}\x{664}\x{665}\x{666}\x{667}\x{668}\x{669}\x{66a}
+ \x{6f0}\x{6f1}\x{6f2}\x{6f3}\x{6f4}\x{6f5}\x{6f6}\x{6f7}\x{6f8}\x{6f9}\x{6fa}
+ \x{966}\x{967}\x{968}\x{969}\x{96a}\x{96b}\x{96c}\x{96d}\x{96e}\x{96f}\x{970}
+ ** Failers
+ X
+
+/^\p{Nl}/8
+ \x{16ee}
+ ** Failers
+ X
+ \x{966}
+
+/^\p{No}/8
+ \x{b2}
+ \x{b3}
+ ** Failers
+ X
+ \x{16ee}
+
+/^\p{Pc}/8
+ \x5f
+ \x{203f}
+ ** Failers
+ X
+ -
+ \x{58a}
+
+/^\p{Pd}/8
+ -
+ \x{58a}
+ ** Failers
+ X
+ \x{203f}
+
+/^\p{Pe}/8
+ )
+ ]
+ }
+ \x{f3b}
+ ** Failers
+ X
+ \x{203f}
+ (
+ [
+ {
+ \x{f3c}
+
+/^\p{Pf}/8
+ \x{bb}
+ \x{2019}
+ ** Failers
+ X
+ \x{203f}
+
+/^\p{Pi}/8
+ \x{ab}
+ \x{2018}
+ ** Failers
+ X
+ \x{203f}
+
+/^\p{Po}/8
+ !
+ \x{37e}
+ ** Failers
+ X
+ \x{203f}
+
+/^\p{Ps}/8
+ (
+ [
+ {
+ \x{f3c}
+ ** Failers
+ X
+ )
+ ]
+ }
+ \x{f3b}
+
+/^\p{Sc}+/8
+ $\x{a2}\x{a3}\x{a4}\x{a5}\x{a6}
+ \x{9f2}
+ ** Failers
+ X
+ \x{2c2}
+
+/^\p{Sk}/8
+ \x{2c2}
+ ** Failers
+ X
+ \x{9f2}
+
+/^\p{Sm}+/8
+ +<|~\x{ac}\x{2044}
+ ** Failers
+ X
+ \x{9f2}
+
+/^\p{So}/8
+ \x{a6}
+ \x{482}
+ ** Failers
+ X
+ \x{9f2}
+
+/^\p{Zl}/8
+ \x{2028}
+ ** Failers
+ X
+ \x{2029}
+
+/^\p{Zp}/8
+ \x{2029}
+ ** Failers
+ X
+ \x{2028}
+
+/^\p{Zs}/8
+ \ \
+ \x{a0}
+ \x{1680}
+ \x{180e}
+ \x{2000}
+ \x{2001}
+ ** Failers
+ \x{2028}
+ \x{200d}
+
+/\p{Nd}+(..)/8
+ \x{660}\x{661}\x{662}ABC
+
+/\p{Nd}+?(..)/8
+ \x{660}\x{661}\x{662}ABC
+
+/\p{Nd}{2,}(..)/8
+ \x{660}\x{661}\x{662}ABC
+
+/\p{Nd}{2,}?(..)/8
+ \x{660}\x{661}\x{662}ABC
+
+/\p{Nd}*(..)/8
+ \x{660}\x{661}\x{662}ABC
+
+/\p{Nd}*?(..)/8
+ \x{660}\x{661}\x{662}ABC
+
+/\p{Nd}{2}(..)/8
+ \x{660}\x{661}\x{662}ABC
+
+/\p{Nd}{2,3}(..)/8
+ \x{660}\x{661}\x{662}ABC
+
+/\p{Nd}{2,3}?(..)/8
+ \x{660}\x{661}\x{662}ABC
+
+/\p{Nd}?(..)/8
+ \x{660}\x{661}\x{662}ABC
+
+/\p{Nd}??(..)/8
+ \x{660}\x{661}\x{662}ABC
+
+/\p{Nd}*+(..)/8
+ \x{660}\x{661}\x{662}ABC
+
+/\p{Nd}*+(...)/8
+ \x{660}\x{661}\x{662}ABC
+
+/\p{Nd}*+(....)/8
+ ** Failers
+ \x{660}\x{661}\x{662}ABC
+
+/\p{Lu}/8i
+ A
+ a\x{10a0}B
+ ** Failers
+ a
+ \x{1d00}
+
+/\p{^Lu}/8i
+ 1234
+ ** Failers
+ ABC
+
+/\P{Lu}/8i
+ 1234
+ ** Failers
+ ABC
+
+/(?<=A\p{Nd})XYZ/8
+ A2XYZ
+ 123A5XYZPQR
+ ABA\x{660}XYZpqr
+ ** Failers
+ AXYZ
+ XYZ
+
+/(?<!\pL)XYZ/8
+ 1XYZ
+ AB=XYZ..
+ XYZ
+ ** Failers
+ WXYZ
-/\x{1000}/8DM
+/[\p{L}]/D
-/\x{10000}/8DM
+/[\p{^L}]/D
-/\x{100000}/8DM
+/[\P{L}]/D
-/\x{1000000}/8DM
+/[\P{^L}]/D
-/\x{4000000}/8DM
+/[abc\p{L}\x{0660}]/8D
-/\x{7fffFFFF}/8DM
+/[\p{Nd}]/8DM
+ 1234
-/[\x{ff}]/8DM
+/[\p{Nd}+-]+/8DM
+ 1234
+ 12-34
+ 12+\x{661}-34
+ ** Failers
+ abcd
-/[\x{100}]/8DM
+/[\P{Nd}]+/8
+ abcd
+ ** Failers
+ 1234
-/\x{ffffffff}/8
+/\D+/8
+ 11111111111111111111111111111111111111111111111111111111111111111111111
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+
+/\P{Nd}+/8
+ 11111111111111111111111111111111111111111111111111111111111111111111111
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-/\x{100000000}/8
+/[\D]+/8
+ 11111111111111111111111111111111111111111111111111111111111111111111111
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-/^\x{100}a\x{1234}/8
- \x{100}a\x{1234}bcd
+/[\P{Nd}]+/8
+ 11111111111111111111111111111111111111111111111111111111111111111111111
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-/\x80/8D
+/[\D\P{Nd}]+/8
+ 11111111111111111111111111111111111111111111111111111111111111111111111
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-/\xff/8D
+/\pL/8
+ a
+ A
-/\x{0041}\x{2262}\x{0391}\x{002e}/D8
- \x{0041}\x{2262}\x{0391}\x{002e}
+/\pL/8i
+ a
+ A
-/\x{D55c}\x{ad6d}\x{C5B4}/D8
- \x{D55c}\x{ad6d}\x{C5B4}
+/\p{Lu}/8
+ A
+ aZ
+ ** Failers
+ abc
+
+/\p{Lu}/8i
+ A
+ aZ
+ ** Failers
+ abc
+
+/\p{Ll}/8
+ a
+ Az
+ ** Failers
+ ABC
+
+/\p{Ll}/8i
+ a
+ Az
+ ** Failers
+ ABC
+
+/^\x{c0}$/8i
+ \x{c0}
+ \x{e0}
-/\x{65e5}\x{672c}\x{8a9e}/D8
- \x{65e5}\x{672c}\x{8a9e}
+/^\x{e0}$/8i
+ \x{c0}
+ \x{e0}
-/\x{80}/D8
+/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/8
+ A\x{391}\x{10427}\x{ff3a}\x{1fb0}
+ ** Failers
+ a\x{391}\x{10427}\x{ff3a}\x{1fb0}
+ A\x{3b1}\x{10427}\x{ff3a}\x{1fb0}
+ A\x{391}\x{1044F}\x{ff3a}\x{1fb0}
+ A\x{391}\x{10427}\x{ff5a}\x{1fb0}
+ A\x{391}\x{10427}\x{ff3a}\x{1fb8}
-/\x{084}/D8
+/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/8i
+ A\x{391}\x{10427}\x{ff3a}\x{1fb0}
+ a\x{391}\x{10427}\x{ff3a}\x{1fb0}
+ A\x{3b1}\x{10427}\x{ff3a}\x{1fb0}
+ A\x{391}\x{1044F}\x{ff3a}\x{1fb0}
+ A\x{391}\x{10427}\x{ff5a}\x{1fb0}
+ A\x{391}\x{10427}\x{ff3a}\x{1fb8}
-/\x{104}/D8
+/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/8iD
-/\x{861}/D8
+/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/8D
-/\x{212ab}/D8
+/AB\x{1fb0}/8D
-/.{3,5}X/D8
- \x{212ab}\x{212ab}\x{212ab}\x{861}X
+/AB\x{1fb0}/8Di
+/\x{391}+/8i
+ \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}
-/.{3,5}?/D8
- \x{212ab}\x{212ab}\x{212ab}\x{861}
+/\x{391}{3,5}(.)/8i
+ \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}X
-/-- These tests are here rather than in testinput5 because Perl 5.6 has --/
-/-- some problems with UTF-8 support, in the area of \x{..} where the --/
-/-- value is < 255. It grumbles about invalid UTF-8 strings. --/
+/\x{391}{3,5}?(.)/8i
+ \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}X
-/^[a\x{c0}]b/8
- \x{c0}b
+/[\x{391}\x{ff3a}]/8i
+ \x{391}
+ \x{ff3a}
+ \x{3b1}
+ \x{ff5a}
-/^([a\x{c0}]*?)aa/8
- a\x{c0}aaaa/
+/[\x{c0}\x{391}]/8i
+ \x{c0}
+ \x{e0}
-/^([a\x{c0}]*?)aa/8
- a\x{c0}aaaa/
- a\x{c0}a\x{c0}aaa/
+/[\x{105}-\x{109}]/8iD
+ \x{104}
+ \x{105}
+ \x{109}
+ ** Failers
+ \x{100}
+ \x{10a}
+
+/[z-\x{100}]/8iD
+ Z
+ z
+ \x{39c}
+ \x{178}
+ |
+ \x{80}
+ \x{ff}
+ \x{100}
+ \x{101}
+ ** Failers
+ \x{102}
+ Y
+ y
+
+/[z-\x{100}]/8Di
+
+/^\X/8
+ A
+ A\x{300}BC
+ A\x{300}\x{301}\x{302}BC
+ *** Failers
+ \x{300}
+
+/^[\X]/8
+ X123
+ *** Failers
+ AXYZ
+
+/^(\X*)C/8
+ A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
+ A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
-/^([a\x{c0}]*)aa/8
- a\x{c0}aaaa/
- a\x{c0}a\x{c0}aaa/
+/^(\X*?)C/8
+ A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
+ A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
-/^([a\x{c0}]*)a\x{c0}/8
- a\x{c0}aaaa/
- a\x{c0}a\x{c0}aaa/
+/^(\X*)(.)/8
+ A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
+ A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
+/^(\X*?)(.)/8
+ A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
+ A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
+
+/^\X(.)/8
+ *** Failers
+ A\x{300}\x{301}\x{302}
+
+/^\X{2,3}(.)/8
+ A\x{300}\x{301}B\x{300}X
+ A\x{300}\x{301}B\x{300}C\x{300}\x{301}
+ A\x{300}\x{301}B\x{300}C\x{300}\x{301}X
+ A\x{300}\x{301}B\x{300}C\x{300}\x{301}DA\x{300}X
+
+/^\X{2,3}?(.)/8
+ A\x{300}\x{301}B\x{300}X
+ A\x{300}\x{301}B\x{300}C\x{300}\x{301}
+ A\x{300}\x{301}B\x{300}C\x{300}\x{301}X
+ A\x{300}\x{301}B\x{300}C\x{300}\x{301}DA\x{300}X
+
/ End of testinput6 /
diff --git a/srclib/pcre/testdata/testoutput1 b/srclib/pcre/testdata/testoutput1
index f0047ffc40..07e737647a 100644
--- a/srclib/pcre/testdata/testoutput1
+++ b/srclib/pcre/testdata/testoutput1
@@ -1,4 +1,4 @@
-PCRE version 3.9 02-Jan-2002
+PCRE version 5.0 13-Sep-2004
/the quick brown fox/
the quick brown fox
@@ -1941,7 +1941,7 @@ No match
/^[W-c]+$/
WXY_^abc
0: WXY_^abc
- ***Failers
+ *** Failers
No match
wxy
No match
@@ -2224,7 +2224,7 @@ No match
0: abc\x01de
1: abc
-/a.b(?s)/
+/(?s)a.b/
a\nb
0: a\x0ab
@@ -3014,5 +3014,3261 @@ No match
0: ABABAB
1: AB
-/ End of testinput1 /
+/(?<!bar)foo/
+ foo
+ 0: foo
+ catfood
+ 0: foo
+ arfootle
+ 0: foo
+ rfoosh
+ 0: foo
+ *** Failers
+No match
+ barfoo
+No match
+ towbarfoo
+No match
+
+/\w{3}(?<!bar)foo/
+ catfood
+ 0: catfoo
+ *** Failers
+No match
+ foo
+No match
+ barfoo
+No match
+ towbarfoo
+No match
+
+/(?<=(foo)a)bar/
+ fooabar
+ 0: bar
+ 1: foo
+ *** Failers
+No match
+ bar
+No match
+ foobbar
+No match
+
+/\Aabc\z/m
+ abc
+ 0: abc
+ *** Failers
+No match
+ abc\n
+No match
+ qqq\nabc
+No match
+ abc\nzzz
+No match
+ qqq\nabc\nzzz
+No match
+
+"(?>.*/)foo"
+ /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/it/you/see/
+No match
+
+"(?>.*/)foo"
+ /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo
+ 0: /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo
+
+/(?>(\.\d\d[1-9]?))\d+/
+ 1.230003938
+ 0: .230003938
+ 1: .23
+ 1.875000282
+ 0: .875000282
+ 1: .875
+ *** Failers
+No match
+ 1.235
+No match
+
+/^((?>\w+)|(?>\s+))*$/
+ now is the time for all good men to come to the aid of the party
+ 0: now is the time for all good men to come to the aid of the party
+ 1: party
+ *** Failers
+No match
+ this is not a line with only words and spaces!
+No match
+
+/(\d+)(\w)/
+ 12345a
+ 0: 12345a
+ 1: 12345
+ 2: a
+ 12345+
+ 0: 12345
+ 1: 1234
+ 2: 5
+
+/((?>\d+))(\w)/
+ 12345a
+ 0: 12345a
+ 1: 12345
+ 2: a
+ *** Failers
+No match
+ 12345+
+No match
+
+/(?>a+)b/
+ aaab
+ 0: aaab
+
+/((?>a+)b)/
+ aaab
+ 0: aaab
+ 1: aaab
+
+/(?>(a+))b/
+ aaab
+ 0: aaab
+ 1: aaa
+
+/(?>b)+/
+ aaabbbccc
+ 0: bbb
+
+/(?>a+|b+|c+)*c/
+ aaabbbbccccd
+ 0: aaabbbbc
+
+/((?>[^()]+)|\([^()]*\))+/
+ ((abc(ade)ufh()()x
+ 0: abc(ade)ufh()()x
+ 1: x
+
+/\(((?>[^()]+)|\([^()]+\))+\)/
+ (abc)
+ 0: (abc)
+ 1: abc
+ (abc(def)xyz)
+ 0: (abc(def)xyz)
+ 1: xyz
+ *** Failers
+No match
+ ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+No match
+
+/a(?-i)b/i
+ ab
+ 0: ab
+ Ab
+ 0: Ab
+ *** Failers
+No match
+ aB
+No match
+ AB
+No match
+
+/(a (?x)b c)d e/
+ a bcd e
+ 0: a bcd e
+ 1: a bc
+ *** Failers
+No match
+ a b cd e
+No match
+ abcd e
+No match
+ a bcde
+No match
+
+/(a b(?x)c d (?-x)e f)/
+ a bcde f
+ 0: a bcde f
+ 1: a bcde f
+ *** Failers
+No match
+ abcdef
+No match
+
+/(a(?i)b)c/
+ abc
+ 0: abc
+ 1: ab
+ aBc
+ 0: aBc
+ 1: aB
+ *** Failers
+No match
+ abC
+No match
+ aBC
+No match
+ Abc
+No match
+ ABc
+No match
+ ABC
+No match
+ AbC
+No match
+
+/a(?i:b)c/
+ abc
+ 0: abc
+ aBc
+ 0: aBc
+ *** Failers
+No match
+ ABC
+No match
+ abC
+No match
+ aBC
+No match
+
+/a(?i:b)*c/
+ aBc
+ 0: aBc
+ aBBc
+ 0: aBBc
+ *** Failers
+No match
+ aBC
+No match
+ aBBC
+No match
+
+/a(?=b(?i)c)\w\wd/
+ abcd
+ 0: abcd
+ abCd
+ 0: abCd
+ *** Failers
+No match
+ aBCd
+No match
+ abcD
+No match
+
+/(?s-i:more.*than).*million/i
+ more than million
+ 0: more than million
+ more than MILLION
+ 0: more than MILLION
+ more \n than Million
+ 0: more \x0a than Million
+ *** Failers
+No match
+ MORE THAN MILLION
+No match
+ more \n than \n million
+No match
+
+/(?:(?s-i)more.*than).*million/i
+ more than million
+ 0: more than million
+ more than MILLION
+ 0: more than MILLION
+ more \n than Million
+ 0: more \x0a than Million
+ *** Failers
+No match
+ MORE THAN MILLION
+No match
+ more \n than \n million
+No match
+
+/(?>a(?i)b+)+c/
+ abc
+ 0: abc
+ aBbc
+ 0: aBbc
+ aBBc
+ 0: aBBc
+ *** Failers
+No match
+ Abc
+No match
+ abAb
+No match
+ abbC
+No match
+
+/(?=a(?i)b)\w\wc/
+ abc
+ 0: abc
+ aBc
+ 0: aBc
+ *** Failers
+No match
+ Ab
+No match
+ abC
+No match
+ aBC
+No match
+
+/(?<=a(?i)b)(\w\w)c/
+ abxxc
+ 0: xxc
+ 1: xx
+ aBxxc
+ 0: xxc
+ 1: xx
+ *** Failers
+No match
+ Abxxc
+No match
+ ABxxc
+No match
+ abxxC
+No match
+
+/(?:(a)|b)(?(1)A|B)/
+ aA
+ 0: aA
+ 1: a
+ bB
+ 0: bB
+ *** Failers
+No match
+ aB
+No match
+ bA
+No match
+
+/^(a)?(?(1)a|b)+$/
+ aa
+ 0: aa
+ 1: a
+ b
+ 0: b
+ bb
+ 0: bb
+ *** Failers
+No match
+ ab
+No match
+
+/^(?(?=abc)\w{3}:|\d\d)$/
+ abc:
+ 0: abc:
+ 12
+ 0: 12
+ *** Failers
+No match
+ 123
+No match
+ xyz
+No match
+
+/^(?(?!abc)\d\d|\w{3}:)$/
+ abc:
+ 0: abc:
+ 12
+ 0: 12
+ *** Failers
+No match
+ 123
+No match
+ xyz
+No match
+
+/(?(?<=foo)bar|cat)/
+ foobar
+ 0: bar
+ cat
+ 0: cat
+ fcat
+ 0: cat
+ focat
+ 0: cat
+ *** Failers
+No match
+ foocat
+No match
+
+/(?(?<!foo)cat|bar)/
+ foobar
+ 0: bar
+ cat
+ 0: cat
+ fcat
+ 0: cat
+ focat
+ 0: cat
+ *** Failers
+No match
+ foocat
+No match
+
+/( \( )? [^()]+ (?(1) \) |) /x
+ abcd
+ 0: abcd
+ (abcd)
+ 0: (abcd)
+ 1: (
+ the quick (abcd) fox
+ 0: the quick
+ (abcd
+ 0: abcd
+
+/( \( )? [^()]+ (?(1) \) ) /x
+ abcd
+ 0: abcd
+ (abcd)
+ 0: (abcd)
+ 1: (
+ the quick (abcd) fox
+ 0: the quick
+ (abcd
+ 0: abcd
+
+/^(?(2)a|(1)(2))+$/
+ 12
+ 0: 12
+ 1: 1
+ 2: 2
+ 12a
+ 0: 12a
+ 1: 1
+ 2: 2
+ 12aa
+ 0: 12aa
+ 1: 1
+ 2: 2
+ *** Failers
+No match
+ 1234
+No match
+
+/((?i)blah)\s+\1/
+ blah blah
+ 0: blah blah
+ 1: blah
+ BLAH BLAH
+ 0: BLAH BLAH
+ 1: BLAH
+ Blah Blah
+ 0: Blah Blah
+ 1: Blah
+ blaH blaH
+ 0: blaH blaH
+ 1: blaH
+ *** Failers
+No match
+ blah BLAH
+No match
+ Blah blah
+No match
+ blaH blah
+No match
+
+/((?i)blah)\s+(?i:\1)/
+ blah blah
+ 0: blah blah
+ 1: blah
+ BLAH BLAH
+ 0: BLAH BLAH
+ 1: BLAH
+ Blah Blah
+ 0: Blah Blah
+ 1: Blah
+ blaH blaH
+ 0: blaH blaH
+ 1: blaH
+ blah BLAH
+ 0: blah BLAH
+ 1: blah
+ Blah blah
+ 0: Blah blah
+ 1: Blah
+ blaH blah
+ 0: blaH blah
+ 1: blaH
+
+/(?>a*)*/
+ a
+ 0: a
+ aa
+ 0: aa
+ aaaa
+ 0: aaaa
+
+/(abc|)+/
+ abc
+ 0: abc
+ 1:
+ abcabc
+ 0: abcabc
+ 1:
+ abcabcabc
+ 0: abcabcabc
+ 1:
+ xyz
+ 0:
+ 1:
+
+/([a]*)*/
+ a
+ 0: a
+ 1:
+ aaaaa
+ 0: aaaaa
+ 1:
+
+/([ab]*)*/
+ a
+ 0: a
+ 1:
+ b
+ 0: b
+ 1:
+ ababab
+ 0: ababab
+ 1:
+ aaaabcde
+ 0: aaaab
+ 1:
+ bbbb
+ 0: bbbb
+ 1:
+
+/([^a]*)*/
+ b
+ 0: b
+ 1:
+ bbbb
+ 0: bbbb
+ 1:
+ aaa
+ 0:
+ 1:
+
+/([^ab]*)*/
+ cccc
+ 0: cccc
+ 1:
+ abab
+ 0:
+ 1:
+
+/([a]*?)*/
+ a
+ 0:
+ 1:
+ aaaa
+ 0:
+ 1:
+
+/([ab]*?)*/
+ a
+ 0:
+ 1:
+ b
+ 0:
+ 1:
+ abab
+ 0:
+ 1:
+ baba
+ 0:
+ 1:
+
+/([^a]*?)*/
+ b
+ 0:
+ 1:
+ bbbb
+ 0:
+ 1:
+ aaa
+ 0:
+ 1:
+
+/([^ab]*?)*/
+ c
+ 0:
+ 1:
+ cccc
+ 0:
+ 1:
+ baba
+ 0:
+ 1:
+
+/(?>a*)*/
+ a
+ 0: a
+ aaabcde
+ 0: aaa
+
+/((?>a*))*/
+ aaaaa
+ 0: aaaaa
+ 1:
+ aabbaa
+ 0: aa
+ 1:
+
+/((?>a*?))*/
+ aaaaa
+ 0:
+ 1:
+ aabbaa
+ 0:
+ 1:
+
+/(?(?=[^a-z]+[a-z]) \d{2}-[a-z]{3}-\d{2} | \d{2}-\d{2}-\d{2} ) /x
+ 12-sep-98
+ 0: 12-sep-98
+ 12-09-98
+ 0: 12-09-98
+ *** Failers
+No match
+ sep-12-98
+No match
+
+/(?<=(foo))bar\1/
+ foobarfoo
+ 0: barfoo
+ 1: foo
+ foobarfootling
+ 0: barfoo
+ 1: foo
+ *** Failers
+No match
+ foobar
+No match
+ barfoo
+No match
+
+/(?i:saturday|sunday)/
+ saturday
+ 0: saturday
+ sunday
+ 0: sunday
+ Saturday
+ 0: Saturday
+ Sunday
+ 0: Sunday
+ SATURDAY
+ 0: SATURDAY
+ SUNDAY
+ 0: SUNDAY
+ SunDay
+ 0: SunDay
+
+/(a(?i)bc|BB)x/
+ abcx
+ 0: abcx
+ 1: abc
+ aBCx
+ 0: aBCx
+ 1: aBC
+ bbx
+ 0: bbx
+ 1: bb
+ BBx
+ 0: BBx
+ 1: BB
+ *** Failers
+No match
+ abcX
+No match
+ aBCX
+No match
+ bbX
+No match
+ BBX
+No match
+
+/^([ab](?i)[cd]|[ef])/
+ ac
+ 0: ac
+ 1: ac
+ aC
+ 0: aC
+ 1: aC
+ bD
+ 0: bD
+ 1: bD
+ elephant
+ 0: e
+ 1: e
+ Europe
+ 0: E
+ 1: E
+ frog
+ 0: f
+ 1: f
+ France
+ 0: F
+ 1: F
+ *** Failers
+No match
+ Africa
+No match
+
+/^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)/
+ ab
+ 0: ab
+ 1: ab
+ aBd
+ 0: aBd
+ 1: aBd
+ xy
+ 0: xy
+ 1: xy
+ xY
+ 0: xY
+ 1: xY
+ zebra
+ 0: z
+ 1: z
+ Zambesi
+ 0: Z
+ 1: Z
+ *** Failers
+No match
+ aCD
+No match
+ XY
+No match
+
+/(?<=foo\n)^bar/m
+ foo\nbar
+ 0: bar
+ *** Failers
+No match
+ bar
+No match
+ baz\nbar
+No match
+
+/(?<=(?<!foo)bar)baz/
+ barbaz
+ 0: baz
+ barbarbaz
+ 0: baz
+ koobarbaz
+ 0: baz
+ *** Failers
+No match
+ baz
+No match
+ foobarbaz
+No match
+
+/The case of aaaaaa is missed out below because I think Perl 5.005_02 gets/
+/it wrong; it sets $1 to aaa rather than aa. Compare the following test,/
+No match
+/where it does set $1 to aa when matching aaaaaa./
+No match
+
+/^(a\1?){4}$/
+ a
+No match
+ aa
+No match
+ aaa
+No match
+ aaaa
+ 0: aaaa
+ 1: a
+ aaaaa
+ 0: aaaaa
+ 1: a
+ aaaaaaa
+ 0: aaaaaaa
+ 1: a
+ aaaaaaaa
+No match
+ aaaaaaaaa
+No match
+ aaaaaaaaaa
+ 0: aaaaaaaaaa
+ 1: aaaa
+ aaaaaaaaaaa
+No match
+ aaaaaaaaaaaa
+No match
+ aaaaaaaaaaaaa
+No match
+ aaaaaaaaaaaaaa
+No match
+ aaaaaaaaaaaaaaa
+No match
+ aaaaaaaaaaaaaaaa
+No match
+
+/^(a\1?)(a\1?)(a\2?)(a\3?)$/
+ a
+No match
+ aa
+No match
+ aaa
+No match
+ aaaa
+ 0: aaaa
+ 1: a
+ 2: a
+ 3: a
+ 4: a
+ aaaaa
+ 0: aaaaa
+ 1: a
+ 2: aa
+ 3: a
+ 4: a
+ aaaaaa
+ 0: aaaaaa
+ 1: a
+ 2: aa
+ 3: a
+ 4: aa
+ aaaaaaa
+ 0: aaaaaaa
+ 1: a
+ 2: aa
+ 3: aaa
+ 4: a
+ aaaaaaaa
+No match
+ aaaaaaaaa
+No match
+ aaaaaaaaaa
+ 0: aaaaaaaaaa
+ 1: a
+ 2: aa
+ 3: aaa
+ 4: aaaa
+ aaaaaaaaaaa
+No match
+ aaaaaaaaaaaa
+No match
+ aaaaaaaaaaaaa
+No match
+ aaaaaaaaaaaaaa
+No match
+ aaaaaaaaaaaaaaa
+No match
+ aaaaaaaaaaaaaaaa
+No match
+
+/The following tests are taken from the Perl 5.005 test suite; some of them/
+/are compatible with 5.004, but I'd rather not have to sort them out./
+No match
+
+/abc/
+ abc
+ 0: abc
+ xabcy
+ 0: abc
+ ababc
+ 0: abc
+ *** Failers
+No match
+ xbc
+No match
+ axc
+No match
+ abx
+No match
+
+/ab*c/
+ abc
+ 0: abc
+
+/ab*bc/
+ abc
+ 0: abc
+ abbc
+ 0: abbc
+ abbbbc
+ 0: abbbbc
+
+/.{1}/
+ abbbbc
+ 0: a
+
+/.{3,4}/
+ abbbbc
+ 0: abbb
+
+/ab{0,}bc/
+ abbbbc
+ 0: abbbbc
+
+/ab+bc/
+ abbc
+ 0: abbc
+ *** Failers
+No match
+ abc
+No match
+ abq
+No match
+
+/ab{1,}bc/
+
+/ab+bc/
+ abbbbc
+ 0: abbbbc
+
+/ab{1,}bc/
+ abbbbc
+ 0: abbbbc
+
+/ab{1,3}bc/
+ abbbbc
+ 0: abbbbc
+
+/ab{3,4}bc/
+ abbbbc
+ 0: abbbbc
+
+/ab{4,5}bc/
+ *** Failers
+No match
+ abq
+No match
+ abbbbc
+No match
+
+/ab?bc/
+ abbc
+ 0: abbc
+ abc
+ 0: abc
+
+/ab{0,1}bc/
+ abc
+ 0: abc
+
+/ab?bc/
+
+/ab?c/
+ abc
+ 0: abc
+
+/ab{0,1}c/
+ abc
+ 0: abc
+
+/^abc$/
+ abc
+ 0: abc
+ *** Failers
+No match
+ abbbbc
+No match
+ abcc
+No match
+
+/^abc/
+ abcc
+ 0: abc
+
+/^abc$/
+
+/abc$/
+ aabc
+ 0: abc
+ *** Failers
+No match
+ aabc
+ 0: abc
+ aabcd
+No match
+
+/^/
+ abc
+ 0:
+
+/$/
+ abc
+ 0:
+
+/a.c/
+ abc
+ 0: abc
+ axc
+ 0: axc
+
+/a.*c/
+ axyzc
+ 0: axyzc
+
+/a[bc]d/
+ abd
+ 0: abd
+ *** Failers
+No match
+ axyzd
+No match
+ abc
+No match
+
+/a[b-d]e/
+ ace
+ 0: ace
+
+/a[b-d]/
+ aac
+ 0: ac
+
+/a[-b]/
+ a-
+ 0: a-
+
+/a[b-]/
+ a-
+ 0: a-
+
+/a]/
+ a]
+ 0: a]
+
+/a[]]b/
+ a]b
+ 0: a]b
+
+/a[^bc]d/
+ aed
+ 0: aed
+ *** Failers
+No match
+ abd
+No match
+ abd
+No match
+
+/a[^-b]c/
+ adc
+ 0: adc
+
+/a[^]b]c/
+ adc
+ 0: adc
+ *** Failers
+No match
+ a-c
+ 0: a-c
+ a]c
+No match
+
+/\ba\b/
+ a-
+ 0: a
+ -a
+ 0: a
+ -a-
+ 0: a
+
+/\by\b/
+ *** Failers
+No match
+ xy
+No match
+ yz
+No match
+ xyz
+No match
+
+/\Ba\B/
+ *** Failers
+ 0: a
+ a-
+No match
+ -a
+No match
+ -a-
+No match
+
+/\By\b/
+ xy
+ 0: y
+
+/\by\B/
+ yz
+ 0: y
+
+/\By\B/
+ xyz
+ 0: y
+
+/\w/
+ a
+ 0: a
+
+/\W/
+ -
+ 0: -
+ *** Failers
+ 0: *
+ -
+ 0: -
+ a
+No match
+
+/a\sb/
+ a b
+ 0: a b
+
+/a\Sb/
+ a-b
+ 0: a-b
+ *** Failers
+No match
+ a-b
+ 0: a-b
+ a b
+No match
+
+/\d/
+ 1
+ 0: 1
+
+/\D/
+ -
+ 0: -
+ *** Failers
+ 0: *
+ -
+ 0: -
+ 1
+No match
+
+/[\w]/
+ a
+ 0: a
+
+/[\W]/
+ -
+ 0: -
+ *** Failers
+ 0: *
+ -
+ 0: -
+ a
+No match
+
+/a[\s]b/
+ a b
+ 0: a b
+
+/a[\S]b/
+ a-b
+ 0: a-b
+ *** Failers
+No match
+ a-b
+ 0: a-b
+ a b
+No match
+
+/[\d]/
+ 1
+ 0: 1
+
+/[\D]/
+ -
+ 0: -
+ *** Failers
+ 0: *
+ -
+ 0: -
+ 1
+No match
+
+/ab|cd/
+ abc
+ 0: ab
+ abcd
+ 0: ab
+
+/()ef/
+ def
+ 0: ef
+ 1:
+
+/$b/
+
+/a\(b/
+ a(b
+ 0: a(b
+
+/a\(*b/
+ ab
+ 0: ab
+ a((b
+ 0: a((b
+
+/a\\b/
+ a\b
+No match
+
+/((a))/
+ abc
+ 0: a
+ 1: a
+ 2: a
+
+/(a)b(c)/
+ abc
+ 0: abc
+ 1: a
+ 2: c
+
+/a+b+c/
+ aabbabc
+ 0: abc
+
+/a{1,}b{1,}c/
+ aabbabc
+ 0: abc
+
+/a.+?c/
+ abcabc
+ 0: abc
+
+/(a+|b)*/
+ ab
+ 0: ab
+ 1: b
+
+/(a+|b){0,}/
+ ab
+ 0: ab
+ 1: b
+
+/(a+|b)+/
+ ab
+ 0: ab
+ 1: b
+
+/(a+|b){1,}/
+ ab
+ 0: ab
+ 1: b
+
+/(a+|b)?/
+ ab
+ 0: a
+ 1: a
+
+/(a+|b){0,1}/
+ ab
+ 0: a
+ 1: a
+
+/[^ab]*/
+ cde
+ 0: cde
+
+/abc/
+ *** Failers
+No match
+ b
+No match
+
+
+/a*/
+
+
+/([abc])*d/
+ abbbcd
+ 0: abbbcd
+ 1: c
+
+/([abc])*bcd/
+ abcd
+ 0: abcd
+ 1: a
+
+/a|b|c|d|e/
+ e
+ 0: e
+
+/(a|b|c|d|e)f/
+ ef
+ 0: ef
+ 1: e
+
+/abcd*efg/
+ abcdefg
+ 0: abcdefg
+
+/ab*/
+ xabyabbbz
+ 0: ab
+ xayabbbz
+ 0: a
+
+/(ab|cd)e/
+ abcde
+ 0: cde
+ 1: cd
+
+/[abhgefdc]ij/
+ hij
+ 0: hij
+
+/^(ab|cd)e/
+
+/(abc|)ef/
+ abcdef
+ 0: ef
+ 1:
+
+/(a|b)c*d/
+ abcd
+ 0: bcd
+ 1: b
+
+/(ab|ab*)bc/
+ abc
+ 0: abc
+ 1: a
+
+/a([bc]*)c*/
+ abc
+ 0: abc
+ 1: bc
+
+/a([bc]*)(c*d)/
+ abcd
+ 0: abcd
+ 1: bc
+ 2: d
+
+/a([bc]+)(c*d)/
+ abcd
+ 0: abcd
+ 1: bc
+ 2: d
+
+/a([bc]*)(c+d)/
+ abcd
+ 0: abcd
+ 1: b
+ 2: cd
+
+/a[bcd]*dcdcde/
+ adcdcde
+ 0: adcdcde
+
+/a[bcd]+dcdcde/
+ *** Failers
+No match
+ abcde
+No match
+ adcdcde
+No match
+
+/(ab|a)b*c/
+ abc
+ 0: abc
+ 1: ab
+
+/((a)(b)c)(d)/
+ abcd
+ 0: abcd
+ 1: abc
+ 2: a
+ 3: b
+ 4: d
+
+/[a-zA-Z_][a-zA-Z0-9_]*/
+ alpha
+ 0: alpha
+
+/^a(bc+|b[eh])g|.h$/
+ abh
+ 0: bh
+
+/(bc+d$|ef*g.|h?i(j|k))/
+ effgz
+ 0: effgz
+ 1: effgz
+ ij
+ 0: ij
+ 1: ij
+ 2: j
+ reffgz
+ 0: effgz
+ 1: effgz
+ *** Failers
+No match
+ effg
+No match
+ bcdd
+No match
+
+/((((((((((a))))))))))/
+ a
+ 0: a
+ 1: a
+ 2: a
+ 3: a
+ 4: a
+ 5: a
+ 6: a
+ 7: a
+ 8: a
+ 9: a
+10: a
+
+/((((((((((a))))))))))\10/
+ aa
+ 0: aa
+ 1: a
+ 2: a
+ 3: a
+ 4: a
+ 5: a
+ 6: a
+ 7: a
+ 8: a
+ 9: a
+10: a
+
+/(((((((((a)))))))))/
+ a
+ 0: a
+ 1: a
+ 2: a
+ 3: a
+ 4: a
+ 5: a
+ 6: a
+ 7: a
+ 8: a
+ 9: a
+
+/multiple words of text/
+ *** Failers
+No match
+ aa
+No match
+ uh-uh
+No match
+
+/multiple words/
+ multiple words, yeah
+ 0: multiple words
+
+/(.*)c(.*)/
+ abcde
+ 0: abcde
+ 1: ab
+ 2: de
+
+/\((.*), (.*)\)/
+ (a, b)
+ 0: (a, b)
+ 1: a
+ 2: b
+
+/[k]/
+
+/abcd/
+ abcd
+ 0: abcd
+
+/a(bc)d/
+ abcd
+ 0: abcd
+ 1: bc
+
+/a[-]?c/
+ ac
+ 0: ac
+
+/(abc)\1/
+ abcabc
+ 0: abcabc
+ 1: abc
+
+/([a-c]*)\1/
+ abcabc
+ 0: abcabc
+ 1: abc
+
+/(a)|\1/
+ a
+ 0: a
+ 1: a
+ *** Failers
+ 0: a
+ 1: a
+ ab
+ 0: a
+ 1: a
+ x
+No match
+
+/(([a-c])b*?\2)*/
+ ababbbcbc
+ 0: ababb
+ 1: bb
+ 2: b
+
+/(([a-c])b*?\2){3}/
+ ababbbcbc
+ 0: ababbbcbc
+ 1: cbc
+ 2: c
+
+/((\3|b)\2(a)x)+/
+ aaaxabaxbaaxbbax
+ 0: bbax
+ 1: bbax
+ 2: b
+ 3: a
+
+/((\3|b)\2(a)){2,}/
+ bbaababbabaaaaabbaaaabba
+ 0: bbaaaabba
+ 1: bba
+ 2: b
+ 3: a
+
+/abc/i
+ ABC
+ 0: ABC
+ XABCY
+ 0: ABC
+ ABABC
+ 0: ABC
+ *** Failers
+No match
+ aaxabxbaxbbx
+No match
+ XBC
+No match
+ AXC
+No match
+ ABX
+No match
+
+/ab*c/i
+ ABC
+ 0: ABC
+
+/ab*bc/i
+ ABC
+ 0: ABC
+ ABBC
+ 0: ABBC
+
+/ab*?bc/i
+ ABBBBC
+ 0: ABBBBC
+
+/ab{0,}?bc/i
+ ABBBBC
+ 0: ABBBBC
+
+/ab+?bc/i
+ ABBC
+ 0: ABBC
+
+/ab+bc/i
+ *** Failers
+No match
+ ABC
+No match
+ ABQ
+No match
+
+/ab{1,}bc/i
+
+/ab+bc/i
+ ABBBBC
+ 0: ABBBBC
+
+/ab{1,}?bc/i
+ ABBBBC
+ 0: ABBBBC
+
+/ab{1,3}?bc/i
+ ABBBBC
+ 0: ABBBBC
+
+/ab{3,4}?bc/i
+ ABBBBC
+ 0: ABBBBC
+
+/ab{4,5}?bc/i
+ *** Failers
+No match
+ ABQ
+No match
+ ABBBBC
+No match
+
+/ab??bc/i
+ ABBC
+ 0: ABBC
+ ABC
+ 0: ABC
+
+/ab{0,1}?bc/i
+ ABC
+ 0: ABC
+
+/ab??bc/i
+
+/ab??c/i
+ ABC
+ 0: ABC
+
+/ab{0,1}?c/i
+ ABC
+ 0: ABC
+
+/^abc$/i
+ ABC
+ 0: ABC
+ *** Failers
+No match
+ ABBBBC
+No match
+ ABCC
+No match
+
+/^abc/i
+ ABCC
+ 0: ABC
+
+/^abc$/i
+
+/abc$/i
+ AABC
+ 0: ABC
+
+/^/i
+ ABC
+ 0:
+
+/$/i
+ ABC
+ 0:
+
+/a.c/i
+ ABC
+ 0: ABC
+ AXC
+ 0: AXC
+
+/a.*?c/i
+ AXYZC
+ 0: AXYZC
+
+/a.*c/i
+ *** Failers
+No match
+ AABC
+ 0: AABC
+ AXYZD
+No match
+
+/a[bc]d/i
+ ABD
+ 0: ABD
+
+/a[b-d]e/i
+ ACE
+ 0: ACE
+ *** Failers
+No match
+ ABC
+No match
+ ABD
+No match
+
+/a[b-d]/i
+ AAC
+ 0: AC
+
+/a[-b]/i
+ A-
+ 0: A-
+
+/a[b-]/i
+ A-
+ 0: A-
+
+/a]/i
+ A]
+ 0: A]
+
+/a[]]b/i
+ A]B
+ 0: A]B
+
+/a[^bc]d/i
+ AED
+ 0: AED
+
+/a[^-b]c/i
+ ADC
+ 0: ADC
+ *** Failers
+No match
+ ABD
+No match
+ A-C
+No match
+
+/a[^]b]c/i
+ ADC
+ 0: ADC
+
+/ab|cd/i
+ ABC
+ 0: AB
+ ABCD
+ 0: AB
+
+/()ef/i
+ DEF
+ 0: EF
+ 1:
+
+/$b/i
+ *** Failers
+No match
+ A]C
+No match
+ B
+No match
+
+/a\(b/i
+ A(B
+ 0: A(B
+
+/a\(*b/i
+ AB
+ 0: AB
+ A((B
+ 0: A((B
+
+/a\\b/i
+ A\B
+No match
+
+/((a))/i
+ ABC
+ 0: A
+ 1: A
+ 2: A
+
+/(a)b(c)/i
+ ABC
+ 0: ABC
+ 1: A
+ 2: C
+
+/a+b+c/i
+ AABBABC
+ 0: ABC
+
+/a{1,}b{1,}c/i
+ AABBABC
+ 0: ABC
+
+/a.+?c/i
+ ABCABC
+ 0: ABC
+
+/a.*?c/i
+ ABCABC
+ 0: ABC
+
+/a.{0,5}?c/i
+ ABCABC
+ 0: ABC
+
+/(a+|b)*/i
+ AB
+ 0: AB
+ 1: B
+
+/(a+|b){0,}/i
+ AB
+ 0: AB
+ 1: B
+
+/(a+|b)+/i
+ AB
+ 0: AB
+ 1: B
+
+/(a+|b){1,}/i
+ AB
+ 0: AB
+ 1: B
+
+/(a+|b)?/i
+ AB
+ 0: A
+ 1: A
+
+/(a+|b){0,1}/i
+ AB
+ 0: A
+ 1: A
+
+/(a+|b){0,1}?/i
+ AB
+ 0:
+
+/[^ab]*/i
+ CDE
+ 0: CDE
+
+/abc/i
+
+/a*/i
+
+
+/([abc])*d/i
+ ABBBCD
+ 0: ABBBCD
+ 1: C
+
+/([abc])*bcd/i
+ ABCD
+ 0: ABCD
+ 1: A
+
+/a|b|c|d|e/i
+ E
+ 0: E
+
+/(a|b|c|d|e)f/i
+ EF
+ 0: EF
+ 1: E
+
+/abcd*efg/i
+ ABCDEFG
+ 0: ABCDEFG
+
+/ab*/i
+ XABYABBBZ
+ 0: AB
+ XAYABBBZ
+ 0: A
+
+/(ab|cd)e/i
+ ABCDE
+ 0: CDE
+ 1: CD
+
+/[abhgefdc]ij/i
+ HIJ
+ 0: HIJ
+
+/^(ab|cd)e/i
+ ABCDE
+No match
+
+/(abc|)ef/i
+ ABCDEF
+ 0: EF
+ 1:
+
+/(a|b)c*d/i
+ ABCD
+ 0: BCD
+ 1: B
+
+/(ab|ab*)bc/i
+ ABC
+ 0: ABC
+ 1: A
+
+/a([bc]*)c*/i
+ ABC
+ 0: ABC
+ 1: BC
+
+/a([bc]*)(c*d)/i
+ ABCD
+ 0: ABCD
+ 1: BC
+ 2: D
+
+/a([bc]+)(c*d)/i
+ ABCD
+ 0: ABCD
+ 1: BC
+ 2: D
+
+/a([bc]*)(c+d)/i
+ ABCD
+ 0: ABCD
+ 1: B
+ 2: CD
+
+/a[bcd]*dcdcde/i
+ ADCDCDE
+ 0: ADCDCDE
+
+/a[bcd]+dcdcde/i
+
+/(ab|a)b*c/i
+ ABC
+ 0: ABC
+ 1: AB
+
+/((a)(b)c)(d)/i
+ ABCD
+ 0: ABCD
+ 1: ABC
+ 2: A
+ 3: B
+ 4: D
+
+/[a-zA-Z_][a-zA-Z0-9_]*/i
+ ALPHA
+ 0: ALPHA
+
+/^a(bc+|b[eh])g|.h$/i
+ ABH
+ 0: BH
+
+/(bc+d$|ef*g.|h?i(j|k))/i
+ EFFGZ
+ 0: EFFGZ
+ 1: EFFGZ
+ IJ
+ 0: IJ
+ 1: IJ
+ 2: J
+ REFFGZ
+ 0: EFFGZ
+ 1: EFFGZ
+ *** Failers
+No match
+ ADCDCDE
+No match
+ EFFG
+No match
+ BCDD
+No match
+
+/((((((((((a))))))))))/i
+ A
+ 0: A
+ 1: A
+ 2: A
+ 3: A
+ 4: A
+ 5: A
+ 6: A
+ 7: A
+ 8: A
+ 9: A
+10: A
+
+/((((((((((a))))))))))\10/i
+ AA
+ 0: AA
+ 1: A
+ 2: A
+ 3: A
+ 4: A
+ 5: A
+ 6: A
+ 7: A
+ 8: A
+ 9: A
+10: A
+
+/(((((((((a)))))))))/i
+ A
+ 0: A
+ 1: A
+ 2: A
+ 3: A
+ 4: A
+ 5: A
+ 6: A
+ 7: A
+ 8: A
+ 9: A
+
+/(?:(?:(?:(?:(?:(?:(?:(?:(?:(a))))))))))/i
+ A
+ 0: A
+ 1: A
+
+/(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))/i
+ C
+ 0: C
+ 1: C
+
+/multiple words of text/i
+ *** Failers
+No match
+ AA
+No match
+ UH-UH
+No match
+
+/multiple words/i
+ MULTIPLE WORDS, YEAH
+ 0: MULTIPLE WORDS
+
+/(.*)c(.*)/i
+ ABCDE
+ 0: ABCDE
+ 1: AB
+ 2: DE
+
+/\((.*), (.*)\)/i
+ (A, B)
+ 0: (A, B)
+ 1: A
+ 2: B
+
+/[k]/i
+
+/abcd/i
+ ABCD
+ 0: ABCD
+
+/a(bc)d/i
+ ABCD
+ 0: ABCD
+ 1: BC
+
+/a[-]?c/i
+ AC
+ 0: AC
+
+/(abc)\1/i
+ ABCABC
+ 0: ABCABC
+ 1: ABC
+
+/([a-c]*)\1/i
+ ABCABC
+ 0: ABCABC
+ 1: ABC
+
+/a(?!b)./
+ abad
+ 0: ad
+
+/a(?=d)./
+ abad
+ 0: ad
+
+/a(?=c|d)./
+ abad
+ 0: ad
+
+/a(?:b|c|d)(.)/
+ ace
+ 0: ace
+ 1: e
+
+/a(?:b|c|d)*(.)/
+ ace
+ 0: ace
+ 1: e
+
+/a(?:b|c|d)+?(.)/
+ ace
+ 0: ace
+ 1: e
+ acdbcdbe
+ 0: acd
+ 1: d
+
+/a(?:b|c|d)+(.)/
+ acdbcdbe
+ 0: acdbcdbe
+ 1: e
+
+/a(?:b|c|d){2}(.)/
+ acdbcdbe
+ 0: acdb
+ 1: b
+
+/a(?:b|c|d){4,5}(.)/
+ acdbcdbe
+ 0: acdbcdb
+ 1: b
+
+/a(?:b|c|d){4,5}?(.)/
+ acdbcdbe
+ 0: acdbcd
+ 1: d
+
+/((foo)|(bar))*/
+ foobar
+ 0: foobar
+ 1: bar
+ 2: foo
+ 3: bar
+
+/a(?:b|c|d){6,7}(.)/
+ acdbcdbe
+ 0: acdbcdbe
+ 1: e
+
+/a(?:b|c|d){6,7}?(.)/
+ acdbcdbe
+ 0: acdbcdbe
+ 1: e
+
+/a(?:b|c|d){5,6}(.)/
+ acdbcdbe
+ 0: acdbcdbe
+ 1: e
+
+/a(?:b|c|d){5,6}?(.)/
+ acdbcdbe
+ 0: acdbcdb
+ 1: b
+
+/a(?:b|c|d){5,7}(.)/
+ acdbcdbe
+ 0: acdbcdbe
+ 1: e
+
+/a(?:b|c|d){5,7}?(.)/
+ acdbcdbe
+ 0: acdbcdb
+ 1: b
+
+/a(?:b|(c|e){1,2}?|d)+?(.)/
+ ace
+ 0: ace
+ 1: c
+ 2: e
+
+/^(.+)?B/
+ AB
+ 0: AB
+ 1: A
+
+/^([^a-z])|(\^)$/
+ .
+ 0: .
+ 1: .
+
+/^[<>]&/
+ <&OUT
+ 0: <&
+
+/^(a\1?){4}$/
+ aaaaaaaaaa
+ 0: aaaaaaaaaa
+ 1: aaaa
+ *** Failers
+No match
+ AB
+No match
+ aaaaaaaaa
+No match
+ aaaaaaaaaaa
+No match
+
+/^(a(?(1)\1)){4}$/
+ aaaaaaaaaa
+ 0: aaaaaaaaaa
+ 1: aaaa
+ *** Failers
+No match
+ aaaaaaaaa
+No match
+ aaaaaaaaaaa
+No match
+
+/(?:(f)(o)(o)|(b)(a)(r))*/
+ foobar
+ 0: foobar
+ 1: f
+ 2: o
+ 3: o
+ 4: b
+ 5: a
+ 6: r
+
+/(?<=a)b/
+ ab
+ 0: b
+ *** Failers
+No match
+ cb
+No match
+ b
+No match
+
+/(?<!c)b/
+ ab
+ 0: b
+ b
+ 0: b
+ b
+ 0: b
+
+/(?:..)*a/
+ aba
+ 0: aba
+
+/(?:..)*?a/
+ aba
+ 0: a
+
+/^(?:b|a(?=(.)))*\1/
+ abc
+ 0: ab
+ 1: b
+
+/^(){3,5}/
+ abc
+ 0:
+ 1:
+
+/^(a+)*ax/
+ aax
+ 0: aax
+ 1: a
+
+/^((a|b)+)*ax/
+ aax
+ 0: aax
+ 1: a
+ 2: a
+
+/^((a|bc)+)*ax/
+ aax
+ 0: aax
+ 1: a
+ 2: a
+
+/(a|x)*ab/
+ cab
+ 0: ab
+
+/(a)*ab/
+ cab
+ 0: ab
+
+/(?:(?i)a)b/
+ ab
+ 0: ab
+
+/((?i)a)b/
+ ab
+ 0: ab
+ 1: a
+
+/(?:(?i)a)b/
+ Ab
+ 0: Ab
+
+/((?i)a)b/
+ Ab
+ 0: Ab
+ 1: A
+
+/(?:(?i)a)b/
+ *** Failers
+No match
+ cb
+No match
+ aB
+No match
+
+/((?i)a)b/
+
+/(?i:a)b/
+ ab
+ 0: ab
+
+/((?i:a))b/
+ ab
+ 0: ab
+ 1: a
+
+/(?i:a)b/
+ Ab
+ 0: Ab
+
+/((?i:a))b/
+ Ab
+ 0: Ab
+ 1: A
+
+/(?i:a)b/
+ *** Failers
+No match
+ aB
+No match
+ aB
+No match
+
+/((?i:a))b/
+
+/(?:(?-i)a)b/i
+ ab
+ 0: ab
+
+/((?-i)a)b/i
+ ab
+ 0: ab
+ 1: a
+
+/(?:(?-i)a)b/i
+ aB
+ 0: aB
+
+/((?-i)a)b/i
+ aB
+ 0: aB
+ 1: a
+
+/(?:(?-i)a)b/i
+ *** Failers
+No match
+ aB
+ 0: aB
+ Ab
+No match
+
+/((?-i)a)b/i
+
+/(?:(?-i)a)b/i
+ aB
+ 0: aB
+
+/((?-i)a)b/i
+ aB
+ 0: aB
+ 1: a
+
+/(?:(?-i)a)b/i
+ *** Failers
+No match
+ Ab
+No match
+ AB
+No match
+
+/((?-i)a)b/i
+
+/(?-i:a)b/i
+ ab
+ 0: ab
+
+/((?-i:a))b/i
+ ab
+ 0: ab
+ 1: a
+
+/(?-i:a)b/i
+ aB
+ 0: aB
+
+/((?-i:a))b/i
+ aB
+ 0: aB
+ 1: a
+/(?-i:a)b/i
+ *** Failers
+No match
+ AB
+No match
+ Ab
+No match
+
+/((?-i:a))b/i
+
+/(?-i:a)b/i
+ aB
+ 0: aB
+
+/((?-i:a))b/i
+ aB
+ 0: aB
+ 1: a
+
+/(?-i:a)b/i
+ *** Failers
+No match
+ Ab
+No match
+ AB
+No match
+
+/((?-i:a))b/i
+
+/((?-i:a.))b/i
+ *** Failers
+No match
+ AB
+No match
+ a\nB
+No match
+
+/((?s-i:a.))b/i
+ a\nB
+ 0: a\x0aB
+ 1: a\x0a
+
+/(?:c|d)(?:)(?:a(?:)(?:b)(?:b(?:))(?:b(?:)(?:b)))/
+ cabbbb
+ 0: cabbbb
+
+/(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))/
+ caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+ 0: caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+
+/(ab)\d\1/i
+ Ab4ab
+ 0: Ab4ab
+ 1: Ab
+ ab4Ab
+ 0: ab4Ab
+ 1: ab
+
+/foo\w*\d{4}baz/
+ foobar1234baz
+ 0: foobar1234baz
+
+/x(~~)*(?:(?:F)?)?/
+ x~~
+ 0: x~~
+ 1: ~~
+
+/^a(?#xxx){3}c/
+ aaac
+ 0: aaac
+
+/^a (?#xxx) (?#yyy) {3}c/x
+ aaac
+ 0: aaac
+
+/(?<![cd])b/
+ *** Failers
+No match
+ B\nB
+No match
+ dbcb
+No match
+
+/(?<![cd])[ab]/
+ dbaacb
+ 0: a
+
+/(?<!(c|d))b/
+
+/(?<!(c|d))[ab]/
+ dbaacb
+ 0: a
+
+/(?<!cd)[ab]/
+ cdaccb
+ 0: b
+
+/^(?:a?b?)*$/
+ *** Failers
+No match
+ dbcb
+No match
+ a--
+No match
+
+/((?s)^a(.))((?m)^b$)/
+ a\nb\nc\n
+ 0: a\x0ab
+ 1: a\x0a
+ 2: \x0a
+ 3: b
+
+/((?m)^b$)/
+ a\nb\nc\n
+ 0: b
+ 1: b
+
+/(?m)^b/
+ a\nb\n
+ 0: b
+
+/(?m)^(b)/
+ a\nb\n
+ 0: b
+ 1: b
+
+/((?m)^b)/
+ a\nb\n
+ 0: b
+ 1: b
+
+/\n((?m)^b)/
+ a\nb\n
+ 0: \x0ab
+ 1: b
+
+/((?s).)c(?!.)/
+ a\nb\nc\n
+ 0: \x0ac
+ 1: \x0a
+ a\nb\nc\n
+ 0: \x0ac
+ 1: \x0a
+
+/((?s)b.)c(?!.)/
+ a\nb\nc\n
+ 0: b\x0ac
+ 1: b\x0a
+ a\nb\nc\n
+ 0: b\x0ac
+ 1: b\x0a
+
+/^b/
+
+/()^b/
+ *** Failers
+No match
+ a\nb\nc\n
+No match
+ a\nb\nc\n
+No match
+
+/((?m)^b)/
+ a\nb\nc\n
+ 0: b
+ 1: b
+
+/(?(1)a|b)/
+
+/(?(1)b|a)/
+ a
+ 0: a
+
+/(x)?(?(1)a|b)/
+ *** Failers
+No match
+ a
+No match
+ a
+No match
+
+/(x)?(?(1)b|a)/
+ a
+ 0: a
+
+/()?(?(1)b|a)/
+ a
+ 0: a
+
+/()(?(1)b|a)/
+
+/()?(?(1)a|b)/
+ a
+ 0: a
+ 1:
+
+/^(\()?blah(?(1)(\)))$/
+ (blah)
+ 0: (blah)
+ 1: (
+ 2: )
+ blah
+ 0: blah
+ *** Failers
+No match
+ a
+No match
+ blah)
+No match
+ (blah
+No match
+
+/^(\(+)?blah(?(1)(\)))$/
+ (blah)
+ 0: (blah)
+ 1: (
+ 2: )
+ blah
+ 0: blah
+ *** Failers
+No match
+ blah)
+No match
+ (blah
+No match
+
+/(?(?!a)a|b)/
+
+/(?(?!a)b|a)/
+ a
+ 0: a
+
+/(?(?=a)b|a)/
+ *** Failers
+No match
+ a
+No match
+ a
+No match
+
+/(?(?=a)a|b)/
+ a
+ 0: a
+
+/(?=(a+?))(\1ab)/
+ aaab
+ 0: aab
+ 1: a
+ 2: aab
+
+/^(?=(a+?))\1ab/
+
+/(\w+:)+/
+ one:
+ 0: one:
+ 1: one:
+
+/$(?<=^(a))/
+ a
+ 0:
+ 1: a
+
+/(?=(a+?))(\1ab)/
+ aaab
+ 0: aab
+ 1: a
+ 2: aab
+
+/^(?=(a+?))\1ab/
+ *** Failers
+No match
+ aaab
+No match
+ aaab
+No match
+
+/([\w:]+::)?(\w+)$/
+ abcd
+ 0: abcd
+ 1: <unset>
+ 2: abcd
+ xy:z:::abcd
+ 0: xy:z:::abcd
+ 1: xy:z:::
+ 2: abcd
+
+/^[^bcd]*(c+)/
+ aexycd
+ 0: aexyc
+ 1: c
+
+/(a*)b+/
+ caab
+ 0: aab
+ 1: aa
+
+/([\w:]+::)?(\w+)$/
+ abcd
+ 0: abcd
+ 1: <unset>
+ 2: abcd
+ xy:z:::abcd
+ 0: xy:z:::abcd
+ 1: xy:z:::
+ 2: abcd
+ *** Failers
+ 0: Failers
+ 1: <unset>
+ 2: Failers
+ abcd:
+No match
+ abcd:
+No match
+
+/^[^bcd]*(c+)/
+ aexycd
+ 0: aexyc
+ 1: c
+
+/(>a+)ab/
+
+/(?>a+)b/
+ aaab
+ 0: aaab
+
+/([[:]+)/
+ a:[b]:
+ 0: :[
+ 1: :[
+
+/([[=]+)/
+ a=[b]=
+ 0: =[
+ 1: =[
+
+/([[.]+)/
+ a.[b].
+ 0: .[
+ 1: .[
+
+/((?>a+)b)/
+ aaab
+ 0: aaab
+ 1: aaab
+
+/(?>(a+))b/
+ aaab
+ 0: aaab
+ 1: aaa
+
+/((?>[^()]+)|\([^()]*\))+/
+ ((abc(ade)ufh()()x
+ 0: abc(ade)ufh()()x
+ 1: x
+
+/a\Z/
+ *** Failers
+No match
+ aaab
+No match
+ a\nb\n
+No match
+
+/b\Z/
+ a\nb\n
+ 0: b
+
+/b\z/
+
+/b\Z/
+ a\nb
+ 0: b
+
+/b\z/
+ a\nb
+ 0: b
+ *** Failers
+No match
+
+/^(?>(?(1)\.|())[^\W_](?>[a-z0-9-]*[^\W_])?)+$/
+ a
+ 0: a
+ 1:
+ abc
+ 0: abc
+ 1:
+ a-b
+ 0: a-b
+ 1:
+ 0-9
+ 0: 0-9
+ 1:
+ a.b
+ 0: a.b
+ 1:
+ 5.6.7
+ 0: 5.6.7
+ 1:
+ the.quick.brown.fox
+ 0: the.quick.brown.fox
+ 1:
+ a100.b200.300c
+ 0: a100.b200.300c
+ 1:
+ 12-ab.1245
+ 0: 12-ab.1245
+ 1:
+ *** Failers
+No match
+ \
+No match
+ .a
+No match
+ -a
+No match
+ a-
+No match
+ a.
+No match
+ a_b
+No match
+ a.-
+No match
+ a..
+No match
+ ab..bc
+No match
+ the.quick.brown.fox-
+No match
+ the.quick.brown.fox.
+No match
+ the.quick.brown.fox_
+No match
+ the.quick.brown.fox+
+No match
+
+/(?>.*)(?<=(abcd|wxyz))/
+ alphabetabcd
+ 0: alphabetabcd
+ 1: abcd
+ endingwxyz
+ 0: endingwxyz
+ 1: wxyz
+ *** Failers
+No match
+ a rather long string that doesn't end with one of them
+No match
+
+/word (?>(?:(?!otherword)[a-zA-Z0-9]+ ){0,30})otherword/
+ word cat dog elephant mussel cow horse canary baboon snake shark otherword
+ 0: word cat dog elephant mussel cow horse canary baboon snake shark otherword
+ word cat dog elephant mussel cow horse canary baboon snake shark
+No match
+
+/word (?>[a-zA-Z0-9]+ ){0,30}otherword/
+ word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope
+No match
+
+/(?<=\d{3}(?!999))foo/
+ 999foo
+ 0: foo
+ 123999foo
+ 0: foo
+ *** Failers
+No match
+ 123abcfoo
+No match
+
+/(?<=(?!...999)\d{3})foo/
+ 999foo
+ 0: foo
+ 123999foo
+ 0: foo
+ *** Failers
+No match
+ 123abcfoo
+No match
+
+/(?<=\d{3}(?!999)...)foo/
+ 123abcfoo
+ 0: foo
+ 123456foo
+ 0: foo
+ *** Failers
+No match
+ 123999foo
+No match
+
+/(?<=\d{3}...)(?<!999)foo/
+ 123abcfoo
+ 0: foo
+ 123456foo
+ 0: foo
+ *** Failers
+No match
+ 123999foo
+No match
+
+/<a[\s]+href[\s]*=[\s]* # find <a href=
+ ([\"\'])? # find single or double quote
+ (?(1) (.*?)\1 | ([^\s]+)) # if quote found, match up to next matching
+ # quote, otherwise match up to next space
+/isx
+ <a href=abcd xyz
+ 0: <a href=abcd
+ 1: <unset>
+ 2: <unset>
+ 3: abcd
+ <a href=\"abcd xyz pqr\" cats
+ 0: <a href="abcd xyz pqr"
+ 1: "
+ 2: abcd xyz pqr
+ <a href=\'abcd xyz pqr\' cats
+ 0: <a href='abcd xyz pqr'
+ 1: '
+ 2: abcd xyz pqr
+
+/<a\s+href\s*=\s* # find <a href=
+ (["'])? # find single or double quote
+ (?(1) (.*?)\1 | (\S+)) # if quote found, match up to next matching
+ # quote, otherwise match up to next space
+/isx
+ <a href=abcd xyz
+ 0: <a href=abcd
+ 1: <unset>
+ 2: <unset>
+ 3: abcd
+ <a href=\"abcd xyz pqr\" cats
+ 0: <a href="abcd xyz pqr"
+ 1: "
+ 2: abcd xyz pqr
+ <a href = \'abcd xyz pqr\' cats
+ 0: <a href = 'abcd xyz pqr'
+ 1: '
+ 2: abcd xyz pqr
+
+/<a\s+href(?>\s*)=(?>\s*) # find <a href=
+ (["'])? # find single or double quote
+ (?(1) (.*?)\1 | (\S+)) # if quote found, match up to next matching
+ # quote, otherwise match up to next space
+/isx
+ <a href=abcd xyz
+ 0: <a href=abcd
+ 1: <unset>
+ 2: <unset>
+ 3: abcd
+ <a href=\"abcd xyz pqr\" cats
+ 0: <a href="abcd xyz pqr"
+ 1: "
+ 2: abcd xyz pqr
+ <a href = \'abcd xyz pqr\' cats
+ 0: <a href = 'abcd xyz pqr'
+ 1: '
+ 2: abcd xyz pqr
+
+/((Z)+|A)*/
+ ZABCDEFG
+ 0: ZA
+ 1: A
+ 2: Z
+
+/(Z()|A)*/
+ ZABCDEFG
+ 0: ZA
+ 1: A
+ 2:
+
+/(Z(())|A)*/
+ ZABCDEFG
+ 0: ZA
+ 1: A
+ 2:
+ 3:
+
+/((?>Z)+|A)*/
+ ZABCDEFG
+ 0: ZA
+ 1: A
+
+/((?>)+|A)*/
+ ZABCDEFG
+ 0:
+ 1:
+
+/a*/g
+ abbab
+ 0: a
+ 0:
+ 0:
+ 0: a
+ 0:
+ 0:
+
+/^[a-\d]/
+ abcde
+ 0: a
+ -things
+ 0: -
+ 0digit
+ 0: 0
+ *** Failers
+No match
+ bcdef
+No match
+
+/^[\d-a]/
+ abcde
+ 0: a
+ -things
+ 0: -
+ 0digit
+ 0: 0
+ *** Failers
+No match
+ bcdef
+No match
+
+/[[:space:]]+/
+ > \x09\x0a\x0c\x0d\x0b<
+ 0: \x09\x0a\x0c\x0d\x0b
+
+/[[:blank:]]+/
+ > \x09\x0a\x0c\x0d\x0b<
+ 0: \x09
+
+/[\s]+/
+ > \x09\x0a\x0c\x0d\x0b<
+ 0: \x09\x0a\x0c\x0d
+
+/\s+/
+ > \x09\x0a\x0c\x0d\x0b<
+ 0: \x09\x0a\x0c\x0d
+
+/a b/x
+ ab
+No match
+
+/(?!\A)x/m
+ a\nxb\n
+ 0: x
+
+/(?!^)x/m
+ a\nxb\n
+No match
+
+/abc\Qabc\Eabc/
+ abcabcabc
+ 0: abcabcabc
+
+/abc\Q(*+|\Eabc/
+ abc(*+|abc
+ 0: abc(*+|abc
+
+/ abc\Q abc\Eabc/x
+ abc abcabc
+ 0: abc abcabc
+ *** Failers
+No match
+ abcabcabc
+No match
+
+/abc#comment
+ \Q#not comment
+ literal\E/x
+ abc#not comment\n literal
+ 0: abc#not comment\x0a literal
+
+/abc#comment
+ \Q#not comment
+ literal/x
+ abc#not comment\n literal
+ 0: abc#not comment\x0a literal
+
+/abc#comment
+ \Q#not comment
+ literal\E #more comment
+ /x
+ abc#not comment\n literal
+ 0: abc#not comment\x0a literal
+
+/abc#comment
+ \Q#not comment
+ literal\E #more comment/x
+ abc#not comment\n literal
+ 0: abc#not comment\x0a literal
+
+/\Qabc\$xyz\E/
+ abc\\\$xyz
+ 0: abc\$xyz
+
+/\Qabc\E\$\Qxyz\E/
+ abc\$xyz
+ 0: abc$xyz
+
+/\Gabc/
+ abc
+ 0: abc
+ *** Failers
+No match
+ xyzabc
+No match
+
+/\Gabc./g
+ abc1abc2xyzabc3
+ 0: abc1
+ 0: abc2
+
+/abc./g
+ abc1abc2xyzabc3
+ 0: abc1
+ 0: abc2
+ 0: abc3
+
+/a(?x: b c )d/
+ XabcdY
+ 0: abcd
+ *** Failers
+No match
+ Xa b c d Y
+No match
+
+/((?x)x y z | a b c)/
+ XabcY
+ 0: abc
+ 1: abc
+ AxyzB
+ 0: xyz
+ 1: xyz
+
+/(?i)AB(?-i)C/
+ XabCY
+ 0: abC
+ *** Failers
+No match
+ XabcY
+No match
+
+/((?i)AB(?-i)C|D)E/
+ abCE
+ 0: abCE
+ 1: abC
+ DE
+ 0: DE
+ 1: D
+ *** Failers
+No match
+ abcE
+No match
+ abCe
+No match
+ dE
+No match
+ De
+No match
+
+/(.*)\d+\1/
+ abc123abc
+ 0: abc123abc
+ 1: abc
+ abc123bc
+ 0: bc123bc
+ 1: bc
+
+/(.*)\d+\1/s
+ abc123abc
+ 0: abc123abc
+ 1: abc
+ abc123bc
+ 0: bc123bc
+ 1: bc
+
+/((.*))\d+\1/
+ abc123abc
+ 0: abc123abc
+ 1: abc
+ 2: abc
+ abc123bc
+ 0: bc123bc
+ 1: bc
+ 2: bc
+
+/-- This tests for an IPv6 address in the form where it can have up to --/
+/-- eight components, one and only one of which is empty. This must be --/
+No match
+/-- an internal component. --/
+No match
+
+/^(?!:) # colon disallowed at start
+ (?: # start of item
+ (?: [0-9a-f]{1,4} | # 1-4 hex digits or
+ (?(1)0 | () ) ) # if null previously matched, fail; else null
+ : # followed by colon
+ ){1,7} # end item; 1-7 of them required
+ [0-9a-f]{1,4} $ # final hex number at end of string
+ (?(1)|.) # check that there was an empty component
+ /xi
+ a123::a123
+ 0: a123::a123
+ 1:
+ a123:b342::abcd
+ 0: a123:b342::abcd
+ 1:
+ a123:b342::324e:abcd
+ 0: a123:b342::324e:abcd
+ 1:
+ a123:ddde:b342::324e:abcd
+ 0: a123:ddde:b342::324e:abcd
+ 1:
+ a123:ddde:b342::324e:dcba:abcd
+ 0: a123:ddde:b342::324e:dcba:abcd
+ 1:
+ a123:ddde:9999:b342::324e:dcba:abcd
+ 0: a123:ddde:9999:b342::324e:dcba:abcd
+ 1:
+ *** Failers
+No match
+ 1:2:3:4:5:6:7:8
+No match
+ a123:bce:ddde:9999:b342::324e:dcba:abcd
+No match
+ a123::9999:b342::324e:dcba:abcd
+No match
+ abcde:2:3:4:5:6:7:8
+No match
+ ::1
+No match
+ abcd:fee0:123::
+No match
+ :1
+No match
+ 1:
+No match
+
+/[z\Qa-d]\E]/
+ z
+ 0: z
+ a
+ 0: a
+ -
+ 0: -
+ d
+ 0: d
+ ]
+ 0: ]
+ *** Failers
+ 0: a
+ b
+No match
+
+/[\z\C]/
+ z
+ 0: z
+ C
+ 0: C
+
+/\M/
+ M
+ 0: M
+
+/(a+)*b/
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+No match
+
+/(?i)reg(?:ul(?:[aä]|ae)r|ex)/
+ REGular
+ 0: REGular
+ regulaer
+ 0: regulaer
+ Regex
+ 0: Regex
+ regulär
+ 0: regul\xe4r
+
+/Åæåä[à-ÿÀ-ß]+/
+ Åæåäà
+ 0: \xc5\xe6\xe5\xe4\xe0
+ Åæåäÿ
+ 0: \xc5\xe6\xe5\xe4\xff
+ ÅæåäÀ
+ 0: \xc5\xe6\xe5\xe4\xc0
+ Åæåäß
+ 0: \xc5\xe6\xe5\xe4\xdf
+
+/(?<=Z)X./
+ \x84XAZXB
+ 0: XB
+
+/ End of testinput1 /
diff --git a/srclib/pcre/testdata/testoutput2 b/srclib/pcre/testdata/testoutput2
index e8844d2aeb..f2e7d5483d 100644
--- a/srclib/pcre/testdata/testoutput2
+++ b/srclib/pcre/testdata/testoutput2
@@ -1,4 +1,4 @@
-PCRE version 3.9 02-Jan-2002
+PCRE version 5.0 13-Sep-2004
/(a)b|/
Capturing subpattern count = 1
@@ -28,7 +28,7 @@ No match
Capturing subpattern count = 0
Options: anchored
No first char
-Need char = 'c'
+No need char
abc
0: abc
\Aabc
@@ -42,24 +42,28 @@ No match
/a+bc/
Capturing subpattern count = 0
+Partial matching not supported
No options
First char = 'a'
Need char = 'c'
/a*bc/
Capturing subpattern count = 0
+Partial matching not supported
No options
No first char
Need char = 'c'
/a{3}bc/
Capturing subpattern count = 0
+Partial matching not supported
No options
First char = 'a'
Need char = 'c'
/(abc|a+z)/
Capturing subpattern count = 1
+Partial matching not supported
No options
First char = 'a'
No need char
@@ -68,7 +72,7 @@ No need char
Capturing subpattern count = 0
Options: anchored
No first char
-Need char = 'c'
+No need char
abc
0: abc
*** Failers
@@ -91,8 +95,8 @@ Failed: number too big in {} quantifier at offset 7
/[abcd/
Failed: missing terminating ] for character class at offset 5
-/[\B]/
-Failed: invalid escape sequence in character class at offset 2
+/(?X)[\B]/
+Failed: invalid escape sequence in character class at offset 6
/[z-a]/
Failed: range out of order in character class at offset 3
@@ -111,12 +115,14 @@ Failed: unrecognized character after (? at offset 2
/.*b/
Capturing subpattern count = 0
+Partial matching not supported
No options
First char at start or follows \n
Need char = 'b'
/.*?b/
Capturing subpattern count = 0
+Partial matching not supported
No options
First char at start or follows \n
Need char = 'b'
@@ -136,7 +142,7 @@ Capturing subpattern count = 0
No options
No first char
No need char
-Starting character set: c d e
+Starting byte set: c d e
this sentence eventually mentions a cat
0: cat
this sentences rambles on and on for a while and then reaches elephant
@@ -147,7 +153,7 @@ Capturing subpattern count = 0
Options: caseless
No first char
No need char
-Starting character set: C D E c d e
+Starting byte set: C D E c d e
this sentence eventually mentions a CAT cat
0: CAT
this sentences rambles on and on for a while to elephant ElePhant
@@ -158,14 +164,14 @@ Capturing subpattern count = 0
No options
No first char
No need char
-Starting character set: a b c d
+Starting byte set: a b c d
/(a|[^\dZ])/S
Capturing subpattern count = 1
No options
No first char
No need char
-Starting character set: \x00 \x01 \x02 \x03 \x04 \x05 \x06 \x07 \x08 \x09 \x0a
+Starting byte set: \x00 \x01 \x02 \x03 \x04 \x05 \x06 \x07 \x08 \x09 \x0a
\x0b \x0c \x0d \x0e \x0f \x10 \x11 \x12 \x13 \x14 \x15 \x16 \x17 \x18 \x19
\x1a \x1b \x1c \x1d \x1e \x1f \x20 ! " # $ % & ' ( ) * + , - . / : ; < = >
? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y [ \ ] ^ _ ` a b c d
@@ -185,10 +191,10 @@ Capturing subpattern count = 1
No options
No first char
No need char
-Starting character set: \x09 \x0a \x0b \x0c \x0d \x20 a b
+Starting byte set: \x09 \x0a \x0c \x0d \x20 a b
/(ab\2)/
-Failed: back reference to non-existent subpattern at offset 6
+Failed: reference to non-existent subpattern at offset 6
/{4,5}abc/
Failed: nothing to repeat at offset 4
@@ -281,7 +287,7 @@ No match
No match
/(a)(b)(c)(d)(e)\6/
-Failed: back reference to non-existent subpattern at offset 17
+Failed: reference to non-existent subpattern at offset 17
/the quick brown fox/
Capturing subpattern count = 0
@@ -297,7 +303,7 @@ Need char = 'x'
Capturing subpattern count = 0
Options: anchored
No first char
-Need char = 'x'
+No need char
the quick brown fox
0: the quick brown fox
*** Failers
@@ -320,6 +326,7 @@ No need char
/.*((abc)$|(def))/
Capturing subpattern count = 3
+Partial matching not supported
No options
First char at start or follows \n
No need char
@@ -396,6 +403,7 @@ Failed: missing terminating ] for character class at offset 4
/[^aeiou ]{3,}/
Capturing subpattern count = 0
+Partial matching not supported
No options
No first char
No need char
@@ -404,6 +412,7 @@ No need char
/<.*>/
Capturing subpattern count = 0
+Partial matching not supported
No options
First char = '<'
Need char = '>'
@@ -412,6 +421,7 @@ Need char = '>'
/<.*?>/
Capturing subpattern count = 0
+Partial matching not supported
No options
First char = '<'
Need char = '>'
@@ -420,14 +430,16 @@ Need char = '>'
/<.*>/U
Capturing subpattern count = 0
+Partial matching not supported
Options: ungreedy
First char = '<'
Need char = '>'
abc<def>ghi<klm>nop
0: <def>
-/<.*>(?U)/
+/(?U)<.*>/
Capturing subpattern count = 0
+Partial matching not supported
Options: ungreedy
First char = '<'
Need char = '>'
@@ -436,6 +448,7 @@ Need char = '>'
/<.*?>/U
Capturing subpattern count = 0
+Partial matching not supported
Options: ungreedy
First char = '<'
Need char = '>'
@@ -444,6 +457,7 @@ Need char = '>'
/={3,}/U
Capturing subpattern count = 0
+Partial matching not supported
Options: ungreedy
First char = '='
Need char = '='
@@ -452,6 +466,7 @@ Need char = '='
/(?U)={3,}?/
Capturing subpattern count = 0
+Partial matching not supported
Options: ungreedy
First char = '='
Need char = '='
@@ -486,8 +501,8 @@ Failed: lookbehind assertion is not fixed length at offset 12
/(?i)abc/
Capturing subpattern count = 0
Options: caseless
-First char = 'a'
-Need char = 'c'
+First char = 'a' (caseless)
+Need char = 'c' (caseless)
/(a|(?m)a)/
Capturing subpattern count = 1
@@ -499,7 +514,7 @@ No need char
Capturing subpattern count = 0
Options: anchored caseless
No first char
-Need char = '4'
+No need char
/(^b|(?i)^d)/
Capturing subpattern count = 1
@@ -510,6 +525,7 @@ No need char
/(?s).*/
Capturing subpattern count = 0
+Partial matching not supported
Options: anchored dotall
No first char
No need char
@@ -519,21 +535,21 @@ Capturing subpattern count = 0
No options
No first char
No need char
-Starting character set: a b c d
+Starting byte set: a b c d
/(?i)[abcd]/S
Capturing subpattern count = 0
Options: caseless
No first char
No need char
-Starting character set: A B C D a b c d
+Starting byte set: A B C D a b c d
/(?m)[xy]|(b|c)/S
Capturing subpattern count = 1
Options: multiline
No first char
No need char
-Starting character set: b c x y
+Starting byte set: b c x y
/(^a|^b)/m
Capturing subpattern count = 1
@@ -563,11 +579,12 @@ Failed: assertion expected after (?( at offset 3
Failed: assertion expected after (?( at offset 3
/(?(?<ab))/
-Failed: unrecognized character after (?< at offset 2
+Failed: unrecognized character after (?< at offset 5
/((?s)blah)\s+\1/
Capturing subpattern count = 1
Max back reference = 1
+Partial matching not supported
No options
First char = 'b'
Need char = 'h'
@@ -575,36 +592,38 @@ Need char = 'h'
/((?i)blah)\s+\1/
Capturing subpattern count = 1
Max back reference = 1
+Partial matching not supported
No options
Case state changes
-No first char
-Need char = 'h'
+First char = 'b' (caseless)
+Need char = 'h' (caseless)
/((?i)b)/DS
------------------------------------------------------------------
- 0 16 Bra 0
- 3 8 Bra 1
+ 0 15 Bra 0
+ 3 7 Bra 1
6 01 Opt
- 8 1 b
- 11 8 Ket
- 14 00 Opt
- 16 16 Ket
- 19 End
+ 8 NC b
+ 10 7 Ket
+ 13 00 Opt
+ 15 15 Ket
+ 18 End
------------------------------------------------------------------
Capturing subpattern count = 1
No options
Case state changes
-No first char
-Need char = 'b'
-Starting character set: B b
+First char = 'b' (caseless)
+No need char
+Study returned NULL
/(a*b|(?i:c*(?-i)d))/S
Capturing subpattern count = 1
+Partial matching not supported
No options
Case state changes
No first char
No need char
-Starting character set: C a b c d
+Starting byte set: C a b c d
/a$/
Capturing subpattern count = 0
@@ -642,7 +661,7 @@ No match
Capturing subpattern count = 0
Options: anchored multiline
No first char
-Need char = 'c'
+No need char
/^abc/m
Capturing subpattern count = 0
@@ -652,9 +671,10 @@ Need char = 'c'
/^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/
Capturing subpattern count = 5
+Partial matching not supported
Options: anchored
No first char
-Need char = 'a'
+No need char
aaaaabbbbbcccccdef
0: aaaaabbbbbcccccdef
1: aaaaabbbbbcccccdef
@@ -668,27 +688,53 @@ Capturing subpattern count = 0
No options
No first char
No need char
-Starting character set: a b
+Starting byte set: a b
/(?<!foo)(alpha|omega)/S
Capturing subpattern count = 1
No options
No first char
Need char = 'a'
-Starting character set: a o
+Starting byte set: a o
/(?!alphabet)[ab]/S
Capturing subpattern count = 0
No options
No first char
No need char
-Starting character set: a b
+Starting byte set: a b
/(?<=foo\n)^bar/m
Capturing subpattern count = 0
Options: multiline
+No first char
+Need char = 'r'
+ foo\nbarbar
+ 0: bar
+ ***Failers
+No match
+ rhubarb
+No match
+ barbell
+No match
+ abc\nbarton
+No match
+
+/^(?<=foo\n)bar/m
+Capturing subpattern count = 0
+Options: multiline
First char at start or follows \n
Need char = 'r'
+ foo\nbarbar
+ 0: bar
+ ***Failers
+No match
+ rhubarb
+No match
+ barbell
+No match
+ abc\nbarton
+No match
/(?>^abc)/m
Capturing subpattern count = 0
@@ -744,6 +790,7 @@ No need char
/(?>.*)(?<=(abcd)|(xyz))/
Capturing subpattern count = 2
+Partial matching not supported
No options
First char at start or follows \n
No need char
@@ -825,7 +872,7 @@ Capturing subpattern count = 1
Max back reference = 1
Options: anchored
No first char
-Need char = 'a'
+No need char
aaaaaa
0: aaaaaa
1: aa
@@ -864,13 +911,13 @@ Failed: nothing to repeat at offset 2
Failed: unmatched parentheses at offset 0
/\1/
-Failed: back reference to non-existent subpattern at offset 2
+Failed: reference to non-existent subpattern at offset 2
/\2/
-Failed: back reference to non-existent subpattern at offset 2
+Failed: reference to non-existent subpattern at offset 2
/(a)|\2/
-Failed: back reference to non-existent subpattern at offset 6
+Failed: reference to non-existent subpattern at offset 6
/a[b-a]/i
Failed: range out of order in character class at offset 4
@@ -903,7 +950,7 @@ Failed: unmatched parentheses at offset 0
Failed: missing ) at offset 4
/(?<%)b/
-Failed: unrecognized character after (?< at offset 0
+Failed: unrecognized character after (?< at offset 3
/a(?{)b/
Failed: unrecognized character after (? at offset 3
@@ -966,6 +1013,7 @@ copy substring 5 failed -7
/(.{20})/
Capturing subpattern count = 1
+Partial matching not supported
No options
No first char
No need char
@@ -983,6 +1031,7 @@ copy substring 1 failed -6
/(.{15})/
Capturing subpattern count = 1
+Partial matching not supported
No options
No first char
No need char
@@ -997,6 +1046,7 @@ No need char
/(.{16})/
Capturing subpattern count = 1
+Partial matching not supported
No options
No first char
No need char
@@ -1015,7 +1065,7 @@ copy substring 1 failed -6
Capturing subpattern count = 3
Options: anchored
No first char
-Need char = 'f'
+No need char
adef\G1\G2\G3\G4\L
0: adef
1: a
@@ -1053,7 +1103,7 @@ get substring 4 failed -7
Capturing subpattern count = 0
Options: anchored
No first char
-Need char = 'f'
+No need char
abc\00def\L\C0
0: abc\x00def
0C abc (7)
@@ -1062,109 +1112,116 @@ Need char = 'f'
/word ((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+
)((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+
)?)?)?)?)?)?)?)?)?otherword/M
-Memory allocation (code space): 428
+Memory allocation (code space): 432
Capturing subpattern count = 8
+Partial matching not supported
No options
First char = 'w'
Need char = 'd'
/.*X/D
------------------------------------------------------------------
- 0 8 Bra 0
+ 0 7 Bra 0
3 Any*
- 5 1 X
- 8 8 Ket
- 11 End
+ 5 X
+ 7 7 Ket
+ 10 End
------------------------------------------------------------------
Capturing subpattern count = 0
+Partial matching not supported
No options
First char at start or follows \n
Need char = 'X'
/.*X/Ds
------------------------------------------------------------------
- 0 8 Bra 0
+ 0 7 Bra 0
3 Any*
- 5 1 X
- 8 8 Ket
- 11 End
+ 5 X
+ 7 7 Ket
+ 10 End
------------------------------------------------------------------
Capturing subpattern count = 0
+Partial matching not supported
Options: anchored dotall
No first char
Need char = 'X'
/(.*X|^B)/D
------------------------------------------------------------------
- 0 21 Bra 0
- 3 8 Bra 1
+ 0 19 Bra 0
+ 3 7 Bra 1
6 Any*
- 8 1 X
- 11 7 Alt
- 14 ^
- 15 1 B
- 18 15 Ket
- 21 21 Ket
- 24 End
+ 8 X
+ 10 6 Alt
+ 13 ^
+ 14 B
+ 16 13 Ket
+ 19 19 Ket
+ 22 End
------------------------------------------------------------------
Capturing subpattern count = 1
+Partial matching not supported
No options
First char at start or follows \n
No need char
/(.*X|^B)/Ds
------------------------------------------------------------------
- 0 21 Bra 0
- 3 8 Bra 1
+ 0 19 Bra 0
+ 3 7 Bra 1
6 Any*
- 8 1 X
- 11 7 Alt
- 14 ^
- 15 1 B
- 18 15 Ket
- 21 21 Ket
- 24 End
+ 8 X
+ 10 6 Alt
+ 13 ^
+ 14 B
+ 16 13 Ket
+ 19 19 Ket
+ 22 End
------------------------------------------------------------------
Capturing subpattern count = 1
+Partial matching not supported
Options: anchored dotall
No first char
No need char
/(?s)(.*X|^B)/D
------------------------------------------------------------------
- 0 21 Bra 0
- 3 8 Bra 1
+ 0 19 Bra 0
+ 3 7 Bra 1
6 Any*
- 8 1 X
- 11 7 Alt
- 14 ^
- 15 1 B
- 18 15 Ket
- 21 21 Ket
- 24 End
+ 8 X
+ 10 6 Alt
+ 13 ^
+ 14 B
+ 16 13 Ket
+ 19 19 Ket
+ 22 End
------------------------------------------------------------------
Capturing subpattern count = 1
+Partial matching not supported
Options: anchored dotall
No first char
No need char
/(?s:.*X|^B)/D
------------------------------------------------------------------
- 0 27 Bra 0
- 3 10 Bra 0
+ 0 25 Bra 0
+ 3 9 Bra 0
6 04 Opt
8 Any*
- 10 1 X
- 13 9 Alt
- 16 04 Opt
- 18 ^
- 19 1 B
- 22 19 Ket
- 25 00 Opt
- 27 27 Ket
- 30 End
+ 10 X
+ 12 8 Alt
+ 15 04 Opt
+ 17 ^
+ 18 B
+ 20 17 Ket
+ 23 00 Opt
+ 25 25 Ket
+ 28 End
------------------------------------------------------------------
Capturing subpattern count = 0
+Partial matching not supported
No options
First char at start or follows \n
No need char
@@ -1242,13 +1299,14 @@ Need char = 's'
Capturing subpattern count = 0
Options: anchored
No first char
-Need char = 's'
+No need char
ississippi
0: iss
0+ issippi
/.*iss/g+
Capturing subpattern count = 0
+Partial matching not supported
No options
First char at start or follows \n
Need char = 's'
@@ -1292,7 +1350,7 @@ Need char = 'i'
Capturing subpattern count = 0
Options: anchored
No first char
-Need char = 's'
+No need char
Mississippi
0: Mis
0+ sissippi
@@ -1301,7 +1359,7 @@ Need char = 's'
Capturing subpattern count = 0
Options: anchored
No first char
-Need char = 10
+No need char
ab\nab\ncd
0: ab\x0a
0+ ab\x0acd
@@ -1349,36 +1407,42 @@ Need char = 'c'
/a*/
Capturing subpattern count = 0
+Partial matching not supported
No options
No first char
No need char
/a+/
Capturing subpattern count = 0
+Partial matching not supported
No options
First char = 'a'
No need char
/(baa|a+)/
Capturing subpattern count = 1
+Partial matching not supported
No options
No first char
Need char = 'a'
/a{0,3}/
Capturing subpattern count = 0
+Partial matching not supported
No options
No first char
No need char
/baa{3,}/
Capturing subpattern count = 0
+Partial matching not supported
No options
First char = 'b'
Need char = 'a'
/"([^\\"]+|\\.)*"/
Capturing subpattern count = 1
+Partial matching not supported
No options
First char = '"'
Need char = '"'
@@ -1433,60 +1497,70 @@ Need char = 'b'
/abc*/
Capturing subpattern count = 0
+Partial matching not supported
No options
First char = 'a'
Need char = 'b'
/ab.c*/
Capturing subpattern count = 0
+Partial matching not supported
No options
First char = 'a'
Need char = 'b'
/a.c*/
Capturing subpattern count = 0
+Partial matching not supported
No options
First char = 'a'
No need char
/.c*/
Capturing subpattern count = 0
+Partial matching not supported
No options
No first char
No need char
/ac*/
Capturing subpattern count = 0
+Partial matching not supported
No options
First char = 'a'
No need char
/(a.c*|b.c*)/
Capturing subpattern count = 1
+Partial matching not supported
No options
No first char
No need char
/a.c*|aba/
Capturing subpattern count = 0
+Partial matching not supported
No options
First char = 'a'
No need char
/.+a/
Capturing subpattern count = 0
+Partial matching not supported
No options
No first char
Need char = 'a'
/(?=abcda)a.*/
Capturing subpattern count = 0
+Partial matching not supported
No options
First char = 'a'
-No need char
+Need char = 'a'
/(?=a)a.*/
Capturing subpattern count = 0
+Partial matching not supported
No options
First char = 'a'
No need char
@@ -1499,12 +1573,14 @@ No need char
/a\d*/
Capturing subpattern count = 0
+Partial matching not supported
No options
First char = 'a'
No need char
/ab\d*/
Capturing subpattern count = 0
+Partial matching not supported
No options
First char = 'a'
Need char = 'b'
@@ -1523,6 +1599,7 @@ Need char = 'd'
/ab\d+/
Capturing subpattern count = 0
+Partial matching not supported
No options
First char = 'a'
Need char = 'b'
@@ -1640,6 +1717,7 @@ Study returned NULL
\) # Closing )
/x
Capturing subpattern count = 0
+Partial matching not supported
Options: extended
First char = '('
Need char = ')'
@@ -1668,6 +1746,7 @@ No match
/\( ( (?>[^()]+) | (?R) )* \) /xg
Capturing subpattern count = 1
+Partial matching not supported
Options: extended
First char = '('
Need char = ')'
@@ -1682,6 +1761,7 @@ Need char = ')'
/\( (?: (?>[^()]+) | (?R) ) \) /x
Capturing subpattern count = 0
+Partial matching not supported
Options: extended
First char = '('
Need char = ')'
@@ -1700,6 +1780,7 @@ No match
/\( (?: (?>[^()]+) | (?R) )? \) /x
Capturing subpattern count = 0
+Partial matching not supported
Options: extended
First char = '('
Need char = ')'
@@ -1710,6 +1791,7 @@ Need char = ')'
/\( ( (?>[^()]+) | (?R) )* \) /x
Capturing subpattern count = 1
+Partial matching not supported
Options: extended
First char = '('
Need char = ')'
@@ -1719,6 +1801,7 @@ Need char = ')'
/\( ( ( (?>[^()]+) | (?R) )* ) \) /x
Capturing subpattern count = 2
+Partial matching not supported
Options: extended
First char = '('
Need char = ')'
@@ -1729,6 +1812,7 @@ Need char = ')'
/\( (123)? ( ( (?>[^()]+) | (?R) )* ) \) /x
Capturing subpattern count = 3
+Partial matching not supported
Options: extended
First char = '('
Need char = ')'
@@ -1745,6 +1829,7 @@ Need char = ')'
/\( ( (123)? ( (?>[^()]+) | (?R) )* ) \) /x
Capturing subpattern count = 3
+Partial matching not supported
Options: extended
First char = '('
Need char = ')'
@@ -1761,6 +1846,7 @@ Need char = ')'
/\( (((((((((( ( (?>[^()]+) | (?R) )* )))))))))) \) /x
Capturing subpattern count = 11
+Partial matching not supported
Options: extended
First char = '('
Need char = ')'
@@ -1780,6 +1866,7 @@ Need char = ')'
/\( ( ( (?>[^()<>]+) | ((?>[^()]+)) | (?R) )* ) \) /x
Capturing subpattern count = 3
+Partial matching not supported
Options: extended
First char = '('
Need char = ')'
@@ -1787,10 +1874,11 @@ Need char = ')'
0: (abcd(xyz<p>qrs)123)
1: abcd(xyz<p>qrs)123
2: 123
- 3: <p>qrs
+ 3: <unset>
/\( ( ( (?>[^()]+) | ((?R)) )* ) \) /x
Capturing subpattern count = 3
+Partial matching not supported
Options: extended
First char = '('
Need char = ')'
@@ -1818,6 +1906,19 @@ Options: anchored
No first char
No need char
+/^[[:^alnum:]]/D
+------------------------------------------------------------------
+ 0 37 Bra 0
+ 3 ^
+ 4 [\x00-/:-@[-`{-\xff]
+ 37 37 Ket
+ 40 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: anchored
+No first char
+No need char
+
/^[[:alpha:]]/D
------------------------------------------------------------------
0 37 Bra 0
@@ -1830,6 +1931,19 @@ Capturing subpattern count = 0
Options: anchored
No first char
No need char
+
+/^[[:^alpha:]]/D
+------------------------------------------------------------------
+ 0 37 Bra 0
+ 3 ^
+ 4 [\x00-@[-`{-\xff]
+ 37 37 Ket
+ 40 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: anchored
+No first char
+No need char
/^[[:ascii:]]/D
------------------------------------------------------------------
@@ -1844,6 +1958,32 @@ Options: anchored
No first char
No need char
+/^[[:^ascii:]]/D
+------------------------------------------------------------------
+ 0 37 Bra 0
+ 3 ^
+ 4 [\x80-\xff]
+ 37 37 Ket
+ 40 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: anchored
+No first char
+No need char
+
+/^[[:blank:]]/D
+------------------------------------------------------------------
+ 0 37 Bra 0
+ 3 ^
+ 4 [\x09 ]
+ 37 37 Ket
+ 40 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: anchored
+No first char
+No need char
+
/^[[:cntrl:]]/D
------------------------------------------------------------------
0 37 Bra 0
@@ -1991,7 +2131,20 @@ No need char
------------------------------------------------------------------
0 37 Bra 0
3 ^
- 4 [\x00-/1-2:-\xff]
+ 4 [\x00-/12:-\xff]
+ 37 37 Ket
+ 40 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: anchored
+No first char
+No need char
+
+/^[[:^blank:]]/D
+------------------------------------------------------------------
+ 0 37 Bra 0
+ 3 ^
+ 4 [\x00-\x08\x0a-\x1f!-\xff]
37 37 Ket
40 End
------------------------------------------------------------------
@@ -2003,7 +2156,7 @@ No need char
/[01[:alpha:]%]/D
------------------------------------------------------------------
0 36 Bra 0
- 3 [%0-1A-Za-z]
+ 3 [%01A-Za-z]
36 36 Ket
39 End
------------------------------------------------------------------
@@ -2076,6 +2229,7 @@ Need char = 'd'
/(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\w+)\s+(\270)/
Capturing subpattern count = 271
Max back reference = 270
+Partial matching not supported
No options
No first char
No need char
@@ -2372,9 +2526,3082 @@ Need char = 'n'
1: main
2: O
+/These are all cases where Perl does it differently (nested captures)/
+Capturing subpattern count = 1
+No options
+First char = 'T'
+Need char = 's'
+
+/^(a(b)?)+$/
+Capturing subpattern count = 2
+Options: anchored
+No first char
+No need char
+ aba
+ 0: aba
+ 1: a
+ 2: b
+
+/^(aa(bb)?)+$/
+Capturing subpattern count = 2
+Options: anchored
+No first char
+No need char
+ aabbaa
+ 0: aabbaa
+ 1: aa
+ 2: bb
+
+/^(aa|aa(bb))+$/
+Capturing subpattern count = 2
+Options: anchored
+No first char
+No need char
+ aabbaa
+ 0: aabbaa
+ 1: aa
+ 2: bb
+
+/^(aa(bb)??)+$/
+Capturing subpattern count = 2
+Options: anchored
+No first char
+No need char
+ aabbaa
+ 0: aabbaa
+ 1: aa
+ 2: bb
+
+/^(?:aa(bb)?)+$/
+Capturing subpattern count = 1
+Options: anchored
+No first char
+No need char
+ aabbaa
+ 0: aabbaa
+ 1: bb
+
+/^(aa(b(b))?)+$/
+Capturing subpattern count = 3
+Options: anchored
+No first char
+No need char
+ aabbaa
+ 0: aabbaa
+ 1: aa
+ 2: bb
+ 3: b
+
+/^(?:aa(b(b))?)+$/
+Capturing subpattern count = 2
+Options: anchored
+No first char
+No need char
+ aabbaa
+ 0: aabbaa
+ 1: bb
+ 2: b
+
+/^(?:aa(b(?:b))?)+$/
+Capturing subpattern count = 1
+Options: anchored
+No first char
+No need char
+ aabbaa
+ 0: aabbaa
+ 1: bb
+
+/^(?:aa(bb(?:b))?)+$/
+Capturing subpattern count = 1
+Options: anchored
+No first char
+No need char
+ aabbbaa
+ 0: aabbbaa
+ 1: bbb
+
+/^(?:aa(b(?:bb))?)+$/
+Capturing subpattern count = 1
+Options: anchored
+No first char
+No need char
+ aabbbaa
+ 0: aabbbaa
+ 1: bbb
+
+/^(?:aa(?:b(b))?)+$/
+Capturing subpattern count = 1
+Options: anchored
+No first char
+No need char
+ aabbaa
+ 0: aabbaa
+ 1: b
+
+/^(?:aa(?:b(bb))?)+$/
+Capturing subpattern count = 1
+Options: anchored
+No first char
+No need char
+ aabbbaa
+ 0: aabbbaa
+ 1: bb
+
+/^(aa(b(bb))?)+$/
+Capturing subpattern count = 3
+Options: anchored
+No first char
+No need char
+ aabbbaa
+ 0: aabbbaa
+ 1: aa
+ 2: bbb
+ 3: bb
+
+/^(aa(bb(bb))?)+$/
+Capturing subpattern count = 3
+Options: anchored
+No first char
+No need char
+ aabbbbaa
+ 0: aabbbbaa
+ 1: aa
+ 2: bbbb
+ 3: bb
+
+/--------------------------------------------------------------------/
+Capturing subpattern count = 0
+No options
+First char = '-'
+Need char = '-'
+
+/#/xMD
+Memory allocation (code space): 7
+------------------------------------------------------------------
+ 0 3 Bra 0
+ 3 3 Ket
+ 6 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: extended
+No first char
+No need char
+
+/a#/xMD
+Memory allocation (code space): 9
+------------------------------------------------------------------
+ 0 5 Bra 0
+ 3 a
+ 5 5 Ket
+ 8 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: extended
+First char = 'a'
+No need char
+
+/[\s]/D
+------------------------------------------------------------------
+ 0 36 Bra 0
+ 3 [\x09\x0a\x0c\x0d ]
+ 36 36 Ket
+ 39 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+No options
+No first char
+No need char
+
+/[\S]/D
+------------------------------------------------------------------
+ 0 36 Bra 0
+ 3 [\x00-\x08\x0b\x0e-\x1f!-\xff]
+ 36 36 Ket
+ 39 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+No options
+No first char
+No need char
+
+/a(?i)b/D
+------------------------------------------------------------------
+ 0 9 Bra 0
+ 3 a
+ 5 01 Opt
+ 7 NC b
+ 9 9 Ket
+ 12 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+No options
+Case state changes
+First char = 'a'
+Need char = 'b' (caseless)
+ ab
+ 0: ab
+ aB
+ 0: aB
+ *** Failers
+No match
+ AB
+No match
+
+/(a(?i)b)/D
+------------------------------------------------------------------
+ 0 17 Bra 0
+ 3 9 Bra 1
+ 6 a
+ 8 01 Opt
+ 10 NC b
+ 12 9 Ket
+ 15 00 Opt
+ 17 17 Ket
+ 20 End
+------------------------------------------------------------------
+Capturing subpattern count = 1
+No options
+Case state changes
+First char = 'a'
+Need char = 'b' (caseless)
+ ab
+ 0: ab
+ 1: ab
+ aB
+ 0: aB
+ 1: aB
+ *** Failers
+No match
+ AB
+No match
+
+/ (?i)abc/xD
+------------------------------------------------------------------
+ 0 9 Bra 0
+ 3 NC abc
+ 9 9 Ket
+ 12 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: caseless extended
+First char = 'a' (caseless)
+Need char = 'c' (caseless)
+
+/#this is a comment
+ (?i)abc/xD
+------------------------------------------------------------------
+ 0 9 Bra 0
+ 3 NC abc
+ 9 9 Ket
+ 12 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: caseless extended
+First char = 'a' (caseless)
+Need char = 'c' (caseless)
+
+/123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890/D
+------------------------------------------------------------------
+ 0 603 Bra 0
+ 3 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+603 603 Ket
+606 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+No options
+First char = '1'
+Need char = '0'
+
+/\Q123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890/D
+------------------------------------------------------------------
+ 0 603 Bra 0
+ 3 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
+603 603 Ket
+606 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+No options
+First char = '1'
+Need char = '0'
+
+/\Q\E/D
+------------------------------------------------------------------
+ 0 3 Bra 0
+ 3 3 Ket
+ 6 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+No options
+No first char
+No need char
+ \
+ 0:
+
+/\Q\Ex/D
+------------------------------------------------------------------
+ 0 5 Bra 0
+ 3 x
+ 5 5 Ket
+ 8 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+No options
+First char = 'x'
+No need char
+
+/ \Q\E/D
+------------------------------------------------------------------
+ 0 5 Bra 0
+ 3
+ 5 5 Ket
+ 8 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+No options
+First char = ' '
+No need char
+
+/a\Q\E/D
+------------------------------------------------------------------
+ 0 5 Bra 0
+ 3 a
+ 5 5 Ket
+ 8 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+No options
+First char = 'a'
+No need char
+ abc
+ 0: a
+ bca
+ 0: a
+ bac
+ 0: a
+
+/a\Q\Eb/D
+------------------------------------------------------------------
+ 0 7 Bra 0
+ 3 ab
+ 7 7 Ket
+ 10 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+No options
+First char = 'a'
+Need char = 'b'
+ abc
+ 0: ab
+
+/\Q\Eabc/D
+------------------------------------------------------------------
+ 0 9 Bra 0
+ 3 abc
+ 9 9 Ket
+ 12 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+No options
+First char = 'a'
+Need char = 'c'
+
+/x*+\w/D
+------------------------------------------------------------------
+ 0 12 Bra 0
+ 3 5 Once
+ 6 x*
+ 8 5 Ket
+ 11 \w
+ 12 12 Ket
+ 15 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Partial matching not supported
+No options
+No first char
+No need char
+ *** Failers
+ 0: F
+ xxxxx
+No match
+
+/x?+/D
+------------------------------------------------------------------
+ 0 11 Bra 0
+ 3 5 Once
+ 6 x?
+ 8 5 Ket
+ 11 11 Ket
+ 14 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+No options
+No first char
+No need char
+
+/x++/D
+------------------------------------------------------------------
+ 0 11 Bra 0
+ 3 5 Once
+ 6 x+
+ 8 5 Ket
+ 11 11 Ket
+ 14 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Partial matching not supported
+No options
+First char = 'x'
+No need char
+
+/x{1,3}+/D
+------------------------------------------------------------------
+ 0 15 Bra 0
+ 3 9 Once
+ 6 x
+ 8 x{,2}
+ 12 9 Ket
+ 15 15 Ket
+ 18 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Partial matching not supported
+No options
+First char = 'x'
+No need char
+
+/(x)*+/D
+------------------------------------------------------------------
+ 0 18 Bra 0
+ 3 12 Once
+ 6 Brazero
+ 7 5 Bra 1
+ 10 x
+ 12 5 KetRmax
+ 15 12 Ket
+ 18 18 Ket
+ 21 End
+------------------------------------------------------------------
+Capturing subpattern count = 1
+No options
+No first char
+No need char
+
+/^(\w++|\s++)*$/
+Capturing subpattern count = 1
+Partial matching not supported
+Options: anchored
+No first char
+No need char
+ now is the time for all good men to come to the aid of the party
+ 0: now is the time for all good men to come to the aid of the party
+ 1: party
+ *** Failers
+No match
+ this is not a line with only words and spaces!
+No match
+
+/(\d++)(\w)/
+Capturing subpattern count = 2
+Partial matching not supported
+No options
+No first char
+No need char
+ 12345a
+ 0: 12345a
+ 1: 12345
+ 2: a
+ *** Failers
+No match
+ 12345+
+No match
+
+/a++b/
+Capturing subpattern count = 0
+Partial matching not supported
+No options
+First char = 'a'
+Need char = 'b'
+ aaab
+ 0: aaab
+
+/(a++b)/
+Capturing subpattern count = 1
+Partial matching not supported
+No options
+First char = 'a'
+Need char = 'b'
+ aaab
+ 0: aaab
+ 1: aaab
+
+/(a++)b/
+Capturing subpattern count = 1
+Partial matching not supported
+No options
+First char = 'a'
+Need char = 'b'
+ aaab
+ 0: aaab
+ 1: aaa
+
+/([^()]++|\([^()]*\))+/
+Capturing subpattern count = 1
+Partial matching not supported
+No options
+No first char
+No need char
+ ((abc(ade)ufh()()x
+ 0: abc(ade)ufh()()x
+ 1: x
+
+/\(([^()]++|\([^()]+\))+\)/
+Capturing subpattern count = 1
+Partial matching not supported
+No options
+First char = '('
+Need char = ')'
+ (abc)
+ 0: (abc)
+ 1: abc
+ (abc(def)xyz)
+ 0: (abc(def)xyz)
+ 1: xyz
+ *** Failers
+No match
+ ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+No match
+
+/(abc){1,3}+/D
+------------------------------------------------------------------
+ 0 53 Bra 0
+ 3 47 Once
+ 6 9 Bra 1
+ 9 abc
+ 15 9 Ket
+ 18 Brazero
+ 19 28 Bra 0
+ 22 9 Bra 1
+ 25 abc
+ 31 9 Ket
+ 34 Brazero
+ 35 9 Bra 1
+ 38 abc
+ 44 9 Ket
+ 47 28 Ket
+ 50 47 Ket
+ 53 53 Ket
+ 56 End
+------------------------------------------------------------------
+Capturing subpattern count = 1
+No options
+First char = 'a'
+Need char = 'c'
+
+/a+?+/
+Failed: nothing to repeat at offset 3
+
+/a{2,3}?+b/
+Failed: nothing to repeat at offset 7
+
+/(?U)a+?+/
+Failed: nothing to repeat at offset 7
+
+/a{2,3}?+b/U
+Failed: nothing to repeat at offset 7
+
+/x(?U)a++b/D
+------------------------------------------------------------------
+ 0 15 Bra 0
+ 3 x
+ 5 5 Once
+ 8 a+
+ 10 5 Ket
+ 13 b
+ 15 15 Ket
+ 18 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Partial matching not supported
+No options
+First char = 'x'
+Need char = 'b'
+ xaaaab
+ 0: xaaaab
+
+/(?U)xa++b/D
+------------------------------------------------------------------
+ 0 15 Bra 0
+ 3 x
+ 5 5 Once
+ 8 a+
+ 10 5 Ket
+ 13 b
+ 15 15 Ket
+ 18 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Partial matching not supported
+Options: ungreedy
+First char = 'x'
+Need char = 'b'
+ xaaaab
+ 0: xaaaab
+
+/^((a+)(?U)([ab]+)(?-U)([bc]+)(\w*))/D
+------------------------------------------------------------------
+ 0 106 Bra 0
+ 3 ^
+ 4 99 Bra 1
+ 7 5 Bra 2
+ 10 a+
+ 12 5 Ket
+ 15 37 Bra 3
+ 18 [ab]+?
+ 52 37 Ket
+ 55 37 Bra 4
+ 58 [bc]+
+ 92 37 Ket
+ 95 5 Bra 5
+ 98 \w*
+100 5 Ket
+103 99 Ket
+106 106 Ket
+109 End
+------------------------------------------------------------------
+Capturing subpattern count = 5
+Partial matching not supported
+Options: anchored
+No first char
+No need char
+
+/^x(?U)a+b/D
+------------------------------------------------------------------
+ 0 10 Bra 0
+ 3 ^
+ 4 x
+ 6 a+?
+ 8 b
+ 10 10 Ket
+ 13 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Partial matching not supported
+Options: anchored
+No first char
+Need char = 'b'
+
+/^x(?U)(a+)b/D
+------------------------------------------------------------------
+ 0 16 Bra 0
+ 3 ^
+ 4 x
+ 6 5 Bra 1
+ 9 a+?
+ 11 5 Ket
+ 14 b
+ 16 16 Ket
+ 19 End
+------------------------------------------------------------------
+Capturing subpattern count = 1
+Partial matching not supported
+Options: anchored
+No first char
+Need char = 'b'
+
+/[.x.]/
+Failed: POSIX collating elements are not supported at offset 0
+
+/[=x=]/
+Failed: POSIX collating elements are not supported at offset 0
+
+/[:x:]/
+Failed: POSIX named classes are supported only within a class at offset 0
+
+/\l/
+Failed: PCRE does not support \L, \l, \N, \U, or \u at offset 1
+
+/\L/
+Failed: PCRE does not support \L, \l, \N, \U, or \u at offset 1
+
+/\N{name}/
+Failed: PCRE does not support \L, \l, \N, \U, or \u at offset 1
+
+/\u/
+Failed: PCRE does not support \L, \l, \N, \U, or \u at offset 1
+
+/\U/
+Failed: PCRE does not support \L, \l, \N, \U, or \u at offset 1
+
+/[/
+Failed: missing terminating ] for character class at offset 1
+
+/[a-/
+Failed: missing terminating ] for character class at offset 3
+
+/[[:space:]/
+Failed: missing terminating ] for character class at offset 10
+
+/[\s]/DM
+Memory allocation (code space): 40
+------------------------------------------------------------------
+ 0 36 Bra 0
+ 3 [\x09\x0a\x0c\x0d ]
+ 36 36 Ket
+ 39 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+No options
+No first char
+No need char
+
+/[[:space:]]/DM
+Memory allocation (code space): 40
+------------------------------------------------------------------
+ 0 36 Bra 0
+ 3 [\x09-\x0d ]
+ 36 36 Ket
+ 39 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+No options
+No first char
+No need char
+
+/[[:space:]abcde]/DM
+Memory allocation (code space): 40
+------------------------------------------------------------------
+ 0 36 Bra 0
+ 3 [\x09-\x0d a-e]
+ 36 36 Ket
+ 39 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+No options
+No first char
+No need char
+
+/< (?: (?(R) \d++ | [^<>]*+) | (?R)) * >/x
+Capturing subpattern count = 0
+Partial matching not supported
+Options: extended
+First char = '<'
+Need char = '>'
+ <>
+ 0: <>
+ <abcd>
+ 0: <abcd>
+ <abc <123> hij>
+ 0: <abc <123> hij>
+ <abc <def> hij>
+ 0: <def>
+ <abc<>def>
+ 0: <abc<>def>
+ <abc<>
+ 0: <>
+ *** Failers
+No match
+ <abc
+No match
+
+|8J\$WE\<\.rX\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\<EjmhUZ\?\.akp2dF\>qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b|DM
+Memory allocation (code space): 826
+------------------------------------------------------------------
+ 0 822 Bra 0
+ 3 8J$WE<.rX+ix[d1b!H#?vV0vrK:ZH1=2M>iV;?aPhFB<*vW@QW@sO9}cfZA-i'w%hKd6gt1UJP,15_#QY$M^Mss_U/]&LK9[5vQub^w[KDD<EjmhUZ?.akp2dF>qmj;2}YWFdYx.Ap]hjCPTP(n28k+3;o&WXqs/gOXdr$:r'do0;b4c(f_Gr="\4)[01T7ajQJvL$W~mL_sS/4h:x*[ZN=KLs&L5zX//>it,o:aU(;Z>pW&T7oP'2K^E:x9'c[%z-,64JQ5AeH_G#KijUKghQw^\vea3a?kka_G$8#`*kynsxzBLru']k_[7FrVx}^=$blx>s-N%j;D*aZDnsw:YKZ%Q.Kne9#hP?+b3(SOvL,^;&u5@?5C5Bhb=m-vEh_L15Jl]U)0RP6{q%L^_z5E'Dw6X
+821 \b
+822 822 Ket
+825 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+No options
+First char = '8'
+Need char = 'X'
+
+|\$\<\.X\+ix\[d1b\!H\#\?vV0vrK\:ZH1\=2M\>iV\;\?aPhFB\<\*vW\@QW\@sO9\}cfZA\-i\'w\%hKd6gt1UJP\,15_\#QY\$M\^Mss_U\/\]\&LK9\[5vQub\^w\[KDD\<EjmhUZ\?\.akp2dF\>qmj\;2\}YWFdYx\.Ap\]hjCPTP\(n28k\+3\;o\&WXqs\/gOXdr\$\:r\'do0\;b4c\(f_Gr\=\"\\4\)\[01T7ajQJvL\$W\~mL_sS\/4h\:x\*\[ZN\=KLs\&L5zX\/\/\>it\,o\:aU\(\;Z\>pW\&T7oP\'2K\^E\:x9\'c\[\%z\-\,64JQ5AeH_G\#KijUKghQw\^\\vea3a\?kka_G\$8\#\`\*kynsxzBLru\'\]k_\[7FrVx\}\^\=\$blx\>s\-N\%j\;D\*aZDnsw\:YKZ\%Q\.Kne9\#hP\?\+b3\(SOvL\,\^\;\&u5\@\?5C5Bhb\=m\-vEh_L15Jl\]U\)0RP6\{q\%L\^_z5E\'Dw6X\b|DM
+Memory allocation (code space): 816
+------------------------------------------------------------------
+ 0 812 Bra 0
+ 3 $<.X+ix[d1b!H#?vV0vrK:ZH1=2M>iV;?aPhFB<*vW@QW@sO9}cfZA-i'w%hKd6gt1UJP,15_#QY$M^Mss_U/]&LK9[5vQub^w[KDD<EjmhUZ?.akp2dF>qmj;2}YWFdYx.Ap]hjCPTP(n28k+3;o&WXqs/gOXdr$:r'do0;b4c(f_Gr="\4)[01T7ajQJvL$W~mL_sS/4h:x*[ZN=KLs&L5zX//>it,o:aU(;Z>pW&T7oP'2K^E:x9'c[%z-,64JQ5AeH_G#KijUKghQw^\vea3a?kka_G$8#`*kynsxzBLru']k_[7FrVx}^=$blx>s-N%j;D*aZDnsw:YKZ%Q.Kne9#hP?+b3(SOvL,^;&u5@?5C5Bhb=m-vEh_L15Jl]U)0RP6{q%L^_z5E'Dw6X
+811 \b
+812 812 Ket
+815 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+No options
+First char = '$'
+Need char = 'X'
+
+/(.*)\d+\1/I
+Capturing subpattern count = 1
+Max back reference = 1
+Partial matching not supported
+No options
+No first char
+No need char
+
+/(.*)\d+/I
+Capturing subpattern count = 1
+Partial matching not supported
+No options
+First char at start or follows \n
+No need char
+
+/(.*)\d+\1/Is
+Capturing subpattern count = 1
+Max back reference = 1
+Partial matching not supported
+Options: dotall
+No first char
+No need char
+
+/(.*)\d+/Is
+Capturing subpattern count = 1
+Partial matching not supported
+Options: anchored dotall
+No first char
+No need char
+
+/(.*(xyz))\d+\2/I
+Capturing subpattern count = 2
+Max back reference = 2
+Partial matching not supported
+No options
+First char at start or follows \n
+Need char = 'z'
+
+/((.*))\d+\1/I
+Capturing subpattern count = 2
+Max back reference = 1
+Partial matching not supported
+No options
+No first char
+No need char
+ abc123bc
+ 0: bc123bc
+ 1: bc
+ 2: bc
+
+/a[b]/I
+Capturing subpattern count = 0
+No options
+First char = 'a'
+Need char = 'b'
+
+/(?=a).*/I
+Capturing subpattern count = 0
+Partial matching not supported
+No options
+First char = 'a'
+No need char
+
+/(?=abc).xyz/iI
+Capturing subpattern count = 0
+Options: caseless
+First char = 'a' (caseless)
+Need char = 'z' (caseless)
+
+/(?=abc)(?i).xyz/I
+Capturing subpattern count = 0
+No options
+Case state changes
+First char = 'a'
+Need char = 'z' (caseless)
+
+/(?=a)(?=b)/I
+Capturing subpattern count = 0
+No options
+First char = 'a'
+No need char
+
+/(?=.)a/I
+Capturing subpattern count = 0
+No options
+First char = 'a'
+No need char
+
+/((?=abcda)a)/I
+Capturing subpattern count = 1
+No options
+First char = 'a'
+Need char = 'a'
+
+/((?=abcda)ab)/I
+Capturing subpattern count = 1
+No options
+First char = 'a'
+Need char = 'b'
+
+/()a/I
+Capturing subpattern count = 1
+No options
+No first char
+Need char = 'a'
+
+/(?(1)ab|ac)/I
+Capturing subpattern count = 0
+No options
+First char = 'a'
+No need char
+
+/(?(1)abz|acz)/I
+Capturing subpattern count = 0
+No options
+First char = 'a'
+Need char = 'z'
+
+/(?(1)abz)/I
+Capturing subpattern count = 0
+No options
+No first char
+No need char
+
+/(?(1)abz)123/I
+Capturing subpattern count = 0
+No options
+No first char
+Need char = '3'
+
+/(a)+/I
+Capturing subpattern count = 1
+No options
+First char = 'a'
+No need char
+
+/(a){2,3}/I
+Capturing subpattern count = 1
+No options
+First char = 'a'
+Need char = 'a'
+
+/(a)*/I
+Capturing subpattern count = 1
+No options
+No first char
+No need char
+
+/[a]/I
+Capturing subpattern count = 0
+No options
+First char = 'a'
+No need char
+
+/[ab]/I
+Capturing subpattern count = 0
+No options
+No first char
+No need char
+
+/[ab]/IS
+Capturing subpattern count = 0
+No options
+No first char
+No need char
+Starting byte set: a b
+
+/[^a]/I
+Capturing subpattern count = 0
+No options
+No first char
+No need char
+
+/\d456/I
+Capturing subpattern count = 0
+No options
+No first char
+Need char = '6'
+
+/\d456/IS
+Capturing subpattern count = 0
+No options
+No first char
+Need char = '6'
+Starting byte set: 0 1 2 3 4 5 6 7 8 9
+
+/a^b/I
+Capturing subpattern count = 0
+No options
+First char = 'a'
+Need char = 'b'
+
+/^a/mI
+Capturing subpattern count = 0
+Options: multiline
+First char at start or follows \n
+Need char = 'a'
+ abcde
+ 0: a
+ xy\nabc
+ 0: a
+ *** Failers
+No match
+ xyabc
+No match
+
+/c|abc/I
+Capturing subpattern count = 0
+No options
+No first char
+Need char = 'c'
+
+/(?i)[ab]/IS
+Capturing subpattern count = 0
+Options: caseless
+No first char
+No need char
+Starting byte set: A B a b
+
+/[ab](?i)cd/IS
+Capturing subpattern count = 0
+No options
+Case state changes
+No first char
+Need char = 'd' (caseless)
+Starting byte set: a b
+
+/abc(?C)def/
+Capturing subpattern count = 0
+No options
+First char = 'a'
+Need char = 'f'
+ abcdef
+--->abcdef
+ 0 ^ ^ d
+ 0: abcdef
+ 1234abcdef
+--->1234abcdef
+ 0 ^ ^ d
+ 0: abcdef
+ *** Failers
+No match
+ abcxyz
+No match
+ abcxyzf
+--->abcxyzf
+ 0 ^ ^ d
+No match
+
+/abc(?C)de(?C1)f/
+Capturing subpattern count = 0
+No options
+First char = 'a'
+Need char = 'f'
+ 123abcdef
+--->123abcdef
+ 0 ^ ^ d
+ 1 ^ ^ f
+ 0: abcdef
+
+/(?C1)\dabc(?C2)def/
+Capturing subpattern count = 0
+No options
+No first char
+Need char = 'f'
+ 1234abcdef
+--->1234abcdef
+ 1 ^ \d
+ 1 ^ \d
+ 1 ^ \d
+ 1 ^ \d
+ 2 ^ ^ d
+ 0: 4abcdef
+ *** Failers
+No match
+ abcdef
+--->abcdef
+ 1 ^ \d
+ 1 ^ \d
+ 1 ^ \d
+ 1 ^ \d
+ 1 ^ \d
+ 1 ^ \d
+No match
+
+/(?C255)ab/
+Capturing subpattern count = 0
+No options
+First char = 'a'
+Need char = 'b'
+
+/(?C256)ab/
+Failed: number after (?C is > 255 at offset 6
+
+/(?Cab)xx/
+Failed: closing ) for (?C expected at offset 3
+
+/(?C12vr)x/
+Failed: closing ) for (?C expected at offset 5
+
+/abc(?C)def/
+Capturing subpattern count = 0
+No options
+First char = 'a'
+Need char = 'f'
+ *** Failers
+No match
+ \x83\x0\x61bcdef
+--->\x83\x00abcdef
+ 0 ^ ^ d
+ 0: abcdef
+
+/(abc)(?C)de(?C1)f/
+Capturing subpattern count = 1
+No options
+First char = 'a'
+Need char = 'f'
+ 123abcdef
+--->123abcdef
+ 0 ^ ^ d
+ 1 ^ ^ f
+ 0: abcdef
+ 1: abc
+ 123abcdef\C+
+Callout 0: last capture = 1
+ 0: <unset>
+ 1: abc
+--->123abcdef
+ ^ ^ d
+Callout 1: last capture = 1
+ 0: <unset>
+ 1: abc
+--->123abcdef
+ ^ ^ f
+ 0: abcdef
+ 1: abc
+ 123abcdef\C-
+ 0: abcdef
+ 1: abc
+ *** Failers
+No match
+ 123abcdef\C!1
+--->123abcdef
+ 0 ^ ^ d
+ 1 ^ ^ f
+No match
+
+/(?C0)(abc(?C1))*/
+Capturing subpattern count = 1
+No options
+No first char
+No need char
+ abcabcabc
+--->abcabcabc
+ 0 ^ (abc(?C1))*
+ 1 ^ ^ )
+ 1 ^ ^ )
+ 1 ^ ^ )
+ 0: abcabcabc
+ 1: abc
+ abcabc\C!1!3
+--->abcabc
+ 0 ^ (abc(?C1))*
+ 1 ^ ^ )
+ 1 ^ ^ )
+ 0: abcabc
+ 1: abc
+ *** Failers
+--->*** Failers
+ 0 ^ (abc(?C1))*
+ 0:
+ abcabcabc\C!1!3
+--->abcabcabc
+ 0 ^ (abc(?C1))*
+ 1 ^ ^ )
+ 1 ^ ^ )
+ 1 ^ ^ )
+ 0: abcabc
+ 1: abc
+
+/(\d{3}(?C))*/
+Capturing subpattern count = 1
+Partial matching not supported
+No options
+No first char
+No need char
+ 123\C+
+Callout 0: last capture = -1
+ 0: <unset>
+--->123
+ ^ ^ )
+ 0: 123
+ 1: 123
+ 123456\C+
+Callout 0: last capture = -1
+ 0: <unset>
+--->123456
+ ^ ^ )
+Callout 0: last capture = 1
+ 0: <unset>
+ 1: 123
+--->123456
+ ^ ^ )
+ 0: 123456
+ 1: 456
+ 123456789\C+
+Callout 0: last capture = -1
+ 0: <unset>
+--->123456789
+ ^ ^ )
+Callout 0: last capture = 1
+ 0: <unset>
+ 1: 123
+--->123456789
+ ^ ^ )
+Callout 0: last capture = 1
+ 0: <unset>
+ 1: 456
+--->123456789
+ ^ ^ )
+ 0: 123456789
+ 1: 789
+
+/((xyz)(?C)p|(?C1)xyzabc)/
+Capturing subpattern count = 2
+No options
+First char = 'x'
+No need char
+ xyzabc\C+
+Callout 0: last capture = 2
+ 0: <unset>
+ 1: <unset>
+ 2: xyz
+--->xyzabc
+ ^ ^ p
+Callout 1: last capture = -1
+ 0: <unset>
+--->xyzabc
+ ^ x
+ 0: xyzabc
+ 1: xyzabc
+
+/(X)((xyz)(?C)p|(?C1)xyzabc)/
+Capturing subpattern count = 3
+No options
+First char = 'X'
+Need char = 'x'
+ Xxyzabc\C+
+Callout 0: last capture = 3
+ 0: <unset>
+ 1: X
+ 2: <unset>
+ 3: xyz
+--->Xxyzabc
+ ^ ^ p
+Callout 1: last capture = 1
+ 0: <unset>
+ 1: X
+--->Xxyzabc
+ ^^ x
+ 0: Xxyzabc
+ 1: X
+ 2: xyzabc
+
+/(?=(abc))(?C)abcdef/
+Capturing subpattern count = 1
+No options
+First char = 'a'
+Need char = 'f'
+ abcdef\C+
+Callout 0: last capture = 1
+ 0: <unset>
+ 1: abc
+--->abcdef
+ ^ a
+ 0: abcdef
+ 1: abc
+
+/(?!(abc)(?C1)d)(?C2)abcxyz/
+Capturing subpattern count = 1
+No options
+First char = 'a'
+Need char = 'z'
+ abcxyz\C+
+Callout 1: last capture = 1
+ 0: <unset>
+ 1: abc
+--->abcxyz
+ ^ ^ d
+Callout 2: last capture = -1
+ 0: <unset>
+--->abcxyz
+ ^ a
+ 0: abcxyz
+
+/(?<=(abc)(?C))xyz/
+Capturing subpattern count = 1
+No options
+First char = 'x'
+Need char = 'z'
+ abcxyz\C+
+Callout 0: last capture = 1
+ 0: <unset>
+ 1: abc
+--->abcxyz
+ ^ )
+ 0: xyz
+ 1: abc
+
+/(?C)abc/
+Capturing subpattern count = 0
+No options
+First char = 'a'
+Need char = 'c'
+
+/(?C)^abc/
+Capturing subpattern count = 0
+Options: anchored
+No first char
+No need char
+
+/(?C)a|b/S
+Capturing subpattern count = 0
+No options
+No first char
+No need char
+Starting byte set: a b
+
+/(?R)/
+Failed: recursive call could loop indefinitely at offset 3
+
+/(a|(?R))/
+Failed: recursive call could loop indefinitely at offset 6
+
+/(ab|(bc|(de|(?R))))/
+Failed: recursive call could loop indefinitely at offset 15
+
+/x(ab|(bc|(de|(?R))))/
+Capturing subpattern count = 3
+No options
+First char = 'x'
+No need char
+ xab
+ 0: xab
+ 1: ab
+ xbc
+ 0: xbc
+ 1: bc
+ 2: bc
+ xde
+ 0: xde
+ 1: de
+ 2: de
+ 3: de
+ xxab
+ 0: xxab
+ 1: xab
+ 2: xab
+ 3: xab
+ xxxab
+ 0: xxxab
+ 1: xxab
+ 2: xxab
+ 3: xxab
+ *** Failers
+No match
+ xyab
+No match
+
+/(ab|(bc|(de|(?1))))/
+Failed: recursive call could loop indefinitely at offset 15
+
+/x(ab|(bc|(de|(?1)x)x)x)/
+Failed: recursive call could loop indefinitely at offset 16
+
+/^([^()]|\((?1)*\))*$/
+Capturing subpattern count = 1
+Options: anchored
+No first char
+No need char
+ abc
+ 0: abc
+ 1: c
+ a(b)c
+ 0: a(b)c
+ 1: c
+ a(b(c))d
+ 0: a(b(c))d
+ 1: d
+ *** Failers)
+No match
+ a(b(c)d
+No match
+
+/^>abc>([^()]|\((?1)*\))*<xyz<$/
+Capturing subpattern count = 1
+Options: anchored
+No first char
+Need char = '<'
+ >abc>123<xyz<
+ 0: >abc>123<xyz<
+ 1: 3
+ >abc>1(2)3<xyz<
+ 0: >abc>1(2)3<xyz<
+ 1: 3
+ >abc>(1(2)3)<xyz<
+ 0: >abc>(1(2)3)<xyz<
+ 1: (1(2)3)
+
+/(a(?1)b)/D
+------------------------------------------------------------------
+ 0 16 Bra 0
+ 3 10 Bra 1
+ 6 a
+ 8 3 Recurse
+ 11 b
+ 13 10 Ket
+ 16 16 Ket
+ 19 End
+------------------------------------------------------------------
+Capturing subpattern count = 1
+No options
+First char = 'a'
+Need char = 'b'
+
+/(a(?1)+b)/D
+------------------------------------------------------------------
+ 0 22 Bra 0
+ 3 16 Bra 1
+ 6 a
+ 8 6 Bra 0
+ 11 3 Recurse
+ 14 6 KetRmax
+ 17 b
+ 19 16 Ket
+ 22 22 Ket
+ 25 End
+------------------------------------------------------------------
+Capturing subpattern count = 1
+No options
+First char = 'a'
+Need char = 'b'
+
+/^\W*(?:((.)\W*(?1)\W*\2|)|((.)\W*(?3)\W*\4|\W*.\W*))\W*$/i
+Capturing subpattern count = 4
+Max back reference = 4
+Partial matching not supported
+Options: anchored caseless
+No first char
+No need char
+ 1221
+ 0: 1221
+ 1: 1221
+ 2: 1
+ Satan, oscillate my metallic sonatas!
+ 0: Satan, oscillate my metallic sonatas!
+ 1: <unset>
+ 2: <unset>
+ 3: Satan, oscillate my metallic sonatas
+ 4: S
+ A man, a plan, a canal: Panama!
+ 0: A man, a plan, a canal: Panama!
+ 1: <unset>
+ 2: <unset>
+ 3: A man, a plan, a canal: Panama
+ 4: A
+ Able was I ere I saw Elba.
+ 0: Able was I ere I saw Elba.
+ 1: <unset>
+ 2: <unset>
+ 3: Able was I ere I saw Elba
+ 4: A
+ *** Failers
+No match
+ The quick brown fox
+No match
+
+/^(\d+|\((?1)([+*-])(?1)\)|-(?1))$/
+Capturing subpattern count = 2
+Partial matching not supported
+Options: anchored
+No first char
+No need char
+ 12
+ 0: 12
+ 1: 12
+ (((2+2)*-3)-7)
+ 0: (((2+2)*-3)-7)
+ 1: (((2+2)*-3)-7)
+ 2: -
+ -12
+ 0: -12
+ 1: -12
+ *** Failers
+No match
+ ((2+2)*-3)-7)
+No match
+
+/^(x(y|(?1){2})z)/
+Capturing subpattern count = 2
+Options: anchored
+No first char
+No need char
+ xyz
+ 0: xyz
+ 1: xyz
+ 2: y
+ xxyzxyzz
+ 0: xxyzxyzz
+ 1: xxyzxyzz
+ 2: xyzxyz
+ *** Failers
+No match
+ xxyzz
+No match
+ xxyzxyzxyzz
+No match
+
+/((< (?: (?(R) \d++ | [^<>]*+) | (?2)) * >))/x
+Capturing subpattern count = 2
+Partial matching not supported
+Options: extended
+First char = '<'
+Need char = '>'
+ <>
+ 0: <>
+ 1: <>
+ 2: <>
+ <abcd>
+ 0: <abcd>
+ 1: <abcd>
+ 2: <abcd>
+ <abc <123> hij>
+ 0: <abc <123> hij>
+ 1: <abc <123> hij>
+ 2: <abc <123> hij>
+ <abc <def> hij>
+ 0: <def>
+ 1: <def>
+ 2: <def>
+ <abc<>def>
+ 0: <abc<>def>
+ 1: <abc<>def>
+ 2: <abc<>def>
+ <abc<>
+ 0: <>
+ 1: <>
+ 2: <>
+ *** Failers
+No match
+ <abc
+No match
+
+/(?1)/
+Failed: reference to non-existent subpattern at offset 3
+
+/((?2)(abc)/
+Failed: reference to non-existent subpattern at offset 4
+
+/^(abc)def(?1)/
+Capturing subpattern count = 1
+Options: anchored
+No first char
+No need char
+ abcdefabc
+ 0: abcdefabc
+ 1: abc
+
+/^(a|b|c)=(?1)+/
+Capturing subpattern count = 1
+Options: anchored
+No first char
+No need char
+ a=a
+ 0: a=a
+ 1: a
+ a=b
+ 0: a=b
+ 1: a
+ a=bc
+ 0: a=bc
+ 1: a
+
+/^(a|b|c)=((?1))+/
+Capturing subpattern count = 2
+Options: anchored
+No first char
+No need char
+ a=a
+ 0: a=a
+ 1: a
+ 2: a
+ a=b
+ 0: a=b
+ 1: a
+ 2: b
+ a=bc
+ 0: a=bc
+ 1: a
+ 2: c
+
+/a(?P<name1>b|c)d(?P<longername2>e)/D
+------------------------------------------------------------------
+ 0 28 Bra 0
+ 3 a
+ 5 5 Bra 1
+ 8 b
+ 10 5 Alt
+ 13 c
+ 15 10 Ket
+ 18 d
+ 20 5 Bra 2
+ 23 e
+ 25 5 Ket
+ 28 28 Ket
+ 31 End
+------------------------------------------------------------------
+Capturing subpattern count = 2
+Named capturing subpatterns:
+ longername2 2
+ name1 1
+No options
+First char = 'a'
+Need char = 'e'
+ abde
+ 0: abde
+ 1: b
+ 2: e
+ acde
+ 0: acde
+ 1: c
+ 2: e
+
+/(?:a(?P<c>c(?P<d>d)))(?P<a>a)/D
+------------------------------------------------------------------
+ 0 35 Bra 0
+ 3 21 Bra 0
+ 6 a
+ 8 13 Bra 1
+ 11 c
+ 13 5 Bra 2
+ 16 d
+ 18 5 Ket
+ 21 13 Ket
+ 24 21 Ket
+ 27 5 Bra 3
+ 30 a
+ 32 5 Ket
+ 35 35 Ket
+ 38 End
+------------------------------------------------------------------
+Capturing subpattern count = 3
+Named capturing subpatterns:
+ a 3
+ c 1
+ d 2
+No options
+First char = 'a'
+Need char = 'a'
+
+/(?P<a>a)...(?P=a)bbb(?P>a)d/D
+------------------------------------------------------------------
+ 0 28 Bra 0
+ 3 5 Bra 1
+ 6 a
+ 8 5 Ket
+ 11 Any
+ 12 Any
+ 13 Any
+ 14 \1
+ 17 bbb
+ 23 3 Recurse
+ 26 d
+ 28 28 Ket
+ 31 End
+------------------------------------------------------------------
+Capturing subpattern count = 1
+Max back reference = 1
+Named capturing subpatterns:
+ a 1
+No options
+First char = 'a'
+Need char = 'd'
+
+/^\W*(?:(?P<one>(?P<two>.)\W*(?P>one)\W*(?P=two)|)|(?P<three>(?P<four>.)\W*(?P>three)\W*(?P=four)|\W*.\W*))\W*$/i
+Capturing subpattern count = 4
+Max back reference = 4
+Named capturing subpatterns:
+ four 4
+ one 1
+ three 3
+ two 2
+Partial matching not supported
+Options: anchored caseless
+No first char
+No need char
+ 1221
+ 0: 1221
+ 1: 1221
+ 2: 1
+ Satan, oscillate my metallic sonatas!
+ 0: Satan, oscillate my metallic sonatas!
+ 1: <unset>
+ 2: <unset>
+ 3: Satan, oscillate my metallic sonatas
+ 4: S
+ A man, a plan, a canal: Panama!
+ 0: A man, a plan, a canal: Panama!
+ 1: <unset>
+ 2: <unset>
+ 3: A man, a plan, a canal: Panama
+ 4: A
+ Able was I ere I saw Elba.
+ 0: Able was I ere I saw Elba.
+ 1: <unset>
+ 2: <unset>
+ 3: Able was I ere I saw Elba
+ 4: A
+ *** Failers
+No match
+ The quick brown fox
+No match
+
+/((?(R)a|b))\1(?1)?/
+Capturing subpattern count = 1
+Max back reference = 1
+No options
+No first char
+No need char
+ bb
+ 0: bb
+ 1: b
+ bbaa
+ 0: bba
+ 1: b
+
+/(.*)a/sI
+Capturing subpattern count = 1
+Partial matching not supported
+Options: anchored dotall
+No first char
+Need char = 'a'
+
+/(.*)a\1/sI
+Capturing subpattern count = 1
+Max back reference = 1
+Partial matching not supported
+Options: dotall
+No first char
+Need char = 'a'
+
+/(.*)a(b)\2/sI
+Capturing subpattern count = 2
+Max back reference = 2
+Partial matching not supported
+Options: anchored dotall
+No first char
+Need char = 'b'
+
+/((.*)a|(.*)b)z/sI
+Capturing subpattern count = 3
+Partial matching not supported
+Options: anchored dotall
+No first char
+Need char = 'z'
+
+/((.*)a|(.*)b)z\1/sI
+Capturing subpattern count = 3
+Max back reference = 1
+Partial matching not supported
+Options: dotall
+No first char
+Need char = 'z'
+
+/((.*)a|(.*)b)z\2/sI
+Capturing subpattern count = 3
+Max back reference = 2
+Partial matching not supported
+Options: dotall
+No first char
+Need char = 'z'
+
+/((.*)a|(.*)b)z\3/sI
+Capturing subpattern count = 3
+Max back reference = 3
+Partial matching not supported
+Options: dotall
+No first char
+Need char = 'z'
+
+/((.*)a|^(.*)b)z\3/sI
+Capturing subpattern count = 3
+Max back reference = 3
+Partial matching not supported
+Options: anchored dotall
+No first char
+Need char = 'z'
+
+/(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a/sI
+Capturing subpattern count = 31
+Partial matching not supported
+Options: anchored dotall
+No first char
+No need char
+
+/(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a\31/sI
+Capturing subpattern count = 31
+Max back reference = 31
+Partial matching not supported
+Options: dotall
+No first char
+No need char
+
+/(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a\32/sI
+Capturing subpattern count = 32
+Max back reference = 32
+Partial matching not supported
+Options: dotall
+No first char
+No need char
+
+/(a)(bc)/ND
+------------------------------------------------------------------
+ 0 21 Bra 0
+ 3 5 Bra 0
+ 6 a
+ 8 5 Ket
+ 11 7 Bra 0
+ 14 bc
+ 18 7 Ket
+ 21 21 Ket
+ 24 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options:
+First char = 'a'
+Need char = 'c'
+ abc
+ 0: abc
+
+/(?P<one>a)(bc)/ND
+------------------------------------------------------------------
+ 0 21 Bra 0
+ 3 5 Bra 1
+ 6 a
+ 8 5 Ket
+ 11 7 Bra 0
+ 14 bc
+ 18 7 Ket
+ 21 21 Ket
+ 24 End
+------------------------------------------------------------------
+Capturing subpattern count = 1
+Named capturing subpatterns:
+ one 1
+Options:
+First char = 'a'
+Need char = 'c'
+ abc
+ 0: abc
+ 1: a
+
+/(a)(?P<named>bc)/ND
+------------------------------------------------------------------
+ 0 21 Bra 0
+ 3 5 Bra 0
+ 6 a
+ 8 5 Ket
+ 11 7 Bra 1
+ 14 bc
+ 18 7 Ket
+ 21 21 Ket
+ 24 End
+------------------------------------------------------------------
+Capturing subpattern count = 1
+Named capturing subpatterns:
+ named 1
+Options:
+First char = 'a'
+Need char = 'c'
+
+/(a+)*zz/
+Capturing subpattern count = 1
+Partial matching not supported
+No options
+No first char
+Need char = 'z'
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaazzbbbbbb\M
+Minimum match limit = 8
+ 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaazz
+ 1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ aaaaaaaaaaaaaz\M
+Minimum match limit = 32768
+No match
+
+/(aaa(?C1)bbb|ab)/
+Capturing subpattern count = 1
+No options
+First char = 'a'
+Need char = 'b'
+ aaabbb
+--->aaabbb
+ 1 ^ ^ b
+ 0: aaabbb
+ 1: aaabbb
+ aaabbb\C*0
+--->aaabbb
+ 1 ^ ^ b
+ 0: aaabbb
+ 1: aaabbb
+ aaabbb\C*1
+--->aaabbb
+ 1 ^ ^ b
+Callout data = 1
+ 0: ab
+ 1: ab
+ aaabbb\C*-1
+--->aaabbb
+ 1 ^ ^ b
+Callout data = -1
+No match
+
+/ab(?P<one>cd)ef(?P<two>gh)/
+Capturing subpattern count = 2
+Named capturing subpatterns:
+ one 1
+ two 2
+No options
+First char = 'a'
+Need char = 'h'
+ abcdefgh
+ 0: abcdefgh
+ 1: cd
+ 2: gh
+ abcdefgh\C1\Gtwo
+ 0: abcdefgh
+ 1: cd
+ 2: gh
+ 1C cd (2)
+ 2G gh (2)
+ abcdefgh\Cone\Ctwo
+ 0: abcdefgh
+ 1: cd
+ 2: gh
+ 1C cd (2)
+ 2C gh (2)
+ abcdefgh\Cthree
+no parentheses with name "three"
+ 0: abcdefgh
+ 1: cd
+ 2: gh
+
+/(?P<Tes>)(?P<Test>)/D
+------------------------------------------------------------------
+ 0 15 Bra 0
+ 3 3 Bra 1
+ 6 3 Ket
+ 9 3 Bra 2
+ 12 3 Ket
+ 15 15 Ket
+ 18 End
+------------------------------------------------------------------
+Capturing subpattern count = 2
+Named capturing subpatterns:
+ Tes 1
+ Test 2
+No options
+No first char
+No need char
+
+/(?P<Test>)(?P<Tes>)/D
+------------------------------------------------------------------
+ 0 15 Bra 0
+ 3 3 Bra 1
+ 6 3 Ket
+ 9 3 Bra 2
+ 12 3 Ket
+ 15 15 Ket
+ 18 End
+------------------------------------------------------------------
+Capturing subpattern count = 2
+Named capturing subpatterns:
+ Tes 2
+ Test 1
+No options
+No first char
+No need char
+
+/(?P<Z>zz)(?P<A>aa)/
+Capturing subpattern count = 2
+Named capturing subpatterns:
+ A 2
+ Z 1
+No options
+First char = 'z'
+Need char = 'a'
+ zzaa\CZ
+ 0: zzaa
+ 1: zz
+ 2: aa
+ 1C zz (2)
+ zzaa\CA
+ 0: zzaa
+ 1: zz
+ 2: aa
+ 2C aa (2)
+
+/(?P<x>eks)(?P<x>eccs)/
+Failed: two named groups have the same name at offset 16
+
+/(?P<abc>abc(?P<def>def)(?P<abc>xyz))/
+Failed: two named groups have the same name at offset 31
+
+"\[((?P<elem>\d+)(,(?P>elem))*)\]"
+Capturing subpattern count = 3
+Named capturing subpatterns:
+ elem 2
+Partial matching not supported
+No options
+First char = '['
+Need char = ']'
+ [10,20,30,5,5,4,4,2,43,23,4234]
+ 0: [10,20,30,5,5,4,4,2,43,23,4234]
+ 1: 10,20,30,5,5,4,4,2,43,23,4234
+ 2: 10
+ 3: ,4234
+ *** Failers
+No match
+ []
+No match
+
+"\[((?P<elem>\d+)(,(?P>elem))*)?\]"
+Capturing subpattern count = 3
+Named capturing subpatterns:
+ elem 2
+Partial matching not supported
+No options
+First char = '['
+Need char = ']'
+ [10,20,30,5,5,4,4,2,43,23,4234]
+ 0: [10,20,30,5,5,4,4,2,43,23,4234]
+ 1: 10,20,30,5,5,4,4,2,43,23,4234
+ 2: 10
+ 3: ,4234
+ []
+ 0: []
+
+/(a(b(?2)c))?/D
+------------------------------------------------------------------
+ 0 25 Bra 0
+ 3 Brazero
+ 4 18 Bra 1
+ 7 a
+ 9 10 Bra 2
+ 12 b
+ 14 9 Recurse
+ 17 c
+ 19 10 Ket
+ 22 18 Ket
+ 25 25 Ket
+ 28 End
+------------------------------------------------------------------
+Capturing subpattern count = 2
+No options
+No first char
+No need char
+
+/(a(b(?2)c))*/D
+------------------------------------------------------------------
+ 0 25 Bra 0
+ 3 Brazero
+ 4 18 Bra 1
+ 7 a
+ 9 10 Bra 2
+ 12 b
+ 14 9 Recurse
+ 17 c
+ 19 10 Ket
+ 22 18 KetRmax
+ 25 25 Ket
+ 28 End
+------------------------------------------------------------------
+Capturing subpattern count = 2
+No options
+No first char
+No need char
+
+/(a(b(?2)c)){0,2}/D
+------------------------------------------------------------------
+ 0 53 Bra 0
+ 3 Brazero
+ 4 46 Bra 0
+ 7 18 Bra 1
+ 10 a
+ 12 10 Bra 2
+ 15 b
+ 17 12 Recurse
+ 20 c
+ 22 10 Ket
+ 25 18 Ket
+ 28 Brazero
+ 29 18 Bra 1
+ 32 a
+ 34 10 Bra 2
+ 37 b
+ 39 12 Recurse
+ 42 c
+ 44 10 Ket
+ 47 18 Ket
+ 50 46 Ket
+ 53 53 Ket
+ 56 End
+------------------------------------------------------------------
+Capturing subpattern count = 2
+No options
+No first char
+No need char
+
+/[ab]{1}+/D
+------------------------------------------------------------------
+ 0 47 Bra 0
+ 3 41 Once
+ 6 [ab]{1,1}
+ 44 41 Ket
+ 47 47 Ket
+ 50 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+No options
+No first char
+No need char
+
+/((w\/|-|with)*(free|immediate)*.*?shipping\s*[!.-]*)/i
+Capturing subpattern count = 3
+Partial matching not supported
+Options: caseless
+No first char
+Need char = 'g' (caseless)
+ Baby Bjorn Active Carrier - With free SHIPPING!!
+ 0: Baby Bjorn Active Carrier - With free SHIPPING!!
+ 1: Baby Bjorn Active Carrier - With free SHIPPING!!
+
+/((w\/|-|with)*(free|immediate)*.*?shipping\s*[!.-]*)/iS
+Capturing subpattern count = 3
+Partial matching not supported
+Options: caseless
+No first char
+Need char = 'g' (caseless)
+Study returned NULL
+ Baby Bjorn Active Carrier - With free SHIPPING!!
+ 0: Baby Bjorn Active Carrier - With free SHIPPING!!
+ 1: Baby Bjorn Active Carrier - With free SHIPPING!!
+
+/a*.*b/SD
+------------------------------------------------------------------
+ 0 9 Bra 0
+ 3 a*
+ 5 Any*
+ 7 b
+ 9 9 Ket
+ 12 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Partial matching not supported
+No options
+No first char
+Need char = 'b'
+Study returned NULL
+
+/(a|b)*.?c/SD
+------------------------------------------------------------------
+ 0 21 Bra 0
+ 3 Brazero
+ 4 5 Bra 1
+ 7 a
+ 9 5 Alt
+ 12 b
+ 14 10 KetRmax
+ 17 Any?
+ 19 c
+ 21 21 Ket
+ 24 End
+------------------------------------------------------------------
+Capturing subpattern count = 1
+No options
+No first char
+Need char = 'c'
+Study returned NULL
+
+/abc(?C255)de(?C)f/D
+------------------------------------------------------------------
+ 0 27 Bra 0
+ 3 abc
+ 9 Callout 255 10 1
+ 15 de
+ 19 Callout 0 16 1
+ 25 f
+ 27 27 Ket
+ 30 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+No options
+First char = 'a'
+Need char = 'f'
+
+/abcde/CD
+------------------------------------------------------------------
+ 0 49 Bra 0
+ 3 Callout 255 0 1
+ 9 a
+ 11 Callout 255 1 1
+ 17 b
+ 19 Callout 255 2 1
+ 25 c
+ 27 Callout 255 3 1
+ 33 d
+ 35 Callout 255 4 1
+ 41 e
+ 43 Callout 255 5 0
+ 49 49 Ket
+ 52 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options:
+First char = 'a'
+Need char = 'e'
+ abcde
+--->abcde
+ +0 ^ a
+ +1 ^^ b
+ +2 ^ ^ c
+ +3 ^ ^ d
+ +4 ^ ^ e
+ +5 ^ ^
+ 0: abcde
+ abcdfe
+--->abcdfe
+ +0 ^ a
+ +1 ^^ b
+ +2 ^ ^ c
+ +3 ^ ^ d
+ +4 ^ ^ e
+No match
+
+/a*b/CD
+------------------------------------------------------------------
+ 0 25 Bra 0
+ 3 Callout 255 0 2
+ 9 a*
+ 11 Callout 255 2 1
+ 17 b
+ 19 Callout 255 3 0
+ 25 25 Ket
+ 28 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Partial matching not supported
+Options:
+No first char
+Need char = 'b'
+ ab
+--->ab
+ +0 ^ a*
+ +2 ^^ b
+ +3 ^ ^
+ 0: ab
+ aaaab
+--->aaaab
+ +0 ^ a*
+ +2 ^ ^ b
+ +3 ^ ^
+ 0: aaaab
+ aaaacb
+--->aaaacb
+ +0 ^ a*
+ +2 ^ ^ b
+ +2 ^ ^ b
+ +2 ^ ^ b
+ +2 ^^ b
+ +2 ^ b
+ +0 ^ a*
+ +2 ^ ^ b
+ +2 ^ ^ b
+ +2 ^^ b
+ +2 ^ b
+ +0 ^ a*
+ +2 ^ ^ b
+ +2 ^^ b
+ +2 ^ b
+ +0 ^ a*
+ +2 ^^ b
+ +2 ^ b
+ +0 ^ a*
+ +2 ^ b
+ +0 ^ a*
+ +2 ^ b
+ +3 ^^
+ 0: b
+
+/a+b/CD
+------------------------------------------------------------------
+ 0 25 Bra 0
+ 3 Callout 255 0 2
+ 9 a+
+ 11 Callout 255 2 1
+ 17 b
+ 19 Callout 255 3 0
+ 25 25 Ket
+ 28 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Partial matching not supported
+Options:
+First char = 'a'
+Need char = 'b'
+ ab
+--->ab
+ +0 ^ a+
+ +2 ^^ b
+ +3 ^ ^
+ 0: ab
+ aaaab
+--->aaaab
+ +0 ^ a+
+ +2 ^ ^ b
+ +3 ^ ^
+ 0: aaaab
+ aaaacb
+--->aaaacb
+ +0 ^ a+
+ +2 ^ ^ b
+ +2 ^ ^ b
+ +2 ^ ^ b
+ +2 ^^ b
+ +0 ^ a+
+ +2 ^ ^ b
+ +2 ^ ^ b
+ +2 ^^ b
+ +0 ^ a+
+ +2 ^ ^ b
+ +2 ^^ b
+ +0 ^ a+
+ +2 ^^ b
+No match
+
+/(abc|def)x/CD
+------------------------------------------------------------------
+ 0 92 Bra 0
+ 3 Callout 255 0 9
+ 9 33 Bra 1
+ 12 Callout 255 1 1
+ 18 a
+ 20 Callout 255 2 1
+ 26 b
+ 28 Callout 255 3 1
+ 34 c
+ 36 Callout 255 4 0
+ 42 33 Alt
+ 45 Callout 255 5 1
+ 51 d
+ 53 Callout 255 6 1
+ 59 e
+ 61 Callout 255 7 1
+ 67 f
+ 69 Callout 255 8 0
+ 75 66 Ket
+ 78 Callout 255 9 1
+ 84 x
+ 86 Callout 255 10 0
+ 92 92 Ket
+ 95 End
+------------------------------------------------------------------
+Capturing subpattern count = 1
+Options:
+No first char
+Need char = 'x'
+ abcx
+--->abcx
+ +0 ^ (abc|def)
+ +1 ^ a
+ +2 ^^ b
+ +3 ^ ^ c
+ +4 ^ ^ |
+ +9 ^ ^ x
++10 ^ ^
+ 0: abcx
+ 1: abc
+ defx
+--->defx
+ +0 ^ (abc|def)
+ +1 ^ a
+ +5 ^ d
+ +6 ^^ e
+ +7 ^ ^ f
+ +8 ^ ^ )
+ +9 ^ ^ x
++10 ^ ^
+ 0: defx
+ 1: def
+ abcdefzx
+--->abcdefzx
+ +0 ^ (abc|def)
+ +1 ^ a
+ +2 ^^ b
+ +3 ^ ^ c
+ +4 ^ ^ |
+ +9 ^ ^ x
+ +5 ^ d
+ +0 ^ (abc|def)
+ +1 ^ a
+ +5 ^ d
+ +0 ^ (abc|def)
+ +1 ^ a
+ +5 ^ d
+ +0 ^ (abc|def)
+ +1 ^ a
+ +5 ^ d
+ +6 ^^ e
+ +7 ^ ^ f
+ +8 ^ ^ )
+ +9 ^ ^ x
+ +0 ^ (abc|def)
+ +1 ^ a
+ +5 ^ d
+ +0 ^ (abc|def)
+ +1 ^ a
+ +5 ^ d
+ +0 ^ (abc|def)
+ +1 ^ a
+ +5 ^ d
+ +0 ^ (abc|def)
+ +1 ^ a
+ +5 ^ d
+No match
+
+/(ab|cd){3,4}/C
+Capturing subpattern count = 1
+Options:
+No first char
+No need char
+ ababab
+--->ababab
+ +0 ^ (ab|cd){3,4}
+ +1 ^ a
+ +2 ^^ b
+ +3 ^ ^ |
+ +1 ^ ^ a
+ +2 ^ ^ b
+ +3 ^ ^ |
+ +1 ^ ^ a
+ +2 ^ ^ b
+ +3 ^ ^ |
+ +1 ^ ^ a
+ +4 ^ ^ c
++12 ^ ^
+ 0: ababab
+ 1: ab
+ abcdabcd
+--->abcdabcd
+ +0 ^ (ab|cd){3,4}
+ +1 ^ a
+ +2 ^^ b
+ +3 ^ ^ |
+ +1 ^ ^ a
+ +4 ^ ^ c
+ +5 ^ ^ d
+ +6 ^ ^ )
+ +1 ^ ^ a
+ +2 ^ ^ b
+ +3 ^ ^ |
+ +1 ^ ^ a
+ +4 ^ ^ c
+ +5 ^ ^ d
+ +6 ^ ^ )
++12 ^ ^
+ 0: abcdabcd
+ 1: cd
+ abcdcdcdcdcd
+--->abcdcdcdcdcd
+ +0 ^ (ab|cd){3,4}
+ +1 ^ a
+ +2 ^^ b
+ +3 ^ ^ |
+ +1 ^ ^ a
+ +4 ^ ^ c
+ +5 ^ ^ d
+ +6 ^ ^ )
+ +1 ^ ^ a
+ +4 ^ ^ c
+ +5 ^ ^ d
+ +6 ^ ^ )
+ +1 ^ ^ a
+ +4 ^ ^ c
+ +5 ^ ^ d
+ +6 ^ ^ )
++12 ^ ^
+ 0: abcdcdcd
+ 1: cd
+
+/([ab]{,4}c|xy)/CD
+------------------------------------------------------------------
+ 0 131 Bra 0
+ 3 Callout 255 0 14
+ 9 88 Bra 1
+ 12 Callout 255 1 4
+ 18 [ab]
+ 51 Callout 255 5 1
+ 57 {
+ 59 Callout 255 6 1
+ 65 ,
+ 67 Callout 255 7 1
+ 73 4
+ 75 Callout 255 8 1
+ 81 }
+ 83 Callout 255 9 1
+ 89 c
+ 91 Callout 255 10 0
+ 97 25 Alt
+100 Callout 255 11 1
+106 x
+108 Callout 255 12 1
+114 y
+116 Callout 255 13 0
+122 113 Ket
+125 Callout 255 14 0
+131 131 Ket
+134 End
+------------------------------------------------------------------
+Capturing subpattern count = 1
+Options:
+No first char
+No need char
+ Note: that { does NOT introduce a quantifier
+--->Note: that { does NOT introduce a quantifier
+ +0 ^ ([ab]{,4}c|xy)
+ +1 ^ [ab]
++11 ^ x
+ +0 ^ ([ab]{,4}c|xy)
+ +1 ^ [ab]
++11 ^ x
+ +0 ^ ([ab]{,4}c|xy)
+ +1 ^ [ab]
++11 ^ x
+ +0 ^ ([ab]{,4}c|xy)
+ +1 ^ [ab]
++11 ^ x
+ +0 ^ ([ab]{,4}c|xy)
+ +1 ^ [ab]
++11 ^ x
+ +0 ^ ([ab]{,4}c|xy)
+ +1 ^ [ab]
++11 ^ x
+ +0 ^ ([ab]{,4}c|xy)
+ +1 ^ [ab]
++11 ^ x
+ +0 ^ ([ab]{,4}c|xy)
+ +1 ^ [ab]
++11 ^ x
+ +0 ^ ([ab]{,4}c|xy)
+ +1 ^ [ab]
+ +5 ^^ {
++11 ^ x
+ +0 ^ ([ab]{,4}c|xy)
+ +1 ^ [ab]
++11 ^ x
+ +0 ^ ([ab]{,4}c|xy)
+ +1 ^ [ab]
++11 ^ x
+ +0 ^ ([ab]{,4}c|xy)
+ +1 ^ [ab]
++11 ^ x
+ +0 ^ ([ab]{,4}c|xy)
+ +1 ^ [ab]
++11 ^ x
+ +0 ^ ([ab]{,4}c|xy)
+ +1 ^ [ab]
++11 ^ x
+ +0 ^ ([ab]{,4}c|xy)
+ +1 ^ [ab]
++11 ^ x
+ +0 ^ ([ab]{,4}c|xy)
+ +1 ^ [ab]
++11 ^ x
+ +0 ^ ([ab]{,4}c|xy)
+ +1 ^ [ab]
++11 ^ x
+ +0 ^ ([ab]{,4}c|xy)
+ +1 ^ [ab]
++11 ^ x
+ +0 ^ ([ab]{,4}c|xy)
+ +1 ^ [ab]
++11 ^ x
+ +0 ^ ([ab]{,4}c|xy)
+ +1 ^ [ab]
++11 ^ x
+ +0 ^ ([ab]{,4}c|xy)
+ +1 ^ [ab]
++11 ^ x
+ +0 ^ ([ab]{,4}c|xy)
+ +1 ^ [ab]
++11 ^ x
+ +0 ^ ([ab]{,4}c|xy)
+ +1 ^ [ab]
++11 ^ x
+ +0 ^ ([ab]{,4}c|xy)
+ +1 ^ [ab]
++11 ^ x
+ +0 ^ ([ab]{,4}c|xy)
+ +1 ^ [ab]
++11 ^ x
+ +0 ^ ([ab]{,4}c|xy)
+ +1 ^ [ab]
++11 ^ x
+ +0 ^ ([ab]{,4}c|xy)
+ +1 ^ [ab]
++11 ^ x
+ +0 ^ ([ab]{,4}c|xy)
+ +1 ^ [ab]
++11 ^ x
+ +0 ^ ([ab]{,4}c|xy)
+ +1 ^ [ab]
++11 ^ x
+ +0 ^ ([ab]{,4}c|xy)
+ +1 ^ [ab]
++11 ^ x
+ +0 ^ ([ab]{,4}c|xy)
+ +1 ^ [ab]
++11 ^ x
+ +0 ^ ([ab]{,4}c|xy)
+ +1 ^ [ab]
++11 ^ x
+ +0 ^ ([ab]{,4}c|xy)
+ +1 ^ [ab]
+ +5 ^^ {
++11 ^ x
+ +0 ^ ([ab]{,4}c|xy)
+ +1 ^ [ab]
++11 ^ x
+ +0 ^ ([ab]{,4}c|xy)
+ +1 ^ [ab]
++11 ^ x
+ +0 ^ ([ab]{,4}c|xy)
+ +1 ^ [ab]
++11 ^ x
+ +0 ^ ([ab]{,4}c|xy)
+ +1 ^ [ab]
+ +5 ^^ {
++11 ^ x
+ +0 ^ ([ab]{,4}c|xy)
+ +1 ^ [ab]
++11 ^ x
+ +0 ^ ([ab]{,4}c|xy)
+ +1 ^ [ab]
++11 ^ x
+ +0 ^ ([ab]{,4}c|xy)
+ +1 ^ [ab]
++11 ^ x
+ +0 ^ ([ab]{,4}c|xy)
+ +1 ^ [ab]
++11 ^ x
+ +0 ^ ([ab]{,4}c|xy)
+ +1 ^ [ab]
++11 ^ x
+ +0 ^ ([ab]{,4}c|xy)
+ +1 ^ [ab]
++11 ^ x
+ +0 ^ ([ab]{,4}c|xy)
+ +1 ^ [ab]
++11 ^ x
+ +0 ^ ([ab]{,4}c|xy)
+ +1 ^ [ab]
++11 ^ x
+No match
+
+/([ab]{1,4}c|xy){4,5}?123/CD
+------------------------------------------------------------------
+ 0 485 Bra 0
+ 3 Callout 255 0 21
+ 9 61 Bra 1
+ 12 Callout 255 1 9
+ 18 [ab]{1,4}
+ 56 Callout 255 10 1
+ 62 c
+ 64 Callout 255 11 0
+ 70 25 Alt
+ 73 Callout 255 12 1
+ 79 x
+ 81 Callout 255 13 1
+ 87 y
+ 89 Callout 255 14 0
+ 95 86 Ket
+ 98 61 Bra 1
+101 Callout 255 1 9
+107 [ab]{1,4}
+145 Callout 255 10 1
+151 c
+153 Callout 255 11 0
+159 25 Alt
+162 Callout 255 12 1
+168 x
+170 Callout 255 13 1
+176 y
+178 Callout 255 14 0
+184 86 Ket
+187 61 Bra 1
+190 Callout 255 1 9
+196 [ab]{1,4}
+234 Callout 255 10 1
+240 c
+242 Callout 255 11 0
+248 25 Alt
+251 Callout 255 12 1
+257 x
+259 Callout 255 13 1
+265 y
+267 Callout 255 14 0
+273 86 Ket
+276 61 Bra 1
+279 Callout 255 1 9
+285 [ab]{1,4}
+323 Callout 255 10 1
+329 c
+331 Callout 255 11 0
+337 25 Alt
+340 Callout 255 12 1
+346 x
+348 Callout 255 13 1
+354 y
+356 Callout 255 14 0
+362 86 Ket
+365 Braminzero
+366 61 Bra 1
+369 Callout 255 1 9
+375 [ab]{1,4}
+413 Callout 255 10 1
+419 c
+421 Callout 255 11 0
+427 25 Alt
+430 Callout 255 12 1
+436 x
+438 Callout 255 13 1
+444 y
+446 Callout 255 14 0
+452 86 Ket
+455 Callout 255 21 1
+461 1
+463 Callout 255 22 1
+469 2
+471 Callout 255 23 1
+477 3
+479 Callout 255 24 0
+485 485 Ket
+488 End
+------------------------------------------------------------------
+Capturing subpattern count = 1
+Partial matching not supported
+Options:
+No first char
+Need char = '3'
+ aacaacaacaacaac123
+--->aacaacaacaacaac123
+ +0 ^ ([ab]{1,4}c|xy){4,5}?
+ +1 ^ [ab]{1,4}
++10 ^ ^ c
++11 ^ ^ |
+ +1 ^ ^ [ab]{1,4}
++10 ^ ^ c
++11 ^ ^ |
+ +1 ^ ^ [ab]{1,4}
++10 ^ ^ c
++11 ^ ^ |
+ +1 ^ ^ [ab]{1,4}
++10 ^ ^ c
++11 ^ ^ |
++21 ^ ^ 1
+ +1 ^ ^ [ab]{1,4}
++10 ^ ^ c
++11 ^ ^ |
++21 ^ ^ 1
++22 ^ ^ 2
++23 ^ ^ 3
++24 ^ ^
+ 0: aacaacaacaacaac123
+ 1: aac
+
+/\b.*/I
+Capturing subpattern count = 0
+Partial matching not supported
+No options
+No first char
+No need char
+ ab cd\>1
+ 0: cd
+
+/\b.*/Is
+Capturing subpattern count = 0
+Partial matching not supported
+Options: dotall
+No first char
+No need char
+ ab cd\>1
+ 0: cd
+
+/(?!.bcd).*/I
+Capturing subpattern count = 0
+Partial matching not supported
+No options
+No first char
+No need char
+ Xbcd12345
+ 0: bcd12345
+
+/abcde/
+Capturing subpattern count = 0
+No options
+First char = 'a'
+Need char = 'e'
+ ab\P
+Partial match
+ abc\P
+Partial match
+ abcd\P
+Partial match
+ abcde\P
+ 0: abcde
+ the quick brown abc\P
+Partial match
+ ** Failers\P
+No match
+ the quick brown abxyz fox\P
+No match
+
+"^(0?[1-9]|[12][0-9]|3[01])/(0?[1-9]|1[012])/(20)?\d\d$"
+Capturing subpattern count = 3
+Options: anchored
+No first char
+Need char = '/'
+ 13/05/04\P
+ 0: 13/05/04
+ 1: 13
+ 2: 05
+ 13/5/2004\P
+ 0: 13/5/2004
+ 1: 13
+ 2: 5
+ 3: 20
+ 02/05/09\P
+ 0: 02/05/09
+ 1: 02
+ 2: 05
+ 1\P
+Partial match
+ 1/2\P
+Partial match
+ 1/2/0\P
+Partial match
+ 1/2/04\P
+ 0: 1/2/04
+ 1: 1
+ 2: 2
+ 0\P
+Partial match
+ 02/\P
+Partial match
+ 02/0\P
+Partial match
+ 02/1\P
+Partial match
+ ** Failers\P
+No match
+ \P
+No match
+ 123\P
+No match
+ 33/4/04\P
+No match
+ 3/13/04\P
+No match
+ 0/1/2003\P
+No match
+ 0/\P
+No match
+ 02/0/\P
+No match
+ 02/13\P
+No match
+
+/0{0,2}ABC/I
+Capturing subpattern count = 0
+Partial matching not supported
+No options
+No first char
+Need char = 'C'
+
+/\d{3,}ABC/I
+Capturing subpattern count = 0
+Partial matching not supported
+No options
+No first char
+Need char = 'C'
+
+/\d*ABC/I
+Capturing subpattern count = 0
+Partial matching not supported
+No options
+No first char
+Need char = 'C'
+
+/[abc]+DE/I
+Capturing subpattern count = 0
+Partial matching not supported
+No options
+No first char
+Need char = 'E'
+
+/[abc]?123/
+Capturing subpattern count = 0
+No options
+No first char
+Need char = '3'
+ 123\P
+ 0: 123
+ a\P
+Partial match
+ b\P
+Partial match
+ c\P
+Partial match
+ c12\P
+Partial match
+ c123\P
+ 0: c123
+
+/^(?:\d){3,5}X/
+Capturing subpattern count = 0
+Options: anchored
+No first char
+Need char = 'X'
+ 1\P
+Partial match
+ 123\P
+Partial match
+ 123X
+ 0: 123X
+ 1234\P
+Partial match
+ 1234X
+ 0: 1234X
+ 12345\P
+Partial match
+ 12345X
+ 0: 12345X
+ *** Failers
+No match
+ 1X
+No match
+ 123456\P
+No match
+
+/abc/>testsavedregex
+Capturing subpattern count = 0
+No options
+First char = 'a'
+Need char = 'c'
+Compiled regex written to testsavedregex
+<testsavedregex
+Compiled regex loaded from testsavedregex
+No study data
+Capturing subpattern count = 0
+No options
+First char = 'a'
+Need char = 'c'
+ abc
+ 0: abc
+ ** Failers
+No match
+ bca
+No match
+
+/abc/F>testsavedregex
+Capturing subpattern count = 0
+No options
+First char = 'a'
+Need char = 'c'
+Compiled regex written to testsavedregex
+<testsavedregex
+Compiled regex (byte-inverted) loaded from testsavedregex
+No study data
+Capturing subpattern count = 0
+No options
+First char = 'a'
+Need char = 'c'
+ abc
+ 0: abc
+ ** Failers
+No match
+ bca
+No match
+
+/(a|b)/S>testsavedregex
+Capturing subpattern count = 1
+No options
+No first char
+No need char
+Starting byte set: a b
+Compiled regex written to testsavedregex
+Study data written to testsavedregex
+<testsavedregex
+Compiled regex loaded from testsavedregex
+Study data loaded from testsavedregex
+Capturing subpattern count = 1
+No options
+No first char
+No need char
+Starting byte set: a b
+ abc
+ 0: a
+ 1: a
+ ** Failers
+ 0: a
+ 1: a
+ def
+No match
+
+/(a|b)/SF>testsavedregex
+Capturing subpattern count = 1
+No options
+No first char
+No need char
+Starting byte set: a b
+Compiled regex written to testsavedregex
+Study data written to testsavedregex
+<testsavedregex
+Compiled regex (byte-inverted) loaded from testsavedregex
+Study data loaded from testsavedregex
+Capturing subpattern count = 1
+No options
+No first char
+No need char
+Starting byte set: a b
+ abc
+ 0: a
+ 1: a
+ ** Failers
+ 0: a
+ 1: a
+ def
+No match
+
+~<(\w+)/?>(.)*</(\1)>~smg
+Capturing subpattern count = 3
+Max back reference = 1
+Partial matching not supported
+Options: multiline dotall
+First char = '<'
+Need char = '>'
+ <!DOCTYPE seite SYSTEM "http://www.lco.lineas.de/xmlCms.dtd">\n<seite>\n<dokumenteninformation>\n<seitentitel>Partner der LCO</seitentitel>\n<sprache>de</sprache>\n<seitenbeschreibung>Partner der LINEAS Consulting\nGmbH</seitenbeschreibung>\n<schluesselworte>LINEAS Consulting GmbH Hamburg\nPartnerfirmen</schluesselworte>\n<revisit>30 days</revisit>\n<robots>index,follow</robots>\n<menueinformation>\n<aktiv>ja</aktiv>\n<menueposition>3</menueposition>\n<menuetext>Partner</menuetext>\n</menueinformation>\n<lastedited>\n<autor>LCO</autor>\n<firma>LINEAS Consulting</firma>\n<datum>15.10.2003</datum>\n</lastedited>\n</dokumenteninformation>\n<inhalt>\n\n<absatzueberschrift>Die Partnerfirmen der LINEAS Consulting\nGmbH</absatzueberschrift>\n\n<absatz><link ziel="http://www.ca.com/" zielfenster="_blank">\n<bild name="logo_ca.gif" rahmen="no"/></link> <link\nziel="http://www.ey.com/" zielfenster="_blank"><bild\nname="logo_euy.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><link ziel="http://www.cisco.de/" zielfenster="_blank">\n<bild name="logo_cisco.gif" rahmen="ja"/></link></absatz>\n\n<absatz><link ziel="http://www.atelion.de/"\nzielfenster="_blank"><bild\nname="logo_atelion.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><link ziel="http://www.line-information.de/"\nzielfenster="_blank">\n<bild name="logo_line_information.gif" rahmen="no"/></link>\n</absatz>\n\n<absatz><bild name="logo_aw.gif" rahmen="no"/></absatz>\n\n<absatz><link ziel="http://www.incognis.de/"\nzielfenster="_blank"><bild\nname="logo_incognis.gif" rahmen="no"/></link></absatz>\n\n<absatz><link ziel="http://www.addcraft.com/"\nzielfenster="_blank"><bild\nname="logo_addcraft.gif" rahmen="no"/></link></absatz>\n\n<absatz><link ziel="http://www.comendo.com/"\nzielfenster="_blank"><bild\nname="logo_comendo.gif" rahmen="no"/></link></absatz>\n\n</inhalt>\n</seite>
+ 0: <seite>\x0a<dokumenteninformation>\x0a<seitentitel>Partner der LCO</seitentitel>\x0a<sprache>de</sprache>\x0a<seitenbeschreibung>Partner der LINEAS Consulting\x0aGmbH</seitenbeschreibung>\x0a<schluesselworte>LINEAS Consulting GmbH Hamburg\x0aPartnerfirmen</schluesselworte>\x0a<revisit>30 days</revisit>\x0a<robots>index,follow</robots>\x0a<menueinformation>\x0a<aktiv>ja</aktiv>\x0a<menueposition>3</menueposition>\x0a<menuetext>Partner</menuetext>\x0a</menueinformation>\x0a<lastedited>\x0a<autor>LCO</autor>\x0a<firma>LINEAS Consulting</firma>\x0a<datum>15.10.2003</datum>\x0a</lastedited>\x0a</dokumenteninformation>\x0a<inhalt>\x0a\x0a<absatzueberschrift>Die Partnerfirmen der LINEAS Consulting\x0aGmbH</absatzueberschrift>\x0a\x0a<absatz><link ziel="http://www.ca.com/" zielfenster="_blank">\x0a<bild name="logo_ca.gif" rahmen="no"/></link> <link\x0aziel="http://www.ey.com/" zielfenster="_blank"><bild\x0aname="logo_euy.gif" rahmen="no"/></link>\x0a</absatz>\x0a\x0a<absatz><link ziel="http://www.cisco.de/" zielfenster="_blank">\x0a<bild name="logo_cisco.gif" rahmen="ja"/></link></absatz>\x0a\x0a<absatz><link ziel="http://www.atelion.de/"\x0azielfenster="_blank"><bild\x0aname="logo_atelion.gif" rahmen="no"/></link>\x0a</absatz>\x0a\x0a<absatz><link ziel="http://www.line-information.de/"\x0azielfenster="_blank">\x0a<bild name="logo_line_information.gif" rahmen="no"/></link>\x0a</absatz>\x0a\x0a<absatz><bild name="logo_aw.gif" rahmen="no"/></absatz>\x0a\x0a<absatz><link ziel="http://www.incognis.de/"\x0azielfenster="_blank"><bild\x0aname="logo_incognis.gif" rahmen="no"/></link></absatz>\x0a\x0a<absatz><link ziel="http://www.addcraft.com/"\x0azielfenster="_blank"><bild\x0aname="logo_addcraft.gif" rahmen="no"/></link></absatz>\x0a\x0a<absatz><link ziel="http://www.comendo.com/"\x0azielfenster="_blank"><bild\x0aname="logo_comendo.gif" rahmen="no"/></link></absatz>\x0a\x0a</inhalt>\x0a</seite>
+ 1: seite
+ 2: \x0a
+ 3: seite
+
+/^a/IF
+Capturing subpattern count = 0
+Options: anchored
+No first char
+No need char
+
/ End of testinput2 /
Capturing subpattern count = 0
No options
First char = ' '
Need char = ' '
-
diff --git a/srclib/pcre/testdata/testoutput3 b/srclib/pcre/testdata/testoutput3
index cbe9aaa755..225bd5bff0 100644
--- a/srclib/pcre/testdata/testoutput3
+++ b/srclib/pcre/testdata/testoutput3
@@ -1,2991 +1,115 @@
-PCRE version 3.9 02-Jan-2002
+PCRE version 5.0 13-Sep-2004
-/(?<!bar)foo/
- foo
- 0: foo
- catfood
- 0: foo
- arfootle
- 0: foo
- rfoosh
- 0: foo
+/^[\w]+/
*** Failers
No match
- barfoo
+ École
No match
- towbarfoo
-No match
-
-/\w{3}(?<!bar)foo/
- catfood
- 0: catfoo
- *** Failers
-No match
- foo
-No match
- barfoo
-No match
- towbarfoo
-No match
-
-/(?<=(foo)a)bar/
- fooabar
- 0: bar
- 1: foo
- *** Failers
-No match
- bar
-No match
- foobbar
-No match
-
-/\Aabc\z/m
- abc
- 0: abc
- *** Failers
-No match
- abc\n
-No match
- qqq\nabc
-No match
- abc\nzzz
-No match
- qqq\nabc\nzzz
-No match
-
-"(?>.*/)foo"
- /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/it/you/see/
-No match
-
-"(?>.*/)foo"
- /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo
- 0: /this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo
-
-/(?>(\.\d\d[1-9]?))\d+/
- 1.230003938
- 0: .230003938
- 1: .23
- 1.875000282
- 0: .875000282
- 1: .875
- *** Failers
-No match
- 1.235
-No match
-
-/^((?>\w+)|(?>\s+))*$/
- now is the time for all good men to come to the aid of the party
- 0: now is the time for all good men to come to the aid of the party
- 1: party
- *** Failers
-No match
- this is not a line with only words and spaces!
-No match
-
-/(\d+)(\w)/
- 12345a
- 0: 12345a
- 1: 12345
- 2: a
- 12345+
- 0: 12345
- 1: 1234
- 2: 5
-
-/((?>\d+))(\w)/
- 12345a
- 0: 12345a
- 1: 12345
- 2: a
- *** Failers
-No match
- 12345+
-No match
-
-/(?>a+)b/
- aaab
- 0: aaab
-
-/((?>a+)b)/
- aaab
- 0: aaab
- 1: aaab
-
-/(?>(a+))b/
- aaab
- 0: aaab
- 1: aaa
-
-/(?>b)+/
- aaabbbccc
- 0: bbb
-
-/(?>a+|b+|c+)*c/
- aaabbbbccccd
- 0: aaabbbbc
-
-/((?>[^()]+)|\([^()]*\))+/
- ((abc(ade)ufh()()x
- 0: abc(ade)ufh()()x
- 1: x
-
-/\(((?>[^()]+)|\([^()]+\))+\)/
- (abc)
- 0: (abc)
- 1: abc
- (abc(def)xyz)
- 0: (abc(def)xyz)
- 1: xyz
- *** Failers
-No match
- ((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-No match
-
-/a(?-i)b/i
- ab
- 0: ab
- *** Failers
-No match
- Ab
-No match
- aB
-No match
- AB
-No match
-
-/(a (?x)b c)d e/
- a bcd e
- 0: a bcd e
- 1: a bc
- *** Failers
-No match
- a b cd e
-No match
- abcd e
-No match
- a bcde
-No match
-
-/(a b(?x)c d (?-x)e f)/
- a bcde f
- 0: a bcde f
- 1: a bcde f
- *** Failers
-No match
- abcdef
-No match
-
-/(a(?i)b)c/
- abc
- 0: abc
- 1: ab
- aBc
- 0: aBc
- 1: aB
- *** Failers
-No match
- abC
-No match
- aBC
-No match
- Abc
-No match
- ABc
-No match
- ABC
-No match
- AbC
-No match
-
-/a(?i:b)c/
- abc
- 0: abc
- aBc
- 0: aBc
- *** Failers
-No match
- ABC
-No match
- abC
-No match
- aBC
-No match
-
-/a(?i:b)*c/
- aBc
- 0: aBc
- aBBc
- 0: aBBc
- *** Failers
-No match
- aBC
-No match
- aBBC
-No match
-
-/a(?=b(?i)c)\w\wd/
- abcd
- 0: abcd
- abCd
- 0: abCd
- *** Failers
-No match
- aBCd
-No match
- abcD
-No match
-
-/(?s-i:more.*than).*million/i
- more than million
- 0: more than million
- more than MILLION
- 0: more than MILLION
- more \n than Million
- 0: more \x0a than Million
- *** Failers
-No match
- MORE THAN MILLION
-No match
- more \n than \n million
-No match
-
-/(?:(?s-i)more.*than).*million/i
- more than million
- 0: more than million
- more than MILLION
- 0: more than MILLION
- more \n than Million
- 0: more \x0a than Million
- *** Failers
-No match
- MORE THAN MILLION
-No match
- more \n than \n million
-No match
-
-/(?>a(?i)b+)+c/
- abc
- 0: abc
- aBbc
- 0: aBbc
- aBBc
- 0: aBBc
- *** Failers
-No match
- Abc
-No match
- abAb
-No match
- abbC
-No match
-
-/(?=a(?i)b)\w\wc/
- abc
- 0: abc
- aBc
- 0: aBc
- *** Failers
-No match
- Ab
-No match
- abC
-No match
- aBC
-No match
-
-/(?<=a(?i)b)(\w\w)c/
- abxxc
- 0: xxc
- 1: xx
- aBxxc
- 0: xxc
- 1: xx
- *** Failers
-No match
- Abxxc
-No match
- ABxxc
-No match
- abxxC
-No match
-
-/(?:(a)|b)(?(1)A|B)/
- aA
- 0: aA
- 1: a
- bB
- 0: bB
- *** Failers
-No match
- aB
-No match
- bA
-No match
-
-/^(a)?(?(1)a|b)+$/
- aa
- 0: aa
- 1: a
- b
- 0: b
- bb
- 0: bb
- *** Failers
-No match
- ab
-No match
-
-/^(?(?=abc)\w{3}:|\d\d)$/
- abc:
- 0: abc:
- 12
- 0: 12
- *** Failers
-No match
- 123
-No match
- xyz
-No match
-
-/^(?(?!abc)\d\d|\w{3}:)$/
- abc:
- 0: abc:
- 12
- 0: 12
- *** Failers
-No match
- 123
-No match
- xyz
-No match
-
-/(?(?<=foo)bar|cat)/
- foobar
- 0: bar
- cat
- 0: cat
- fcat
- 0: cat
- focat
- 0: cat
- *** Failers
-No match
- foocat
-No match
-
-/(?(?<!foo)cat|bar)/
- foobar
- 0: bar
- cat
- 0: cat
- fcat
- 0: cat
- focat
- 0: cat
- *** Failers
-No match
- foocat
-No match
-
-/( \( )? [^()]+ (?(1) \) |) /x
- abcd
- 0: abcd
- (abcd)
- 0: (abcd)
- 1: (
- the quick (abcd) fox
- 0: the quick
- (abcd
- 0: abcd
-
-/( \( )? [^()]+ (?(1) \) ) /x
- abcd
- 0: abcd
- (abcd)
- 0: (abcd)
- 1: (
- the quick (abcd) fox
- 0: the quick
- (abcd
- 0: abcd
-
-/^(?(2)a|(1)(2))+$/
- 12
- 0: 12
- 1: 1
- 2: 2
- 12a
- 0: 12a
- 1: 1
- 2: 2
- 12aa
- 0: 12aa
- 1: 1
- 2: 2
- *** Failers
-No match
- 1234
-No match
-
-/((?i)blah)\s+\1/
- blah blah
- 0: blah blah
- 1: blah
- BLAH BLAH
- 0: BLAH BLAH
- 1: BLAH
- Blah Blah
- 0: Blah Blah
- 1: Blah
- blaH blaH
- 0: blaH blaH
- 1: blaH
- *** Failers
-No match
- blah BLAH
-No match
- Blah blah
-No match
- blaH blah
-No match
-
-/((?i)blah)\s+(?i:\1)/
- blah blah
- 0: blah blah
- 1: blah
- BLAH BLAH
- 0: BLAH BLAH
- 1: BLAH
- Blah Blah
- 0: Blah Blah
- 1: Blah
- blaH blaH
- 0: blaH blaH
- 1: blaH
- blah BLAH
- 0: blah BLAH
- 1: blah
- Blah blah
- 0: Blah blah
- 1: Blah
- blaH blah
- 0: blaH blah
- 1: blaH
-
-/(?>a*)*/
- a
- 0: a
- aa
- 0: aa
- aaaa
- 0: aaaa
-
-/(abc|)+/
- abc
- 0: abc
- 1:
- abcabc
- 0: abcabc
- 1:
- abcabcabc
- 0: abcabcabc
- 1:
- xyz
- 0:
- 1:
-
-/([a]*)*/
- a
- 0: a
- 1:
- aaaaa
- 0: aaaaa
- 1:
-
-/([ab]*)*/
- a
- 0: a
- 1:
- b
- 0: b
- 1:
- ababab
- 0: ababab
- 1:
- aaaabcde
- 0: aaaab
- 1:
- bbbb
- 0: bbbb
- 1:
-
-/([^a]*)*/
- b
- 0: b
- 1:
- bbbb
- 0: bbbb
- 1:
- aaa
- 0:
- 1:
-
-/([^ab]*)*/
- cccc
- 0: cccc
- 1:
- abab
- 0:
- 1:
-
-/([a]*?)*/
- a
- 0:
- 1:
- aaaa
- 0:
- 1:
-
-/([ab]*?)*/
- a
- 0:
- 1:
- b
- 0:
- 1:
- abab
- 0:
- 1:
- baba
- 0:
- 1:
-
-/([^a]*?)*/
- b
- 0:
- 1:
- bbbb
- 0:
- 1:
- aaa
- 0:
- 1:
-
-/([^ab]*?)*/
- c
- 0:
- 1:
- cccc
- 0:
- 1:
- baba
- 0:
- 1:
-
-/(?>a*)*/
- a
- 0: a
- aaabcde
- 0: aaa
-
-/((?>a*))*/
- aaaaa
- 0: aaaaa
- 1:
- aabbaa
- 0: aa
- 1:
-
-/((?>a*?))*/
- aaaaa
- 0:
- 1:
- aabbaa
- 0:
- 1:
-
-/(?(?=[^a-z]+[a-z]) \d{2}-[a-z]{3}-\d{2} | \d{2}-\d{2}-\d{2} ) /x
- 12-sep-98
- 0: 12-sep-98
- 12-09-98
- 0: 12-09-98
- *** Failers
-No match
- sep-12-98
-No match
-
-/(?<=(foo))bar\1/
- foobarfoo
- 0: barfoo
- 1: foo
- foobarfootling
- 0: barfoo
- 1: foo
- *** Failers
-No match
- foobar
-No match
- barfoo
-No match
-
-/(?i:saturday|sunday)/
- saturday
- 0: saturday
- sunday
- 0: sunday
- Saturday
- 0: Saturday
- Sunday
- 0: Sunday
- SATURDAY
- 0: SATURDAY
- SUNDAY
- 0: SUNDAY
- SunDay
- 0: SunDay
-
-/(a(?i)bc|BB)x/
- abcx
- 0: abcx
- 1: abc
- aBCx
- 0: aBCx
- 1: aBC
- bbx
- 0: bbx
- 1: bb
- BBx
- 0: BBx
- 1: BB
- *** Failers
-No match
- abcX
-No match
- aBCX
-No match
- bbX
-No match
- BBX
-No match
-
-/^([ab](?i)[cd]|[ef])/
- ac
- 0: ac
- 1: ac
- aC
- 0: aC
- 1: aC
- bD
- 0: bD
- 1: bD
- elephant
- 0: e
- 1: e
- Europe
- 0: E
- 1: E
- frog
- 0: f
- 1: f
- France
- 0: F
- 1: F
- *** Failers
-No match
- Africa
-No match
-
-/^(ab|a(?i)[b-c](?m-i)d|x(?i)y|z)/
- ab
- 0: ab
- 1: ab
- aBd
- 0: aBd
- 1: aBd
- xy
- 0: xy
- 1: xy
- xY
- 0: xY
- 1: xY
- zebra
- 0: z
- 1: z
- Zambesi
- 0: Z
- 1: Z
- *** Failers
-No match
- aCD
-No match
- XY
-No match
-
-/(?<=foo\n)^bar/m
- foo\nbar
- 0: bar
- *** Failers
-No match
- bar
-No match
- baz\nbar
-No match
-
-/(?<=(?<!foo)bar)baz/
- barbaz
- 0: baz
- barbarbaz
- 0: baz
- koobarbaz
- 0: baz
- *** Failers
-No match
- baz
-No match
- foobarbaz
-No match
-
-/The case of aaaaaa is missed out below because I think Perl 5.005_02 gets/
-/it wrong; it sets $1 to aaa rather than aa. Compare the following test,/
-No match
-/where it does set $1 to aa when matching aaaaaa./
-No match
-
-/^(a\1?){4}$/
- a
-No match
- aa
-No match
- aaa
-No match
- aaaa
- 0: aaaa
- 1: a
- aaaaa
- 0: aaaaa
- 1: a
- aaaaaaa
- 0: aaaaaaa
- 1: a
- aaaaaaaa
-No match
- aaaaaaaaa
-No match
- aaaaaaaaaa
- 0: aaaaaaaaaa
- 1: aaaa
- aaaaaaaaaaa
-No match
- aaaaaaaaaaaa
-No match
- aaaaaaaaaaaaa
-No match
- aaaaaaaaaaaaaa
-No match
- aaaaaaaaaaaaaaa
-No match
- aaaaaaaaaaaaaaaa
-No match
-
-/^(a\1?)(a\1?)(a\2?)(a\3?)$/
- a
-No match
- aa
-No match
- aaa
-No match
- aaaa
- 0: aaaa
- 1: a
- 2: a
- 3: a
- 4: a
- aaaaa
- 0: aaaaa
- 1: a
- 2: aa
- 3: a
- 4: a
- aaaaaa
- 0: aaaaaa
- 1: a
- 2: aa
- 3: a
- 4: aa
- aaaaaaa
- 0: aaaaaaa
- 1: a
- 2: aa
- 3: aaa
- 4: a
- aaaaaaaa
-No match
- aaaaaaaaa
-No match
- aaaaaaaaaa
- 0: aaaaaaaaaa
- 1: a
- 2: aa
- 3: aaa
- 4: aaaa
- aaaaaaaaaaa
-No match
- aaaaaaaaaaaa
-No match
- aaaaaaaaaaaaa
-No match
- aaaaaaaaaaaaaa
-No match
- aaaaaaaaaaaaaaa
-No match
- aaaaaaaaaaaaaaaa
-No match
-
-/The following tests are taken from the Perl 5.005 test suite; some of them/
-/are compatible with 5.004, but I'd rather not have to sort them out./
-No match
-
-/abc/
- abc
- 0: abc
- xabcy
- 0: abc
- ababc
- 0: abc
- *** Failers
-No match
- xbc
-No match
- axc
-No match
- abx
-No match
-
-/ab*c/
- abc
- 0: abc
-
-/ab*bc/
- abc
- 0: abc
- abbc
- 0: abbc
- abbbbc
- 0: abbbbc
-
-/.{1}/
- abbbbc
- 0: a
-
-/.{3,4}/
- abbbbc
- 0: abbb
-
-/ab{0,}bc/
- abbbbc
- 0: abbbbc
-
-/ab+bc/
- abbc
- 0: abbc
- *** Failers
-No match
- abc
-No match
- abq
-No match
-
-/ab{1,}bc/
-
-/ab+bc/
- abbbbc
- 0: abbbbc
-
-/ab{1,}bc/
- abbbbc
- 0: abbbbc
-
-/ab{1,3}bc/
- abbbbc
- 0: abbbbc
-
-/ab{3,4}bc/
- abbbbc
- 0: abbbbc
-
-/ab{4,5}bc/
- *** Failers
-No match
- abq
-No match
- abbbbc
-No match
-
-/ab?bc/
- abbc
- 0: abbc
- abc
- 0: abc
-
-/ab{0,1}bc/
- abc
- 0: abc
-
-/ab?bc/
-
-/ab?c/
- abc
- 0: abc
-
-/ab{0,1}c/
- abc
- 0: abc
-
-/^abc$/
- abc
- 0: abc
- *** Failers
-No match
- abbbbc
-No match
- abcc
-No match
-
-/^abc/
- abcc
- 0: abc
-
-/^abc$/
-
-/abc$/
- aabc
- 0: abc
- *** Failers
-No match
- aabc
- 0: abc
- aabcd
-No match
-
-/^/
- abc
- 0:
-
-/$/
- abc
- 0:
-
-/a.c/
- abc
- 0: abc
- axc
- 0: axc
-
-/a.*c/
- axyzc
- 0: axyzc
-
-/a[bc]d/
- abd
- 0: abd
- *** Failers
-No match
- axyzd
-No match
- abc
-No match
-
-/a[b-d]e/
- ace
- 0: ace
-
-/a[b-d]/
- aac
- 0: ac
-
-/a[-b]/
- a-
- 0: a-
-
-/a[b-]/
- a-
- 0: a-
-
-/a]/
- a]
- 0: a]
-
-/a[]]b/
- a]b
- 0: a]b
-
-/a[^bc]d/
- aed
- 0: aed
- *** Failers
-No match
- abd
-No match
- abd
-No match
-
-/a[^-b]c/
- adc
- 0: adc
-
-/a[^]b]c/
- adc
- 0: adc
- *** Failers
-No match
- a-c
- 0: a-c
- a]c
-No match
-
-/\ba\b/
- a-
- 0: a
- -a
- 0: a
- -a-
- 0: a
-
-/\by\b/
- *** Failers
-No match
- xy
-No match
- yz
-No match
- xyz
-No match
-
-/\Ba\B/
- *** Failers
- 0: a
- a-
-No match
- -a
-No match
- -a-
-No match
-
-/\By\b/
- xy
- 0: y
-
-/\by\B/
- yz
- 0: y
-
-/\By\B/
- xyz
- 0: y
-
-/\w/
- a
- 0: a
-
-/\W/
- -
- 0: -
- *** Failers
- 0: *
- -
- 0: -
- a
-No match
-
-/a\sb/
- a b
- 0: a b
-
-/a\Sb/
- a-b
- 0: a-b
- *** Failers
-No match
- a-b
- 0: a-b
- a b
-No match
-
-/\d/
- 1
- 0: 1
-
-/\D/
- -
- 0: -
- *** Failers
- 0: *
- -
- 0: -
- 1
-No match
-
-/[\w]/
- a
- 0: a
-
-/[\W]/
- -
- 0: -
- *** Failers
- 0: *
- -
- 0: -
- a
-No match
-
-/a[\s]b/
- a b
- 0: a b
-
-/a[\S]b/
- a-b
- 0: a-b
- *** Failers
-No match
- a-b
- 0: a-b
- a b
-No match
-
-/[\d]/
- 1
- 0: 1
-
-/[\D]/
- -
- 0: -
- *** Failers
- 0: *
- -
- 0: -
- 1
-No match
-
-/ab|cd/
- abc
- 0: ab
- abcd
- 0: ab
-
-/()ef/
- def
- 0: ef
- 1:
-
-/$b/
-
-/a\(b/
- a(b
- 0: a(b
-
-/a\(*b/
- ab
- 0: ab
- a((b
- 0: a((b
-
-/a\\b/
- a\b
-No match
-
-/((a))/
- abc
- 0: a
- 1: a
- 2: a
-
-/(a)b(c)/
- abc
- 0: abc
- 1: a
- 2: c
-
-/a+b+c/
- aabbabc
- 0: abc
-
-/a{1,}b{1,}c/
- aabbabc
- 0: abc
-
-/a.+?c/
- abcabc
- 0: abc
-
-/(a+|b)*/
- ab
- 0: ab
- 1: b
-
-/(a+|b){0,}/
- ab
- 0: ab
- 1: b
-
-/(a+|b)+/
- ab
- 0: ab
- 1: b
-
-/(a+|b){1,}/
- ab
- 0: ab
- 1: b
-
-/(a+|b)?/
- ab
- 0: a
- 1: a
-
-/(a+|b){0,1}/
- ab
- 0: a
- 1: a
-
-/[^ab]*/
- cde
- 0: cde
-
-/abc/
- *** Failers
-No match
- b
-No match
-
-
-/a*/
-
-
-/([abc])*d/
- abbbcd
- 0: abbbcd
- 1: c
-
-/([abc])*bcd/
- abcd
- 0: abcd
- 1: a
-
-/a|b|c|d|e/
- e
- 0: e
-
-/(a|b|c|d|e)f/
- ef
- 0: ef
- 1: e
-
-/abcd*efg/
- abcdefg
- 0: abcdefg
-
-/ab*/
- xabyabbbz
- 0: ab
- xayabbbz
- 0: a
-
-/(ab|cd)e/
- abcde
- 0: cde
- 1: cd
-
-/[abhgefdc]ij/
- hij
- 0: hij
-
-/^(ab|cd)e/
-
-/(abc|)ef/
- abcdef
- 0: ef
- 1:
-
-/(a|b)c*d/
- abcd
- 0: bcd
- 1: b
-
-/(ab|ab*)bc/
- abc
- 0: abc
- 1: a
-
-/a([bc]*)c*/
- abc
- 0: abc
- 1: bc
-
-/a([bc]*)(c*d)/
- abcd
- 0: abcd
- 1: bc
- 2: d
-
-/a([bc]+)(c*d)/
- abcd
- 0: abcd
- 1: bc
- 2: d
-
-/a([bc]*)(c+d)/
- abcd
- 0: abcd
- 1: b
- 2: cd
-
-/a[bcd]*dcdcde/
- adcdcde
- 0: adcdcde
-
-/a[bcd]+dcdcde/
- *** Failers
-No match
- abcde
-No match
- adcdcde
-No match
-
-/(ab|a)b*c/
- abc
- 0: abc
- 1: ab
-
-/((a)(b)c)(d)/
- abcd
- 0: abcd
- 1: abc
- 2: a
- 3: b
- 4: d
-
-/[a-zA-Z_][a-zA-Z0-9_]*/
- alpha
- 0: alpha
-
-/^a(bc+|b[eh])g|.h$/
- abh
- 0: bh
-
-/(bc+d$|ef*g.|h?i(j|k))/
- effgz
- 0: effgz
- 1: effgz
- ij
- 0: ij
- 1: ij
- 2: j
- reffgz
- 0: effgz
- 1: effgz
- *** Failers
-No match
- effg
-No match
- bcdd
-No match
-
-/((((((((((a))))))))))/
- a
- 0: a
- 1: a
- 2: a
- 3: a
- 4: a
- 5: a
- 6: a
- 7: a
- 8: a
- 9: a
-10: a
-
-/((((((((((a))))))))))\10/
- aa
- 0: aa
- 1: a
- 2: a
- 3: a
- 4: a
- 5: a
- 6: a
- 7: a
- 8: a
- 9: a
-10: a
-
-/(((((((((a)))))))))/
- a
- 0: a
- 1: a
- 2: a
- 3: a
- 4: a
- 5: a
- 6: a
- 7: a
- 8: a
- 9: a
-
-/multiple words of text/
- *** Failers
-No match
- aa
-No match
- uh-uh
-No match
-
-/multiple words/
- multiple words, yeah
- 0: multiple words
-
-/(.*)c(.*)/
- abcde
- 0: abcde
- 1: ab
- 2: de
-
-/\((.*), (.*)\)/
- (a, b)
- 0: (a, b)
- 1: a
- 2: b
-
-/[k]/
-
-/abcd/
- abcd
- 0: abcd
-
-/a(bc)d/
- abcd
- 0: abcd
- 1: bc
-
-/a[-]?c/
- ac
- 0: ac
-
-/(abc)\1/
- abcabc
- 0: abcabc
- 1: abc
-
-/([a-c]*)\1/
- abcabc
- 0: abcabc
- 1: abc
-/(a)|\1/
- a
- 0: a
- 1: a
- *** Failers
- 0: a
- 1: a
- ab
- 0: a
- 1: a
- x
-No match
-
-/(([a-c])b*?\2)*/
- ababbbcbc
- 0: ababb
- 1: bb
- 2: b
-
-/(([a-c])b*?\2){3}/
- ababbbcbc
- 0: ababbbcbc
- 1: cbc
- 2: c
-
-/((\3|b)\2(a)x)+/
- aaaxabaxbaaxbbax
- 0: bbax
- 1: bbax
- 2: b
- 3: a
-
-/((\3|b)\2(a)){2,}/
- bbaababbabaaaaabbaaaabba
- 0: bbaaaabba
- 1: bba
- 2: b
- 3: a
-
-/abc/i
- ABC
- 0: ABC
- XABCY
- 0: ABC
- ABABC
- 0: ABC
- *** Failers
-No match
- aaxabxbaxbbx
-No match
- XBC
-No match
- AXC
-No match
- ABX
-No match
-
-/ab*c/i
- ABC
- 0: ABC
-
-/ab*bc/i
- ABC
- 0: ABC
- ABBC
- 0: ABBC
-
-/ab*?bc/i
- ABBBBC
- 0: ABBBBC
-
-/ab{0,}?bc/i
- ABBBBC
- 0: ABBBBC
-
-/ab+?bc/i
- ABBC
- 0: ABBC
-
-/ab+bc/i
- *** Failers
-No match
- ABC
-No match
- ABQ
-No match
-
-/ab{1,}bc/i
-
-/ab+bc/i
- ABBBBC
- 0: ABBBBC
-
-/ab{1,}?bc/i
- ABBBBC
- 0: ABBBBC
-
-/ab{1,3}?bc/i
- ABBBBC
- 0: ABBBBC
-
-/ab{3,4}?bc/i
- ABBBBC
- 0: ABBBBC
-
-/ab{4,5}?bc/i
- *** Failers
-No match
- ABQ
-No match
- ABBBBC
-No match
-
-/ab??bc/i
- ABBC
- 0: ABBC
- ABC
- 0: ABC
-
-/ab{0,1}?bc/i
- ABC
- 0: ABC
-
-/ab??bc/i
-
-/ab??c/i
- ABC
- 0: ABC
-
-/ab{0,1}?c/i
- ABC
- 0: ABC
-
-/^abc$/i
- ABC
- 0: ABC
- *** Failers
-No match
- ABBBBC
-No match
- ABCC
-No match
-
-/^abc/i
- ABCC
- 0: ABC
-
-/^abc$/i
-
-/abc$/i
- AABC
- 0: ABC
-
-/^/i
- ABC
- 0:
-
-/$/i
- ABC
- 0:
-
-/a.c/i
- ABC
- 0: ABC
- AXC
- 0: AXC
-
-/a.*?c/i
- AXYZC
- 0: AXYZC
-
-/a.*c/i
- *** Failers
-No match
- AABC
- 0: AABC
- AXYZD
-No match
-
-/a[bc]d/i
- ABD
- 0: ABD
-
-/a[b-d]e/i
- ACE
- 0: ACE
- *** Failers
-No match
- ABC
-No match
- ABD
-No match
-
-/a[b-d]/i
- AAC
- 0: AC
-
-/a[-b]/i
- A-
- 0: A-
-
-/a[b-]/i
- A-
- 0: A-
-
-/a]/i
- A]
- 0: A]
-
-/a[]]b/i
- A]B
- 0: A]B
-
-/a[^bc]d/i
- AED
- 0: AED
-
-/a[^-b]c/i
- ADC
- 0: ADC
- *** Failers
-No match
- ABD
-No match
- A-C
-No match
-
-/a[^]b]c/i
- ADC
- 0: ADC
-
-/ab|cd/i
- ABC
- 0: AB
- ABCD
- 0: AB
-
-/()ef/i
- DEF
- 0: EF
- 1:
-
-/$b/i
- *** Failers
-No match
- A]C
-No match
- B
-No match
-
-/a\(b/i
- A(B
- 0: A(B
-
-/a\(*b/i
- AB
- 0: AB
- A((B
- 0: A((B
-
-/a\\b/i
- A\B
-No match
-
-/((a))/i
- ABC
- 0: A
- 1: A
- 2: A
-
-/(a)b(c)/i
- ABC
- 0: ABC
- 1: A
- 2: C
-
-/a+b+c/i
- AABBABC
- 0: ABC
-
-/a{1,}b{1,}c/i
- AABBABC
- 0: ABC
-
-/a.+?c/i
- ABCABC
- 0: ABC
-
-/a.*?c/i
- ABCABC
- 0: ABC
-
-/a.{0,5}?c/i
- ABCABC
- 0: ABC
-
-/(a+|b)*/i
- AB
- 0: AB
- 1: B
-
-/(a+|b){0,}/i
- AB
- 0: AB
- 1: B
-
-/(a+|b)+/i
- AB
- 0: AB
- 1: B
-
-/(a+|b){1,}/i
- AB
- 0: AB
- 1: B
-
-/(a+|b)?/i
- AB
- 0: A
- 1: A
-
-/(a+|b){0,1}/i
- AB
- 0: A
- 1: A
-
-/(a+|b){0,1}?/i
- AB
- 0:
-
-/[^ab]*/i
- CDE
- 0: CDE
-
-/abc/i
-
-/a*/i
-
-
-/([abc])*d/i
- ABBBCD
- 0: ABBBCD
- 1: C
-
-/([abc])*bcd/i
- ABCD
- 0: ABCD
- 1: A
-
-/a|b|c|d|e/i
- E
- 0: E
-
-/(a|b|c|d|e)f/i
- EF
- 0: EF
- 1: E
-
-/abcd*efg/i
- ABCDEFG
- 0: ABCDEFG
-
-/ab*/i
- XABYABBBZ
- 0: AB
- XAYABBBZ
- 0: A
-
-/(ab|cd)e/i
- ABCDE
- 0: CDE
- 1: CD
-
-/[abhgefdc]ij/i
- HIJ
- 0: HIJ
-
-/^(ab|cd)e/i
- ABCDE
-No match
-
-/(abc|)ef/i
- ABCDEF
- 0: EF
- 1:
-
-/(a|b)c*d/i
- ABCD
- 0: BCD
- 1: B
-
-/(ab|ab*)bc/i
- ABC
- 0: ABC
- 1: A
-
-/a([bc]*)c*/i
- ABC
- 0: ABC
- 1: BC
-
-/a([bc]*)(c*d)/i
- ABCD
- 0: ABCD
- 1: BC
- 2: D
-
-/a([bc]+)(c*d)/i
- ABCD
- 0: ABCD
- 1: BC
- 2: D
-
-/a([bc]*)(c+d)/i
- ABCD
- 0: ABCD
- 1: B
- 2: CD
-
-/a[bcd]*dcdcde/i
- ADCDCDE
- 0: ADCDCDE
-
-/a[bcd]+dcdcde/i
-
-/(ab|a)b*c/i
- ABC
- 0: ABC
- 1: AB
-
-/((a)(b)c)(d)/i
- ABCD
- 0: ABCD
- 1: ABC
- 2: A
- 3: B
- 4: D
-
-/[a-zA-Z_][a-zA-Z0-9_]*/i
- ALPHA
- 0: ALPHA
-
-/^a(bc+|b[eh])g|.h$/i
- ABH
- 0: BH
-
-/(bc+d$|ef*g.|h?i(j|k))/i
- EFFGZ
- 0: EFFGZ
- 1: EFFGZ
- IJ
- 0: IJ
- 1: IJ
- 2: J
- REFFGZ
- 0: EFFGZ
- 1: EFFGZ
- *** Failers
-No match
- ADCDCDE
-No match
- EFFG
-No match
- BCDD
-No match
-
-/((((((((((a))))))))))/i
- A
- 0: A
- 1: A
- 2: A
- 3: A
- 4: A
- 5: A
- 6: A
- 7: A
- 8: A
- 9: A
-10: A
-
-/((((((((((a))))))))))\10/i
- AA
- 0: AA
- 1: A
- 2: A
- 3: A
- 4: A
- 5: A
- 6: A
- 7: A
- 8: A
- 9: A
-10: A
-
-/(((((((((a)))))))))/i
- A
- 0: A
- 1: A
- 2: A
- 3: A
- 4: A
- 5: A
- 6: A
- 7: A
- 8: A
- 9: A
-
-/(?:(?:(?:(?:(?:(?:(?:(?:(?:(a))))))))))/i
- A
- 0: A
- 1: A
-
-/(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))/i
- C
- 0: C
- 1: C
-
-/multiple words of text/i
- *** Failers
-No match
- AA
-No match
- UH-UH
-No match
-
-/multiple words/i
- MULTIPLE WORDS, YEAH
- 0: MULTIPLE WORDS
-
-/(.*)c(.*)/i
- ABCDE
- 0: ABCDE
- 1: AB
- 2: DE
-
-/\((.*), (.*)\)/i
- (A, B)
- 0: (A, B)
- 1: A
- 2: B
-
-/[k]/i
-
-/abcd/i
- ABCD
- 0: ABCD
-
-/a(bc)d/i
- ABCD
- 0: ABCD
- 1: BC
-
-/a[-]?c/i
- AC
- 0: AC
-
-/(abc)\1/i
- ABCABC
- 0: ABCABC
- 1: ABC
-
-/([a-c]*)\1/i
- ABCABC
- 0: ABCABC
- 1: ABC
-
-/a(?!b)./
- abad
- 0: ad
-
-/a(?=d)./
- abad
- 0: ad
-
-/a(?=c|d)./
- abad
- 0: ad
-
-/a(?:b|c|d)(.)/
- ace
- 0: ace
- 1: e
-
-/a(?:b|c|d)*(.)/
- ace
- 0: ace
- 1: e
-
-/a(?:b|c|d)+?(.)/
- ace
- 0: ace
- 1: e
- acdbcdbe
- 0: acd
- 1: d
-
-/a(?:b|c|d)+(.)/
- acdbcdbe
- 0: acdbcdbe
- 1: e
-
-/a(?:b|c|d){2}(.)/
- acdbcdbe
- 0: acdb
- 1: b
-
-/a(?:b|c|d){4,5}(.)/
- acdbcdbe
- 0: acdbcdb
- 1: b
-
-/a(?:b|c|d){4,5}?(.)/
- acdbcdbe
- 0: acdbcd
- 1: d
-
-/((foo)|(bar))*/
- foobar
- 0: foobar
- 1: bar
- 2: foo
- 3: bar
-
-/a(?:b|c|d){6,7}(.)/
- acdbcdbe
- 0: acdbcdbe
- 1: e
-
-/a(?:b|c|d){6,7}?(.)/
- acdbcdbe
- 0: acdbcdbe
- 1: e
-
-/a(?:b|c|d){5,6}(.)/
- acdbcdbe
- 0: acdbcdbe
- 1: e
-
-/a(?:b|c|d){5,6}?(.)/
- acdbcdbe
- 0: acdbcdb
- 1: b
-
-/a(?:b|c|d){5,7}(.)/
- acdbcdbe
- 0: acdbcdbe
- 1: e
-
-/a(?:b|c|d){5,7}?(.)/
- acdbcdbe
- 0: acdbcdb
- 1: b
-
-/a(?:b|(c|e){1,2}?|d)+?(.)/
- ace
- 0: ace
- 1: c
- 2: e
-
-/^(.+)?B/
- AB
- 0: AB
- 1: A
-
-/^([^a-z])|(\^)$/
- .
- 0: .
- 1: .
-
-/^[<>]&/
- <&OUT
- 0: <&
-
-/^(a\1?){4}$/
- aaaaaaaaaa
- 0: aaaaaaaaaa
- 1: aaaa
- *** Failers
-No match
- AB
-No match
- aaaaaaaaa
-No match
- aaaaaaaaaaa
-No match
-
-/^(a(?(1)\1)){4}$/
- aaaaaaaaaa
- 0: aaaaaaaaaa
- 1: aaaa
- *** Failers
-No match
- aaaaaaaaa
-No match
- aaaaaaaaaaa
-No match
-
-/(?:(f)(o)(o)|(b)(a)(r))*/
- foobar
- 0: foobar
- 1: f
- 2: o
- 3: o
- 4: b
- 5: a
- 6: r
-
-/(?<=a)b/
- ab
- 0: b
- *** Failers
-No match
- cb
-No match
- b
-No match
-
-/(?<!c)b/
- ab
- 0: b
- b
- 0: b
- b
- 0: b
-
-/(?:..)*a/
- aba
- 0: aba
-
-/(?:..)*?a/
- aba
- 0: a
-
-/^(?:b|a(?=(.)))*\1/
- abc
- 0: ab
- 1: b
-
-/^(){3,5}/
- abc
- 0:
- 1:
-
-/^(a+)*ax/
- aax
- 0: aax
- 1: a
-
-/^((a|b)+)*ax/
- aax
- 0: aax
- 1: a
- 2: a
-
-/^((a|bc)+)*ax/
- aax
- 0: aax
- 1: a
- 2: a
-
-/(a|x)*ab/
- cab
- 0: ab
-
-/(a)*ab/
- cab
- 0: ab
-
-/(?:(?i)a)b/
- ab
- 0: ab
-
-/((?i)a)b/
- ab
- 0: ab
- 1: a
-
-/(?:(?i)a)b/
- Ab
- 0: Ab
+/^[\w]+/Lfr_FR
+ École
+ 0: École
-/((?i)a)b/
- Ab
- 0: Ab
- 1: A
-
-/(?:(?i)a)b/
- *** Failers
-No match
- cb
-No match
- aB
-No match
-
-/((?i)a)b/
-
-/(?i:a)b/
- ab
- 0: ab
-
-/((?i:a))b/
- ab
- 0: ab
- 1: a
-
-/(?i:a)b/
- Ab
- 0: Ab
-
-/((?i:a))b/
- Ab
- 0: Ab
- 1: A
-
-/(?i:a)b/
- *** Failers
-No match
- aB
-No match
- aB
-No match
-
-/((?i:a))b/
-
-/(?:(?-i)a)b/i
- ab
- 0: ab
-
-/((?-i)a)b/i
- ab
- 0: ab
- 1: a
-
-/(?:(?-i)a)b/i
- aB
- 0: aB
-
-/((?-i)a)b/i
- aB
- 0: aB
- 1: a
-
-/(?:(?-i)a)b/i
- *** Failers
-No match
- aB
- 0: aB
- Ab
-No match
-
-/((?-i)a)b/i
-
-/(?:(?-i)a)b/i
- aB
- 0: aB
-
-/((?-i)a)b/i
- aB
- 0: aB
- 1: a
-
-/(?:(?-i)a)b/i
- *** Failers
-No match
- Ab
-No match
- AB
-No match
-
-/((?-i)a)b/i
-
-/(?-i:a)b/i
- ab
- 0: ab
-
-/((?-i:a))b/i
- ab
- 0: ab
- 1: a
-
-/(?-i:a)b/i
- aB
- 0: aB
-
-/((?-i:a))b/i
- aB
- 0: aB
- 1: a
-
-/(?-i:a)b/i
- *** Failers
-No match
- AB
-No match
- Ab
-No match
-
-/((?-i:a))b/i
-
-/(?-i:a)b/i
- aB
- 0: aB
-
-/((?-i:a))b/i
- aB
- 0: aB
- 1: a
-
-/(?-i:a)b/i
- *** Failers
-No match
- Ab
-No match
- AB
-No match
-
-/((?-i:a))b/i
-
-/((?-i:a.))b/i
- *** Failers
-No match
- AB
-No match
- a\nB
-No match
-
-/((?s-i:a.))b/i
- a\nB
- 0: a\x0aB
- 1: a\x0a
-
-/(?:c|d)(?:)(?:a(?:)(?:b)(?:b(?:))(?:b(?:)(?:b)))/
- cabbbb
- 0: cabbbb
-
-/(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))/
- caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
- 0: caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
-
-/(ab)\d\1/i
- Ab4ab
- 0: Ab4ab
- 1: Ab
- ab4Ab
- 0: ab4Ab
- 1: ab
-
-/foo\w*\d{4}baz/
- foobar1234baz
- 0: foobar1234baz
-
-/x(~~)*(?:(?:F)?)?/
- x~~
- 0: x~~
- 1: ~~
-
-/^a(?#xxx){3}c/
- aaac
- 0: aaac
-
-/^a (?#xxx) (?#yyy) {3}c/x
- aaac
- 0: aaac
-
-/(?<![cd])b/
- *** Failers
-No match
- B\nB
-No match
- dbcb
-No match
-
-/(?<![cd])[ab]/
- dbaacb
- 0: a
-
-/(?<!(c|d))b/
-
-/(?<!(c|d))[ab]/
- dbaacb
- 0: a
-
-/(?<!cd)[ab]/
- cdaccb
- 0: b
-
-/^(?:a?b?)*$/
- *** Failers
-No match
- dbcb
-No match
- a--
-No match
-
-/((?s)^a(.))((?m)^b$)/
- a\nb\nc\n
- 0: a\x0ab
- 1: a\x0a
- 2: \x0a
- 3: b
-
-/((?m)^b$)/
- a\nb\nc\n
- 0: b
- 1: b
-
-/(?m)^b/
- a\nb\n
- 0: b
-
-/(?m)^(b)/
- a\nb\n
- 0: b
- 1: b
-
-/((?m)^b)/
- a\nb\n
- 0: b
- 1: b
-
-/\n((?m)^b)/
- a\nb\n
- 0: \x0ab
- 1: b
-
-/((?s).)c(?!.)/
- a\nb\nc\n
- 0: \x0ac
- 1: \x0a
- a\nb\nc\n
- 0: \x0ac
- 1: \x0a
-
-/((?s)b.)c(?!.)/
- a\nb\nc\n
- 0: b\x0ac
- 1: b\x0a
- a\nb\nc\n
- 0: b\x0ac
- 1: b\x0a
-
-/^b/
-
-/()^b/
+/^[\w]+/
*** Failers
No match
- a\nb\nc\n
+ École
No match
- a\nb\nc\n
-No match
-
-/((?m)^b)/
- a\nb\nc\n
- 0: b
- 1: b
-
-/(?(1)a|b)/
-/(?(1)b|a)/
- a
- 0: a
+/^[\W]+/
+ École
+ 0: \xc9
-/(x)?(?(1)a|b)/
+/^[\W]+/Lfr_FR
*** Failers
+ 0: ***
+ École
No match
- a
-No match
- a
-No match
-
-/(x)?(?(1)b|a)/
- a
- 0: a
-
-/()?(?(1)b|a)/
- a
- 0: a
-/()(?(1)b|a)/
-
-/()?(?(1)a|b)/
- a
- 0: a
- 1:
-
-/^(\()?blah(?(1)(\)))$/
- (blah)
- 0: (blah)
- 1: (
- 2: )
- blah
- 0: blah
+/[\b]/
+ \b
+ 0: \x08
*** Failers
No match
a
No match
- blah)
-No match
- (blah
-No match
-
-/^(\(+)?blah(?(1)(\)))$/
- (blah)
- 0: (blah)
- 1: (
- 2: )
- blah
- 0: blah
- *** Failers
-No match
- blah)
-No match
- (blah
-No match
-
-/(?(?!a)a|b)/
-
-/(?(?!a)b|a)/
- a
- 0: a
-/(?(?=a)b|a)/
+/[\b]/Lfr_FR
+ \b
+ 0: \x08
*** Failers
No match
a
No match
- a
-No match
-
-/(?(?=a)a|b)/
- a
- 0: a
-
-/(?=(a+?))(\1ab)/
- aaab
- 0: aab
- 1: a
- 2: aab
-
-/^(?=(a+?))\1ab/
-/(\w+:)+/
- one:
- 0: one:
- 1: one:
-
-/$(?<=^(a))/
- a
- 0:
- 1: a
-
-/(?=(a+?))(\1ab)/
- aaab
- 0: aab
- 1: a
- 2: aab
-
-/^(?=(a+?))\1ab/
+/^\w+/
*** Failers
No match
- aaab
-No match
- aaab
+ École
No match
-/([\w:]+::)?(\w+)$/
- abcd
- 0: abcd
- 1: <unset>
- 2: abcd
- xy:z:::abcd
- 0: xy:z:::abcd
- 1: xy:z:::
- 2: abcd
-
-/^[^bcd]*(c+)/
- aexycd
- 0: aexyc
- 1: c
+/^\w+/Lfr_FR
+ École
+ 0: École
-/(a*)b+/
- caab
- 0: aab
- 1: aa
+/(.+)\b(.+)/
+ École
+ 0: \xc9cole
+ 1: \xc9
+ 2: cole
-/([\w:]+::)?(\w+)$/
- abcd
- 0: abcd
- 1: <unset>
- 2: abcd
- xy:z:::abcd
- 0: xy:z:::abcd
- 1: xy:z:::
- 2: abcd
+/(.+)\b(.+)/Lfr_FR
*** Failers
- 0: Failers
- 1: <unset>
+ 0: *** Failers
+ 1: ***
2: Failers
- abcd:
-No match
- abcd:
-No match
-
-/^[^bcd]*(c+)/
- aexycd
- 0: aexyc
- 1: c
-
-/(>a+)ab/
-
-/(?>a+)b/
- aaab
- 0: aaab
-
-/([[:]+)/
- a:[b]:
- 0: :[
- 1: :[
-
-/([[=]+)/
- a=[b]=
- 0: =[
- 1: =[
-
-/([[.]+)/
- a.[b].
- 0: .[
- 1: .[
-
-/((?>a+)b)/
- aaab
- 0: aaab
- 1: aaab
-
-/(?>(a+))b/
- aaab
- 0: aaab
- 1: aaa
-
-/((?>[^()]+)|\([^()]*\))+/
- ((abc(ade)ufh()()x
- 0: abc(ade)ufh()()x
- 1: x
-
-/a\Z/
- *** Failers
-No match
- aaab
-No match
- a\nb\n
-No match
-
-/b\Z/
- a\nb\n
- 0: b
-
-/b\z/
-
-/b\Z/
- a\nb
- 0: b
-
-/b\z/
- a\nb
- 0: b
- *** Failers
-No match
-
-/^(?>(?(1)\.|())[^\W_](?>[a-z0-9-]*[^\W_])?)+$/
- a
- 0: a
- 1:
- abc
- 0: abc
- 1:
- a-b
- 0: a-b
- 1:
- 0-9
- 0: 0-9
- 1:
- a.b
- 0: a.b
- 1:
- 5.6.7
- 0: 5.6.7
- 1:
- the.quick.brown.fox
- 0: the.quick.brown.fox
- 1:
- a100.b200.300c
- 0: a100.b200.300c
- 1:
- 12-ab.1245
- 0: 12-ab.1245
- 1:
- ***Failers
-No match
- \
-No match
- .a
-No match
- -a
-No match
- a-
-No match
- a.
-No match
- a_b
-No match
- a.-
-No match
- a..
-No match
- ab..bc
-No match
- the.quick.brown.fox-
-No match
- the.quick.brown.fox.
-No match
- the.quick.brown.fox_
-No match
- the.quick.brown.fox+
-No match
-
-/(?>.*)(?<=(abcd|wxyz))/
- alphabetabcd
- 0: alphabetabcd
- 1: abcd
- endingwxyz
- 0: endingwxyz
- 1: wxyz
- *** Failers
-No match
- a rather long string that doesn't end with one of them
-No match
-
-/word (?>(?:(?!otherword)[a-zA-Z0-9]+ ){0,30})otherword/
- word cat dog elephant mussel cow horse canary baboon snake shark otherword
- 0: word cat dog elephant mussel cow horse canary baboon snake shark otherword
- word cat dog elephant mussel cow horse canary baboon snake shark
-No match
-
-/word (?>[a-zA-Z0-9]+ ){0,30}otherword/
- word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope
-No match
-
-/(?<=\d{3}(?!999))foo/
- 999foo
- 0: foo
- 123999foo
- 0: foo
- *** Failers
-No match
- 123abcfoo
-No match
-
-/(?<=(?!...999)\d{3})foo/
- 999foo
- 0: foo
- 123999foo
- 0: foo
- *** Failers
-No match
- 123abcfoo
-No match
-
-/(?<=\d{3}(?!999)...)foo/
- 123abcfoo
- 0: foo
- 123456foo
- 0: foo
- *** Failers
-No match
- 123999foo
-No match
-
-/(?<=\d{3}...)(?<!999)foo/
- 123abcfoo
- 0: foo
- 123456foo
- 0: foo
- *** Failers
-No match
- 123999foo
-No match
-
-/<a[\s]+href[\s]*=[\s]* # find <a href=
- ([\"\'])? # find single or double quote
- (?(1) (.*?)\1 | ([^\s]+)) # if quote found, match up to next matching
- # quote, otherwise match up to next space
-/isx
- <a href=abcd xyz
- 0: <a href=abcd
- 1: <unset>
- 2: <unset>
- 3: abcd
- <a href=\"abcd xyz pqr\" cats
- 0: <a href="abcd xyz pqr"
- 1: "
- 2: abcd xyz pqr
- <a href=\'abcd xyz pqr\' cats
- 0: <a href='abcd xyz pqr'
- 1: '
- 2: abcd xyz pqr
-
-/<a\s+href\s*=\s* # find <a href=
- (["'])? # find single or double quote
- (?(1) (.*?)\1 | (\S+)) # if quote found, match up to next matching
- # quote, otherwise match up to next space
-/isx
- <a href=abcd xyz
- 0: <a href=abcd
- 1: <unset>
- 2: <unset>
- 3: abcd
- <a href=\"abcd xyz pqr\" cats
- 0: <a href="abcd xyz pqr"
- 1: "
- 2: abcd xyz pqr
- <a href = \'abcd xyz pqr\' cats
- 0: <a href = 'abcd xyz pqr'
- 1: '
- 2: abcd xyz pqr
-
-/<a\s+href(?>\s*)=(?>\s*) # find <a href=
- (["'])? # find single or double quote
- (?(1) (.*?)\1 | (\S+)) # if quote found, match up to next matching
- # quote, otherwise match up to next space
-/isx
- <a href=abcd xyz
- 0: <a href=abcd
- 1: <unset>
- 2: <unset>
- 3: abcd
- <a href=\"abcd xyz pqr\" cats
- 0: <a href="abcd xyz pqr"
- 1: "
- 2: abcd xyz pqr
- <a href = \'abcd xyz pqr\' cats
- 0: <a href = 'abcd xyz pqr'
- 1: '
- 2: abcd xyz pqr
-
-/((Z)+|A)*/
- ZABCDEFG
- 0: ZA
- 1: A
- 2: Z
-
-/(Z()|A)*/
- ZABCDEFG
- 0: ZA
- 1: A
- 2:
-
-/(Z(())|A)*/
- ZABCDEFG
- 0: ZA
- 1: A
- 2:
- 3:
-
-/((?>Z)+|A)*/
- ZABCDEFG
- 0: ZA
- 1: A
-
-/((?>)+|A)*/
- ZABCDEFG
- 0:
- 1:
-
-/a*/g
- abbab
- 0: a
- 0:
- 0:
- 0: a
- 0:
- 0:
-
-/^[a-\d]/
- abcde
- 0: a
- -things
- 0: -
- 0digit
- 0: 0
- *** Failers
-No match
- bcdef
-No match
-
-/^[\d-a]/
- abcde
- 0: a
- -things
- 0: -
- 0digit
- 0: 0
- *** Failers
+ École
+No match
+
+/École/i
+ École
+ 0: \xc9cole
+ *** Failers
+No match
+ école
+No match
+
+/École/iLfr_FR
+ École
+ 0: École
+ école
+ 0: école
+
+/\w/IS
+Capturing subpattern count = 0
+No options
+No first char
+No need char
+Starting byte set: 0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P
+ Q R S T U V W X Y Z _ a b c d e f g h i j k l m n o p q r s t u v w x y z
+
+/\w/ISLfr_FR
+Capturing subpattern count = 0
+No options
+No first char
+No need char
+Starting byte set: 0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P
+ Q R S T U V W X Y Z _ a b c d e f g h i j k l m n o p q r s t u v w x y z
+ µ À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï Ð Ñ Ò Ó Ô Õ Ö Ø Ù Ú Û Ü Ý Þ ß à á â ã ä
+ å æ ç è é ê ë ì í î ï ð ñ ò ó ô õ ö ø ù ú û ü ý þ ÿ
+
+/^[\xc8-\xc9]/iLfr_FR
+ École
+ 0: É
+ école
+ 0: é
+
+/^[\xc8-\xc9]/Lfr_FR
+ École
+ 0: É
+ *** Failers
No match
- bcdef
+ école
No match
-/ End of testinput3 /
-
+/ End of testinput3 /
diff --git a/srclib/pcre/testdata/testoutput4 b/srclib/pcre/testdata/testoutput4
index df81a0f548..e8d2603349 100644
--- a/srclib/pcre/testdata/testoutput4
+++ b/srclib/pcre/testdata/testoutput4
@@ -1,116 +1,903 @@
-PCRE version 3.9 02-Jan-2002
+PCRE version 5.0 13-Sep-2004
-/^[\w]+/
+/-- Do not use the \x{} construct except with patterns that have the --/
+/-- /8 option set, because PCRE doesn't recognize them as UTF-8 unless --/
+No match
+/-- that option is set. However, the latest Perls recognize them always. --/
+No match
+
+/a.b/8
+ acb
+ 0: acb
+ a\x7fb
+ 0: a\x{7f}b
+ a\x{100}b
+ 0: a\x{100}b
+ *** Failers
+No match
+ a\nb
+No match
+
+/a(.{3})b/8
+ a\x{4000}xyb
+ 0: a\x{4000}xyb
+ 1: \x{4000}xy
+ a\x{4000}\x7fyb
+ 0: a\x{4000}\x{7f}yb
+ 1: \x{4000}\x{7f}y
+ a\x{4000}\x{100}yb
+ 0: a\x{4000}\x{100}yb
+ 1: \x{4000}\x{100}y
*** Failers
No match
- École
+ a\x{4000}b
+No match
+ ac\ncb
No match
-/^[\w]+/Lfr
- École
- 0: École
+/a(.*?)(.)/
+ a\xc0\x88b
+ 0: a\xc0
+ 1:
+ 2: \xc0
+
+/a(.*?)(.)/8
+ a\x{100}b
+ 0: a\x{100}
+ 1:
+ 2: \x{100}
+
+/a(.*)(.)/
+ a\xc0\x88b
+ 0: a\xc0\x88b
+ 1: \xc0\x88
+ 2: b
+
+/a(.*)(.)/8
+ a\x{100}b
+ 0: a\x{100}b
+ 1: \x{100}
+ 2: b
+
+/a(.)(.)/
+ a\xc0\x92bcd
+ 0: a\xc0\x92
+ 1: \xc0
+ 2: \x92
-/^[\w]+/
+/a(.)(.)/8
+ a\x{240}bcd
+ 0: a\x{240}b
+ 1: \x{240}
+ 2: b
+
+/a(.?)(.)/
+ a\xc0\x92bcd
+ 0: a\xc0\x92
+ 1: \xc0
+ 2: \x92
+
+/a(.?)(.)/8
+ a\x{240}bcd
+ 0: a\x{240}b
+ 1: \x{240}
+ 2: b
+
+/a(.??)(.)/
+ a\xc0\x92bcd
+ 0: a\xc0
+ 1:
+ 2: \xc0
+
+/a(.??)(.)/8
+ a\x{240}bcd
+ 0: a\x{240}
+ 1:
+ 2: \x{240}
+
+/a(.{3})b/8
+ a\x{1234}xyb
+ 0: a\x{1234}xyb
+ 1: \x{1234}xy
+ a\x{1234}\x{4321}yb
+ 0: a\x{1234}\x{4321}yb
+ 1: \x{1234}\x{4321}y
+ a\x{1234}\x{4321}\x{3412}b
+ 0: a\x{1234}\x{4321}\x{3412}b
+ 1: \x{1234}\x{4321}\x{3412}
*** Failers
No match
- École
+ a\x{1234}b
+No match
+ ac\ncb
No match
-/^[\W]+/
- École
- 0: \xc9
+/a(.{3,})b/8
+ a\x{1234}xyb
+ 0: a\x{1234}xyb
+ 1: \x{1234}xy
+ a\x{1234}\x{4321}yb
+ 0: a\x{1234}\x{4321}yb
+ 1: \x{1234}\x{4321}y
+ a\x{1234}\x{4321}\x{3412}b
+ 0: a\x{1234}\x{4321}\x{3412}b
+ 1: \x{1234}\x{4321}\x{3412}
+ axxxxbcdefghijb
+ 0: axxxxbcdefghijb
+ 1: xxxxbcdefghij
+ a\x{1234}\x{4321}\x{3412}\x{3421}b
+ 0: a\x{1234}\x{4321}\x{3412}\x{3421}b
+ 1: \x{1234}\x{4321}\x{3412}\x{3421}
+ *** Failers
+No match
+ a\x{1234}b
+No match
-/^[\W]+/Lfr
+/a(.{3,}?)b/8
+ a\x{1234}xyb
+ 0: a\x{1234}xyb
+ 1: \x{1234}xy
+ a\x{1234}\x{4321}yb
+ 0: a\x{1234}\x{4321}yb
+ 1: \x{1234}\x{4321}y
+ a\x{1234}\x{4321}\x{3412}b
+ 0: a\x{1234}\x{4321}\x{3412}b
+ 1: \x{1234}\x{4321}\x{3412}
+ axxxxbcdefghijb
+ 0: axxxxb
+ 1: xxxx
+ a\x{1234}\x{4321}\x{3412}\x{3421}b
+ 0: a\x{1234}\x{4321}\x{3412}\x{3421}b
+ 1: \x{1234}\x{4321}\x{3412}\x{3421}
*** Failers
- 0: ***
- École
+No match
+ a\x{1234}b
No match
-/[\b]/
- \b
- 0: \x08
+/a(.{3,5})b/8
+ a\x{1234}xyb
+ 0: a\x{1234}xyb
+ 1: \x{1234}xy
+ a\x{1234}\x{4321}yb
+ 0: a\x{1234}\x{4321}yb
+ 1: \x{1234}\x{4321}y
+ a\x{1234}\x{4321}\x{3412}b
+ 0: a\x{1234}\x{4321}\x{3412}b
+ 1: \x{1234}\x{4321}\x{3412}
+ axxxxbcdefghijb
+ 0: axxxxb
+ 1: xxxx
+ a\x{1234}\x{4321}\x{3412}\x{3421}b
+ 0: a\x{1234}\x{4321}\x{3412}\x{3421}b
+ 1: \x{1234}\x{4321}\x{3412}\x{3421}
+ axbxxbcdefghijb
+ 0: axbxxb
+ 1: xbxx
+ axxxxxbcdefghijb
+ 0: axxxxxb
+ 1: xxxxx
*** Failers
No match
- a
+ a\x{1234}b
+No match
+ axxxxxxbcdefghijb
No match
-/[\b]/Lfr
- \b
- 0: \x08
+/a(.{3,5}?)b/8
+ a\x{1234}xyb
+ 0: a\x{1234}xyb
+ 1: \x{1234}xy
+ a\x{1234}\x{4321}yb
+ 0: a\x{1234}\x{4321}yb
+ 1: \x{1234}\x{4321}y
+ a\x{1234}\x{4321}\x{3412}b
+ 0: a\x{1234}\x{4321}\x{3412}b
+ 1: \x{1234}\x{4321}\x{3412}
+ axxxxbcdefghijb
+ 0: axxxxb
+ 1: xxxx
+ a\x{1234}\x{4321}\x{3412}\x{3421}b
+ 0: a\x{1234}\x{4321}\x{3412}\x{3421}b
+ 1: \x{1234}\x{4321}\x{3412}\x{3421}
+ axbxxbcdefghijb
+ 0: axbxxb
+ 1: xbxx
+ axxxxxbcdefghijb
+ 0: axxxxxb
+ 1: xxxxx
*** Failers
No match
- a
+ a\x{1234}b
+No match
+ axxxxxxbcdefghijb
No match
-/^\w+/
+/^[a\x{c0}]/8
*** Failers
No match
- École
+ \x{100}
+No match
+
+/(?<=aXb)cd/8
+ aXbcd
+ 0: cd
+
+/(?<=a\x{100}b)cd/8
+ a\x{100}bcd
+ 0: cd
+
+/(?<=a\x{100000}b)cd/8
+ a\x{100000}bcd
+ 0: cd
+
+/(?:\x{100}){3}b/8
+ \x{100}\x{100}\x{100}b
+ 0: \x{100}\x{100}\x{100}b
+ *** Failers
+No match
+ \x{100}\x{100}b
+No match
+
+/\x{ab}/8
+ \x{ab}
+ 0: \x{ab}
+ \xc2\xab
+ 0: \x{ab}
+ *** Failers
+No match
+ \x00{ab}
No match
-/^\w+/Lfr
- École
- 0: École
+/(?<=(.))X/8
+ WXYZ
+ 0: X
+ 1: W
+ \x{256}XYZ
+ 0: X
+ 1: \x{256}
+ *** Failers
+No match
+ XYZ
+No match
+
+/X(\C{3})/8
+ X\x{1234}
+ 0: X\x{1234}
+ 1: \x{1234}
+
+/X(\C{4})/8
+ X\x{1234}YZ
+ 0: X\x{1234}Y
+ 1: \x{1234}Y
+
+/X\C*/8
+ XYZabcdce
+ 0: XYZabcdce
+
+/X\C*?/8
+ XYZabcde
+ 0: X
+
+/X\C{3,5}/8
+ Xabcdefg
+ 0: Xabcde
+ X\x{1234}
+ 0: X\x{1234}
+ X\x{1234}YZ
+ 0: X\x{1234}YZ
+ X\x{1234}\x{512}
+ 0: X\x{1234}\x{512}
+ X\x{1234}\x{512}YZ
+ 0: X\x{1234}\x{512}
+
+/X\C{3,5}?/8
+ Xabcdefg
+ 0: Xabc
+ X\x{1234}
+ 0: X\x{1234}
+ X\x{1234}YZ
+ 0: X\x{1234}
+ X\x{1234}\x{512}
+ 0: X\x{1234}
+
+/[^a]+/8g
+ bcd
+ 0: bcd
+ \x{100}aY\x{256}Z
+ 0: \x{100}
+ 0: Y\x{256}Z
+
+/^[^a]{2}/8
+ \x{100}bc
+ 0: \x{100}b
+
+/^[^a]{2,}/8
+ \x{100}bcAa
+ 0: \x{100}bcA
+
+/^[^a]{2,}?/8
+ \x{100}bca
+ 0: \x{100}b
+
+/[^a]+/8ig
+ bcd
+ 0: bcd
+ \x{100}aY\x{256}Z
+ 0: \x{100}
+ 0: Y\x{256}Z
+
+/^[^a]{2}/8i
+ \x{100}bc
+ 0: \x{100}b
+
+/^[^a]{2,}/8i
+ \x{100}bcAa
+ 0: \x{100}bc
+
+/^[^a]{2,}?/8i
+ \x{100}bca
+ 0: \x{100}b
+
+/\x{100}{0,0}/8
+ abcd
+ 0:
+
+/\x{100}?/8
+ abcd
+ 0:
+ \x{100}\x{100}
+ 0: \x{100}
+
+/\x{100}{0,3}/8
+ \x{100}\x{100}
+ 0: \x{100}\x{100}
+ \x{100}\x{100}\x{100}\x{100}
+ 0: \x{100}\x{100}\x{100}
+
+/\x{100}*/8
+ abce
+ 0:
+ \x{100}\x{100}\x{100}\x{100}
+ 0: \x{100}\x{100}\x{100}\x{100}
-/(.+)\b(.+)/
- École
- 0: \xc9cole
- 1: \xc9
- 2: cole
+/\x{100}{1,1}/8
+ abcd\x{100}\x{100}\x{100}\x{100}
+ 0: \x{100}
-/(.+)\b(.+)/Lfr
+/\x{100}{1,3}/8
+ abcd\x{100}\x{100}\x{100}\x{100}
+ 0: \x{100}\x{100}\x{100}
+
+/\x{100}+/8
+ abcd\x{100}\x{100}\x{100}\x{100}
+ 0: \x{100}\x{100}\x{100}\x{100}
+
+/\x{100}{3}/8
+ abcd\x{100}\x{100}\x{100}XX
+ 0: \x{100}\x{100}\x{100}
+
+/\x{100}{3,5}/8
+ abcd\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}XX
+ 0: \x{100}\x{100}\x{100}\x{100}\x{100}
+
+/\x{100}{3,}/8
+ abcd\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}XX
+ 0: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
+
+/(?<=a\x{100}{2}b)X/8+
+ Xyyya\x{100}\x{100}bXzzz
+ 0: X
+ 0+ zzz
+
+/\D*/8
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+
+/\D*/8
+ \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
+ 0: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}
+
+/\D/8
+ 1X2
+ 0: X
+ 1\x{100}2
+ 0: \x{100}
+
+/>\S/8
+ > >X Y
+ 0: >X
+ > >\x{100} Y
+ 0: >\x{100}
+
+/\d/8
+ \x{100}3
+ 0: 3
+
+/\s/8
+ \x{100} X
+ 0:
+
+/\D+/8
+ 12abcd34
+ 0: abcd
*** Failers
0: *** Failers
- 1: ***
- 2: Failers
- École
-No match
-
-/École/i
- École
- 0: \xc9cole
- *** Failers
-No match
- école
-No match
-
-/École/iLfr
- École
- 0: École
- école
- 0: école
-
-/\w/IS
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-Starting character set: 0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P
- Q R S T U V W X Y Z _ a b c d e f g h i j k l m n o p q r s t u v w x y z
-
-/\w/ISLfr
-Capturing subpattern count = 0
-No options
-No first char
-No need char
-Starting character set: 0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P
- Q R S T U V W X Y Z _ a b c d e f g h i j k l m n o p q r s t u v w x y z
- À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï Ð Ñ Ò Ó Ô Õ Ö Ø Ù Ú Û Ü Ý Þ ß à á â ã ä å
- æ ç è é ê ë ì í î ï ð ñ ò ó ô õ ö ø ù ú û ü ý þ ÿ
-
-/^[\xc8-\xc9]/iLfr
- École
- 0: É
- école
- 0: é
-
-/^[\xc8-\xc9]/Lfr
- École
- 0: É
+ 1234
+No match
+
+/\D{2,3}/8
+ 12abcd34
+ 0: abc
+ 12ab34
+ 0: ab
+ *** Failers
+ 0: ***
+ 1234
+No match
+ 12a34
+No match
+
+/\D{2,3}?/8
+ 12abcd34
+ 0: ab
+ 12ab34
+ 0: ab
+ *** Failers
+ 0: **
+ 1234
+No match
+ 12a34
+No match
+
+/\d+/8
+ 12abcd34
+ 0: 12
+ *** Failers
+No match
+
+/\d{2,3}/8
+ 12abcd34
+ 0: 12
+ 1234abcd
+ 0: 123
+ *** Failers
+No match
+ 1.4
+No match
+
+/\d{2,3}?/8
+ 12abcd34
+ 0: 12
+ 1234abcd
+ 0: 12
+ *** Failers
+No match
+ 1.4
+No match
+
+/\S+/8
+ 12abcd34
+ 0: 12abcd34
+ *** Failers
+ 0: ***
+ \ \
+No match
+
+/\S{2,3}/8
+ 12abcd34
+ 0: 12a
+ 1234abcd
+ 0: 123
+ *** Failers
+ 0: ***
+ \ \
+No match
+
+/\S{2,3}?/8
+ 12abcd34
+ 0: 12
+ 1234abcd
+ 0: 12
+ *** Failers
+ 0: **
+ \ \
+No match
+
+/>\s+</8+
+ 12> <34
+ 0: > <
+ 0+ 34
+ *** Failers
+No match
+
+/>\s{2,3}</8+
+ ab> <cd
+ 0: > <
+ 0+ cd
+ ab> <ce
+ 0: > <
+ 0+ ce
+ *** Failers
+No match
+ ab> <cd
+No match
+
+/>\s{2,3}?</8+
+ ab> <cd
+ 0: > <
+ 0+ cd
+ ab> <ce
+ 0: > <
+ 0+ ce
+ *** Failers
+No match
+ ab> <cd
+No match
+
+/\w+/8
+ 12 34
+ 0: 12
+ *** Failers
+ 0: Failers
+ +++=*!
+No match
+
+/\w{2,3}/8
+ ab cd
+ 0: ab
+ abcd ce
+ 0: abc
+ *** Failers
+ 0: Fai
+ a.b.c
+No match
+
+/\w{2,3}?/8
+ ab cd
+ 0: ab
+ abcd ce
+ 0: ab
+ *** Failers
+ 0: Fa
+ a.b.c
+No match
+
+/\W+/8
+ 12====34
+ 0: ====
+ *** Failers
+ 0: ***
+ abcd
+No match
+
+/\W{2,3}/8
+ ab====cd
+ 0: ===
+ ab==cd
+ 0: ==
+ *** Failers
+ 0: ***
+ a.b.c
+No match
+
+/\W{2,3}?/8
+ ab====cd
+ 0: ==
+ ab==cd
+ 0: ==
+ *** Failers
+ 0: **
+ a.b.c
+No match
+
+/[\x{100}]/8
+ \x{100}
+ 0: \x{100}
+ Z\x{100}
+ 0: \x{100}
+ \x{100}Z
+ 0: \x{100}
+ *** Failers
+No match
+
+/[Z\x{100}]/8
+ Z\x{100}
+ 0: Z
+ \x{100}
+ 0: \x{100}
+ \x{100}Z
+ 0: \x{100}
*** Failers
No match
- école
+
+/[\x{100}\x{200}]/8
+ ab\x{100}cd
+ 0: \x{100}
+ ab\x{200}cd
+ 0: \x{200}
+ *** Failers
+No match
+
+/[\x{100}-\x{200}]/8
+ ab\x{100}cd
+ 0: \x{100}
+ ab\x{200}cd
+ 0: \x{200}
+ ab\x{111}cd
+ 0: \x{111}
+ *** Failers
No match
-/ End of testinput4 /
+/[z-\x{200}]/8
+ ab\x{100}cd
+ 0: \x{100}
+ ab\x{200}cd
+ 0: \x{200}
+ ab\x{111}cd
+ 0: \x{111}
+ abzcd
+ 0: z
+ ab|cd
+ 0: |
+ *** Failers
+No match
+
+/[Q\x{100}\x{200}]/8
+ ab\x{100}cd
+ 0: \x{100}
+ ab\x{200}cd
+ 0: \x{200}
+ Q?
+ 0: Q
+ *** Failers
+No match
+
+/[Q\x{100}-\x{200}]/8
+ ab\x{100}cd
+ 0: \x{100}
+ ab\x{200}cd
+ 0: \x{200}
+ ab\x{111}cd
+ 0: \x{111}
+ Q?
+ 0: Q
+ *** Failers
+No match
+
+/[Qz-\x{200}]/8
+ ab\x{100}cd
+ 0: \x{100}
+ ab\x{200}cd
+ 0: \x{200}
+ ab\x{111}cd
+ 0: \x{111}
+ abzcd
+ 0: z
+ ab|cd
+ 0: |
+ Q?
+ 0: Q
+ *** Failers
+No match
+
+/[\x{100}\x{200}]{1,3}/8
+ ab\x{100}cd
+ 0: \x{100}
+ ab\x{200}cd
+ 0: \x{200}
+ ab\x{200}\x{100}\x{200}\x{100}cd
+ 0: \x{200}\x{100}\x{200}
+ *** Failers
+No match
+
+/[\x{100}\x{200}]{1,3}?/8
+ ab\x{100}cd
+ 0: \x{100}
+ ab\x{200}cd
+ 0: \x{200}
+ ab\x{200}\x{100}\x{200}\x{100}cd
+ 0: \x{200}
+ *** Failers
+No match
+
+/[Q\x{100}\x{200}]{1,3}/8
+ ab\x{100}cd
+ 0: \x{100}
+ ab\x{200}cd
+ 0: \x{200}
+ ab\x{200}\x{100}\x{200}\x{100}cd
+ 0: \x{200}\x{100}\x{200}
+ *** Failers
+No match
+
+/[Q\x{100}\x{200}]{1,3}?/8
+ ab\x{100}cd
+ 0: \x{100}
+ ab\x{200}cd
+ 0: \x{200}
+ ab\x{200}\x{100}\x{200}\x{100}cd
+ 0: \x{200}
+ *** Failers
+No match
+
+/(?<=[\x{100}\x{200}])X/8
+ abc\x{200}X
+ 0: X
+ abc\x{100}X
+ 0: X
+ *** Failers
+No match
+ X
+No match
+
+/(?<=[Q\x{100}\x{200}])X/8
+ abc\x{200}X
+ 0: X
+ abc\x{100}X
+ 0: X
+ abQX
+ 0: X
+ *** Failers
+No match
+ X
+No match
+/(?<=[\x{100}\x{200}]{3})X/8
+ abc\x{100}\x{200}\x{100}X
+ 0: X
+ *** Failers
+No match
+ abc\x{200}X
+No match
+ X
+No match
+
+/[^\x{100}\x{200}]X/8
+ AX
+ 0: AX
+ \x{150}X
+ 0: \x{150}X
+ \x{500}X
+ 0: \x{500}X
+ *** Failers
+No match
+ \x{100}X
+No match
+ \x{200}X
+No match
+
+/[^Q\x{100}\x{200}]X/8
+ AX
+ 0: AX
+ \x{150}X
+ 0: \x{150}X
+ \x{500}X
+ 0: \x{500}X
+ *** Failers
+No match
+ \x{100}X
+No match
+ \x{200}X
+No match
+ QX
+No match
+
+/[^\x{100}-\x{200}]X/8
+ AX
+ 0: AX
+ \x{500}X
+ 0: \x{500}X
+ *** Failers
+No match
+ \x{100}X
+No match
+ \x{150}X
+No match
+ \x{200}X
+No match
+
+/a\Cb/
+ aXb
+ 0: aXb
+ a\nb
+ 0: a\x0ab
+
+/a\Cb/8
+ aXb
+ 0: aXb
+ a\nb
+ 0: a\x{0a}b
+ *** Failers
+No match
+ a\x{100}b
+No match
+
+/[z-\x{100}]/8i
+ z
+ 0: z
+ Z
+ 0: Z
+ \x{100}
+ 0: \x{100}
+ *** Failers
+No match
+ \x{102}
+No match
+ y
+No match
+
+/[\xFF]/
+ >\xff<
+ 0: \xff
+
+/[\xff]/8
+ >\x{ff}<
+ 0: \x{ff}
+
+/[^\xFF]/
+ XYZ
+ 0: X
+
+/[^\xff]/8
+ XYZ
+ 0: X
+ \x{123}
+ 0: \x{123}
+
+/^[ac]*b/8
+ xb
+No match
+
+/^[ac\x{100}]*b/8
+ xb
+No match
+
+/^[^x]*b/8i
+ xb
+No match
+
+/^[^x]*b/8
+ xb
+No match
+
+/^\d*b/8
+ xb
+No match
+
+/(|a)/g8
+ catac
+ 0:
+ 1:
+ 0:
+ 1:
+ 0: a
+ 1: a
+ 0:
+ 1:
+ 0:
+ 1:
+ 0: a
+ 1: a
+ 0:
+ 1:
+ 0:
+ 1:
+ a\x{256}a
+ 0:
+ 1:
+ 0: a
+ 1: a
+ 0:
+ 1:
+ 0:
+ 1:
+ 0: a
+ 1: a
+ 0:
+ 1:
+
+/^\x{85}$/8i
+ \x{85}
+ 0: \x{85}
+
+/ End of testinput4 /
diff --git a/srclib/pcre/testdata/testoutput5 b/srclib/pcre/testdata/testoutput5
index 6bb9ad31b4..b010957bc5 100644
--- a/srclib/pcre/testdata/testoutput5
+++ b/srclib/pcre/testdata/testoutput5
@@ -1,242 +1,1075 @@
-PCRE version 3.9 02-Jan-2002
+PCRE version 5.0 13-Sep-2004
-/-- Because of problems with Perl 5.6 in handling UTF-8 vs non UTF-8 --/
-/-- strings automatically, do not use the \x{} construct except with --/
+/\x{100}/8DM
+Memory allocation (code space): 10
+------------------------------------------------------------------
+ 0 6 Bra 0
+ 3 \x{100}
+ 6 6 Ket
+ 9 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: utf8
+First char = 196
+Need char = 128
+
+/\x{1000}/8DM
+Memory allocation (code space): 11
+------------------------------------------------------------------
+ 0 7 Bra 0
+ 3 \x{1000}
+ 7 7 Ket
+ 10 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: utf8
+First char = 225
+Need char = 128
+
+/\x{10000}/8DM
+Memory allocation (code space): 12
+------------------------------------------------------------------
+ 0 8 Bra 0
+ 3 \x{10000}
+ 8 8 Ket
+ 11 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: utf8
+First char = 240
+Need char = 128
+
+/\x{100000}/8DM
+Memory allocation (code space): 12
+------------------------------------------------------------------
+ 0 8 Bra 0
+ 3 \x{100000}
+ 8 8 Ket
+ 11 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: utf8
+First char = 244
+Need char = 128
+
+/\x{1000000}/8DM
+Memory allocation (code space): 13
+------------------------------------------------------------------
+ 0 9 Bra 0
+ 3 \x{1000000}
+ 9 9 Ket
+ 12 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: utf8
+First char = 249
+Need char = 128
+
+/\x{4000000}/8DM
+Memory allocation (code space): 14
+------------------------------------------------------------------
+ 0 10 Bra 0
+ 3 \x{4000000}
+ 10 10 Ket
+ 13 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: utf8
+First char = 252
+Need char = 128
+
+/\x{7fffFFFF}/8DM
+Memory allocation (code space): 14
+------------------------------------------------------------------
+ 0 10 Bra 0
+ 3 \x{7fffffff}
+ 10 10 Ket
+ 13 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: utf8
+First char = 253
+Need char = 191
+
+/[\x{ff}]/8DM
+Memory allocation (code space): 10
+------------------------------------------------------------------
+ 0 6 Bra 0
+ 3 \x{ff}
+ 6 6 Ket
+ 9 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: utf8
+First char = 195
+Need char = 191
+
+/[\x{100}]/8DM
+Memory allocation (code space): 47
+------------------------------------------------------------------
+ 0 11 Bra 0
+ 3 [\x{100}]
+ 11 11 Ket
+ 14 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: utf8
+No first char
+No need char
+
+/\x{ffffffff}/8
+Failed: character value in \x{...} sequence is too large at offset 11
+
+/\x{100000000}/8
+Failed: character value in \x{...} sequence is too large at offset 12
+
+/^\x{100}a\x{1234}/8
+ \x{100}a\x{1234}bcd
+ 0: \x{100}a\x{1234}
+
+/\x80/8D
+------------------------------------------------------------------
+ 0 6 Bra 0
+ 3 \x{80}
+ 6 6 Ket
+ 9 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: utf8
+First char = 194
+Need char = 128
+
+/\xff/8D
+------------------------------------------------------------------
+ 0 6 Bra 0
+ 3 \x{ff}
+ 6 6 Ket
+ 9 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: utf8
+First char = 195
+Need char = 191
+
+/\x{0041}\x{2262}\x{0391}\x{002e}/D8
+------------------------------------------------------------------
+ 0 14 Bra 0
+ 3 A\x{2262}\x{391}.
+ 14 14 Ket
+ 17 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: utf8
+First char = 'A'
+Need char = '.'
+ \x{0041}\x{2262}\x{0391}\x{002e}
+ 0: A\x{2262}\x{391}.
+
+/\x{D55c}\x{ad6d}\x{C5B4}/D8
+------------------------------------------------------------------
+ 0 15 Bra 0
+ 3 \x{d55c}\x{ad6d}\x{c5b4}
+ 15 15 Ket
+ 18 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: utf8
+First char = 237
+Need char = 180
+ \x{D55c}\x{ad6d}\x{C5B4}
+ 0: \x{d55c}\x{ad6d}\x{c5b4}
+
+/\x{65e5}\x{672c}\x{8a9e}/D8
+------------------------------------------------------------------
+ 0 15 Bra 0
+ 3 \x{65e5}\x{672c}\x{8a9e}
+ 15 15 Ket
+ 18 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: utf8
+First char = 230
+Need char = 158
+ \x{65e5}\x{672c}\x{8a9e}
+ 0: \x{65e5}\x{672c}\x{8a9e}
+
+/\x{80}/D8
+------------------------------------------------------------------
+ 0 6 Bra 0
+ 3 \x{80}
+ 6 6 Ket
+ 9 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: utf8
+First char = 194
+Need char = 128
+
+/\x{084}/D8
+------------------------------------------------------------------
+ 0 6 Bra 0
+ 3 \x{84}
+ 6 6 Ket
+ 9 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: utf8
+First char = 194
+Need char = 132
+
+/\x{104}/D8
+------------------------------------------------------------------
+ 0 6 Bra 0
+ 3 \x{104}
+ 6 6 Ket
+ 9 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: utf8
+First char = 196
+Need char = 132
+
+/\x{861}/D8
+------------------------------------------------------------------
+ 0 7 Bra 0
+ 3 \x{861}
+ 7 7 Ket
+ 10 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: utf8
+First char = 224
+Need char = 161
+
+/\x{212ab}/D8
+------------------------------------------------------------------
+ 0 8 Bra 0
+ 3 \x{212ab}
+ 8 8 Ket
+ 11 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: utf8
+First char = 240
+Need char = 171
+
+/.{3,5}X/D8
+------------------------------------------------------------------
+ 0 13 Bra 0
+ 3 Any{3}
+ 7 Any{0,2}
+ 11 X
+ 13 13 Ket
+ 16 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Partial matching not supported
+Options: utf8
+No first char
+Need char = 'X'
+ \x{212ab}\x{212ab}\x{212ab}\x{861}X
+ 0: \x{212ab}\x{212ab}\x{212ab}\x{861}X
+
+
+/.{3,5}?/D8
+------------------------------------------------------------------
+ 0 11 Bra 0
+ 3 Any{3}
+ 7 Any{0,2}?
+ 11 11 Ket
+ 14 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Partial matching not supported
+Options: utf8
+No first char
+No need char
+ \x{212ab}\x{212ab}\x{212ab}\x{861}
+ 0: \x{212ab}\x{212ab}\x{212ab}
+
+/-- These tests are here rather than in testinput4 because Perl 5.6 has --/
+/-- some problems with UTF-8 support, in the area of \x{..} where the --/
No match
-/-- patterns that have the /8 option set, and don't use them without! --/
+/-- value is < 255. It grumbles about invalid UTF-8 strings. --/
No match
-/a.b/8
- acb
- 0: acb
- a\x7fb
- 0: a\x{7f}b
- a\x{100}b
- 0: a\x{100}b
+/^[a\x{c0}]b/8
+ \x{c0}b
+ 0: \x{c0}b
+
+/^([a\x{c0}]*?)aa/8
+ a\x{c0}aaaa/
+ 0: a\x{c0}aa
+ 1: a\x{c0}
+
+/^([a\x{c0}]*?)aa/8
+ a\x{c0}aaaa/
+ 0: a\x{c0}aa
+ 1: a\x{c0}
+ a\x{c0}a\x{c0}aaa/
+ 0: a\x{c0}a\x{c0}aa
+ 1: a\x{c0}a\x{c0}
+
+/^([a\x{c0}]*)aa/8
+ a\x{c0}aaaa/
+ 0: a\x{c0}aaaa
+ 1: a\x{c0}aa
+ a\x{c0}a\x{c0}aaa/
+ 0: a\x{c0}a\x{c0}aaa
+ 1: a\x{c0}a\x{c0}a
+
+/^([a\x{c0}]*)a\x{c0}/8
+ a\x{c0}aaaa/
+ 0: a\x{c0}
+ 1:
+ a\x{c0}a\x{c0}aaa/
+ 0: a\x{c0}a\x{c0}
+ 1: a\x{c0}
+
+/-- --/
+
+/(?<=\C)X/8
+Failed: \C not allowed in lookbehind assertion at offset 6
+
+/-- This one is here not because it's different to Perl, but because the --/
+/-- way the captured single-byte is displayed. (In Perl it becomes a --/
+No match
+/-- character, and you can't tell the difference.) --/
+No match
+
+/X(\C)(.*)/8
+ X\x{1234}
+ 0: X\x{1234}
+ 1: \xe1
+ 2: \x88\xb4
+ X\nabc
+ 0: X\x{0a}abc
+ 1: \x{0a}
+ 2: abc
+
+/^[ab]/8D
+------------------------------------------------------------------
+ 0 37 Bra 0
+ 3 ^
+ 4 [ab]
+ 37 37 Ket
+ 40 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: anchored utf8
+No first char
+No need char
+ bar
+ 0: b
*** Failers
No match
- a\nb
+ c
+No match
+ \x{ff}
+No match
+ \x{100}
No match
-/a(.{3})b/8
- a\x{4000}xyb
- 0: a\x{4000}xyb
- 1: \x{4000}xy
- a\x{4000}\x7fyb
- 0: a\x{4000}\x{7f}yb
- 1: \x{4000}\x{7f}y
- a\x{4000}\x{100}yb
- 0: a\x{4000}\x{100}yb
- 1: \x{4000}\x{100}y
- *** Failers
+/^[^ab]/8D
+------------------------------------------------------------------
+ 0 37 Bra 0
+ 3 ^
+ 4 [\x00-`c-\xff] (neg)
+ 37 37 Ket
+ 40 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: anchored utf8
+No first char
+No need char
+ c
+ 0: c
+ \x{ff}
+ 0: \x{ff}
+ \x{100}
+ 0: \x{100}
+ *** Failers
+ 0: *
+ aaa
No match
- a\x{4000}b
+
+/[^ab\xC0-\xF0]/8SD
+------------------------------------------------------------------
+ 0 36 Bra 0
+ 3 [\x00-`c-\xbf\xf1-\xff] (neg)
+ 36 36 Ket
+ 39 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: utf8
+No first char
+No need char
+Starting byte set: \x00 \x01 \x02 \x03 \x04 \x05 \x06 \x07 \x08 \x09 \x0a
+ \x0b \x0c \x0d \x0e \x0f \x10 \x11 \x12 \x13 \x14 \x15 \x16 \x17 \x18 \x19
+ \x1a \x1b \x1c \x1d \x1e \x1f \x20 ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4
+ 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y
+ Z [ \ ] ^ _ ` c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ \x7f
+ \xc2 \xc3 \xc4 \xc5 \xc6 \xc7 \xc8 \xc9 \xca \xcb \xcc \xcd \xce \xcf \xd0
+ \xd1 \xd2 \xd3 \xd4 \xd5 \xd6 \xd7 \xd8 \xd9 \xda \xdb \xdc \xdd \xde \xdf
+ \xe0 \xe1 \xe2 \xe3 \xe4 \xe5 \xe6 \xe7 \xe8 \xe9 \xea \xeb \xec \xed \xee
+ \xef \xf0 \xf1 \xf2 \xf3 \xf4 \xf5 \xf6 \xf7 \xf8 \xf9 \xfa \xfb \xfc \xfd
+ \xfe \xff
+ \x{f1}
+ 0: \x{f1}
+ \x{bf}
+ 0: \x{bf}
+ \x{100}
+ 0: \x{100}
+ \x{1000}
+ 0: \x{1000}
+ *** Failers
+ 0: *
+ \x{c0}
No match
- ac\ncb
+ \x{f0}
No match
-/a(.*?)(.)/
- a\xc0\x88b
- 0: a\xc0
- 1:
- 2: \xc0
+/Ä€{3,4}/8SD
+------------------------------------------------------------------
+ 0 13 Bra 0
+ 3 \x{100}{3}
+ 8 \x{100}{,1}
+ 13 13 Ket
+ 16 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Partial matching not supported
+Options: utf8
+First char = 196
+Need char = 128
+Study returned NULL
+ \x{100}\x{100}\x{100}\x{100\x{100}
+ 0: \x{100}\x{100}\x{100}
-/a(.*?)(.)/8
- a\x{100}b
- 0: a\x{100}
- 1:
- 2: \x{100}
-
-/a(.*)(.)/
- a\xc0\x88b
- 0: a\xc0\x88b
- 1: \xc0\x88
- 2: b
-
-/a(.*)(.)/8
- a\x{100}b
- 0: a\x{100}b
- 1: \x{100}
- 2: b
-
-/a(.)(.)/
- a\xc0\x92bcd
- 0: a\xc0\x92
- 1: \xc0
- 2: \x92
-
-/a(.)(.)/8
- a\x{240}bcd
- 0: a\x{240}b
- 1: \x{240}
- 2: b
-
-/a(.?)(.)/
- a\xc0\x92bcd
- 0: a\xc0\x92
- 1: \xc0
- 2: \x92
-
-/a(.?)(.)/8
- a\x{240}bcd
- 0: a\x{240}b
- 1: \x{240}
- 2: b
-
-/a(.??)(.)/
- a\xc0\x92bcd
- 0: a\xc0
- 1:
- 2: \xc0
+/(\x{100}+|x)/8SD
+------------------------------------------------------------------
+ 0 17 Bra 0
+ 3 6 Bra 1
+ 6 \x{100}+
+ 9 5 Alt
+ 12 x
+ 14 11 Ket
+ 17 17 Ket
+ 20 End
+------------------------------------------------------------------
+Capturing subpattern count = 1
+Partial matching not supported
+Options: utf8
+No first char
+No need char
+Starting byte set: x \xc4
-/a(.??)(.)/8
- a\x{240}bcd
- 0: a\x{240}
- 1:
- 2: \x{240}
-
-/a(.{3})b/8
- a\x{1234}xyb
- 0: a\x{1234}xyb
- 1: \x{1234}xy
- a\x{1234}\x{4321}yb
- 0: a\x{1234}\x{4321}yb
- 1: \x{1234}\x{4321}y
- a\x{1234}\x{4321}\x{3412}b
- 0: a\x{1234}\x{4321}\x{3412}b
- 1: \x{1234}\x{4321}\x{3412}
- *** Failers
+/(\x{100}*a|x)/8SD
+------------------------------------------------------------------
+ 0 19 Bra 0
+ 3 8 Bra 1
+ 6 \x{100}*
+ 9 a
+ 11 5 Alt
+ 14 x
+ 16 13 Ket
+ 19 19 Ket
+ 22 End
+------------------------------------------------------------------
+Capturing subpattern count = 1
+Partial matching not supported
+Options: utf8
+No first char
+No need char
+Starting byte set: a x \xc4
+
+/(\x{100}{0,2}a|x)/8SD
+------------------------------------------------------------------
+ 0 21 Bra 0
+ 3 10 Bra 1
+ 6 \x{100}{,2}
+ 11 a
+ 13 5 Alt
+ 16 x
+ 18 15 Ket
+ 21 21 Ket
+ 24 End
+------------------------------------------------------------------
+Capturing subpattern count = 1
+Partial matching not supported
+Options: utf8
+No first char
+No need char
+Starting byte set: a x \xc4
+
+/(\x{100}{1,2}a|x)/8SD
+------------------------------------------------------------------
+ 0 24 Bra 0
+ 3 13 Bra 1
+ 6 \x{100}
+ 9 \x{100}{,1}
+ 14 a
+ 16 5 Alt
+ 19 x
+ 21 18 Ket
+ 24 24 Ket
+ 27 End
+------------------------------------------------------------------
+Capturing subpattern count = 1
+Partial matching not supported
+Options: utf8
+No first char
+No need char
+Starting byte set: x \xc4
+
+/\x{100}*(\d+|"(?1)")/8
+ 1234
+ 0: 1234
+ 1: 1234
+ "1234"
+ 0: "1234"
+ 1: "1234"
+ \x{100}1234
+ 0: \x{100}1234
+ 1: 1234
+ "\x{100}1234"
+ 0: \x{100}1234
+ 1: 1234
+ \x{100}\x{100}12ab
+ 0: \x{100}\x{100}12
+ 1: 12
+ \x{100}\x{100}"12"
+ 0: \x{100}\x{100}"12"
+ 1: "12"
+ *** Failers
No match
- a\x{1234}b
-No match
- ac\ncb
-No match
-
-/a(.{3,})b/8
- a\x{1234}xyb
- 0: a\x{1234}xyb
- 1: \x{1234}xy
- a\x{1234}\x{4321}yb
- 0: a\x{1234}\x{4321}yb
- 1: \x{1234}\x{4321}y
- a\x{1234}\x{4321}\x{3412}b
- 0: a\x{1234}\x{4321}\x{3412}b
- 1: \x{1234}\x{4321}\x{3412}
- axxxxbcdefghijb
- 0: axxxxbcdefghijb
- 1: xxxxbcdefghij
- a\x{1234}\x{4321}\x{3412}\x{3421}b
- 0: a\x{1234}\x{4321}\x{3412}\x{3421}b
- 1: \x{1234}\x{4321}\x{3412}\x{3421}
- *** Failers
+ \x{100}\x{100}abcd
No match
- a\x{1234}b
-No match
-
-/a(.{3,}?)b/8
- a\x{1234}xyb
- 0: a\x{1234}xyb
- 1: \x{1234}xy
- a\x{1234}\x{4321}yb
- 0: a\x{1234}\x{4321}yb
- 1: \x{1234}\x{4321}y
- a\x{1234}\x{4321}\x{3412}b
- 0: a\x{1234}\x{4321}\x{3412}b
- 1: \x{1234}\x{4321}\x{3412}
- axxxxbcdefghijb
- 0: axxxxb
- 1: xxxx
- a\x{1234}\x{4321}\x{3412}\x{3421}b
- 0: a\x{1234}\x{4321}\x{3412}\x{3421}b
- 1: \x{1234}\x{4321}\x{3412}\x{3421}
- *** Failers
+
+/\x{100}/8D
+------------------------------------------------------------------
+ 0 6 Bra 0
+ 3 \x{100}
+ 6 6 Ket
+ 9 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: utf8
+First char = 196
+Need char = 128
+
+/\x{100}*/8D
+------------------------------------------------------------------
+ 0 6 Bra 0
+ 3 \x{100}*
+ 6 6 Ket
+ 9 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Partial matching not supported
+Options: utf8
+No first char
+No need char
+
+/a\x{100}*/8D
+------------------------------------------------------------------
+ 0 8 Bra 0
+ 3 a
+ 5 \x{100}*
+ 8 8 Ket
+ 11 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Partial matching not supported
+Options: utf8
+First char = 'a'
+No need char
+
+/ab\x{100}*/8D
+------------------------------------------------------------------
+ 0 10 Bra 0
+ 3 ab
+ 7 \x{100}*
+ 10 10 Ket
+ 13 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Partial matching not supported
+Options: utf8
+First char = 'a'
+Need char = 'b'
+
+/a\x{100}\x{101}*/8D
+------------------------------------------------------------------
+ 0 11 Bra 0
+ 3 a\x{100}
+ 8 \x{101}*
+ 11 11 Ket
+ 14 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Partial matching not supported
+Options: utf8
+First char = 'a'
+Need char = 128
+
+/a\x{100}\x{101}+/8D
+------------------------------------------------------------------
+ 0 11 Bra 0
+ 3 a\x{100}
+ 8 \x{101}+
+ 11 11 Ket
+ 14 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Partial matching not supported
+Options: utf8
+First char = 'a'
+Need char = 129
+
+/\x{100}*A/8D
+------------------------------------------------------------------
+ 0 8 Bra 0
+ 3 \x{100}*
+ 6 A
+ 8 8 Ket
+ 11 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Partial matching not supported
+Options: utf8
+No first char
+Need char = 'A'
+ A
+ 0: A
+
+/\x{100}*\d(?R)/8D
+------------------------------------------------------------------
+ 0 10 Bra 0
+ 3 \x{100}*
+ 6 \d
+ 7 0 Recurse
+ 10 10 Ket
+ 13 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Partial matching not supported
+Options: utf8
+No first char
+No need char
+
+/[^\x{c4}]/D
+------------------------------------------------------------------
+ 0 36 Bra 0
+ 3 [\x01-35-bd-z|~-\xff] (neg)
+ 36 36 Ket
+ 39 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+No options
+No first char
+No need char
+
+/[^\x{c4}]/8D
+------------------------------------------------------------------
+ 0 36 Bra 0
+ 3 [\x00-\xc3\xc5-\xff] (neg)
+ 36 36 Ket
+ 39 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: utf8
+No first char
+No need char
+
+/[\x{100}]/8DM
+Memory allocation (code space): 47
+------------------------------------------------------------------
+ 0 11 Bra 0
+ 3 [\x{100}]
+ 11 11 Ket
+ 14 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: utf8
+No first char
+No need char
+ \x{100}
+ 0: \x{100}
+ Z\x{100}
+ 0: \x{100}
+ \x{100}Z
+ 0: \x{100}
+ *** Failers
No match
- a\x{1234}b
-No match
-
-/a(.{3,5})b/8
- a\x{1234}xyb
- 0: a\x{1234}xyb
- 1: \x{1234}xy
- a\x{1234}\x{4321}yb
- 0: a\x{1234}\x{4321}yb
- 1: \x{1234}\x{4321}y
- a\x{1234}\x{4321}\x{3412}b
- 0: a\x{1234}\x{4321}\x{3412}b
- 1: \x{1234}\x{4321}\x{3412}
- axxxxbcdefghijb
- 0: axxxxb
- 1: xxxx
- a\x{1234}\x{4321}\x{3412}\x{3421}b
- 0: a\x{1234}\x{4321}\x{3412}\x{3421}b
- 1: \x{1234}\x{4321}\x{3412}\x{3421}
- axbxxbcdefghijb
- 0: axbxxb
- 1: xbxx
- axxxxxbcdefghijb
- 0: axxxxxb
- 1: xxxxx
- *** Failers
+
+/[Z\x{100}]/8DM
+Memory allocation (code space): 47
+------------------------------------------------------------------
+ 0 43 Bra 0
+ 3 [Z\x{100}]
+ 43 43 Ket
+ 46 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: utf8
+No first char
+No need char
+ Z\x{100}
+ 0: Z
+ \x{100}
+ 0: \x{100}
+ \x{100}Z
+ 0: \x{100}
+ *** Failers
No match
- a\x{1234}b
-No match
- axxxxxxbcdefghijb
-No match
-
-/a(.{3,5}?)b/8
- a\x{1234}xyb
- 0: a\x{1234}xyb
- 1: \x{1234}xy
- a\x{1234}\x{4321}yb
- 0: a\x{1234}\x{4321}yb
- 1: \x{1234}\x{4321}y
- a\x{1234}\x{4321}\x{3412}b
- 0: a\x{1234}\x{4321}\x{3412}b
- 1: \x{1234}\x{4321}\x{3412}
- axxxxbcdefghijb
- 0: axxxxb
- 1: xxxx
- a\x{1234}\x{4321}\x{3412}\x{3421}b
- 0: a\x{1234}\x{4321}\x{3412}\x{3421}b
- 1: \x{1234}\x{4321}\x{3412}\x{3421}
- axbxxbcdefghijb
- 0: axbxxb
- 1: xbxx
- axxxxxbcdefghijb
- 0: axxxxxb
- 1: xxxxx
+
+/[\x{200}-\x{100}]/8
+Failed: range out of order in character class at offset 15
+
+/[Ä€-Ä„]/8
+ \x{100}
+ 0: \x{100}
+ \x{104}
+ 0: \x{104}
*** Failers
No match
- a\x{1234}b
+ \x{105}
No match
- axxxxxxbcdefghijb
+ \x{ff}
No match
-/^[a\x{c0}]/8
- *** Failers
-No match
+/[z-\x{100}]/8D
+------------------------------------------------------------------
+ 0 12 Bra 0
+ 3 [z-\x{100}]
+ 12 12 Ket
+ 15 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: utf8
+No first char
+No need char
+
+/[z\Qa-d]Ä€\E]/8D
+------------------------------------------------------------------
+ 0 43 Bra 0
+ 3 [\-\]adz\x{100}]
+ 43 43 Ket
+ 46 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: utf8
+No first char
+No need char
\x{100}
-No match
+ 0: \x{100}
+ Ā
+ 0: \x{100}
+
+/[\xFF]/D
+------------------------------------------------------------------
+ 0 5 Bra 0
+ 3 \xff
+ 5 5 Ket
+ 8 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+No options
+First char = 255
+No need char
+ >\xff<
+ 0: \xff
+
+/[\xff]/D8
+------------------------------------------------------------------
+ 0 6 Bra 0
+ 3 \x{ff}
+ 6 6 Ket
+ 9 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: utf8
+First char = 195
+Need char = 191
+ >\x{ff}<
+ 0: \x{ff}
-/(?<=aXb)cd/8
- aXbcd
- 0: cd
+/[^\xFF]/D
+------------------------------------------------------------------
+ 0 5 Bra 0
+ 3 [^\xff]
+ 5 5 Ket
+ 8 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+No options
+No first char
+No need char
-/(?<=a\x{100}b)cd/8
- a\x{100}bcd
- 0: cd
+/[^\xff]/8D
+------------------------------------------------------------------
+ 0 36 Bra 0
+ 3 [\x00-\xfe] (neg)
+ 36 36 Ket
+ 39 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: utf8
+No first char
+No need char
-/(?<=a\x{100000}b)cd/8
- a\x{100000}bcd
- 0: cd
+/[Ä-Ü]/8
+ Ö # Matches without Study
+ 0: \x{d6}
+ \x{d6}
+ 0: \x{d6}
-/(?:\x{100}){3}b/8
- \x{100}\x{100}\x{100}b
- 0: \x{100}\x{100}\x{100}b
- *** Failers
+/[Ä-Ü]/8S
+ Ö <-- Same with Study
+ 0: \x{d6}
+ \x{d6}
+ 0: \x{d6}
+
+/[\x{c4}-\x{dc}]/8
+ Ö # Matches without Study
+ 0: \x{d6}
+ \x{d6}
+ 0: \x{d6}
+
+/[\x{c4}-\x{dc}]/8S
+ Ö <-- Same with Study
+ 0: \x{d6}
+ \x{d6}
+ 0: \x{d6}
+
+/[Ã]/8
+Failed: invalid UTF-8 string at offset 2
+
+/Ã/8
+Failed: invalid UTF-8 string at offset 0
+
+/ÃÃÃxxx/8
+Failed: invalid UTF-8 string at offset 1
+
+/ÃÃÃxxx/8?D
+------------------------------------------------------------------
+ 0 15 Bra 0
+ 3 \X{c0}\X{c0}\X{c0}xxx
+ 15 15 Ket
+ 18 End
+------------------------------------------------------------------
+Capturing subpattern count = 0
+Options: utf8 no_utf8_check
+First char = 195
+Need char = 'x'
+
+/abc/8
+ Ã]
+Error -10
+ Ã
+Error -10
+ ÃÃÃ
+Error -10
+ ÃÃÃ\?
+No match
+
+/anything/8
+ \xc0\x80
+Error -10
+ \xc1\x8f
+Error -10
+ \xe0\x9f\x80
+Error -10
+ \xf0\x8f\x80\x80
+Error -10
+ \xf8\x87\x80\x80\x80
+Error -10
+ \xfc\x83\x80\x80\x80\x80
+Error -10
+ \xfe\x80\x80\x80\x80\x80
+Error -10
+ \xff\x80\x80\x80\x80\x80
+Error -10
+ \xc3\x8f
+No match
+ \xe0\xaf\x80
+No match
+ \xe1\x80\x80
+No match
+ \xf0\x9f\x80\x80
No match
- \x{100}\x{100}b
+ \xf1\x8f\x80\x80
+No match
+ \xf8\x88\x80\x80\x80
+No match
+ \xf9\x87\x80\x80\x80
+No match
+ \xfc\x84\x80\x80\x80\x80
+No match
+ \xfd\x83\x80\x80\x80\x80
No match
-/ End of testinput5 /
+/\x{100}abc(xyz(?1))/8D
+------------------------------------------------------------------
+ 0 27 Bra 0
+ 3 \x{100}abc
+ 12 12 Bra 1
+ 15 xyz
+ 21 12 Recurse
+ 24 12 Ket
+ 27 27 Ket
+ 30 End
+------------------------------------------------------------------
+Capturing subpattern count = 1
+Options: utf8
+First char = 196
+Need char = 'z'
+
+/[^\x{100}]abc(xyz(?1))/8D
+------------------------------------------------------------------
+ 0 32 Bra 0
+ 3 [^\x{100}]
+ 11 abc
+ 17 12 Bra 1
+ 20 xyz
+ 26 17 Recurse
+ 29 12 Ket
+ 32 32 Ket
+ 35 End
+------------------------------------------------------------------
+Capturing subpattern count = 1
+Options: utf8
+No first char
+Need char = 'z'
+
+/[ab\x{100}]abc(xyz(?1))/8D
+------------------------------------------------------------------
+ 0 64 Bra 0
+ 3 [ab\x{100}]
+ 43 abc
+ 49 12 Bra 1
+ 52 xyz
+ 58 49 Recurse
+ 61 12 Ket
+ 64 64 Ket
+ 67 End
+------------------------------------------------------------------
+Capturing subpattern count = 1
+Options: utf8
+No first char
+Need char = 'z'
+/(\x{100}(b(?2)c))?/D8
+------------------------------------------------------------------
+ 0 26 Bra 0
+ 3 Brazero
+ 4 19 Bra 1
+ 7 \x{100}
+ 10 10 Bra 2
+ 13 b
+ 15 10 Recurse
+ 18 c
+ 20 10 Ket
+ 23 19 Ket
+ 26 26 Ket
+ 29 End
+------------------------------------------------------------------
+Capturing subpattern count = 2
+Options: utf8
+No first char
+No need char
+
+/(\x{100}(b(?2)c)){0,2}/D8
+------------------------------------------------------------------
+ 0 55 Bra 0
+ 3 Brazero
+ 4 48 Bra 0
+ 7 19 Bra 1
+ 10 \x{100}
+ 13 10 Bra 2
+ 16 b
+ 18 13 Recurse
+ 21 c
+ 23 10 Ket
+ 26 19 Ket
+ 29 Brazero
+ 30 19 Bra 1
+ 33 \x{100}
+ 36 10 Bra 2
+ 39 b
+ 41 13 Recurse
+ 44 c
+ 46 10 Ket
+ 49 19 Ket
+ 52 48 Ket
+ 55 55 Ket
+ 58 End
+------------------------------------------------------------------
+Capturing subpattern count = 2
+Options: utf8
+No first char
+No need char
+
+/(\x{100}(b(?1)c))?/D8
+------------------------------------------------------------------
+ 0 26 Bra 0
+ 3 Brazero
+ 4 19 Bra 1
+ 7 \x{100}
+ 10 10 Bra 2
+ 13 b
+ 15 4 Recurse
+ 18 c
+ 20 10 Ket
+ 23 19 Ket
+ 26 26 Ket
+ 29 End
+------------------------------------------------------------------
+Capturing subpattern count = 2
+Options: utf8
+No first char
+No need char
+
+/(\x{100}(b(?1)c)){0,2}/D8
+------------------------------------------------------------------
+ 0 55 Bra 0
+ 3 Brazero
+ 4 48 Bra 0
+ 7 19 Bra 1
+ 10 \x{100}
+ 13 10 Bra 2
+ 16 b
+ 18 7 Recurse
+ 21 c
+ 23 10 Ket
+ 26 19 Ket
+ 29 Brazero
+ 30 19 Bra 1
+ 33 \x{100}
+ 36 10 Bra 2
+ 39 b
+ 41 7 Recurse
+ 44 c
+ 46 10 Ket
+ 49 19 Ket
+ 52 48 Ket
+ 55 55 Ket
+ 58 End
+------------------------------------------------------------------
+Capturing subpattern count = 2
+Options: utf8
+No first char
+No need char
+
+/\W/8
+ A.B
+ 0: .
+ A\x{100}B
+ 0: \x{100}
+
+/\w/8
+ \x{100}X
+ 0: X
+
+/ End of testinput5 /
diff --git a/srclib/pcre/testdata/testoutput6 b/srclib/pcre/testdata/testoutput6
index fcf084670f..732e5aa01f 100644
--- a/srclib/pcre/testdata/testoutput6
+++ b/srclib/pcre/testdata/testoutput6
@@ -1,319 +1,1013 @@
-PCRE version 3.9 02-Jan-2002
+PCRE version 5.0 13-Sep-2004
-/\x{100}/8DM
-Memory allocation (code space): 11
-------------------------------------------------------------------
- 0 7 Bra 0
- 3 2 \xc4\x80
- 7 7 Ket
- 10 End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-First char = 196
-Need char = 128
+/^\pC\pL\pM\pN\pP\pS\pZ</8
+ \x7f\x{c0}\x{30f}\x{660}\x{66c}\x{f01}\x{1680}<
+ 0: \x{7f}\x{c0}\x{30f}\x{660}\x{66c}\x{f01}\x{1680}<
+ \np\x{300}9!\$ <
+ 0: \x{0a}p\x{300}9!$ <
+ ** Failers
+No match
+ ap\x{300}9!\$ <
+No match
+
+/^\PC/8
+ X
+ 0: X
+ ** Failers
+ 0: *
+ \x7f
+No match
+
+/^\PL/8
+ 9
+ 0: 9
+ ** Failers
+ 0: *
+ \x{c0}
+No match
+
+/^\PM/8
+ X
+ 0: X
+ ** Failers
+ 0: *
+ \x{30f}
+No match
+
+/^\PN/8
+ X
+ 0: X
+ ** Failers
+ 0: *
+ \x{660}
+No match
+
+/^\PP/8
+ X
+ 0: X
+ ** Failers
+No match
+ \x{66c}
+No match
+
+/^\PS/8
+ X
+ 0: X
+ ** Failers
+ 0: *
+ \x{f01}
+No match
+
+/^\PZ/8
+ X
+ 0: X
+ ** Failers
+ 0: *
+ \x{1680}
+No match
+
+/^\p{Cc}/8
+ \x{017}
+ 0: \x{17}
+ \x{09f}
+ 0: \x{9f}
+ ** Failers
+No match
+ \x{0600}
+No match
+
+/^\p{Cf}/8
+ \x{601}
+ 0: \x{601}
+ ** Failers
+No match
+ \x{09f}
+No match
+
+/^\p{Cn}/8
+ ** Failers
+No match
+ \x{09f}
+No match
+
+/^\p{Co}/8
+ \x{f8ff}
+ 0: \x{f8ff}
+ ** Failers
+No match
+ \x{09f}
+No match
+
+/^\p{Cs}/8
+ \x{dfff}
+ 0: \x{dfff}
+ ** Failers
+No match
+ \x{09f}
+No match
+
+/^\p{Ll}/8
+ a
+ 0: a
+ ** Failers
+No match
+ Z
+No match
+ \x{dfff}
+No match
+
+/^\p{Lm}/8
+ \x{2b0}
+ 0: \x{2b0}
+ ** Failers
+No match
+ a
+No match
+
+/^\p{Lo}/8
+ \x{1bb}
+ 0: \x{1bb}
+ ** Failers
+No match
+ a
+No match
+ \x{2b0}
+No match
+
+/^\p{Lt}/8
+ \x{1c5}
+ 0: \x{1c5}
+ ** Failers
+No match
+ a
+No match
+ \x{2b0}
+No match
+
+/^\p{Lu}/8
+ A
+ 0: A
+ ** Failers
+No match
+ \x{2b0}
+No match
+
+/^\p{Mc}/8
+ \x{903}
+ 0: \x{903}
+ ** Failers
+No match
+ X
+No match
+ \x{300}
+No match
+
+/^\p{Me}/8
+ \x{488}
+ 0: \x{488}
+ ** Failers
+No match
+ X
+No match
+ \x{903}
+No match
+ \x{300}
+No match
+
+/^\p{Mn}/8
+ \x{300}
+ 0: \x{300}
+ ** Failers
+No match
+ X
+No match
+ \x{903}
+No match
+
+/^\p{Nd}+/8
+ 0123456789\x{660}\x{661}\x{662}\x{663}\x{664}\x{665}\x{666}\x{667}\x{668}\x{669}\x{66a}
+ 0: 0123456789\x{660}\x{661}\x{662}\x{663}\x{664}\x{665}\x{666}\x{667}\x{668}\x{669}
+ \x{6f0}\x{6f1}\x{6f2}\x{6f3}\x{6f4}\x{6f5}\x{6f6}\x{6f7}\x{6f8}\x{6f9}\x{6fa}
+ 0: \x{6f0}\x{6f1}\x{6f2}\x{6f3}\x{6f4}\x{6f5}\x{6f6}\x{6f7}\x{6f8}\x{6f9}
+ \x{966}\x{967}\x{968}\x{969}\x{96a}\x{96b}\x{96c}\x{96d}\x{96e}\x{96f}\x{970}
+ 0: \x{966}\x{967}\x{968}\x{969}\x{96a}\x{96b}\x{96c}\x{96d}\x{96e}\x{96f}
+ ** Failers
+No match
+ X
+No match
+
+/^\p{Nl}/8
+ \x{16ee}
+ 0: \x{16ee}
+ ** Failers
+No match
+ X
+No match
+ \x{966}
+No match
+
+/^\p{No}/8
+ \x{b2}
+ 0: \x{b2}
+ \x{b3}
+ 0: \x{b3}
+ ** Failers
+No match
+ X
+No match
+ \x{16ee}
+No match
+
+/^\p{Pc}/8
+ \x5f
+ 0: _
+ \x{203f}
+ 0: \x{203f}
+ ** Failers
+No match
+ X
+No match
+ -
+No match
+ \x{58a}
+No match
+
+/^\p{Pd}/8
+ -
+ 0: -
+ \x{58a}
+ 0: \x{58a}
+ ** Failers
+No match
+ X
+No match
+ \x{203f}
+No match
+
+/^\p{Pe}/8
+ )
+ 0: )
+ ]
+ 0: ]
+ }
+ 0: }
+ \x{f3b}
+ 0: \x{f3b}
+ ** Failers
+No match
+ X
+No match
+ \x{203f}
+No match
+ (
+No match
+ [
+No match
+ {
+No match
+ \x{f3c}
+No match
+
+/^\p{Pf}/8
+ \x{bb}
+ 0: \x{bb}
+ \x{2019}
+ 0: \x{2019}
+ ** Failers
+No match
+ X
+No match
+ \x{203f}
+No match
+
+/^\p{Pi}/8
+ \x{ab}
+ 0: \x{ab}
+ \x{2018}
+ 0: \x{2018}
+ ** Failers
+No match
+ X
+No match
+ \x{203f}
+No match
+
+/^\p{Po}/8
+ !
+ 0: !
+ \x{37e}
+ 0: \x{37e}
+ ** Failers
+ 0: *
+ X
+No match
+ \x{203f}
+No match
+
+/^\p{Ps}/8
+ (
+ 0: (
+ [
+ 0: [
+ {
+ 0: {
+ \x{f3c}
+ 0: \x{f3c}
+ ** Failers
+No match
+ X
+No match
+ )
+No match
+ ]
+No match
+ }
+No match
+ \x{f3b}
+No match
+
+/^\p{Sc}+/8
+ $\x{a2}\x{a3}\x{a4}\x{a5}\x{a6}
+ 0: $\x{a2}\x{a3}\x{a4}\x{a5}
+ \x{9f2}
+ 0: \x{9f2}
+ ** Failers
+No match
+ X
+No match
+ \x{2c2}
+No match
+
+/^\p{Sk}/8
+ \x{2c2}
+ 0: \x{2c2}
+ ** Failers
+No match
+ X
+No match
+ \x{9f2}
+No match
+
+/^\p{Sm}+/8
+ +<|~\x{ac}\x{2044}
+ 0: +<|~\x{ac}\x{2044}
+ ** Failers
+No match
+ X
+No match
+ \x{9f2}
+No match
+
+/^\p{So}/8
+ \x{a6}
+ 0: \x{a6}
+ \x{482}
+ 0: \x{482}
+ ** Failers
+No match
+ X
+No match
+ \x{9f2}
+No match
+
+/^\p{Zl}/8
+ \x{2028}
+ 0: \x{2028}
+ ** Failers
+No match
+ X
+No match
+ \x{2029}
+No match
+
+/^\p{Zp}/8
+ \x{2029}
+ 0: \x{2029}
+ ** Failers
+No match
+ X
+No match
+ \x{2028}
+No match
+
+/^\p{Zs}/8
+ \ \
+ 0:
+ \x{a0}
+ 0: \x{a0}
+ \x{1680}
+ 0: \x{1680}
+ \x{180e}
+ 0: \x{180e}
+ \x{2000}
+ 0: \x{2000}
+ \x{2001}
+ 0: \x{2001}
+ ** Failers
+No match
+ \x{2028}
+No match
+ \x{200d}
+No match
+
+/\p{Nd}+(..)/8
+ \x{660}\x{661}\x{662}ABC
+ 0: \x{660}\x{661}\x{662}AB
+ 1: AB
+
+/\p{Nd}+?(..)/8
+ \x{660}\x{661}\x{662}ABC
+ 0: \x{660}\x{661}\x{662}
+ 1: \x{661}\x{662}
+
+/\p{Nd}{2,}(..)/8
+ \x{660}\x{661}\x{662}ABC
+ 0: \x{660}\x{661}\x{662}AB
+ 1: AB
+
+/\p{Nd}{2,}?(..)/8
+ \x{660}\x{661}\x{662}ABC
+ 0: \x{660}\x{661}\x{662}A
+ 1: \x{662}A
+
+/\p{Nd}*(..)/8
+ \x{660}\x{661}\x{662}ABC
+ 0: \x{660}\x{661}\x{662}AB
+ 1: AB
+
+/\p{Nd}*?(..)/8
+ \x{660}\x{661}\x{662}ABC
+ 0: \x{660}\x{661}
+ 1: \x{660}\x{661}
+
+/\p{Nd}{2}(..)/8
+ \x{660}\x{661}\x{662}ABC
+ 0: \x{660}\x{661}\x{662}A
+ 1: \x{662}A
+
+/\p{Nd}{2,3}(..)/8
+ \x{660}\x{661}\x{662}ABC
+ 0: \x{660}\x{661}\x{662}AB
+ 1: AB
+
+/\p{Nd}{2,3}?(..)/8
+ \x{660}\x{661}\x{662}ABC
+ 0: \x{660}\x{661}\x{662}A
+ 1: \x{662}A
+
+/\p{Nd}?(..)/8
+ \x{660}\x{661}\x{662}ABC
+ 0: \x{660}\x{661}\x{662}
+ 1: \x{661}\x{662}
+
+/\p{Nd}??(..)/8
+ \x{660}\x{661}\x{662}ABC
+ 0: \x{660}\x{661}
+ 1: \x{660}\x{661}
+
+/\p{Nd}*+(..)/8
+ \x{660}\x{661}\x{662}ABC
+ 0: \x{660}\x{661}\x{662}AB
+ 1: AB
+
+/\p{Nd}*+(...)/8
+ \x{660}\x{661}\x{662}ABC
+ 0: \x{660}\x{661}\x{662}ABC
+ 1: ABC
+
+/\p{Nd}*+(....)/8
+ ** Failers
+ 0: ** F
+ 1: ** F
+ \x{660}\x{661}\x{662}ABC
+No match
+
+/\p{Lu}/8i
+ A
+ 0: A
+ a\x{10a0}B
+ 0: \x{10a0}
+ ** Failers
+ 0: F
+ a
+No match
+ \x{1d00}
+No match
-/\x{1000}/8DM
-Memory allocation (code space): 12
+/\p{^Lu}/8i
+ 1234
+ 0: 1
+ ** Failers
+ 0: *
+ ABC
+No match
+
+/\P{Lu}/8i
+ 1234
+ 0: 1
+ ** Failers
+ 0: *
+ ABC
+No match
+
+/(?<=A\p{Nd})XYZ/8
+ A2XYZ
+ 0: XYZ
+ 123A5XYZPQR
+ 0: XYZ
+ ABA\x{660}XYZpqr
+ 0: XYZ
+ ** Failers
+No match
+ AXYZ
+No match
+ XYZ
+No match
+
+/(?<!\pL)XYZ/8
+ 1XYZ
+ 0: XYZ
+ AB=XYZ..
+ 0: XYZ
+ XYZ
+ 0: XYZ
+ ** Failers
+No match
+ WXYZ
+No match
+
+/[\p{L}]/D
------------------------------------------------------------------
- 0 8 Bra 0
- 3 3 \xe1\x80\x80
- 8 8 Ket
- 11 End
+ 0 10 Bra 0
+ 3 [\p{L}]
+ 10 10 Ket
+ 13 End
------------------------------------------------------------------
Capturing subpattern count = 0
-Options: utf8
-First char = 225
-Need char = 128
+No options
+No first char
+No need char
-/\x{10000}/8DM
-Memory allocation (code space): 13
+/[\p{^L}]/D
------------------------------------------------------------------
- 0 9 Bra 0
- 3 4 \xf0\x90\x80\x80
- 9 9 Ket
- 12 End
+ 0 10 Bra 0
+ 3 [\P{L}]
+ 10 10 Ket
+ 13 End
------------------------------------------------------------------
Capturing subpattern count = 0
-Options: utf8
-First char = 240
-Need char = 128
+No options
+No first char
+No need char
-/\x{100000}/8DM
-Memory allocation (code space): 13
+/[\P{L}]/D
------------------------------------------------------------------
- 0 9 Bra 0
- 3 4 \xf4\x80\x80\x80
- 9 9 Ket
- 12 End
+ 0 10 Bra 0
+ 3 [\P{L}]
+ 10 10 Ket
+ 13 End
------------------------------------------------------------------
Capturing subpattern count = 0
-Options: utf8
-First char = 244
-Need char = 128
+No options
+No first char
+No need char
-/\x{1000000}/8DM
-Memory allocation (code space): 14
+/[\P{^L}]/D
------------------------------------------------------------------
0 10 Bra 0
- 3 5 \xf9\x80\x80\x80\x80
+ 3 [\p{L}]
10 10 Ket
13 End
------------------------------------------------------------------
Capturing subpattern count = 0
-Options: utf8
-First char = 249
-Need char = 128
+No options
+No first char
+No need char
-/\x{4000000}/8DM
-Memory allocation (code space): 15
+/[abc\p{L}\x{0660}]/8D
------------------------------------------------------------------
- 0 11 Bra 0
- 3 6 \xfc\x84\x80\x80\x80\x80
- 11 11 Ket
- 14 End
+ 0 45 Bra 0
+ 3 [a-c\p{L}\x{660}]
+ 45 45 Ket
+ 48 End
------------------------------------------------------------------
Capturing subpattern count = 0
Options: utf8
-First char = 252
-Need char = 128
+No first char
+No need char
-/\x{7fffFFFF}/8DM
-Memory allocation (code space): 15
+/[\p{Nd}]/8DM
+Memory allocation (code space): 46
------------------------------------------------------------------
- 0 11 Bra 0
- 3 6 \xfd\xbf\xbf\xbf\xbf\xbf
- 11 11 Ket
- 14 End
+ 0 10 Bra 0
+ 3 [\p{Nd}]
+ 10 10 Ket
+ 13 End
------------------------------------------------------------------
Capturing subpattern count = 0
Options: utf8
-First char = 253
-Need char = 191
+No first char
+No need char
+ 1234
+ 0: 1
-/[\x{ff}]/8DM
-Memory allocation (code space): 40
+/[\p{Nd}+-]+/8DM
+Memory allocation (code space): 47
------------------------------------------------------------------
- 0 6 Bra 0
- 3 1 \xff
- 6 6 Ket
- 9 End
+ 0 43 Bra 0
+ 3 [+\-\p{Nd}]+
+ 43 43 Ket
+ 46 End
------------------------------------------------------------------
Capturing subpattern count = 0
+Partial matching not supported
Options: utf8
-First char = 255
+No first char
No need char
+ 1234
+ 0: 1234
+ 12-34
+ 0: 12-34
+ 12+\x{661}-34
+ 0: 12+\x{661}-34
+ ** Failers
+No match
+ abcd
+No match
-/[\x{100}]/8DM
-Memory allocation (code space): 40
-Failed: characters with values > 255 are not yet supported in classes at offset 7
+/[\P{Nd}]+/8
+ abcd
+ 0: abcd
+ ** Failers
+ 0: ** Failers
+ 1234
+No match
-/\x{ffffffff}/8
-Failed: character value in \x{...} sequence is too large at offset 11
+/\D+/8
+ 11111111111111111111111111111111111111111111111111111111111111111111111
+No match
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+
+/\P{Nd}+/8
+ 11111111111111111111111111111111111111111111111111111111111111111111111
+No match
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-/\x{100000000}/8
-Failed: character value in \x{...} sequence is too large at offset 12
+/[\D]+/8
+ 11111111111111111111111111111111111111111111111111111111111111111111111
+No match
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-/^\x{100}a\x{1234}/8
- \x{100}a\x{1234}bcd
- 0: \x{100}a\x{1234}
+/[\P{Nd}]+/8
+ 11111111111111111111111111111111111111111111111111111111111111111111111
+No match
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-/\x80/8D
-------------------------------------------------------------------
- 0 7 Bra 0
- 3 2 \xc2\x80
- 7 7 Ket
- 10 End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-First char = 194
-Need char = 128
+/[\D\P{Nd}]+/8
+ 11111111111111111111111111111111111111111111111111111111111111111111111
+No match
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+ 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-/\xff/8D
-------------------------------------------------------------------
- 0 7 Bra 0
- 3 2 \xc3\xbf
- 7 7 Ket
- 10 End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-First char = 195
-Need char = 191
+/\pL/8
+ a
+ 0: a
+ A
+ 0: A
-/\x{0041}\x{2262}\x{0391}\x{002e}/D8
-------------------------------------------------------------------
- 0 12 Bra 0
- 3 7 A\xe2\x89\xa2\xce\x91.
- 12 12 Ket
- 15 End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-First char = 'A'
-Need char = '.'
- \x{0041}\x{2262}\x{0391}\x{002e}
- 0: A\x{2262}\x{391}.
+/\pL/8i
+ a
+ 0: a
+ A
+ 0: A
-/\x{D55c}\x{ad6d}\x{C5B4}/D8
-------------------------------------------------------------------
- 0 14 Bra 0
- 3 9 \xed\x95\x9c\xea\xb5\xad\xec\x96\xb4
- 14 14 Ket
- 17 End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-First char = 237
-Need char = 180
- \x{D55c}\x{ad6d}\x{C5B4}
- 0: \x{d55c}\x{ad6d}\x{c5b4}
+/\p{Lu}/8
+ A
+ 0: A
+ aZ
+ 0: Z
+ ** Failers
+ 0: F
+ abc
+No match
-/\x{65e5}\x{672c}\x{8a9e}/D8
-------------------------------------------------------------------
- 0 14 Bra 0
- 3 9 \xe6\x97\xa5\xe6\x9c\xac\xe8\xaa\x9e
- 14 14 Ket
- 17 End
-------------------------------------------------------------------
-Capturing subpattern count = 0
-Options: utf8
-First char = 230
-Need char = 158
- \x{65e5}\x{672c}\x{8a9e}
- 0: \x{65e5}\x{672c}\x{8a9e}
+/\p{Lu}/8i
+ A
+ 0: A
+ aZ
+ 0: Z
+ ** Failers
+ 0: F
+ abc
+No match
-/\x{80}/D8
+/\p{Ll}/8
+ a
+ 0: a
+ Az
+ 0: z
+ ** Failers
+ 0: a
+ ABC
+No match
+
+/\p{Ll}/8i
+ a
+ 0: a
+ Az
+ 0: z
+ ** Failers
+ 0: a
+ ABC
+No match
+
+/^\x{c0}$/8i
+ \x{c0}
+ 0: \x{c0}
+ \x{e0}
+ 0: \x{e0}
+
+/^\x{e0}$/8i
+ \x{c0}
+ 0: \x{c0}
+ \x{e0}
+ 0: \x{e0}
+
+/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/8
+ A\x{391}\x{10427}\x{ff3a}\x{1fb0}
+ 0: A\x{391}\x{10427}\x{ff3a}\x{1fb0}
+ ** Failers
+No match
+ a\x{391}\x{10427}\x{ff3a}\x{1fb0}
+No match
+ A\x{3b1}\x{10427}\x{ff3a}\x{1fb0}
+No match
+ A\x{391}\x{1044F}\x{ff3a}\x{1fb0}
+No match
+ A\x{391}\x{10427}\x{ff5a}\x{1fb0}
+No match
+ A\x{391}\x{10427}\x{ff3a}\x{1fb8}
+No match
+
+/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/8i
+ A\x{391}\x{10427}\x{ff3a}\x{1fb0}
+ 0: A\x{391}\x{10427}\x{ff3a}\x{1fb0}
+ a\x{391}\x{10427}\x{ff3a}\x{1fb0}
+ 0: a\x{391}\x{10427}\x{ff3a}\x{1fb0}
+ A\x{3b1}\x{10427}\x{ff3a}\x{1fb0}
+ 0: A\x{3b1}\x{10427}\x{ff3a}\x{1fb0}
+ A\x{391}\x{1044F}\x{ff3a}\x{1fb0}
+ 0: A\x{391}\x{1044f}\x{ff3a}\x{1fb0}
+ A\x{391}\x{10427}\x{ff5a}\x{1fb0}
+ 0: A\x{391}\x{10427}\x{ff5a}\x{1fb0}
+ A\x{391}\x{10427}\x{ff3a}\x{1fb8}
+ 0: A\x{391}\x{10427}\x{ff3a}\x{1fb8}
+
+/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/8iD
------------------------------------------------------------------
- 0 7 Bra 0
- 3 2 \xc2\x80
- 7 7 Ket
- 10 End
+ 0 21 Bra 0
+ 3 NC A\x{391}\x{10427}\x{ff3a}\x{1fb0}
+ 21 21 Ket
+ 24 End
------------------------------------------------------------------
Capturing subpattern count = 0
-Options: utf8
-First char = 194
-Need char = 128
+Options: caseless utf8
+First char = 'A' (caseless)
+No need char
-/\x{084}/D8
+/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/8D
------------------------------------------------------------------
- 0 7 Bra 0
- 3 2 \xc2\x84
- 7 7 Ket
- 10 End
+ 0 21 Bra 0
+ 3 A\x{391}\x{10427}\x{ff3a}\x{1fb0}
+ 21 21 Ket
+ 24 End
------------------------------------------------------------------
Capturing subpattern count = 0
Options: utf8
-First char = 194
-Need char = 132
+First char = 'A'
+Need char = 176
-/\x{104}/D8
+/AB\x{1fb0}/8D
------------------------------------------------------------------
- 0 7 Bra 0
- 3 2 \xc4\x84
- 7 7 Ket
- 10 End
+ 0 11 Bra 0
+ 3 AB\x{1fb0}
+ 11 11 Ket
+ 14 End
------------------------------------------------------------------
Capturing subpattern count = 0
Options: utf8
-First char = 196
-Need char = 132
+First char = 'A'
+Need char = 176
-/\x{861}/D8
+/AB\x{1fb0}/8Di
------------------------------------------------------------------
- 0 8 Bra 0
- 3 3 \xe0\xa1\xa1
- 8 8 Ket
- 11 End
+ 0 11 Bra 0
+ 3 NC AB\x{1fb0}
+ 11 11 Ket
+ 14 End
------------------------------------------------------------------
Capturing subpattern count = 0
-Options: utf8
-First char = 224
-Need char = 161
+Options: caseless utf8
+First char = 'A' (caseless)
+Need char = 'B' (caseless)
+
+/\x{391}+/8i
+ \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}
+ 0: \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}
+
+/\x{391}{3,5}(.)/8i
+ \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}X
+ 0: \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}X
+ 1: X
+
+/\x{391}{3,5}?(.)/8i
+ \x{391}\x{3b1}\x{3b1}\x{3b1}\x{391}X
+ 0: \x{391}\x{3b1}\x{3b1}\x{3b1}
+ 1: \x{3b1}
-/\x{212ab}/D8
+/[\x{391}\x{ff3a}]/8i
+ \x{391}
+ 0: \x{391}
+ \x{ff3a}
+ 0: \x{ff3a}
+ \x{3b1}
+ 0: \x{3b1}
+ \x{ff5a}
+ 0: \x{ff5a}
+
+/[\x{c0}\x{391}]/8i
+ \x{c0}
+ 0: \x{c0}
+ \x{e0}
+ 0: \x{e0}
+
+/[\x{105}-\x{109}]/8iD
------------------------------------------------------------------
- 0 9 Bra 0
- 3 4 \xf0\xa1\x8a\xab
- 9 9 Ket
- 12 End
+ 0 13 Bra 0
+ 3 [\x{104}-\x{109}]
+ 13 13 Ket
+ 16 End
------------------------------------------------------------------
Capturing subpattern count = 0
-Options: utf8
-First char = 240
-Need char = 171
-
-/.{3,5}X/D8
+Options: caseless utf8
+No first char
+No need char
+ \x{104}
+ 0: \x{104}
+ \x{105}
+ 0: \x{105}
+ \x{109}
+ 0: \x{109}
+ ** Failers
+No match
+ \x{100}
+No match
+ \x{10a}
+No match
+
+/[z-\x{100}]/8iD
------------------------------------------------------------------
- 0 14 Bra 0
- 3 Any{3}
- 7 Any{0,2}
- 11 1 X
- 14 14 Ket
- 17 End
+ 0 20 Bra 0
+ 3 [Z\x{39c}\x{178}z-\x{101}]
+ 20 20 Ket
+ 23 End
------------------------------------------------------------------
Capturing subpattern count = 0
-Options: utf8
+Options: caseless utf8
No first char
-Need char = 'X'
- \x{212ab}\x{212ab}\x{212ab}\x{861}X
- 0: \x{212ab}\x{212ab}\x{212ab}\x{861}X
-
+No need char
+ Z
+ 0: Z
+ z
+ 0: z
+ \x{39c}
+ 0: \x{39c}
+ \x{178}
+ 0: \x{178}
+ |
+ 0: |
+ \x{80}
+ 0: \x{80}
+ \x{ff}
+ 0: \x{ff}
+ \x{100}
+ 0: \x{100}
+ \x{101}
+ 0: \x{101}
+ ** Failers
+No match
+ \x{102}
+No match
+ Y
+No match
+ y
+No match
-/.{3,5}?/D8
+/[z-\x{100}]/8Di
------------------------------------------------------------------
- 0 11 Bra 0
- 3 Any{3}
- 7 Any{0,2}?
- 11 11 Ket
- 14 End
+ 0 20 Bra 0
+ 3 [Z\x{39c}\x{178}z-\x{101}]
+ 20 20 Ket
+ 23 End
------------------------------------------------------------------
Capturing subpattern count = 0
-Options: utf8
+Options: caseless utf8
No first char
No need char
- \x{212ab}\x{212ab}\x{212ab}\x{861}
- 0: \x{212ab}\x{212ab}\x{212ab}
-/-- These tests are here rather than in testinput5 because Perl 5.6 has --/
-/-- some problems with UTF-8 support, in the area of \x{..} where the --/
+/^\X/8
+ A
+ 0: A
+ A\x{300}BC
+ 0: A\x{300}
+ A\x{300}\x{301}\x{302}BC
+ 0: A\x{300}\x{301}\x{302}
+ *** Failers
+ 0: *
+ \x{300}
+No match
+
+/^[\X]/8
+ X123
+ 0: X
+ *** Failers
No match
-/-- value is < 255. It grumbles about invalid UTF-8 strings. --/
+ AXYZ
No match
-/^[a\x{c0}]b/8
- \x{c0}b
- 0: \x{c0}b
-
-/^([a\x{c0}]*?)aa/8
- a\x{c0}aaaa/
- 0: a\x{c0}aa
- 1: a\x{c0}
-
-/^([a\x{c0}]*?)aa/8
- a\x{c0}aaaa/
- 0: a\x{c0}aa
- 1: a\x{c0}
- a\x{c0}a\x{c0}aaa/
- 0: a\x{c0}a\x{c0}aa
- 1: a\x{c0}a\x{c0}
-
-/^([a\x{c0}]*)aa/8
- a\x{c0}aaaa/
- 0: a\x{c0}aaaa
- 1: a\x{c0}aa
- a\x{c0}a\x{c0}aaa/
- 0: a\x{c0}a\x{c0}aaa
- 1: a\x{c0}a\x{c0}a
-
-/^([a\x{c0}]*)a\x{c0}/8
- a\x{c0}aaaa/
- 0: a\x{c0}
+/^(\X*)C/8
+ A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
+ 0: A\x{300}\x{301}\x{302}BC
+ 1: A\x{300}\x{301}\x{302}B
+ A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
+ 0: A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
+ 1: A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
+
+/^(\X*?)C/8
+ A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
+ 0: A\x{300}\x{301}\x{302}BC
+ 1: A\x{300}\x{301}\x{302}B
+ A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
+ 0: A\x{300}\x{301}\x{302}BC
+ 1: A\x{300}\x{301}\x{302}B
+
+/^(\X*)(.)/8
+ A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
+ 0: A\x{300}\x{301}\x{302}BCA
+ 1: A\x{300}\x{301}\x{302}BC
+ 2: A
+ A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
+ 0: A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
+ 1: A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
+ 2: C
+
+/^(\X*?)(.)/8
+ A\x{300}\x{301}\x{302}BCA\x{300}\x{301}
+ 0: A
+ 1:
+ 2: A
+ A\x{300}\x{301}\x{302}BCA\x{300}\x{301}C
+ 0: A
1:
- a\x{c0}a\x{c0}aaa/
- 0: a\x{c0}a\x{c0}
- 1: a\x{c0}
+ 2: A
-/ End of testinput6 /
+/^\X(.)/8
+ *** Failers
+ 0: **
+ 1: *
+ A\x{300}\x{301}\x{302}
+No match
+/^\X{2,3}(.)/8
+ A\x{300}\x{301}B\x{300}X
+ 0: A\x{300}\x{301}B\x{300}X
+ 1: X
+ A\x{300}\x{301}B\x{300}C\x{300}\x{301}
+ 0: A\x{300}\x{301}B\x{300}C
+ 1: C
+ A\x{300}\x{301}B\x{300}C\x{300}\x{301}X
+ 0: A\x{300}\x{301}B\x{300}C\x{300}\x{301}X
+ 1: X
+ A\x{300}\x{301}B\x{300}C\x{300}\x{301}DA\x{300}X
+ 0: A\x{300}\x{301}B\x{300}C\x{300}\x{301}D
+ 1: D
+
+/^\X{2,3}?(.)/8
+ A\x{300}\x{301}B\x{300}X
+ 0: A\x{300}\x{301}B\x{300}X
+ 1: X
+ A\x{300}\x{301}B\x{300}C\x{300}\x{301}
+ 0: A\x{300}\x{301}B\x{300}C
+ 1: C
+ A\x{300}\x{301}B\x{300}C\x{300}\x{301}X
+ 0: A\x{300}\x{301}B\x{300}C
+ 1: C
+ A\x{300}\x{301}B\x{300}C\x{300}\x{301}DA\x{300}X
+ 0: A\x{300}\x{301}B\x{300}C
+ 1: C
+
+/ End of testinput6 /
diff --git a/srclib/pcre/ucp.c b/srclib/pcre/ucp.c
new file mode 100644
index 0000000000..3d69653bb6
--- /dev/null
+++ b/srclib/pcre/ucp.c
@@ -0,0 +1,151 @@
+/*************************************************
+* libucp - Unicode Property Table handler *
+*************************************************/
+
+/* This function provides a fast way of obtaining the basic Unicode properties
+of a character, using a compact binary tree that occupies less than 100K bytes.
+
+ Copyright (c) 2004 University of Cambridge
+
+-------------------------------------------------------------------------------
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+-------------------------------------------------------------------------------
+*/
+
+
+#include "ucp.h" /* Exported interface */
+#include "ucpinternal.h" /* Internal table details */
+#include "ucptable.c" /* The table itself */
+
+
+
+/*************************************************
+* Search table and return data *
+*************************************************/
+
+/* Two values are returned: the category is ucp_C, ucp_L, etc. The detailed
+character type is ucp_Lu, ucp_Nd, etc.
+
+Arguments:
+ c the character value
+ type_ptr the detailed character type is returned here
+ case_ptr for letters, the opposite case is returned here, if there
+ is one, else zero
+
+Returns: the character type category or -1 if not found
+*/
+
+static int
+ucp_findchar(const int c, int *type_ptr, int *case_ptr)
+{
+cnode *node = ucp_table;
+register int cc = c;
+int case_offset;
+
+for (;;)
+ {
+ register int d = node->f1 | ((node->f0 & f0_chhmask) << 16);
+ if (cc == d) break;
+ if (cc < d)
+ {
+ if ((node->f0 & f0_leftexists) == 0) return -1;
+ node ++;
+ }
+ else
+ {
+ register int roffset = (node->f2 & f2_rightmask) >> f2_rightshift;
+ if (roffset == 0) return -1;
+ node += 1 << (roffset - 1);
+ }
+ }
+
+switch ((*type_ptr = ((node->f0 & f0_typemask) >> f0_typeshift)))
+ {
+ case ucp_Cc:
+ case ucp_Cf:
+ case ucp_Cn:
+ case ucp_Co:
+ case ucp_Cs:
+ return ucp_C;
+ break;
+
+ case ucp_Ll:
+ case ucp_Lu:
+ case_offset = node->f2 & f2_casemask;
+ if ((case_offset & 0x0100) != 0) case_offset |= 0xfffff000;
+ *case_ptr = (case_offset == 0)? 0 : cc + case_offset;
+ return ucp_L;
+
+ case ucp_Lm:
+ case ucp_Lo:
+ case ucp_Lt:
+ *case_ptr = 0;
+ return ucp_L;
+ break;
+
+ case ucp_Mc:
+ case ucp_Me:
+ case ucp_Mn:
+ return ucp_M;
+ break;
+
+ case ucp_Nd:
+ case ucp_Nl:
+ case ucp_No:
+ return ucp_N;
+ break;
+
+ case ucp_Pc:
+ case ucp_Pd:
+ case ucp_Pe:
+ case ucp_Pf:
+ case ucp_Pi:
+ case ucp_Ps:
+ case ucp_Po:
+ return ucp_P;
+ break;
+
+ case ucp_Sc:
+ case ucp_Sk:
+ case ucp_Sm:
+ case ucp_So:
+ return ucp_S;
+ break;
+
+ case ucp_Zl:
+ case ucp_Zp:
+ case ucp_Zs:
+ return ucp_Z;
+ break;
+
+ default: /* "Should never happen" */
+ return -1;
+ break;
+ }
+}
+
+/* End of ucp.c */
diff --git a/srclib/pcre/ucp.h b/srclib/pcre/ucp.h
new file mode 100644
index 0000000000..c013978e23
--- /dev/null
+++ b/srclib/pcre/ucp.h
@@ -0,0 +1,58 @@
+/*************************************************
+* libucp - Unicode Property Table handler *
+*************************************************/
+
+/* These are the character categories that are returned by ucp_findchar */
+
+enum {
+ ucp_C, /* Other */
+ ucp_L, /* Letter */
+ ucp_M, /* Mark */
+ ucp_N, /* Number */
+ ucp_P, /* Punctuation */
+ ucp_S, /* Symbol */
+ ucp_Z /* Separator */
+};
+
+/* These are the detailed character types that are returned by ucp_findchar */
+
+enum {
+ ucp_Cc, /* Control */
+ ucp_Cf, /* Format */
+ ucp_Cn, /* Unassigned */
+ ucp_Co, /* Private use */
+ ucp_Cs, /* Surrogate */
+ ucp_Ll, /* Lower case letter */
+ ucp_Lm, /* Modifier letter */
+ ucp_Lo, /* Other letter */
+ ucp_Lt, /* Title case letter */
+ ucp_Lu, /* Upper case letter */
+ ucp_Mc, /* Spacing mark */
+ ucp_Me, /* Enclosing mark */
+ ucp_Mn, /* Non-spacing mark */
+ ucp_Nd, /* Decimal number */
+ ucp_Nl, /* Letter number */
+ ucp_No, /* Other number */
+ ucp_Pc, /* Connector punctuation */
+ ucp_Pd, /* Dash punctuation */
+ ucp_Pe, /* Close punctuation */
+ ucp_Pf, /* Final punctuation */
+ ucp_Pi, /* Initial punctuation */
+ ucp_Po, /* Other punctuation */
+ ucp_Ps, /* Open punctuation */
+ ucp_Sc, /* Currency symbol */
+ ucp_Sk, /* Modifier symbol */
+ ucp_Sm, /* Mathematical symbol */
+ ucp_So, /* Other symbol */
+ ucp_Zl, /* Line separator */
+ ucp_Zp, /* Paragraph separator */
+ ucp_Zs /* Space separator */
+};
+
+/* For use in PCRE we make this function static so that there is no conflict if
+PCRE is linked with an application that makes use of an external version -
+assuming an external version is ever released... */
+
+static int ucp_findchar(const int, int *, int *);
+
+/* End of ucp.h */
diff --git a/srclib/pcre/ucpinternal.h b/srclib/pcre/ucpinternal.h
new file mode 100644
index 0000000000..faefb030c9
--- /dev/null
+++ b/srclib/pcre/ucpinternal.h
@@ -0,0 +1,91 @@
+/*************************************************
+* libucp - Unicode Property Table handler *
+*************************************************/
+
+/* Internal header file defining the layout of compact nodes in the tree. */
+
+typedef struct cnode {
+ unsigned short int f0;
+ unsigned short int f1;
+ unsigned short int f2;
+} cnode;
+
+/* Things for the f0 field */
+
+#define f0_leftexists 0x8000 /* Left child exists */
+#define f0_typemask 0x3f00 /* Type bits */
+#define f0_typeshift 8 /* Type shift */
+#define f0_chhmask 0x00ff /* Character high bits */
+
+/* Things for the f2 field */
+
+#define f2_rightmask 0xf000 /* Mask for right offset bits */
+#define f2_rightshift 12 /* Shift for right offset */
+#define f2_casemask 0x0fff /* Mask for case offset */
+
+/* The tree consists of a vector of structures of type cnode, with the root
+node as the first element. The three short ints (16-bits) are used as follows:
+
+(f0) (1) The 0x8000 bit of f0 is set if a left child exists. The child's node
+ is the next node in the vector.
+ (2) The 0x4000 bits of f0 is spare.
+ (3) The 0x3f00 bits of f0 contain the character type; this is a number
+ defined by the enumeration in ucp.h (e.g. ucp_Lu).
+ (4) The bottom 8 bits of f0 contain the most significant byte of the
+ character's 24-bit codepoint.
+
+(f1) (1) The f1 field contains the two least significant bytes of the
+ codepoint.
+
+(f2) (1) The 0xf000 bits of f2 contain zero if there is no right child of this
+ node. Otherwise, they contain one plus the exponent of the power of
+ two of the offset to the right node (e.g. a value of 3 means 8). The
+ units of the offset are node items.
+
+ (2) The 0x0fff bits of f2 contain the signed offset from this character to
+ its alternate cased value. They are zero if there is no such
+ character.
+
+
+-----------------------------------------------------------------------------
+||.|.| type (6) | ms char (8) || ls char (16) ||....| case offset (12) ||
+-----------------------------------------------------------------------------
+ | | |
+ | |-> spare |
+ | exponent of right
+ |-> left child exists child offset
+
+
+The upper/lower casing information is set only for characters that come in
+pairs. There are (at present) four non-one-to-one mappings in the Unicode data.
+These are ignored. They are:
+
+ 1FBE Greek Prosgegrammeni (lower, with upper -> capital iota)
+ 2126 Ohm
+ 212A Kelvin
+ 212B Angstrom
+
+Certainly for the last three, having an alternate case would seem to be a
+mistake. I don't know any Greek, so cannot comment on the first one.
+
+
+When searching the tree, proceed as follows:
+
+(1) Start at the first node.
+
+(2) Extract the character value from f1 and the bottom 8 bits of f0;
+
+(3) Compare with the character being sought. If equal, we are done.
+
+(4) If the test character is smaller, inspect the f0_leftexists flag. If it is
+ not set, the character is not in the tree. If it is set, move to the next
+ node, and go to (2).
+
+(5) If the test character is bigger, extract the f2_rightmask bits from f2, and
+ shift them right by f2_rightshift. If the result is zero, the character is
+ not in the tree. Otherwise, calculate the number of nodes to skip by
+ shifting the value 1 left by this number minus one. Go to (2).
+*/
+
+
+/* End of internal.h */
diff --git a/srclib/pcre/ucptable.c b/srclib/pcre/ucptable.c
new file mode 100644
index 0000000000..7fb3a12343
--- /dev/null
+++ b/srclib/pcre/ucptable.c
@@ -0,0 +1,15105 @@
+/* This source module is automatically generated from the Unicode
+property table. See internal.h for a description of the layout. */
+
+static cnode ucp_table[] = {
+ { 0x9a00, 0x2f1f, 0xe000 },
+ { 0x8700, 0x1558, 0xd000 },
+ { 0x8700, 0x0a99, 0xc000 },
+ { 0x8500, 0x0435, 0xbfe0 },
+ { 0x8500, 0x01ff, 0xafff },
+ { 0x8500, 0x00ff, 0x9079 },
+ { 0x8000, 0x007f, 0x8000 },
+ { 0x9500, 0x003f, 0x7000 },
+ { 0x8000, 0x001f, 0x6000 },
+ { 0x8000, 0x000f, 0x5000 },
+ { 0x8000, 0x0007, 0x4000 },
+ { 0x8000, 0x0003, 0x3000 },
+ { 0x8000, 0x0001, 0x2000 },
+ { 0x0000, 0x0000, 0x0000 },
+ { 0x0000, 0x0002, 0x0000 },
+ { 0x8000, 0x0005, 0x2000 },
+ { 0x0000, 0x0004, 0x0000 },
+ { 0x0000, 0x0006, 0x0000 },
+ { 0x8000, 0x000b, 0x3000 },
+ { 0x8000, 0x0009, 0x2000 },
+ { 0x0000, 0x0008, 0x0000 },
+ { 0x0000, 0x000a, 0x0000 },
+ { 0x8000, 0x000d, 0x2000 },
+ { 0x0000, 0x000c, 0x0000 },
+ { 0x0000, 0x000e, 0x0000 },
+ { 0x8000, 0x0017, 0x4000 },
+ { 0x8000, 0x0013, 0x3000 },
+ { 0x8000, 0x0011, 0x2000 },
+ { 0x0000, 0x0010, 0x0000 },
+ { 0x0000, 0x0012, 0x0000 },
+ { 0x8000, 0x0015, 0x2000 },
+ { 0x0000, 0x0014, 0x0000 },
+ { 0x0000, 0x0016, 0x0000 },
+ { 0x8000, 0x001b, 0x3000 },
+ { 0x8000, 0x0019, 0x2000 },
+ { 0x0000, 0x0018, 0x0000 },
+ { 0x0000, 0x001a, 0x0000 },
+ { 0x8000, 0x001d, 0x2000 },
+ { 0x0000, 0x001c, 0x0000 },
+ { 0x0000, 0x001e, 0x0000 },
+ { 0x9500, 0x002f, 0x5000 },
+ { 0x9500, 0x0027, 0x4000 },
+ { 0x9500, 0x0023, 0x3000 },
+ { 0x9500, 0x0021, 0x2000 },
+ { 0x1d00, 0x0020, 0x0000 },
+ { 0x1500, 0x0022, 0x0000 },
+ { 0x9500, 0x0025, 0x2000 },
+ { 0x1700, 0x0024, 0x0000 },
+ { 0x1500, 0x0026, 0x0000 },
+ { 0x9900, 0x002b, 0x3000 },
+ { 0x9200, 0x0029, 0x2000 },
+ { 0x1600, 0x0028, 0x0000 },
+ { 0x1500, 0x002a, 0x0000 },
+ { 0x9100, 0x002d, 0x2000 },
+ { 0x1500, 0x002c, 0x0000 },
+ { 0x1500, 0x002e, 0x0000 },
+ { 0x8d00, 0x0037, 0x4000 },
+ { 0x8d00, 0x0033, 0x3000 },
+ { 0x8d00, 0x0031, 0x2000 },
+ { 0x0d00, 0x0030, 0x0000 },
+ { 0x0d00, 0x0032, 0x0000 },
+ { 0x8d00, 0x0035, 0x2000 },
+ { 0x0d00, 0x0034, 0x0000 },
+ { 0x0d00, 0x0036, 0x0000 },
+ { 0x9500, 0x003b, 0x3000 },
+ { 0x8d00, 0x0039, 0x2000 },
+ { 0x0d00, 0x0038, 0x0000 },
+ { 0x1500, 0x003a, 0x0000 },
+ { 0x9900, 0x003d, 0x2000 },
+ { 0x1900, 0x003c, 0x0000 },
+ { 0x1900, 0x003e, 0x0000 },
+ { 0x9000, 0x005f, 0x6000 },
+ { 0x8900, 0x004f, 0x5020 },
+ { 0x8900, 0x0047, 0x4020 },
+ { 0x8900, 0x0043, 0x3020 },
+ { 0x8900, 0x0041, 0x2020 },
+ { 0x1500, 0x0040, 0x0000 },
+ { 0x0900, 0x0042, 0x0020 },
+ { 0x8900, 0x0045, 0x2020 },
+ { 0x0900, 0x0044, 0x0020 },
+ { 0x0900, 0x0046, 0x0020 },
+ { 0x8900, 0x004b, 0x3020 },
+ { 0x8900, 0x0049, 0x2020 },
+ { 0x0900, 0x0048, 0x0020 },
+ { 0x0900, 0x004a, 0x0020 },
+ { 0x8900, 0x004d, 0x2020 },
+ { 0x0900, 0x004c, 0x0020 },
+ { 0x0900, 0x004e, 0x0020 },
+ { 0x8900, 0x0057, 0x4020 },
+ { 0x8900, 0x0053, 0x3020 },
+ { 0x8900, 0x0051, 0x2020 },
+ { 0x0900, 0x0050, 0x0020 },
+ { 0x0900, 0x0052, 0x0020 },
+ { 0x8900, 0x0055, 0x2020 },
+ { 0x0900, 0x0054, 0x0020 },
+ { 0x0900, 0x0056, 0x0020 },
+ { 0x9600, 0x005b, 0x3000 },
+ { 0x8900, 0x0059, 0x2020 },
+ { 0x0900, 0x0058, 0x0020 },
+ { 0x0900, 0x005a, 0x0020 },
+ { 0x9200, 0x005d, 0x2000 },
+ { 0x1500, 0x005c, 0x0000 },
+ { 0x1800, 0x005e, 0x0000 },
+ { 0x8500, 0x006f, 0x5fe0 },
+ { 0x8500, 0x0067, 0x4fe0 },
+ { 0x8500, 0x0063, 0x3fe0 },
+ { 0x8500, 0x0061, 0x2fe0 },
+ { 0x1800, 0x0060, 0x0000 },
+ { 0x0500, 0x0062, 0x0fe0 },
+ { 0x8500, 0x0065, 0x2fe0 },
+ { 0x0500, 0x0064, 0x0fe0 },
+ { 0x0500, 0x0066, 0x0fe0 },
+ { 0x8500, 0x006b, 0x3fe0 },
+ { 0x8500, 0x0069, 0x2fe0 },
+ { 0x0500, 0x0068, 0x0fe0 },
+ { 0x0500, 0x006a, 0x0fe0 },
+ { 0x8500, 0x006d, 0x2fe0 },
+ { 0x0500, 0x006c, 0x0fe0 },
+ { 0x0500, 0x006e, 0x0fe0 },
+ { 0x8500, 0x0077, 0x4fe0 },
+ { 0x8500, 0x0073, 0x3fe0 },
+ { 0x8500, 0x0071, 0x2fe0 },
+ { 0x0500, 0x0070, 0x0fe0 },
+ { 0x0500, 0x0072, 0x0fe0 },
+ { 0x8500, 0x0075, 0x2fe0 },
+ { 0x0500, 0x0074, 0x0fe0 },
+ { 0x0500, 0x0076, 0x0fe0 },
+ { 0x9600, 0x007b, 0x3000 },
+ { 0x8500, 0x0079, 0x2fe0 },
+ { 0x0500, 0x0078, 0x0fe0 },
+ { 0x0500, 0x007a, 0x0fe0 },
+ { 0x9200, 0x007d, 0x2000 },
+ { 0x1900, 0x007c, 0x0000 },
+ { 0x1900, 0x007e, 0x0000 },
+ { 0x9500, 0x00bf, 0x7000 },
+ { 0x8000, 0x009f, 0x6000 },
+ { 0x8000, 0x008f, 0x5000 },
+ { 0x8000, 0x0087, 0x4000 },
+ { 0x8000, 0x0083, 0x3000 },
+ { 0x8000, 0x0081, 0x2000 },
+ { 0x0000, 0x0080, 0x0000 },
+ { 0x0000, 0x0082, 0x0000 },
+ { 0x8000, 0x0085, 0x2000 },
+ { 0x0000, 0x0084, 0x0000 },
+ { 0x0000, 0x0086, 0x0000 },
+ { 0x8000, 0x008b, 0x3000 },
+ { 0x8000, 0x0089, 0x2000 },
+ { 0x0000, 0x0088, 0x0000 },
+ { 0x0000, 0x008a, 0x0000 },
+ { 0x8000, 0x008d, 0x2000 },
+ { 0x0000, 0x008c, 0x0000 },
+ { 0x0000, 0x008e, 0x0000 },
+ { 0x8000, 0x0097, 0x4000 },
+ { 0x8000, 0x0093, 0x3000 },
+ { 0x8000, 0x0091, 0x2000 },
+ { 0x0000, 0x0090, 0x0000 },
+ { 0x0000, 0x0092, 0x0000 },
+ { 0x8000, 0x0095, 0x2000 },
+ { 0x0000, 0x0094, 0x0000 },
+ { 0x0000, 0x0096, 0x0000 },
+ { 0x8000, 0x009b, 0x3000 },
+ { 0x8000, 0x0099, 0x2000 },
+ { 0x0000, 0x0098, 0x0000 },
+ { 0x0000, 0x009a, 0x0000 },
+ { 0x8000, 0x009d, 0x2000 },
+ { 0x0000, 0x009c, 0x0000 },
+ { 0x0000, 0x009e, 0x0000 },
+ { 0x9800, 0x00af, 0x5000 },
+ { 0x9a00, 0x00a7, 0x4000 },
+ { 0x9700, 0x00a3, 0x3000 },
+ { 0x9500, 0x00a1, 0x2000 },
+ { 0x1d00, 0x00a0, 0x0000 },
+ { 0x1700, 0x00a2, 0x0000 },
+ { 0x9700, 0x00a5, 0x2000 },
+ { 0x1700, 0x00a4, 0x0000 },
+ { 0x1a00, 0x00a6, 0x0000 },
+ { 0x9400, 0x00ab, 0x3000 },
+ { 0x9a00, 0x00a9, 0x2000 },
+ { 0x1800, 0x00a8, 0x0000 },
+ { 0x0500, 0x00aa, 0x0000 },
+ { 0x8100, 0x00ad, 0x2000 },
+ { 0x1900, 0x00ac, 0x0000 },
+ { 0x1a00, 0x00ae, 0x0000 },
+ { 0x9500, 0x00b7, 0x4000 },
+ { 0x8f00, 0x00b3, 0x3000 },
+ { 0x9900, 0x00b1, 0x2000 },
+ { 0x1a00, 0x00b0, 0x0000 },
+ { 0x0f00, 0x00b2, 0x0000 },
+ { 0x8500, 0x00b5, 0x22e7 },
+ { 0x1800, 0x00b4, 0x0000 },
+ { 0x1a00, 0x00b6, 0x0000 },
+ { 0x9300, 0x00bb, 0x3000 },
+ { 0x8f00, 0x00b9, 0x2000 },
+ { 0x1800, 0x00b8, 0x0000 },
+ { 0x0500, 0x00ba, 0x0000 },
+ { 0x8f00, 0x00bd, 0x2000 },
+ { 0x0f00, 0x00bc, 0x0000 },
+ { 0x0f00, 0x00be, 0x0000 },
+ { 0x8500, 0x00df, 0x6000 },
+ { 0x8900, 0x00cf, 0x5020 },
+ { 0x8900, 0x00c7, 0x4020 },
+ { 0x8900, 0x00c3, 0x3020 },
+ { 0x8900, 0x00c1, 0x2020 },
+ { 0x0900, 0x00c0, 0x0020 },
+ { 0x0900, 0x00c2, 0x0020 },
+ { 0x8900, 0x00c5, 0x2020 },
+ { 0x0900, 0x00c4, 0x0020 },
+ { 0x0900, 0x00c6, 0x0020 },
+ { 0x8900, 0x00cb, 0x3020 },
+ { 0x8900, 0x00c9, 0x2020 },
+ { 0x0900, 0x00c8, 0x0020 },
+ { 0x0900, 0x00ca, 0x0020 },
+ { 0x8900, 0x00cd, 0x2020 },
+ { 0x0900, 0x00cc, 0x0020 },
+ { 0x0900, 0x00ce, 0x0020 },
+ { 0x9900, 0x00d7, 0x4000 },
+ { 0x8900, 0x00d3, 0x3020 },
+ { 0x8900, 0x00d1, 0x2020 },
+ { 0x0900, 0x00d0, 0x0020 },
+ { 0x0900, 0x00d2, 0x0020 },
+ { 0x8900, 0x00d5, 0x2020 },
+ { 0x0900, 0x00d4, 0x0020 },
+ { 0x0900, 0x00d6, 0x0020 },
+ { 0x8900, 0x00db, 0x3020 },
+ { 0x8900, 0x00d9, 0x2020 },
+ { 0x0900, 0x00d8, 0x0020 },
+ { 0x0900, 0x00da, 0x0020 },
+ { 0x8900, 0x00dd, 0x2020 },
+ { 0x0900, 0x00dc, 0x0020 },
+ { 0x0900, 0x00de, 0x0020 },
+ { 0x8500, 0x00ef, 0x5fe0 },
+ { 0x8500, 0x00e7, 0x4fe0 },
+ { 0x8500, 0x00e3, 0x3fe0 },
+ { 0x8500, 0x00e1, 0x2fe0 },
+ { 0x0500, 0x00e0, 0x0fe0 },
+ { 0x0500, 0x00e2, 0x0fe0 },
+ { 0x8500, 0x00e5, 0x2fe0 },
+ { 0x0500, 0x00e4, 0x0fe0 },
+ { 0x0500, 0x00e6, 0x0fe0 },
+ { 0x8500, 0x00eb, 0x3fe0 },
+ { 0x8500, 0x00e9, 0x2fe0 },
+ { 0x0500, 0x00e8, 0x0fe0 },
+ { 0x0500, 0x00ea, 0x0fe0 },
+ { 0x8500, 0x00ed, 0x2fe0 },
+ { 0x0500, 0x00ec, 0x0fe0 },
+ { 0x0500, 0x00ee, 0x0fe0 },
+ { 0x9900, 0x00f7, 0x4000 },
+ { 0x8500, 0x00f3, 0x3fe0 },
+ { 0x8500, 0x00f1, 0x2fe0 },
+ { 0x0500, 0x00f0, 0x0fe0 },
+ { 0x0500, 0x00f2, 0x0fe0 },
+ { 0x8500, 0x00f5, 0x2fe0 },
+ { 0x0500, 0x00f4, 0x0fe0 },
+ { 0x0500, 0x00f6, 0x0fe0 },
+ { 0x8500, 0x00fb, 0x3fe0 },
+ { 0x8500, 0x00f9, 0x2fe0 },
+ { 0x0500, 0x00f8, 0x0fe0 },
+ { 0x0500, 0x00fa, 0x0fe0 },
+ { 0x8500, 0x00fd, 0x2fe0 },
+ { 0x0500, 0x00fc, 0x0fe0 },
+ { 0x0500, 0x00fe, 0x0fe0 },
+ { 0x8500, 0x017f, 0x8ed4 },
+ { 0x8900, 0x013f, 0x7001 },
+ { 0x8500, 0x011f, 0x6fff },
+ { 0x8500, 0x010f, 0x5fff },
+ { 0x8500, 0x0107, 0x4fff },
+ { 0x8500, 0x0103, 0x3fff },
+ { 0x8500, 0x0101, 0x2fff },
+ { 0x0900, 0x0100, 0x0001 },
+ { 0x0900, 0x0102, 0x0001 },
+ { 0x8500, 0x0105, 0x2fff },
+ { 0x0900, 0x0104, 0x0001 },
+ { 0x0900, 0x0106, 0x0001 },
+ { 0x8500, 0x010b, 0x3fff },
+ { 0x8500, 0x0109, 0x2fff },
+ { 0x0900, 0x0108, 0x0001 },
+ { 0x0900, 0x010a, 0x0001 },
+ { 0x8500, 0x010d, 0x2fff },
+ { 0x0900, 0x010c, 0x0001 },
+ { 0x0900, 0x010e, 0x0001 },
+ { 0x8500, 0x0117, 0x4fff },
+ { 0x8500, 0x0113, 0x3fff },
+ { 0x8500, 0x0111, 0x2fff },
+ { 0x0900, 0x0110, 0x0001 },
+ { 0x0900, 0x0112, 0x0001 },
+ { 0x8500, 0x0115, 0x2fff },
+ { 0x0900, 0x0114, 0x0001 },
+ { 0x0900, 0x0116, 0x0001 },
+ { 0x8500, 0x011b, 0x3fff },
+ { 0x8500, 0x0119, 0x2fff },
+ { 0x0900, 0x0118, 0x0001 },
+ { 0x0900, 0x011a, 0x0001 },
+ { 0x8500, 0x011d, 0x2fff },
+ { 0x0900, 0x011c, 0x0001 },
+ { 0x0900, 0x011e, 0x0001 },
+ { 0x8500, 0x012f, 0x5fff },
+ { 0x8500, 0x0127, 0x4fff },
+ { 0x8500, 0x0123, 0x3fff },
+ { 0x8500, 0x0121, 0x2fff },
+ { 0x0900, 0x0120, 0x0001 },
+ { 0x0900, 0x0122, 0x0001 },
+ { 0x8500, 0x0125, 0x2fff },
+ { 0x0900, 0x0124, 0x0001 },
+ { 0x0900, 0x0126, 0x0001 },
+ { 0x8500, 0x012b, 0x3fff },
+ { 0x8500, 0x0129, 0x2fff },
+ { 0x0900, 0x0128, 0x0001 },
+ { 0x0900, 0x012a, 0x0001 },
+ { 0x8500, 0x012d, 0x2fff },
+ { 0x0900, 0x012c, 0x0001 },
+ { 0x0900, 0x012e, 0x0001 },
+ { 0x8500, 0x0137, 0x4fff },
+ { 0x8500, 0x0133, 0x3fff },
+ { 0x8500, 0x0131, 0x2f18 },
+ { 0x0900, 0x0130, 0x0f39 },
+ { 0x0900, 0x0132, 0x0001 },
+ { 0x8500, 0x0135, 0x2fff },
+ { 0x0900, 0x0134, 0x0001 },
+ { 0x0900, 0x0136, 0x0001 },
+ { 0x8900, 0x013b, 0x3001 },
+ { 0x8900, 0x0139, 0x2001 },
+ { 0x0500, 0x0138, 0x0000 },
+ { 0x0500, 0x013a, 0x0fff },
+ { 0x8900, 0x013d, 0x2001 },
+ { 0x0500, 0x013c, 0x0fff },
+ { 0x0500, 0x013e, 0x0fff },
+ { 0x8500, 0x015f, 0x6fff },
+ { 0x8500, 0x014f, 0x5fff },
+ { 0x8900, 0x0147, 0x4001 },
+ { 0x8900, 0x0143, 0x3001 },
+ { 0x8900, 0x0141, 0x2001 },
+ { 0x0500, 0x0140, 0x0fff },
+ { 0x0500, 0x0142, 0x0fff },
+ { 0x8900, 0x0145, 0x2001 },
+ { 0x0500, 0x0144, 0x0fff },
+ { 0x0500, 0x0146, 0x0fff },
+ { 0x8500, 0x014b, 0x3fff },
+ { 0x8500, 0x0149, 0x2000 },
+ { 0x0500, 0x0148, 0x0fff },
+ { 0x0900, 0x014a, 0x0001 },
+ { 0x8500, 0x014d, 0x2fff },
+ { 0x0900, 0x014c, 0x0001 },
+ { 0x0900, 0x014e, 0x0001 },
+ { 0x8500, 0x0157, 0x4fff },
+ { 0x8500, 0x0153, 0x3fff },
+ { 0x8500, 0x0151, 0x2fff },
+ { 0x0900, 0x0150, 0x0001 },
+ { 0x0900, 0x0152, 0x0001 },
+ { 0x8500, 0x0155, 0x2fff },
+ { 0x0900, 0x0154, 0x0001 },
+ { 0x0900, 0x0156, 0x0001 },
+ { 0x8500, 0x015b, 0x3fff },
+ { 0x8500, 0x0159, 0x2fff },
+ { 0x0900, 0x0158, 0x0001 },
+ { 0x0900, 0x015a, 0x0001 },
+ { 0x8500, 0x015d, 0x2fff },
+ { 0x0900, 0x015c, 0x0001 },
+ { 0x0900, 0x015e, 0x0001 },
+ { 0x8500, 0x016f, 0x5fff },
+ { 0x8500, 0x0167, 0x4fff },
+ { 0x8500, 0x0163, 0x3fff },
+ { 0x8500, 0x0161, 0x2fff },
+ { 0x0900, 0x0160, 0x0001 },
+ { 0x0900, 0x0162, 0x0001 },
+ { 0x8500, 0x0165, 0x2fff },
+ { 0x0900, 0x0164, 0x0001 },
+ { 0x0900, 0x0166, 0x0001 },
+ { 0x8500, 0x016b, 0x3fff },
+ { 0x8500, 0x0169, 0x2fff },
+ { 0x0900, 0x0168, 0x0001 },
+ { 0x0900, 0x016a, 0x0001 },
+ { 0x8500, 0x016d, 0x2fff },
+ { 0x0900, 0x016c, 0x0001 },
+ { 0x0900, 0x016e, 0x0001 },
+ { 0x8500, 0x0177, 0x4fff },
+ { 0x8500, 0x0173, 0x3fff },
+ { 0x8500, 0x0171, 0x2fff },
+ { 0x0900, 0x0170, 0x0001 },
+ { 0x0900, 0x0172, 0x0001 },
+ { 0x8500, 0x0175, 0x2fff },
+ { 0x0900, 0x0174, 0x0001 },
+ { 0x0900, 0x0176, 0x0001 },
+ { 0x8900, 0x017b, 0x3001 },
+ { 0x8900, 0x0179, 0x2001 },
+ { 0x0900, 0x0178, 0x0f87 },
+ { 0x0500, 0x017a, 0x0fff },
+ { 0x8900, 0x017d, 0x2001 },
+ { 0x0500, 0x017c, 0x0fff },
+ { 0x0500, 0x017e, 0x0fff },
+ { 0x8500, 0x01bf, 0x7038 },
+ { 0x8900, 0x019f, 0x60d6 },
+ { 0x8900, 0x018f, 0x50ca },
+ { 0x8900, 0x0187, 0x4001 },
+ { 0x8500, 0x0183, 0x3fff },
+ { 0x8900, 0x0181, 0x20d2 },
+ { 0x0500, 0x0180, 0x0000 },
+ { 0x0900, 0x0182, 0x0001 },
+ { 0x8500, 0x0185, 0x2fff },
+ { 0x0900, 0x0184, 0x0001 },
+ { 0x0900, 0x0186, 0x00ce },
+ { 0x8900, 0x018b, 0x3001 },
+ { 0x8900, 0x0189, 0x20cd },
+ { 0x0500, 0x0188, 0x0fff },
+ { 0x0900, 0x018a, 0x00cd },
+ { 0x8500, 0x018d, 0x2000 },
+ { 0x0500, 0x018c, 0x0fff },
+ { 0x0900, 0x018e, 0x004f },
+ { 0x8900, 0x0197, 0x40d1 },
+ { 0x8900, 0x0193, 0x30cd },
+ { 0x8900, 0x0191, 0x2001 },
+ { 0x0900, 0x0190, 0x00cb },
+ { 0x0500, 0x0192, 0x0fff },
+ { 0x8500, 0x0195, 0x2061 },
+ { 0x0900, 0x0194, 0x00cf },
+ { 0x0900, 0x0196, 0x00d3 },
+ { 0x8500, 0x019b, 0x3000 },
+ { 0x8500, 0x0199, 0x2fff },
+ { 0x0900, 0x0198, 0x0001 },
+ { 0x0500, 0x019a, 0x0000 },
+ { 0x8900, 0x019d, 0x20d5 },
+ { 0x0900, 0x019c, 0x00d3 },
+ { 0x0500, 0x019e, 0x0082 },
+ { 0x8900, 0x01af, 0x5001 },
+ { 0x8900, 0x01a7, 0x4001 },
+ { 0x8500, 0x01a3, 0x3fff },
+ { 0x8500, 0x01a1, 0x2fff },
+ { 0x0900, 0x01a0, 0x0001 },
+ { 0x0900, 0x01a2, 0x0001 },
+ { 0x8500, 0x01a5, 0x2fff },
+ { 0x0900, 0x01a4, 0x0001 },
+ { 0x0900, 0x01a6, 0x00da },
+ { 0x8500, 0x01ab, 0x3000 },
+ { 0x8900, 0x01a9, 0x20da },
+ { 0x0500, 0x01a8, 0x0fff },
+ { 0x0500, 0x01aa, 0x0000 },
+ { 0x8500, 0x01ad, 0x2fff },
+ { 0x0900, 0x01ac, 0x0001 },
+ { 0x0900, 0x01ae, 0x00da },
+ { 0x8900, 0x01b7, 0x40db },
+ { 0x8900, 0x01b3, 0x3001 },
+ { 0x8900, 0x01b1, 0x20d9 },
+ { 0x0500, 0x01b0, 0x0fff },
+ { 0x0900, 0x01b2, 0x00d9 },
+ { 0x8900, 0x01b5, 0x2001 },
+ { 0x0500, 0x01b4, 0x0fff },
+ { 0x0500, 0x01b6, 0x0fff },
+ { 0x8700, 0x01bb, 0x3000 },
+ { 0x8500, 0x01b9, 0x2fff },
+ { 0x0900, 0x01b8, 0x0001 },
+ { 0x0500, 0x01ba, 0x0000 },
+ { 0x8500, 0x01bd, 0x2fff },
+ { 0x0900, 0x01bc, 0x0001 },
+ { 0x0500, 0x01be, 0x0000 },
+ { 0x8500, 0x01df, 0x6fff },
+ { 0x8900, 0x01cf, 0x5001 },
+ { 0x8900, 0x01c7, 0x4002 },
+ { 0x8700, 0x01c3, 0x3000 },
+ { 0x8700, 0x01c1, 0x2000 },
+ { 0x0700, 0x01c0, 0x0000 },
+ { 0x0700, 0x01c2, 0x0000 },
+ { 0x8800, 0x01c5, 0x2000 },
+ { 0x0900, 0x01c4, 0x0002 },
+ { 0x0500, 0x01c6, 0x0ffe },
+ { 0x8800, 0x01cb, 0x3000 },
+ { 0x8500, 0x01c9, 0x2ffe },
+ { 0x0800, 0x01c8, 0x0000 },
+ { 0x0900, 0x01ca, 0x0002 },
+ { 0x8900, 0x01cd, 0x2001 },
+ { 0x0500, 0x01cc, 0x0ffe },
+ { 0x0500, 0x01ce, 0x0fff },
+ { 0x8900, 0x01d7, 0x4001 },
+ { 0x8900, 0x01d3, 0x3001 },
+ { 0x8900, 0x01d1, 0x2001 },
+ { 0x0500, 0x01d0, 0x0fff },
+ { 0x0500, 0x01d2, 0x0fff },
+ { 0x8900, 0x01d5, 0x2001 },
+ { 0x0500, 0x01d4, 0x0fff },
+ { 0x0500, 0x01d6, 0x0fff },
+ { 0x8900, 0x01db, 0x3001 },
+ { 0x8900, 0x01d9, 0x2001 },
+ { 0x0500, 0x01d8, 0x0fff },
+ { 0x0500, 0x01da, 0x0fff },
+ { 0x8500, 0x01dd, 0x2fb1 },
+ { 0x0500, 0x01dc, 0x0fff },
+ { 0x0900, 0x01de, 0x0001 },
+ { 0x8500, 0x01ef, 0x5fff },
+ { 0x8500, 0x01e7, 0x4fff },
+ { 0x8500, 0x01e3, 0x3fff },
+ { 0x8500, 0x01e1, 0x2fff },
+ { 0x0900, 0x01e0, 0x0001 },
+ { 0x0900, 0x01e2, 0x0001 },
+ { 0x8500, 0x01e5, 0x2fff },
+ { 0x0900, 0x01e4, 0x0001 },
+ { 0x0900, 0x01e6, 0x0001 },
+ { 0x8500, 0x01eb, 0x3fff },
+ { 0x8500, 0x01e9, 0x2fff },
+ { 0x0900, 0x01e8, 0x0001 },
+ { 0x0900, 0x01ea, 0x0001 },
+ { 0x8500, 0x01ed, 0x2fff },
+ { 0x0900, 0x01ec, 0x0001 },
+ { 0x0900, 0x01ee, 0x0001 },
+ { 0x8900, 0x01f7, 0x4fc8 },
+ { 0x8500, 0x01f3, 0x3ffe },
+ { 0x8900, 0x01f1, 0x2002 },
+ { 0x0500, 0x01f0, 0x0000 },
+ { 0x0800, 0x01f2, 0x0000 },
+ { 0x8500, 0x01f5, 0x2fff },
+ { 0x0900, 0x01f4, 0x0001 },
+ { 0x0900, 0x01f6, 0x0f9f },
+ { 0x8500, 0x01fb, 0x3fff },
+ { 0x8500, 0x01f9, 0x2fff },
+ { 0x0900, 0x01f8, 0x0001 },
+ { 0x0900, 0x01fa, 0x0001 },
+ { 0x8500, 0x01fd, 0x2fff },
+ { 0x0900, 0x01fc, 0x0001 },
+ { 0x0900, 0x01fe, 0x0001 },
+ { 0x8c00, 0x0318, 0x9000 },
+ { 0x8500, 0x0298, 0x8000 },
+ { 0x8500, 0x0258, 0x7000 },
+ { 0x8500, 0x021f, 0x6fff },
+ { 0x8500, 0x020f, 0x5fff },
+ { 0x8500, 0x0207, 0x4fff },
+ { 0x8500, 0x0203, 0x3fff },
+ { 0x8500, 0x0201, 0x2fff },
+ { 0x0900, 0x0200, 0x0001 },
+ { 0x0900, 0x0202, 0x0001 },
+ { 0x8500, 0x0205, 0x2fff },
+ { 0x0900, 0x0204, 0x0001 },
+ { 0x0900, 0x0206, 0x0001 },
+ { 0x8500, 0x020b, 0x3fff },
+ { 0x8500, 0x0209, 0x2fff },
+ { 0x0900, 0x0208, 0x0001 },
+ { 0x0900, 0x020a, 0x0001 },
+ { 0x8500, 0x020d, 0x2fff },
+ { 0x0900, 0x020c, 0x0001 },
+ { 0x0900, 0x020e, 0x0001 },
+ { 0x8500, 0x0217, 0x4fff },
+ { 0x8500, 0x0213, 0x3fff },
+ { 0x8500, 0x0211, 0x2fff },
+ { 0x0900, 0x0210, 0x0001 },
+ { 0x0900, 0x0212, 0x0001 },
+ { 0x8500, 0x0215, 0x2fff },
+ { 0x0900, 0x0214, 0x0001 },
+ { 0x0900, 0x0216, 0x0001 },
+ { 0x8500, 0x021b, 0x3fff },
+ { 0x8500, 0x0219, 0x2fff },
+ { 0x0900, 0x0218, 0x0001 },
+ { 0x0900, 0x021a, 0x0001 },
+ { 0x8500, 0x021d, 0x2fff },
+ { 0x0900, 0x021c, 0x0001 },
+ { 0x0900, 0x021e, 0x0001 },
+ { 0x8500, 0x022f, 0x5fff },
+ { 0x8500, 0x0227, 0x4fff },
+ { 0x8500, 0x0223, 0x3fff },
+ { 0x8500, 0x0221, 0x2000 },
+ { 0x0900, 0x0220, 0x0f7e },
+ { 0x0900, 0x0222, 0x0001 },
+ { 0x8500, 0x0225, 0x2fff },
+ { 0x0900, 0x0224, 0x0001 },
+ { 0x0900, 0x0226, 0x0001 },
+ { 0x8500, 0x022b, 0x3fff },
+ { 0x8500, 0x0229, 0x2fff },
+ { 0x0900, 0x0228, 0x0001 },
+ { 0x0900, 0x022a, 0x0001 },
+ { 0x8500, 0x022d, 0x2fff },
+ { 0x0900, 0x022c, 0x0001 },
+ { 0x0900, 0x022e, 0x0001 },
+ { 0x8500, 0x0250, 0x4000 },
+ { 0x8500, 0x0233, 0x3fff },
+ { 0x8500, 0x0231, 0x2fff },
+ { 0x0900, 0x0230, 0x0001 },
+ { 0x0900, 0x0232, 0x0001 },
+ { 0x8500, 0x0235, 0x2000 },
+ { 0x0500, 0x0234, 0x0000 },
+ { 0x0500, 0x0236, 0x0000 },
+ { 0x8500, 0x0254, 0x3f32 },
+ { 0x8500, 0x0252, 0x2000 },
+ { 0x0500, 0x0251, 0x0000 },
+ { 0x0500, 0x0253, 0x0f2e },
+ { 0x8500, 0x0256, 0x2f33 },
+ { 0x0500, 0x0255, 0x0000 },
+ { 0x0500, 0x0257, 0x0f33 },
+ { 0x8500, 0x0278, 0x6000 },
+ { 0x8500, 0x0268, 0x5f2f },
+ { 0x8500, 0x0260, 0x4f33 },
+ { 0x8500, 0x025c, 0x3000 },
+ { 0x8500, 0x025a, 0x2000 },
+ { 0x0500, 0x0259, 0x0f36 },
+ { 0x0500, 0x025b, 0x0f35 },
+ { 0x8500, 0x025e, 0x2000 },
+ { 0x0500, 0x025d, 0x0000 },
+ { 0x0500, 0x025f, 0x0000 },
+ { 0x8500, 0x0264, 0x3000 },
+ { 0x8500, 0x0262, 0x2000 },
+ { 0x0500, 0x0261, 0x0000 },
+ { 0x0500, 0x0263, 0x0f31 },
+ { 0x8500, 0x0266, 0x2000 },
+ { 0x0500, 0x0265, 0x0000 },
+ { 0x0500, 0x0267, 0x0000 },
+ { 0x8500, 0x0270, 0x4000 },
+ { 0x8500, 0x026c, 0x3000 },
+ { 0x8500, 0x026a, 0x2000 },
+ { 0x0500, 0x0269, 0x0f2d },
+ { 0x0500, 0x026b, 0x0000 },
+ { 0x8500, 0x026e, 0x2000 },
+ { 0x0500, 0x026d, 0x0000 },
+ { 0x0500, 0x026f, 0x0f2d },
+ { 0x8500, 0x0274, 0x3000 },
+ { 0x8500, 0x0272, 0x2f2b },
+ { 0x0500, 0x0271, 0x0000 },
+ { 0x0500, 0x0273, 0x0000 },
+ { 0x8500, 0x0276, 0x2000 },
+ { 0x0500, 0x0275, 0x0f2a },
+ { 0x0500, 0x0277, 0x0000 },
+ { 0x8500, 0x0288, 0x5f26 },
+ { 0x8500, 0x0280, 0x4f26 },
+ { 0x8500, 0x027c, 0x3000 },
+ { 0x8500, 0x027a, 0x2000 },
+ { 0x0500, 0x0279, 0x0000 },
+ { 0x0500, 0x027b, 0x0000 },
+ { 0x8500, 0x027e, 0x2000 },
+ { 0x0500, 0x027d, 0x0000 },
+ { 0x0500, 0x027f, 0x0000 },
+ { 0x8500, 0x0284, 0x3000 },
+ { 0x8500, 0x0282, 0x2000 },
+ { 0x0500, 0x0281, 0x0000 },
+ { 0x0500, 0x0283, 0x0f26 },
+ { 0x8500, 0x0286, 0x2000 },
+ { 0x0500, 0x0285, 0x0000 },
+ { 0x0500, 0x0287, 0x0000 },
+ { 0x8500, 0x0290, 0x4000 },
+ { 0x8500, 0x028c, 0x3000 },
+ { 0x8500, 0x028a, 0x2f27 },
+ { 0x0500, 0x0289, 0x0000 },
+ { 0x0500, 0x028b, 0x0f27 },
+ { 0x8500, 0x028e, 0x2000 },
+ { 0x0500, 0x028d, 0x0000 },
+ { 0x0500, 0x028f, 0x0000 },
+ { 0x8500, 0x0294, 0x3000 },
+ { 0x8500, 0x0292, 0x2f25 },
+ { 0x0500, 0x0291, 0x0000 },
+ { 0x0500, 0x0293, 0x0000 },
+ { 0x8500, 0x0296, 0x2000 },
+ { 0x0500, 0x0295, 0x0000 },
+ { 0x0500, 0x0297, 0x0000 },
+ { 0x9800, 0x02d8, 0x7000 },
+ { 0x8600, 0x02b8, 0x6000 },
+ { 0x8500, 0x02a8, 0x5000 },
+ { 0x8500, 0x02a0, 0x4000 },
+ { 0x8500, 0x029c, 0x3000 },
+ { 0x8500, 0x029a, 0x2000 },
+ { 0x0500, 0x0299, 0x0000 },
+ { 0x0500, 0x029b, 0x0000 },
+ { 0x8500, 0x029e, 0x2000 },
+ { 0x0500, 0x029d, 0x0000 },
+ { 0x0500, 0x029f, 0x0000 },
+ { 0x8500, 0x02a4, 0x3000 },
+ { 0x8500, 0x02a2, 0x2000 },
+ { 0x0500, 0x02a1, 0x0000 },
+ { 0x0500, 0x02a3, 0x0000 },
+ { 0x8500, 0x02a6, 0x2000 },
+ { 0x0500, 0x02a5, 0x0000 },
+ { 0x0500, 0x02a7, 0x0000 },
+ { 0x8600, 0x02b0, 0x4000 },
+ { 0x8500, 0x02ac, 0x3000 },
+ { 0x8500, 0x02aa, 0x2000 },
+ { 0x0500, 0x02a9, 0x0000 },
+ { 0x0500, 0x02ab, 0x0000 },
+ { 0x8500, 0x02ae, 0x2000 },
+ { 0x0500, 0x02ad, 0x0000 },
+ { 0x0500, 0x02af, 0x0000 },
+ { 0x8600, 0x02b4, 0x3000 },
+ { 0x8600, 0x02b2, 0x2000 },
+ { 0x0600, 0x02b1, 0x0000 },
+ { 0x0600, 0x02b3, 0x0000 },
+ { 0x8600, 0x02b6, 0x2000 },
+ { 0x0600, 0x02b5, 0x0000 },
+ { 0x0600, 0x02b7, 0x0000 },
+ { 0x8600, 0x02c8, 0x5000 },
+ { 0x8600, 0x02c0, 0x4000 },
+ { 0x8600, 0x02bc, 0x3000 },
+ { 0x8600, 0x02ba, 0x2000 },
+ { 0x0600, 0x02b9, 0x0000 },
+ { 0x0600, 0x02bb, 0x0000 },
+ { 0x8600, 0x02be, 0x2000 },
+ { 0x0600, 0x02bd, 0x0000 },
+ { 0x0600, 0x02bf, 0x0000 },
+ { 0x9800, 0x02c4, 0x3000 },
+ { 0x9800, 0x02c2, 0x2000 },
+ { 0x0600, 0x02c1, 0x0000 },
+ { 0x1800, 0x02c3, 0x0000 },
+ { 0x8600, 0x02c6, 0x2000 },
+ { 0x1800, 0x02c5, 0x0000 },
+ { 0x0600, 0x02c7, 0x0000 },
+ { 0x8600, 0x02d0, 0x4000 },
+ { 0x8600, 0x02cc, 0x3000 },
+ { 0x8600, 0x02ca, 0x2000 },
+ { 0x0600, 0x02c9, 0x0000 },
+ { 0x0600, 0x02cb, 0x0000 },
+ { 0x8600, 0x02ce, 0x2000 },
+ { 0x0600, 0x02cd, 0x0000 },
+ { 0x0600, 0x02cf, 0x0000 },
+ { 0x9800, 0x02d4, 0x3000 },
+ { 0x9800, 0x02d2, 0x2000 },
+ { 0x0600, 0x02d1, 0x0000 },
+ { 0x1800, 0x02d3, 0x0000 },
+ { 0x9800, 0x02d6, 0x2000 },
+ { 0x1800, 0x02d5, 0x0000 },
+ { 0x1800, 0x02d7, 0x0000 },
+ { 0x9800, 0x02f8, 0x6000 },
+ { 0x9800, 0x02e8, 0x5000 },
+ { 0x8600, 0x02e0, 0x4000 },
+ { 0x9800, 0x02dc, 0x3000 },
+ { 0x9800, 0x02da, 0x2000 },
+ { 0x1800, 0x02d9, 0x0000 },
+ { 0x1800, 0x02db, 0x0000 },
+ { 0x9800, 0x02de, 0x2000 },
+ { 0x1800, 0x02dd, 0x0000 },
+ { 0x1800, 0x02df, 0x0000 },
+ { 0x8600, 0x02e4, 0x3000 },
+ { 0x8600, 0x02e2, 0x2000 },
+ { 0x0600, 0x02e1, 0x0000 },
+ { 0x0600, 0x02e3, 0x0000 },
+ { 0x9800, 0x02e6, 0x2000 },
+ { 0x1800, 0x02e5, 0x0000 },
+ { 0x1800, 0x02e7, 0x0000 },
+ { 0x9800, 0x02f0, 0x4000 },
+ { 0x9800, 0x02ec, 0x3000 },
+ { 0x9800, 0x02ea, 0x2000 },
+ { 0x1800, 0x02e9, 0x0000 },
+ { 0x1800, 0x02eb, 0x0000 },
+ { 0x8600, 0x02ee, 0x2000 },
+ { 0x1800, 0x02ed, 0x0000 },
+ { 0x1800, 0x02ef, 0x0000 },
+ { 0x9800, 0x02f4, 0x3000 },
+ { 0x9800, 0x02f2, 0x2000 },
+ { 0x1800, 0x02f1, 0x0000 },
+ { 0x1800, 0x02f3, 0x0000 },
+ { 0x9800, 0x02f6, 0x2000 },
+ { 0x1800, 0x02f5, 0x0000 },
+ { 0x1800, 0x02f7, 0x0000 },
+ { 0x8c00, 0x0308, 0x5000 },
+ { 0x8c00, 0x0300, 0x4000 },
+ { 0x9800, 0x02fc, 0x3000 },
+ { 0x9800, 0x02fa, 0x2000 },
+ { 0x1800, 0x02f9, 0x0000 },
+ { 0x1800, 0x02fb, 0x0000 },
+ { 0x9800, 0x02fe, 0x2000 },
+ { 0x1800, 0x02fd, 0x0000 },
+ { 0x1800, 0x02ff, 0x0000 },
+ { 0x8c00, 0x0304, 0x3000 },
+ { 0x8c00, 0x0302, 0x2000 },
+ { 0x0c00, 0x0301, 0x0000 },
+ { 0x0c00, 0x0303, 0x0000 },
+ { 0x8c00, 0x0306, 0x2000 },
+ { 0x0c00, 0x0305, 0x0000 },
+ { 0x0c00, 0x0307, 0x0000 },
+ { 0x8c00, 0x0310, 0x4000 },
+ { 0x8c00, 0x030c, 0x3000 },
+ { 0x8c00, 0x030a, 0x2000 },
+ { 0x0c00, 0x0309, 0x0000 },
+ { 0x0c00, 0x030b, 0x0000 },
+ { 0x8c00, 0x030e, 0x2000 },
+ { 0x0c00, 0x030d, 0x0000 },
+ { 0x0c00, 0x030f, 0x0000 },
+ { 0x8c00, 0x0314, 0x3000 },
+ { 0x8c00, 0x0312, 0x2000 },
+ { 0x0c00, 0x0311, 0x0000 },
+ { 0x0c00, 0x0313, 0x0000 },
+ { 0x8c00, 0x0316, 0x2000 },
+ { 0x0c00, 0x0315, 0x0000 },
+ { 0x0c00, 0x0317, 0x0000 },
+ { 0x8500, 0x03b0, 0x8000 },
+ { 0x8c00, 0x035d, 0x7000 },
+ { 0x8c00, 0x0338, 0x6000 },
+ { 0x8c00, 0x0328, 0x5000 },
+ { 0x8c00, 0x0320, 0x4000 },
+ { 0x8c00, 0x031c, 0x3000 },
+ { 0x8c00, 0x031a, 0x2000 },
+ { 0x0c00, 0x0319, 0x0000 },
+ { 0x0c00, 0x031b, 0x0000 },
+ { 0x8c00, 0x031e, 0x2000 },
+ { 0x0c00, 0x031d, 0x0000 },
+ { 0x0c00, 0x031f, 0x0000 },
+ { 0x8c00, 0x0324, 0x3000 },
+ { 0x8c00, 0x0322, 0x2000 },
+ { 0x0c00, 0x0321, 0x0000 },
+ { 0x0c00, 0x0323, 0x0000 },
+ { 0x8c00, 0x0326, 0x2000 },
+ { 0x0c00, 0x0325, 0x0000 },
+ { 0x0c00, 0x0327, 0x0000 },
+ { 0x8c00, 0x0330, 0x4000 },
+ { 0x8c00, 0x032c, 0x3000 },
+ { 0x8c00, 0x032a, 0x2000 },
+ { 0x0c00, 0x0329, 0x0000 },
+ { 0x0c00, 0x032b, 0x0000 },
+ { 0x8c00, 0x032e, 0x2000 },
+ { 0x0c00, 0x032d, 0x0000 },
+ { 0x0c00, 0x032f, 0x0000 },
+ { 0x8c00, 0x0334, 0x3000 },
+ { 0x8c00, 0x0332, 0x2000 },
+ { 0x0c00, 0x0331, 0x0000 },
+ { 0x0c00, 0x0333, 0x0000 },
+ { 0x8c00, 0x0336, 0x2000 },
+ { 0x0c00, 0x0335, 0x0000 },
+ { 0x0c00, 0x0337, 0x0000 },
+ { 0x8c00, 0x0348, 0x5000 },
+ { 0x8c00, 0x0340, 0x4000 },
+ { 0x8c00, 0x033c, 0x3000 },
+ { 0x8c00, 0x033a, 0x2000 },
+ { 0x0c00, 0x0339, 0x0000 },
+ { 0x0c00, 0x033b, 0x0000 },
+ { 0x8c00, 0x033e, 0x2000 },
+ { 0x0c00, 0x033d, 0x0000 },
+ { 0x0c00, 0x033f, 0x0000 },
+ { 0x8c00, 0x0344, 0x3000 },
+ { 0x8c00, 0x0342, 0x2000 },
+ { 0x0c00, 0x0341, 0x0000 },
+ { 0x0c00, 0x0343, 0x0000 },
+ { 0x8c00, 0x0346, 0x2000 },
+ { 0x0c00, 0x0345, 0x0000 },
+ { 0x0c00, 0x0347, 0x0000 },
+ { 0x8c00, 0x0350, 0x4000 },
+ { 0x8c00, 0x034c, 0x3000 },
+ { 0x8c00, 0x034a, 0x2000 },
+ { 0x0c00, 0x0349, 0x0000 },
+ { 0x0c00, 0x034b, 0x0000 },
+ { 0x8c00, 0x034e, 0x2000 },
+ { 0x0c00, 0x034d, 0x0000 },
+ { 0x0c00, 0x034f, 0x0000 },
+ { 0x8c00, 0x0354, 0x3000 },
+ { 0x8c00, 0x0352, 0x2000 },
+ { 0x0c00, 0x0351, 0x0000 },
+ { 0x0c00, 0x0353, 0x0000 },
+ { 0x8c00, 0x0356, 0x2000 },
+ { 0x0c00, 0x0355, 0x0000 },
+ { 0x0c00, 0x0357, 0x0000 },
+ { 0x8900, 0x038f, 0x603f },
+ { 0x8c00, 0x036d, 0x5000 },
+ { 0x8c00, 0x0365, 0x4000 },
+ { 0x8c00, 0x0361, 0x3000 },
+ { 0x8c00, 0x035f, 0x2000 },
+ { 0x0c00, 0x035e, 0x0000 },
+ { 0x0c00, 0x0360, 0x0000 },
+ { 0x8c00, 0x0363, 0x2000 },
+ { 0x0c00, 0x0362, 0x0000 },
+ { 0x0c00, 0x0364, 0x0000 },
+ { 0x8c00, 0x0369, 0x3000 },
+ { 0x8c00, 0x0367, 0x2000 },
+ { 0x0c00, 0x0366, 0x0000 },
+ { 0x0c00, 0x0368, 0x0000 },
+ { 0x8c00, 0x036b, 0x2000 },
+ { 0x0c00, 0x036a, 0x0000 },
+ { 0x0c00, 0x036c, 0x0000 },
+ { 0x9800, 0x0385, 0x4000 },
+ { 0x9800, 0x0375, 0x3000 },
+ { 0x8c00, 0x036f, 0x2000 },
+ { 0x0c00, 0x036e, 0x0000 },
+ { 0x1800, 0x0374, 0x0000 },
+ { 0x9500, 0x037e, 0x2000 },
+ { 0x0600, 0x037a, 0x0000 },
+ { 0x1800, 0x0384, 0x0000 },
+ { 0x8900, 0x0389, 0x3025 },
+ { 0x9500, 0x0387, 0x2000 },
+ { 0x0900, 0x0386, 0x0026 },
+ { 0x0900, 0x0388, 0x0025 },
+ { 0x8900, 0x038c, 0x2040 },
+ { 0x0900, 0x038a, 0x0025 },
+ { 0x0900, 0x038e, 0x003f },
+ { 0x8900, 0x039f, 0x5020 },
+ { 0x8900, 0x0397, 0x4020 },
+ { 0x8900, 0x0393, 0x3020 },
+ { 0x8900, 0x0391, 0x2020 },
+ { 0x0500, 0x0390, 0x0000 },
+ { 0x0900, 0x0392, 0x0020 },
+ { 0x8900, 0x0395, 0x2020 },
+ { 0x0900, 0x0394, 0x0020 },
+ { 0x0900, 0x0396, 0x0020 },
+ { 0x8900, 0x039b, 0x3020 },
+ { 0x8900, 0x0399, 0x2020 },
+ { 0x0900, 0x0398, 0x0020 },
+ { 0x0900, 0x039a, 0x0020 },
+ { 0x8900, 0x039d, 0x2020 },
+ { 0x0900, 0x039c, 0x0020 },
+ { 0x0900, 0x039e, 0x0020 },
+ { 0x8900, 0x03a8, 0x4020 },
+ { 0x8900, 0x03a4, 0x3020 },
+ { 0x8900, 0x03a1, 0x2020 },
+ { 0x0900, 0x03a0, 0x0020 },
+ { 0x0900, 0x03a3, 0x0020 },
+ { 0x8900, 0x03a6, 0x2020 },
+ { 0x0900, 0x03a5, 0x0020 },
+ { 0x0900, 0x03a7, 0x0020 },
+ { 0x8500, 0x03ac, 0x3fda },
+ { 0x8900, 0x03aa, 0x2020 },
+ { 0x0900, 0x03a9, 0x0020 },
+ { 0x0900, 0x03ab, 0x0020 },
+ { 0x8500, 0x03ae, 0x2fdb },
+ { 0x0500, 0x03ad, 0x0fdb },
+ { 0x0500, 0x03af, 0x0fdb },
+ { 0x8500, 0x03f1, 0x7fb0 },
+ { 0x8500, 0x03d1, 0x6fc7 },
+ { 0x8500, 0x03c0, 0x5fe0 },
+ { 0x8500, 0x03b8, 0x4fe0 },
+ { 0x8500, 0x03b4, 0x3fe0 },
+ { 0x8500, 0x03b2, 0x2fe0 },
+ { 0x0500, 0x03b1, 0x0fe0 },
+ { 0x0500, 0x03b3, 0x0fe0 },
+ { 0x8500, 0x03b6, 0x2fe0 },
+ { 0x0500, 0x03b5, 0x0fe0 },
+ { 0x0500, 0x03b7, 0x0fe0 },
+ { 0x8500, 0x03bc, 0x3fe0 },
+ { 0x8500, 0x03ba, 0x2fe0 },
+ { 0x0500, 0x03b9, 0x0fe0 },
+ { 0x0500, 0x03bb, 0x0fe0 },
+ { 0x8500, 0x03be, 0x2fe0 },
+ { 0x0500, 0x03bd, 0x0fe0 },
+ { 0x0500, 0x03bf, 0x0fe0 },
+ { 0x8500, 0x03c8, 0x4fe0 },
+ { 0x8500, 0x03c4, 0x3fe0 },
+ { 0x8500, 0x03c2, 0x2fe1 },
+ { 0x0500, 0x03c1, 0x0fe0 },
+ { 0x0500, 0x03c3, 0x0fe0 },
+ { 0x8500, 0x03c6, 0x2fe0 },
+ { 0x0500, 0x03c5, 0x0fe0 },
+ { 0x0500, 0x03c7, 0x0fe0 },
+ { 0x8500, 0x03cc, 0x3fc0 },
+ { 0x8500, 0x03ca, 0x2fe0 },
+ { 0x0500, 0x03c9, 0x0fe0 },
+ { 0x0500, 0x03cb, 0x0fe0 },
+ { 0x8500, 0x03ce, 0x2fc1 },
+ { 0x0500, 0x03cd, 0x0fc1 },
+ { 0x0500, 0x03d0, 0x0fc2 },
+ { 0x8500, 0x03e1, 0x5fff },
+ { 0x8500, 0x03d9, 0x4fff },
+ { 0x8500, 0x03d5, 0x3fd1 },
+ { 0x8900, 0x03d3, 0x2000 },
+ { 0x0900, 0x03d2, 0x0000 },
+ { 0x0900, 0x03d4, 0x0000 },
+ { 0x8500, 0x03d7, 0x2000 },
+ { 0x0500, 0x03d6, 0x0fca },
+ { 0x0900, 0x03d8, 0x0001 },
+ { 0x8500, 0x03dd, 0x3fff },
+ { 0x8500, 0x03db, 0x2fff },
+ { 0x0900, 0x03da, 0x0001 },
+ { 0x0900, 0x03dc, 0x0001 },
+ { 0x8500, 0x03df, 0x2fff },
+ { 0x0900, 0x03de, 0x0001 },
+ { 0x0900, 0x03e0, 0x0001 },
+ { 0x8500, 0x03e9, 0x4fff },
+ { 0x8500, 0x03e5, 0x3fff },
+ { 0x8500, 0x03e3, 0x2fff },
+ { 0x0900, 0x03e2, 0x0001 },
+ { 0x0900, 0x03e4, 0x0001 },
+ { 0x8500, 0x03e7, 0x2fff },
+ { 0x0900, 0x03e6, 0x0001 },
+ { 0x0900, 0x03e8, 0x0001 },
+ { 0x8500, 0x03ed, 0x3fff },
+ { 0x8500, 0x03eb, 0x2fff },
+ { 0x0900, 0x03ea, 0x0001 },
+ { 0x0900, 0x03ec, 0x0001 },
+ { 0x8500, 0x03ef, 0x2fff },
+ { 0x0900, 0x03ee, 0x0001 },
+ { 0x0500, 0x03f0, 0x0faa },
+ { 0x8900, 0x0415, 0x6020 },
+ { 0x8900, 0x0405, 0x5050 },
+ { 0x8900, 0x03f9, 0x4ff9 },
+ { 0x8500, 0x03f5, 0x3fa0 },
+ { 0x8500, 0x03f3, 0x2000 },
+ { 0x0500, 0x03f2, 0x0007 },
+ { 0x0900, 0x03f4, 0x0fc4 },
+ { 0x8900, 0x03f7, 0x2001 },
+ { 0x1900, 0x03f6, 0x0000 },
+ { 0x0500, 0x03f8, 0x0fff },
+ { 0x8900, 0x0401, 0x3050 },
+ { 0x8500, 0x03fb, 0x2fff },
+ { 0x0900, 0x03fa, 0x0001 },
+ { 0x0900, 0x0400, 0x0050 },
+ { 0x8900, 0x0403, 0x2050 },
+ { 0x0900, 0x0402, 0x0050 },
+ { 0x0900, 0x0404, 0x0050 },
+ { 0x8900, 0x040d, 0x4050 },
+ { 0x8900, 0x0409, 0x3050 },
+ { 0x8900, 0x0407, 0x2050 },
+ { 0x0900, 0x0406, 0x0050 },
+ { 0x0900, 0x0408, 0x0050 },
+ { 0x8900, 0x040b, 0x2050 },
+ { 0x0900, 0x040a, 0x0050 },
+ { 0x0900, 0x040c, 0x0050 },
+ { 0x8900, 0x0411, 0x3020 },
+ { 0x8900, 0x040f, 0x2050 },
+ { 0x0900, 0x040e, 0x0050 },
+ { 0x0900, 0x0410, 0x0020 },
+ { 0x8900, 0x0413, 0x2020 },
+ { 0x0900, 0x0412, 0x0020 },
+ { 0x0900, 0x0414, 0x0020 },
+ { 0x8900, 0x0425, 0x5020 },
+ { 0x8900, 0x041d, 0x4020 },
+ { 0x8900, 0x0419, 0x3020 },
+ { 0x8900, 0x0417, 0x2020 },
+ { 0x0900, 0x0416, 0x0020 },
+ { 0x0900, 0x0418, 0x0020 },
+ { 0x8900, 0x041b, 0x2020 },
+ { 0x0900, 0x041a, 0x0020 },
+ { 0x0900, 0x041c, 0x0020 },
+ { 0x8900, 0x0421, 0x3020 },
+ { 0x8900, 0x041f, 0x2020 },
+ { 0x0900, 0x041e, 0x0020 },
+ { 0x0900, 0x0420, 0x0020 },
+ { 0x8900, 0x0423, 0x2020 },
+ { 0x0900, 0x0422, 0x0020 },
+ { 0x0900, 0x0424, 0x0020 },
+ { 0x8900, 0x042d, 0x4020 },
+ { 0x8900, 0x0429, 0x3020 },
+ { 0x8900, 0x0427, 0x2020 },
+ { 0x0900, 0x0426, 0x0020 },
+ { 0x0900, 0x0428, 0x0020 },
+ { 0x8900, 0x042b, 0x2020 },
+ { 0x0900, 0x042a, 0x0020 },
+ { 0x0900, 0x042c, 0x0020 },
+ { 0x8500, 0x0431, 0x3fe0 },
+ { 0x8900, 0x042f, 0x2020 },
+ { 0x0900, 0x042e, 0x0020 },
+ { 0x0500, 0x0430, 0x0fe0 },
+ { 0x8500, 0x0433, 0x2fe0 },
+ { 0x0500, 0x0432, 0x0fe0 },
+ { 0x0500, 0x0434, 0x0fe0 },
+ { 0x8700, 0x06a4, 0xa000 },
+ { 0x8500, 0x0563, 0x9fd0 },
+ { 0x8900, 0x04b6, 0x8001 },
+ { 0x8500, 0x0475, 0x7fff },
+ { 0x8500, 0x0455, 0x6fb0 },
+ { 0x8500, 0x0445, 0x5fe0 },
+ { 0x8500, 0x043d, 0x4fe0 },
+ { 0x8500, 0x0439, 0x3fe0 },
+ { 0x8500, 0x0437, 0x2fe0 },
+ { 0x0500, 0x0436, 0x0fe0 },
+ { 0x0500, 0x0438, 0x0fe0 },
+ { 0x8500, 0x043b, 0x2fe0 },
+ { 0x0500, 0x043a, 0x0fe0 },
+ { 0x0500, 0x043c, 0x0fe0 },
+ { 0x8500, 0x0441, 0x3fe0 },
+ { 0x8500, 0x043f, 0x2fe0 },
+ { 0x0500, 0x043e, 0x0fe0 },
+ { 0x0500, 0x0440, 0x0fe0 },
+ { 0x8500, 0x0443, 0x2fe0 },
+ { 0x0500, 0x0442, 0x0fe0 },
+ { 0x0500, 0x0444, 0x0fe0 },
+ { 0x8500, 0x044d, 0x4fe0 },
+ { 0x8500, 0x0449, 0x3fe0 },
+ { 0x8500, 0x0447, 0x2fe0 },
+ { 0x0500, 0x0446, 0x0fe0 },
+ { 0x0500, 0x0448, 0x0fe0 },
+ { 0x8500, 0x044b, 0x2fe0 },
+ { 0x0500, 0x044a, 0x0fe0 },
+ { 0x0500, 0x044c, 0x0fe0 },
+ { 0x8500, 0x0451, 0x3fb0 },
+ { 0x8500, 0x044f, 0x2fe0 },
+ { 0x0500, 0x044e, 0x0fe0 },
+ { 0x0500, 0x0450, 0x0fb0 },
+ { 0x8500, 0x0453, 0x2fb0 },
+ { 0x0500, 0x0452, 0x0fb0 },
+ { 0x0500, 0x0454, 0x0fb0 },
+ { 0x8500, 0x0465, 0x5fff },
+ { 0x8500, 0x045d, 0x4fb0 },
+ { 0x8500, 0x0459, 0x3fb0 },
+ { 0x8500, 0x0457, 0x2fb0 },
+ { 0x0500, 0x0456, 0x0fb0 },
+ { 0x0500, 0x0458, 0x0fb0 },
+ { 0x8500, 0x045b, 0x2fb0 },
+ { 0x0500, 0x045a, 0x0fb0 },
+ { 0x0500, 0x045c, 0x0fb0 },
+ { 0x8500, 0x0461, 0x3fff },
+ { 0x8500, 0x045f, 0x2fb0 },
+ { 0x0500, 0x045e, 0x0fb0 },
+ { 0x0900, 0x0460, 0x0001 },
+ { 0x8500, 0x0463, 0x2fff },
+ { 0x0900, 0x0462, 0x0001 },
+ { 0x0900, 0x0464, 0x0001 },
+ { 0x8500, 0x046d, 0x4fff },
+ { 0x8500, 0x0469, 0x3fff },
+ { 0x8500, 0x0467, 0x2fff },
+ { 0x0900, 0x0466, 0x0001 },
+ { 0x0900, 0x0468, 0x0001 },
+ { 0x8500, 0x046b, 0x2fff },
+ { 0x0900, 0x046a, 0x0001 },
+ { 0x0900, 0x046c, 0x0001 },
+ { 0x8500, 0x0471, 0x3fff },
+ { 0x8500, 0x046f, 0x2fff },
+ { 0x0900, 0x046e, 0x0001 },
+ { 0x0900, 0x0470, 0x0001 },
+ { 0x8500, 0x0473, 0x2fff },
+ { 0x0900, 0x0472, 0x0001 },
+ { 0x0900, 0x0474, 0x0001 },
+ { 0x8900, 0x0496, 0x6001 },
+ { 0x8c00, 0x0485, 0x5000 },
+ { 0x8500, 0x047d, 0x4fff },
+ { 0x8500, 0x0479, 0x3fff },
+ { 0x8500, 0x0477, 0x2fff },
+ { 0x0900, 0x0476, 0x0001 },
+ { 0x0900, 0x0478, 0x0001 },
+ { 0x8500, 0x047b, 0x2fff },
+ { 0x0900, 0x047a, 0x0001 },
+ { 0x0900, 0x047c, 0x0001 },
+ { 0x8500, 0x0481, 0x3fff },
+ { 0x8500, 0x047f, 0x2fff },
+ { 0x0900, 0x047e, 0x0001 },
+ { 0x0900, 0x0480, 0x0001 },
+ { 0x8c00, 0x0483, 0x2000 },
+ { 0x1a00, 0x0482, 0x0000 },
+ { 0x0c00, 0x0484, 0x0000 },
+ { 0x8900, 0x048e, 0x4001 },
+ { 0x8900, 0x048a, 0x3001 },
+ { 0x8b00, 0x0488, 0x2000 },
+ { 0x0c00, 0x0486, 0x0000 },
+ { 0x0b00, 0x0489, 0x0000 },
+ { 0x8900, 0x048c, 0x2001 },
+ { 0x0500, 0x048b, 0x0fff },
+ { 0x0500, 0x048d, 0x0fff },
+ { 0x8900, 0x0492, 0x3001 },
+ { 0x8900, 0x0490, 0x2001 },
+ { 0x0500, 0x048f, 0x0fff },
+ { 0x0500, 0x0491, 0x0fff },
+ { 0x8900, 0x0494, 0x2001 },
+ { 0x0500, 0x0493, 0x0fff },
+ { 0x0500, 0x0495, 0x0fff },
+ { 0x8900, 0x04a6, 0x5001 },
+ { 0x8900, 0x049e, 0x4001 },
+ { 0x8900, 0x049a, 0x3001 },
+ { 0x8900, 0x0498, 0x2001 },
+ { 0x0500, 0x0497, 0x0fff },
+ { 0x0500, 0x0499, 0x0fff },
+ { 0x8900, 0x049c, 0x2001 },
+ { 0x0500, 0x049b, 0x0fff },
+ { 0x0500, 0x049d, 0x0fff },
+ { 0x8900, 0x04a2, 0x3001 },
+ { 0x8900, 0x04a0, 0x2001 },
+ { 0x0500, 0x049f, 0x0fff },
+ { 0x0500, 0x04a1, 0x0fff },
+ { 0x8900, 0x04a4, 0x2001 },
+ { 0x0500, 0x04a3, 0x0fff },
+ { 0x0500, 0x04a5, 0x0fff },
+ { 0x8900, 0x04ae, 0x4001 },
+ { 0x8900, 0x04aa, 0x3001 },
+ { 0x8900, 0x04a8, 0x2001 },
+ { 0x0500, 0x04a7, 0x0fff },
+ { 0x0500, 0x04a9, 0x0fff },
+ { 0x8900, 0x04ac, 0x2001 },
+ { 0x0500, 0x04ab, 0x0fff },
+ { 0x0500, 0x04ad, 0x0fff },
+ { 0x8900, 0x04b2, 0x3001 },
+ { 0x8900, 0x04b0, 0x2001 },
+ { 0x0500, 0x04af, 0x0fff },
+ { 0x0500, 0x04b1, 0x0fff },
+ { 0x8900, 0x04b4, 0x2001 },
+ { 0x0500, 0x04b3, 0x0fff },
+ { 0x0500, 0x04b5, 0x0fff },
+ { 0x8500, 0x04f9, 0x7fff },
+ { 0x8500, 0x04d7, 0x6fff },
+ { 0x8500, 0x04c6, 0x5fff },
+ { 0x8900, 0x04be, 0x4001 },
+ { 0x8900, 0x04ba, 0x3001 },
+ { 0x8900, 0x04b8, 0x2001 },
+ { 0x0500, 0x04b7, 0x0fff },
+ { 0x0500, 0x04b9, 0x0fff },
+ { 0x8900, 0x04bc, 0x2001 },
+ { 0x0500, 0x04bb, 0x0fff },
+ { 0x0500, 0x04bd, 0x0fff },
+ { 0x8500, 0x04c2, 0x3fff },
+ { 0x8900, 0x04c0, 0x2000 },
+ { 0x0500, 0x04bf, 0x0fff },
+ { 0x0900, 0x04c1, 0x0001 },
+ { 0x8500, 0x04c4, 0x2fff },
+ { 0x0900, 0x04c3, 0x0001 },
+ { 0x0900, 0x04c5, 0x0001 },
+ { 0x8500, 0x04ce, 0x4fff },
+ { 0x8500, 0x04ca, 0x3fff },
+ { 0x8500, 0x04c8, 0x2fff },
+ { 0x0900, 0x04c7, 0x0001 },
+ { 0x0900, 0x04c9, 0x0001 },
+ { 0x8500, 0x04cc, 0x2fff },
+ { 0x0900, 0x04cb, 0x0001 },
+ { 0x0900, 0x04cd, 0x0001 },
+ { 0x8500, 0x04d3, 0x3fff },
+ { 0x8500, 0x04d1, 0x2fff },
+ { 0x0900, 0x04d0, 0x0001 },
+ { 0x0900, 0x04d2, 0x0001 },
+ { 0x8500, 0x04d5, 0x2fff },
+ { 0x0900, 0x04d4, 0x0001 },
+ { 0x0900, 0x04d6, 0x0001 },
+ { 0x8500, 0x04e7, 0x5fff },
+ { 0x8500, 0x04df, 0x4fff },
+ { 0x8500, 0x04db, 0x3fff },
+ { 0x8500, 0x04d9, 0x2fff },
+ { 0x0900, 0x04d8, 0x0001 },
+ { 0x0900, 0x04da, 0x0001 },
+ { 0x8500, 0x04dd, 0x2fff },
+ { 0x0900, 0x04dc, 0x0001 },
+ { 0x0900, 0x04de, 0x0001 },
+ { 0x8500, 0x04e3, 0x3fff },
+ { 0x8500, 0x04e1, 0x2fff },
+ { 0x0900, 0x04e0, 0x0001 },
+ { 0x0900, 0x04e2, 0x0001 },
+ { 0x8500, 0x04e5, 0x2fff },
+ { 0x0900, 0x04e4, 0x0001 },
+ { 0x0900, 0x04e6, 0x0001 },
+ { 0x8500, 0x04ef, 0x4fff },
+ { 0x8500, 0x04eb, 0x3fff },
+ { 0x8500, 0x04e9, 0x2fff },
+ { 0x0900, 0x04e8, 0x0001 },
+ { 0x0900, 0x04ea, 0x0001 },
+ { 0x8500, 0x04ed, 0x2fff },
+ { 0x0900, 0x04ec, 0x0001 },
+ { 0x0900, 0x04ee, 0x0001 },
+ { 0x8500, 0x04f3, 0x3fff },
+ { 0x8500, 0x04f1, 0x2fff },
+ { 0x0900, 0x04f0, 0x0001 },
+ { 0x0900, 0x04f2, 0x0001 },
+ { 0x8500, 0x04f5, 0x2fff },
+ { 0x0900, 0x04f4, 0x0001 },
+ { 0x0900, 0x04f8, 0x0001 },
+ { 0x8900, 0x0540, 0x6030 },
+ { 0x8500, 0x050f, 0x5fff },
+ { 0x8500, 0x0507, 0x4fff },
+ { 0x8500, 0x0503, 0x3fff },
+ { 0x8500, 0x0501, 0x2fff },
+ { 0x0900, 0x0500, 0x0001 },
+ { 0x0900, 0x0502, 0x0001 },
+ { 0x8500, 0x0505, 0x2fff },
+ { 0x0900, 0x0504, 0x0001 },
+ { 0x0900, 0x0506, 0x0001 },
+ { 0x8500, 0x050b, 0x3fff },
+ { 0x8500, 0x0509, 0x2fff },
+ { 0x0900, 0x0508, 0x0001 },
+ { 0x0900, 0x050a, 0x0001 },
+ { 0x8500, 0x050d, 0x2fff },
+ { 0x0900, 0x050c, 0x0001 },
+ { 0x0900, 0x050e, 0x0001 },
+ { 0x8900, 0x0538, 0x4030 },
+ { 0x8900, 0x0534, 0x3030 },
+ { 0x8900, 0x0532, 0x2030 },
+ { 0x0900, 0x0531, 0x0030 },
+ { 0x0900, 0x0533, 0x0030 },
+ { 0x8900, 0x0536, 0x2030 },
+ { 0x0900, 0x0535, 0x0030 },
+ { 0x0900, 0x0537, 0x0030 },
+ { 0x8900, 0x053c, 0x3030 },
+ { 0x8900, 0x053a, 0x2030 },
+ { 0x0900, 0x0539, 0x0030 },
+ { 0x0900, 0x053b, 0x0030 },
+ { 0x8900, 0x053e, 0x2030 },
+ { 0x0900, 0x053d, 0x0030 },
+ { 0x0900, 0x053f, 0x0030 },
+ { 0x8900, 0x0550, 0x5030 },
+ { 0x8900, 0x0548, 0x4030 },
+ { 0x8900, 0x0544, 0x3030 },
+ { 0x8900, 0x0542, 0x2030 },
+ { 0x0900, 0x0541, 0x0030 },
+ { 0x0900, 0x0543, 0x0030 },
+ { 0x8900, 0x0546, 0x2030 },
+ { 0x0900, 0x0545, 0x0030 },
+ { 0x0900, 0x0547, 0x0030 },
+ { 0x8900, 0x054c, 0x3030 },
+ { 0x8900, 0x054a, 0x2030 },
+ { 0x0900, 0x0549, 0x0030 },
+ { 0x0900, 0x054b, 0x0030 },
+ { 0x8900, 0x054e, 0x2030 },
+ { 0x0900, 0x054d, 0x0030 },
+ { 0x0900, 0x054f, 0x0030 },
+ { 0x9500, 0x055a, 0x4000 },
+ { 0x8900, 0x0554, 0x3030 },
+ { 0x8900, 0x0552, 0x2030 },
+ { 0x0900, 0x0551, 0x0030 },
+ { 0x0900, 0x0553, 0x0030 },
+ { 0x8900, 0x0556, 0x2030 },
+ { 0x0900, 0x0555, 0x0030 },
+ { 0x0600, 0x0559, 0x0000 },
+ { 0x9500, 0x055e, 0x3000 },
+ { 0x9500, 0x055c, 0x2000 },
+ { 0x1500, 0x055b, 0x0000 },
+ { 0x1500, 0x055d, 0x0000 },
+ { 0x8500, 0x0561, 0x2fd0 },
+ { 0x1500, 0x055f, 0x0000 },
+ { 0x0500, 0x0562, 0x0fd0 },
+ { 0x9a00, 0x060f, 0x8000 },
+ { 0x8c00, 0x05ab, 0x7000 },
+ { 0x8500, 0x0583, 0x6fd0 },
+ { 0x8500, 0x0573, 0x5fd0 },
+ { 0x8500, 0x056b, 0x4fd0 },
+ { 0x8500, 0x0567, 0x3fd0 },
+ { 0x8500, 0x0565, 0x2fd0 },
+ { 0x0500, 0x0564, 0x0fd0 },
+ { 0x0500, 0x0566, 0x0fd0 },
+ { 0x8500, 0x0569, 0x2fd0 },
+ { 0x0500, 0x0568, 0x0fd0 },
+ { 0x0500, 0x056a, 0x0fd0 },
+ { 0x8500, 0x056f, 0x3fd0 },
+ { 0x8500, 0x056d, 0x2fd0 },
+ { 0x0500, 0x056c, 0x0fd0 },
+ { 0x0500, 0x056e, 0x0fd0 },
+ { 0x8500, 0x0571, 0x2fd0 },
+ { 0x0500, 0x0570, 0x0fd0 },
+ { 0x0500, 0x0572, 0x0fd0 },
+ { 0x8500, 0x057b, 0x4fd0 },
+ { 0x8500, 0x0577, 0x3fd0 },
+ { 0x8500, 0x0575, 0x2fd0 },
+ { 0x0500, 0x0574, 0x0fd0 },
+ { 0x0500, 0x0576, 0x0fd0 },
+ { 0x8500, 0x0579, 0x2fd0 },
+ { 0x0500, 0x0578, 0x0fd0 },
+ { 0x0500, 0x057a, 0x0fd0 },
+ { 0x8500, 0x057f, 0x3fd0 },
+ { 0x8500, 0x057d, 0x2fd0 },
+ { 0x0500, 0x057c, 0x0fd0 },
+ { 0x0500, 0x057e, 0x0fd0 },
+ { 0x8500, 0x0581, 0x2fd0 },
+ { 0x0500, 0x0580, 0x0fd0 },
+ { 0x0500, 0x0582, 0x0fd0 },
+ { 0x8c00, 0x059a, 0x5000 },
+ { 0x8c00, 0x0592, 0x4000 },
+ { 0x8500, 0x0587, 0x3000 },
+ { 0x8500, 0x0585, 0x2fd0 },
+ { 0x0500, 0x0584, 0x0fd0 },
+ { 0x0500, 0x0586, 0x0fd0 },
+ { 0x9100, 0x058a, 0x2000 },
+ { 0x1500, 0x0589, 0x0000 },
+ { 0x0c00, 0x0591, 0x0000 },
+ { 0x8c00, 0x0596, 0x3000 },
+ { 0x8c00, 0x0594, 0x2000 },
+ { 0x0c00, 0x0593, 0x0000 },
+ { 0x0c00, 0x0595, 0x0000 },
+ { 0x8c00, 0x0598, 0x2000 },
+ { 0x0c00, 0x0597, 0x0000 },
+ { 0x0c00, 0x0599, 0x0000 },
+ { 0x8c00, 0x05a3, 0x4000 },
+ { 0x8c00, 0x059e, 0x3000 },
+ { 0x8c00, 0x059c, 0x2000 },
+ { 0x0c00, 0x059b, 0x0000 },
+ { 0x0c00, 0x059d, 0x0000 },
+ { 0x8c00, 0x05a0, 0x2000 },
+ { 0x0c00, 0x059f, 0x0000 },
+ { 0x0c00, 0x05a1, 0x0000 },
+ { 0x8c00, 0x05a7, 0x3000 },
+ { 0x8c00, 0x05a5, 0x2000 },
+ { 0x0c00, 0x05a4, 0x0000 },
+ { 0x0c00, 0x05a6, 0x0000 },
+ { 0x8c00, 0x05a9, 0x2000 },
+ { 0x0c00, 0x05a8, 0x0000 },
+ { 0x0c00, 0x05aa, 0x0000 },
+ { 0x8700, 0x05d7, 0x6000 },
+ { 0x8c00, 0x05bc, 0x5000 },
+ { 0x8c00, 0x05b3, 0x4000 },
+ { 0x8c00, 0x05af, 0x3000 },
+ { 0x8c00, 0x05ad, 0x2000 },
+ { 0x0c00, 0x05ac, 0x0000 },
+ { 0x0c00, 0x05ae, 0x0000 },
+ { 0x8c00, 0x05b1, 0x2000 },
+ { 0x0c00, 0x05b0, 0x0000 },
+ { 0x0c00, 0x05b2, 0x0000 },
+ { 0x8c00, 0x05b7, 0x3000 },
+ { 0x8c00, 0x05b5, 0x2000 },
+ { 0x0c00, 0x05b4, 0x0000 },
+ { 0x0c00, 0x05b6, 0x0000 },
+ { 0x8c00, 0x05b9, 0x2000 },
+ { 0x0c00, 0x05b8, 0x0000 },
+ { 0x0c00, 0x05bb, 0x0000 },
+ { 0x8c00, 0x05c4, 0x4000 },
+ { 0x9500, 0x05c0, 0x3000 },
+ { 0x9500, 0x05be, 0x2000 },
+ { 0x0c00, 0x05bd, 0x0000 },
+ { 0x0c00, 0x05bf, 0x0000 },
+ { 0x8c00, 0x05c2, 0x2000 },
+ { 0x0c00, 0x05c1, 0x0000 },
+ { 0x1500, 0x05c3, 0x0000 },
+ { 0x8700, 0x05d3, 0x3000 },
+ { 0x8700, 0x05d1, 0x2000 },
+ { 0x0700, 0x05d0, 0x0000 },
+ { 0x0700, 0x05d2, 0x0000 },
+ { 0x8700, 0x05d5, 0x2000 },
+ { 0x0700, 0x05d4, 0x0000 },
+ { 0x0700, 0x05d6, 0x0000 },
+ { 0x8700, 0x05e7, 0x5000 },
+ { 0x8700, 0x05df, 0x4000 },
+ { 0x8700, 0x05db, 0x3000 },
+ { 0x8700, 0x05d9, 0x2000 },
+ { 0x0700, 0x05d8, 0x0000 },
+ { 0x0700, 0x05da, 0x0000 },
+ { 0x8700, 0x05dd, 0x2000 },
+ { 0x0700, 0x05dc, 0x0000 },
+ { 0x0700, 0x05de, 0x0000 },
+ { 0x8700, 0x05e3, 0x3000 },
+ { 0x8700, 0x05e1, 0x2000 },
+ { 0x0700, 0x05e0, 0x0000 },
+ { 0x0700, 0x05e2, 0x0000 },
+ { 0x8700, 0x05e5, 0x2000 },
+ { 0x0700, 0x05e4, 0x0000 },
+ { 0x0700, 0x05e6, 0x0000 },
+ { 0x9500, 0x05f4, 0x4000 },
+ { 0x8700, 0x05f0, 0x3000 },
+ { 0x8700, 0x05e9, 0x2000 },
+ { 0x0700, 0x05e8, 0x0000 },
+ { 0x0700, 0x05ea, 0x0000 },
+ { 0x8700, 0x05f2, 0x2000 },
+ { 0x0700, 0x05f1, 0x0000 },
+ { 0x1500, 0x05f3, 0x0000 },
+ { 0x8100, 0x0603, 0x3000 },
+ { 0x8100, 0x0601, 0x2000 },
+ { 0x0100, 0x0600, 0x0000 },
+ { 0x0100, 0x0602, 0x0000 },
+ { 0x9500, 0x060d, 0x2000 },
+ { 0x1500, 0x060c, 0x0000 },
+ { 0x1a00, 0x060e, 0x0000 },
+ { 0x8d00, 0x0664, 0x7000 },
+ { 0x8700, 0x0638, 0x6000 },
+ { 0x8700, 0x0628, 0x5000 },
+ { 0x9500, 0x061f, 0x4000 },
+ { 0x8c00, 0x0613, 0x3000 },
+ { 0x8c00, 0x0611, 0x2000 },
+ { 0x0c00, 0x0610, 0x0000 },
+ { 0x0c00, 0x0612, 0x0000 },
+ { 0x8c00, 0x0615, 0x2000 },
+ { 0x0c00, 0x0614, 0x0000 },
+ { 0x1500, 0x061b, 0x0000 },
+ { 0x8700, 0x0624, 0x3000 },
+ { 0x8700, 0x0622, 0x2000 },
+ { 0x0700, 0x0621, 0x0000 },
+ { 0x0700, 0x0623, 0x0000 },
+ { 0x8700, 0x0626, 0x2000 },
+ { 0x0700, 0x0625, 0x0000 },
+ { 0x0700, 0x0627, 0x0000 },
+ { 0x8700, 0x0630, 0x4000 },
+ { 0x8700, 0x062c, 0x3000 },
+ { 0x8700, 0x062a, 0x2000 },
+ { 0x0700, 0x0629, 0x0000 },
+ { 0x0700, 0x062b, 0x0000 },
+ { 0x8700, 0x062e, 0x2000 },
+ { 0x0700, 0x062d, 0x0000 },
+ { 0x0700, 0x062f, 0x0000 },
+ { 0x8700, 0x0634, 0x3000 },
+ { 0x8700, 0x0632, 0x2000 },
+ { 0x0700, 0x0631, 0x0000 },
+ { 0x0700, 0x0633, 0x0000 },
+ { 0x8700, 0x0636, 0x2000 },
+ { 0x0700, 0x0635, 0x0000 },
+ { 0x0700, 0x0637, 0x0000 },
+ { 0x8c00, 0x064d, 0x5000 },
+ { 0x8700, 0x0645, 0x4000 },
+ { 0x8700, 0x0641, 0x3000 },
+ { 0x8700, 0x063a, 0x2000 },
+ { 0x0700, 0x0639, 0x0000 },
+ { 0x0600, 0x0640, 0x0000 },
+ { 0x8700, 0x0643, 0x2000 },
+ { 0x0700, 0x0642, 0x0000 },
+ { 0x0700, 0x0644, 0x0000 },
+ { 0x8700, 0x0649, 0x3000 },
+ { 0x8700, 0x0647, 0x2000 },
+ { 0x0700, 0x0646, 0x0000 },
+ { 0x0700, 0x0648, 0x0000 },
+ { 0x8c00, 0x064b, 0x2000 },
+ { 0x0700, 0x064a, 0x0000 },
+ { 0x0c00, 0x064c, 0x0000 },
+ { 0x8c00, 0x0655, 0x4000 },
+ { 0x8c00, 0x0651, 0x3000 },
+ { 0x8c00, 0x064f, 0x2000 },
+ { 0x0c00, 0x064e, 0x0000 },
+ { 0x0c00, 0x0650, 0x0000 },
+ { 0x8c00, 0x0653, 0x2000 },
+ { 0x0c00, 0x0652, 0x0000 },
+ { 0x0c00, 0x0654, 0x0000 },
+ { 0x8d00, 0x0660, 0x3000 },
+ { 0x8c00, 0x0657, 0x2000 },
+ { 0x0c00, 0x0656, 0x0000 },
+ { 0x0c00, 0x0658, 0x0000 },
+ { 0x8d00, 0x0662, 0x2000 },
+ { 0x0d00, 0x0661, 0x0000 },
+ { 0x0d00, 0x0663, 0x0000 },
+ { 0x8700, 0x0684, 0x6000 },
+ { 0x8700, 0x0674, 0x5000 },
+ { 0x9500, 0x066c, 0x4000 },
+ { 0x8d00, 0x0668, 0x3000 },
+ { 0x8d00, 0x0666, 0x2000 },
+ { 0x0d00, 0x0665, 0x0000 },
+ { 0x0d00, 0x0667, 0x0000 },
+ { 0x9500, 0x066a, 0x2000 },
+ { 0x0d00, 0x0669, 0x0000 },
+ { 0x1500, 0x066b, 0x0000 },
+ { 0x8c00, 0x0670, 0x3000 },
+ { 0x8700, 0x066e, 0x2000 },
+ { 0x1500, 0x066d, 0x0000 },
+ { 0x0700, 0x066f, 0x0000 },
+ { 0x8700, 0x0672, 0x2000 },
+ { 0x0700, 0x0671, 0x0000 },
+ { 0x0700, 0x0673, 0x0000 },
+ { 0x8700, 0x067c, 0x4000 },
+ { 0x8700, 0x0678, 0x3000 },
+ { 0x8700, 0x0676, 0x2000 },
+ { 0x0700, 0x0675, 0x0000 },
+ { 0x0700, 0x0677, 0x0000 },
+ { 0x8700, 0x067a, 0x2000 },
+ { 0x0700, 0x0679, 0x0000 },
+ { 0x0700, 0x067b, 0x0000 },
+ { 0x8700, 0x0680, 0x3000 },
+ { 0x8700, 0x067e, 0x2000 },
+ { 0x0700, 0x067d, 0x0000 },
+ { 0x0700, 0x067f, 0x0000 },
+ { 0x8700, 0x0682, 0x2000 },
+ { 0x0700, 0x0681, 0x0000 },
+ { 0x0700, 0x0683, 0x0000 },
+ { 0x8700, 0x0694, 0x5000 },
+ { 0x8700, 0x068c, 0x4000 },
+ { 0x8700, 0x0688, 0x3000 },
+ { 0x8700, 0x0686, 0x2000 },
+ { 0x0700, 0x0685, 0x0000 },
+ { 0x0700, 0x0687, 0x0000 },
+ { 0x8700, 0x068a, 0x2000 },
+ { 0x0700, 0x0689, 0x0000 },
+ { 0x0700, 0x068b, 0x0000 },
+ { 0x8700, 0x0690, 0x3000 },
+ { 0x8700, 0x068e, 0x2000 },
+ { 0x0700, 0x068d, 0x0000 },
+ { 0x0700, 0x068f, 0x0000 },
+ { 0x8700, 0x0692, 0x2000 },
+ { 0x0700, 0x0691, 0x0000 },
+ { 0x0700, 0x0693, 0x0000 },
+ { 0x8700, 0x069c, 0x4000 },
+ { 0x8700, 0x0698, 0x3000 },
+ { 0x8700, 0x0696, 0x2000 },
+ { 0x0700, 0x0695, 0x0000 },
+ { 0x0700, 0x0697, 0x0000 },
+ { 0x8700, 0x069a, 0x2000 },
+ { 0x0700, 0x0699, 0x0000 },
+ { 0x0700, 0x069b, 0x0000 },
+ { 0x8700, 0x06a0, 0x3000 },
+ { 0x8700, 0x069e, 0x2000 },
+ { 0x0700, 0x069d, 0x0000 },
+ { 0x0700, 0x069f, 0x0000 },
+ { 0x8700, 0x06a2, 0x2000 },
+ { 0x0700, 0x06a1, 0x0000 },
+ { 0x0700, 0x06a3, 0x0000 },
+ { 0x8700, 0x0926, 0x9000 },
+ { 0x8700, 0x0725, 0x8000 },
+ { 0x8c00, 0x06e4, 0x7000 },
+ { 0x8700, 0x06c4, 0x6000 },
+ { 0x8700, 0x06b4, 0x5000 },
+ { 0x8700, 0x06ac, 0x4000 },
+ { 0x8700, 0x06a8, 0x3000 },
+ { 0x8700, 0x06a6, 0x2000 },
+ { 0x0700, 0x06a5, 0x0000 },
+ { 0x0700, 0x06a7, 0x0000 },
+ { 0x8700, 0x06aa, 0x2000 },
+ { 0x0700, 0x06a9, 0x0000 },
+ { 0x0700, 0x06ab, 0x0000 },
+ { 0x8700, 0x06b0, 0x3000 },
+ { 0x8700, 0x06ae, 0x2000 },
+ { 0x0700, 0x06ad, 0x0000 },
+ { 0x0700, 0x06af, 0x0000 },
+ { 0x8700, 0x06b2, 0x2000 },
+ { 0x0700, 0x06b1, 0x0000 },
+ { 0x0700, 0x06b3, 0x0000 },
+ { 0x8700, 0x06bc, 0x4000 },
+ { 0x8700, 0x06b8, 0x3000 },
+ { 0x8700, 0x06b6, 0x2000 },
+ { 0x0700, 0x06b5, 0x0000 },
+ { 0x0700, 0x06b7, 0x0000 },
+ { 0x8700, 0x06ba, 0x2000 },
+ { 0x0700, 0x06b9, 0x0000 },
+ { 0x0700, 0x06bb, 0x0000 },
+ { 0x8700, 0x06c0, 0x3000 },
+ { 0x8700, 0x06be, 0x2000 },
+ { 0x0700, 0x06bd, 0x0000 },
+ { 0x0700, 0x06bf, 0x0000 },
+ { 0x8700, 0x06c2, 0x2000 },
+ { 0x0700, 0x06c1, 0x0000 },
+ { 0x0700, 0x06c3, 0x0000 },
+ { 0x9500, 0x06d4, 0x5000 },
+ { 0x8700, 0x06cc, 0x4000 },
+ { 0x8700, 0x06c8, 0x3000 },
+ { 0x8700, 0x06c6, 0x2000 },
+ { 0x0700, 0x06c5, 0x0000 },
+ { 0x0700, 0x06c7, 0x0000 },
+ { 0x8700, 0x06ca, 0x2000 },
+ { 0x0700, 0x06c9, 0x0000 },
+ { 0x0700, 0x06cb, 0x0000 },
+ { 0x8700, 0x06d0, 0x3000 },
+ { 0x8700, 0x06ce, 0x2000 },
+ { 0x0700, 0x06cd, 0x0000 },
+ { 0x0700, 0x06cf, 0x0000 },
+ { 0x8700, 0x06d2, 0x2000 },
+ { 0x0700, 0x06d1, 0x0000 },
+ { 0x0700, 0x06d3, 0x0000 },
+ { 0x8c00, 0x06dc, 0x4000 },
+ { 0x8c00, 0x06d8, 0x3000 },
+ { 0x8c00, 0x06d6, 0x2000 },
+ { 0x0700, 0x06d5, 0x0000 },
+ { 0x0c00, 0x06d7, 0x0000 },
+ { 0x8c00, 0x06da, 0x2000 },
+ { 0x0c00, 0x06d9, 0x0000 },
+ { 0x0c00, 0x06db, 0x0000 },
+ { 0x8c00, 0x06e0, 0x3000 },
+ { 0x8b00, 0x06de, 0x2000 },
+ { 0x0100, 0x06dd, 0x0000 },
+ { 0x0c00, 0x06df, 0x0000 },
+ { 0x8c00, 0x06e2, 0x2000 },
+ { 0x0c00, 0x06e1, 0x0000 },
+ { 0x0c00, 0x06e3, 0x0000 },
+ { 0x9500, 0x0704, 0x6000 },
+ { 0x8d00, 0x06f4, 0x5000 },
+ { 0x8c00, 0x06ec, 0x4000 },
+ { 0x8c00, 0x06e8, 0x3000 },
+ { 0x8600, 0x06e6, 0x2000 },
+ { 0x0600, 0x06e5, 0x0000 },
+ { 0x0c00, 0x06e7, 0x0000 },
+ { 0x8c00, 0x06ea, 0x2000 },
+ { 0x1a00, 0x06e9, 0x0000 },
+ { 0x0c00, 0x06eb, 0x0000 },
+ { 0x8d00, 0x06f0, 0x3000 },
+ { 0x8700, 0x06ee, 0x2000 },
+ { 0x0c00, 0x06ed, 0x0000 },
+ { 0x0700, 0x06ef, 0x0000 },
+ { 0x8d00, 0x06f2, 0x2000 },
+ { 0x0d00, 0x06f1, 0x0000 },
+ { 0x0d00, 0x06f3, 0x0000 },
+ { 0x8700, 0x06fc, 0x4000 },
+ { 0x8d00, 0x06f8, 0x3000 },
+ { 0x8d00, 0x06f6, 0x2000 },
+ { 0x0d00, 0x06f5, 0x0000 },
+ { 0x0d00, 0x06f7, 0x0000 },
+ { 0x8700, 0x06fa, 0x2000 },
+ { 0x0d00, 0x06f9, 0x0000 },
+ { 0x0700, 0x06fb, 0x0000 },
+ { 0x9500, 0x0700, 0x3000 },
+ { 0x9a00, 0x06fe, 0x2000 },
+ { 0x1a00, 0x06fd, 0x0000 },
+ { 0x0700, 0x06ff, 0x0000 },
+ { 0x9500, 0x0702, 0x2000 },
+ { 0x1500, 0x0701, 0x0000 },
+ { 0x1500, 0x0703, 0x0000 },
+ { 0x8700, 0x0715, 0x5000 },
+ { 0x9500, 0x070c, 0x4000 },
+ { 0x9500, 0x0708, 0x3000 },
+ { 0x9500, 0x0706, 0x2000 },
+ { 0x1500, 0x0705, 0x0000 },
+ { 0x1500, 0x0707, 0x0000 },
+ { 0x9500, 0x070a, 0x2000 },
+ { 0x1500, 0x0709, 0x0000 },
+ { 0x1500, 0x070b, 0x0000 },
+ { 0x8c00, 0x0711, 0x3000 },
+ { 0x8100, 0x070f, 0x2000 },
+ { 0x1500, 0x070d, 0x0000 },
+ { 0x0700, 0x0710, 0x0000 },
+ { 0x8700, 0x0713, 0x2000 },
+ { 0x0700, 0x0712, 0x0000 },
+ { 0x0700, 0x0714, 0x0000 },
+ { 0x8700, 0x071d, 0x4000 },
+ { 0x8700, 0x0719, 0x3000 },
+ { 0x8700, 0x0717, 0x2000 },
+ { 0x0700, 0x0716, 0x0000 },
+ { 0x0700, 0x0718, 0x0000 },
+ { 0x8700, 0x071b, 0x2000 },
+ { 0x0700, 0x071a, 0x0000 },
+ { 0x0700, 0x071c, 0x0000 },
+ { 0x8700, 0x0721, 0x3000 },
+ { 0x8700, 0x071f, 0x2000 },
+ { 0x0700, 0x071e, 0x0000 },
+ { 0x0700, 0x0720, 0x0000 },
+ { 0x8700, 0x0723, 0x2000 },
+ { 0x0700, 0x0722, 0x0000 },
+ { 0x0700, 0x0724, 0x0000 },
+ { 0x8700, 0x0797, 0x7000 },
+ { 0x8c00, 0x0745, 0x6000 },
+ { 0x8c00, 0x0735, 0x5000 },
+ { 0x8700, 0x072d, 0x4000 },
+ { 0x8700, 0x0729, 0x3000 },
+ { 0x8700, 0x0727, 0x2000 },
+ { 0x0700, 0x0726, 0x0000 },
+ { 0x0700, 0x0728, 0x0000 },
+ { 0x8700, 0x072b, 0x2000 },
+ { 0x0700, 0x072a, 0x0000 },
+ { 0x0700, 0x072c, 0x0000 },
+ { 0x8c00, 0x0731, 0x3000 },
+ { 0x8700, 0x072f, 0x2000 },
+ { 0x0700, 0x072e, 0x0000 },
+ { 0x0c00, 0x0730, 0x0000 },
+ { 0x8c00, 0x0733, 0x2000 },
+ { 0x0c00, 0x0732, 0x0000 },
+ { 0x0c00, 0x0734, 0x0000 },
+ { 0x8c00, 0x073d, 0x4000 },
+ { 0x8c00, 0x0739, 0x3000 },
+ { 0x8c00, 0x0737, 0x2000 },
+ { 0x0c00, 0x0736, 0x0000 },
+ { 0x0c00, 0x0738, 0x0000 },
+ { 0x8c00, 0x073b, 0x2000 },
+ { 0x0c00, 0x073a, 0x0000 },
+ { 0x0c00, 0x073c, 0x0000 },
+ { 0x8c00, 0x0741, 0x3000 },
+ { 0x8c00, 0x073f, 0x2000 },
+ { 0x0c00, 0x073e, 0x0000 },
+ { 0x0c00, 0x0740, 0x0000 },
+ { 0x8c00, 0x0743, 0x2000 },
+ { 0x0c00, 0x0742, 0x0000 },
+ { 0x0c00, 0x0744, 0x0000 },
+ { 0x8700, 0x0787, 0x5000 },
+ { 0x8700, 0x074f, 0x4000 },
+ { 0x8c00, 0x0749, 0x3000 },
+ { 0x8c00, 0x0747, 0x2000 },
+ { 0x0c00, 0x0746, 0x0000 },
+ { 0x0c00, 0x0748, 0x0000 },
+ { 0x8700, 0x074d, 0x2000 },
+ { 0x0c00, 0x074a, 0x0000 },
+ { 0x0700, 0x074e, 0x0000 },
+ { 0x8700, 0x0783, 0x3000 },
+ { 0x8700, 0x0781, 0x2000 },
+ { 0x0700, 0x0780, 0x0000 },
+ { 0x0700, 0x0782, 0x0000 },
+ { 0x8700, 0x0785, 0x2000 },
+ { 0x0700, 0x0784, 0x0000 },
+ { 0x0700, 0x0786, 0x0000 },
+ { 0x8700, 0x078f, 0x4000 },
+ { 0x8700, 0x078b, 0x3000 },
+ { 0x8700, 0x0789, 0x2000 },
+ { 0x0700, 0x0788, 0x0000 },
+ { 0x0700, 0x078a, 0x0000 },
+ { 0x8700, 0x078d, 0x2000 },
+ { 0x0700, 0x078c, 0x0000 },
+ { 0x0700, 0x078e, 0x0000 },
+ { 0x8700, 0x0793, 0x3000 },
+ { 0x8700, 0x0791, 0x2000 },
+ { 0x0700, 0x0790, 0x0000 },
+ { 0x0700, 0x0792, 0x0000 },
+ { 0x8700, 0x0795, 0x2000 },
+ { 0x0700, 0x0794, 0x0000 },
+ { 0x0700, 0x0796, 0x0000 },
+ { 0x8700, 0x0906, 0x6000 },
+ { 0x8c00, 0x07a7, 0x5000 },
+ { 0x8700, 0x079f, 0x4000 },
+ { 0x8700, 0x079b, 0x3000 },
+ { 0x8700, 0x0799, 0x2000 },
+ { 0x0700, 0x0798, 0x0000 },
+ { 0x0700, 0x079a, 0x0000 },
+ { 0x8700, 0x079d, 0x2000 },
+ { 0x0700, 0x079c, 0x0000 },
+ { 0x0700, 0x079e, 0x0000 },
+ { 0x8700, 0x07a3, 0x3000 },
+ { 0x8700, 0x07a1, 0x2000 },
+ { 0x0700, 0x07a0, 0x0000 },
+ { 0x0700, 0x07a2, 0x0000 },
+ { 0x8700, 0x07a5, 0x2000 },
+ { 0x0700, 0x07a4, 0x0000 },
+ { 0x0c00, 0x07a6, 0x0000 },
+ { 0x8c00, 0x07af, 0x4000 },
+ { 0x8c00, 0x07ab, 0x3000 },
+ { 0x8c00, 0x07a9, 0x2000 },
+ { 0x0c00, 0x07a8, 0x0000 },
+ { 0x0c00, 0x07aa, 0x0000 },
+ { 0x8c00, 0x07ad, 0x2000 },
+ { 0x0c00, 0x07ac, 0x0000 },
+ { 0x0c00, 0x07ae, 0x0000 },
+ { 0x8c00, 0x0902, 0x3000 },
+ { 0x8700, 0x07b1, 0x2000 },
+ { 0x0c00, 0x07b0, 0x0000 },
+ { 0x0c00, 0x0901, 0x0000 },
+ { 0x8700, 0x0904, 0x2000 },
+ { 0x0a00, 0x0903, 0x0000 },
+ { 0x0700, 0x0905, 0x0000 },
+ { 0x8700, 0x0916, 0x5000 },
+ { 0x8700, 0x090e, 0x4000 },
+ { 0x8700, 0x090a, 0x3000 },
+ { 0x8700, 0x0908, 0x2000 },
+ { 0x0700, 0x0907, 0x0000 },
+ { 0x0700, 0x0909, 0x0000 },
+ { 0x8700, 0x090c, 0x2000 },
+ { 0x0700, 0x090b, 0x0000 },
+ { 0x0700, 0x090d, 0x0000 },
+ { 0x8700, 0x0912, 0x3000 },
+ { 0x8700, 0x0910, 0x2000 },
+ { 0x0700, 0x090f, 0x0000 },
+ { 0x0700, 0x0911, 0x0000 },
+ { 0x8700, 0x0914, 0x2000 },
+ { 0x0700, 0x0913, 0x0000 },
+ { 0x0700, 0x0915, 0x0000 },
+ { 0x8700, 0x091e, 0x4000 },
+ { 0x8700, 0x091a, 0x3000 },
+ { 0x8700, 0x0918, 0x2000 },
+ { 0x0700, 0x0917, 0x0000 },
+ { 0x0700, 0x0919, 0x0000 },
+ { 0x8700, 0x091c, 0x2000 },
+ { 0x0700, 0x091b, 0x0000 },
+ { 0x0700, 0x091d, 0x0000 },
+ { 0x8700, 0x0922, 0x3000 },
+ { 0x8700, 0x0920, 0x2000 },
+ { 0x0700, 0x091f, 0x0000 },
+ { 0x0700, 0x0921, 0x0000 },
+ { 0x8700, 0x0924, 0x2000 },
+ { 0x0700, 0x0923, 0x0000 },
+ { 0x0700, 0x0925, 0x0000 },
+ { 0x8c00, 0x09cd, 0x8000 },
+ { 0x8d00, 0x096d, 0x7000 },
+ { 0x8c00, 0x0948, 0x6000 },
+ { 0x8700, 0x0936, 0x5000 },
+ { 0x8700, 0x092e, 0x4000 },
+ { 0x8700, 0x092a, 0x3000 },
+ { 0x8700, 0x0928, 0x2000 },
+ { 0x0700, 0x0927, 0x0000 },
+ { 0x0700, 0x0929, 0x0000 },
+ { 0x8700, 0x092c, 0x2000 },
+ { 0x0700, 0x092b, 0x0000 },
+ { 0x0700, 0x092d, 0x0000 },
+ { 0x8700, 0x0932, 0x3000 },
+ { 0x8700, 0x0930, 0x2000 },
+ { 0x0700, 0x092f, 0x0000 },
+ { 0x0700, 0x0931, 0x0000 },
+ { 0x8700, 0x0934, 0x2000 },
+ { 0x0700, 0x0933, 0x0000 },
+ { 0x0700, 0x0935, 0x0000 },
+ { 0x8a00, 0x0940, 0x4000 },
+ { 0x8c00, 0x093c, 0x3000 },
+ { 0x8700, 0x0938, 0x2000 },
+ { 0x0700, 0x0937, 0x0000 },
+ { 0x0700, 0x0939, 0x0000 },
+ { 0x8a00, 0x093e, 0x2000 },
+ { 0x0700, 0x093d, 0x0000 },
+ { 0x0a00, 0x093f, 0x0000 },
+ { 0x8c00, 0x0944, 0x3000 },
+ { 0x8c00, 0x0942, 0x2000 },
+ { 0x0c00, 0x0941, 0x0000 },
+ { 0x0c00, 0x0943, 0x0000 },
+ { 0x8c00, 0x0946, 0x2000 },
+ { 0x0c00, 0x0945, 0x0000 },
+ { 0x0c00, 0x0947, 0x0000 },
+ { 0x8700, 0x095d, 0x5000 },
+ { 0x8c00, 0x0952, 0x4000 },
+ { 0x8a00, 0x094c, 0x3000 },
+ { 0x8a00, 0x094a, 0x2000 },
+ { 0x0a00, 0x0949, 0x0000 },
+ { 0x0a00, 0x094b, 0x0000 },
+ { 0x8700, 0x0950, 0x2000 },
+ { 0x0c00, 0x094d, 0x0000 },
+ { 0x0c00, 0x0951, 0x0000 },
+ { 0x8700, 0x0959, 0x3000 },
+ { 0x8c00, 0x0954, 0x2000 },
+ { 0x0c00, 0x0953, 0x0000 },
+ { 0x0700, 0x0958, 0x0000 },
+ { 0x8700, 0x095b, 0x2000 },
+ { 0x0700, 0x095a, 0x0000 },
+ { 0x0700, 0x095c, 0x0000 },
+ { 0x9500, 0x0965, 0x4000 },
+ { 0x8700, 0x0961, 0x3000 },
+ { 0x8700, 0x095f, 0x2000 },
+ { 0x0700, 0x095e, 0x0000 },
+ { 0x0700, 0x0960, 0x0000 },
+ { 0x8c00, 0x0963, 0x2000 },
+ { 0x0c00, 0x0962, 0x0000 },
+ { 0x1500, 0x0964, 0x0000 },
+ { 0x8d00, 0x0969, 0x3000 },
+ { 0x8d00, 0x0967, 0x2000 },
+ { 0x0d00, 0x0966, 0x0000 },
+ { 0x0d00, 0x0968, 0x0000 },
+ { 0x8d00, 0x096b, 0x2000 },
+ { 0x0d00, 0x096a, 0x0000 },
+ { 0x0d00, 0x096c, 0x0000 },
+ { 0x8700, 0x09a2, 0x6000 },
+ { 0x8700, 0x0990, 0x5000 },
+ { 0x8700, 0x0986, 0x4000 },
+ { 0x8c00, 0x0981, 0x3000 },
+ { 0x8d00, 0x096f, 0x2000 },
+ { 0x0d00, 0x096e, 0x0000 },
+ { 0x1500, 0x0970, 0x0000 },
+ { 0x8a00, 0x0983, 0x2000 },
+ { 0x0a00, 0x0982, 0x0000 },
+ { 0x0700, 0x0985, 0x0000 },
+ { 0x8700, 0x098a, 0x3000 },
+ { 0x8700, 0x0988, 0x2000 },
+ { 0x0700, 0x0987, 0x0000 },
+ { 0x0700, 0x0989, 0x0000 },
+ { 0x8700, 0x098c, 0x2000 },
+ { 0x0700, 0x098b, 0x0000 },
+ { 0x0700, 0x098f, 0x0000 },
+ { 0x8700, 0x099a, 0x4000 },
+ { 0x8700, 0x0996, 0x3000 },
+ { 0x8700, 0x0994, 0x2000 },
+ { 0x0700, 0x0993, 0x0000 },
+ { 0x0700, 0x0995, 0x0000 },
+ { 0x8700, 0x0998, 0x2000 },
+ { 0x0700, 0x0997, 0x0000 },
+ { 0x0700, 0x0999, 0x0000 },
+ { 0x8700, 0x099e, 0x3000 },
+ { 0x8700, 0x099c, 0x2000 },
+ { 0x0700, 0x099b, 0x0000 },
+ { 0x0700, 0x099d, 0x0000 },
+ { 0x8700, 0x09a0, 0x2000 },
+ { 0x0700, 0x099f, 0x0000 },
+ { 0x0700, 0x09a1, 0x0000 },
+ { 0x8700, 0x09b7, 0x5000 },
+ { 0x8700, 0x09ab, 0x4000 },
+ { 0x8700, 0x09a6, 0x3000 },
+ { 0x8700, 0x09a4, 0x2000 },
+ { 0x0700, 0x09a3, 0x0000 },
+ { 0x0700, 0x09a5, 0x0000 },
+ { 0x8700, 0x09a8, 0x2000 },
+ { 0x0700, 0x09a7, 0x0000 },
+ { 0x0700, 0x09aa, 0x0000 },
+ { 0x8700, 0x09af, 0x3000 },
+ { 0x8700, 0x09ad, 0x2000 },
+ { 0x0700, 0x09ac, 0x0000 },
+ { 0x0700, 0x09ae, 0x0000 },
+ { 0x8700, 0x09b2, 0x2000 },
+ { 0x0700, 0x09b0, 0x0000 },
+ { 0x0700, 0x09b6, 0x0000 },
+ { 0x8c00, 0x09c1, 0x4000 },
+ { 0x8700, 0x09bd, 0x3000 },
+ { 0x8700, 0x09b9, 0x2000 },
+ { 0x0700, 0x09b8, 0x0000 },
+ { 0x0c00, 0x09bc, 0x0000 },
+ { 0x8a00, 0x09bf, 0x2000 },
+ { 0x0a00, 0x09be, 0x0000 },
+ { 0x0a00, 0x09c0, 0x0000 },
+ { 0x8a00, 0x09c7, 0x3000 },
+ { 0x8c00, 0x09c3, 0x2000 },
+ { 0x0c00, 0x09c2, 0x0000 },
+ { 0x0c00, 0x09c4, 0x0000 },
+ { 0x8a00, 0x09cb, 0x2000 },
+ { 0x0a00, 0x09c8, 0x0000 },
+ { 0x0a00, 0x09cc, 0x0000 },
+ { 0x8700, 0x0a2b, 0x7000 },
+ { 0x8a00, 0x0a03, 0x6000 },
+ { 0x8d00, 0x09ed, 0x5000 },
+ { 0x8c00, 0x09e3, 0x4000 },
+ { 0x8700, 0x09df, 0x3000 },
+ { 0x8700, 0x09dc, 0x2000 },
+ { 0x0a00, 0x09d7, 0x0000 },
+ { 0x0700, 0x09dd, 0x0000 },
+ { 0x8700, 0x09e1, 0x2000 },
+ { 0x0700, 0x09e0, 0x0000 },
+ { 0x0c00, 0x09e2, 0x0000 },
+ { 0x8d00, 0x09e9, 0x3000 },
+ { 0x8d00, 0x09e7, 0x2000 },
+ { 0x0d00, 0x09e6, 0x0000 },
+ { 0x0d00, 0x09e8, 0x0000 },
+ { 0x8d00, 0x09eb, 0x2000 },
+ { 0x0d00, 0x09ea, 0x0000 },
+ { 0x0d00, 0x09ec, 0x0000 },
+ { 0x8f00, 0x09f5, 0x4000 },
+ { 0x8700, 0x09f1, 0x3000 },
+ { 0x8d00, 0x09ef, 0x2000 },
+ { 0x0d00, 0x09ee, 0x0000 },
+ { 0x0700, 0x09f0, 0x0000 },
+ { 0x9700, 0x09f3, 0x2000 },
+ { 0x1700, 0x09f2, 0x0000 },
+ { 0x0f00, 0x09f4, 0x0000 },
+ { 0x8f00, 0x09f9, 0x3000 },
+ { 0x8f00, 0x09f7, 0x2000 },
+ { 0x0f00, 0x09f6, 0x0000 },
+ { 0x0f00, 0x09f8, 0x0000 },
+ { 0x8c00, 0x0a01, 0x2000 },
+ { 0x1a00, 0x09fa, 0x0000 },
+ { 0x0c00, 0x0a02, 0x0000 },
+ { 0x8700, 0x0a1a, 0x5000 },
+ { 0x8700, 0x0a10, 0x4000 },
+ { 0x8700, 0x0a08, 0x3000 },
+ { 0x8700, 0x0a06, 0x2000 },
+ { 0x0700, 0x0a05, 0x0000 },
+ { 0x0700, 0x0a07, 0x0000 },
+ { 0x8700, 0x0a0a, 0x2000 },
+ { 0x0700, 0x0a09, 0x0000 },
+ { 0x0700, 0x0a0f, 0x0000 },
+ { 0x8700, 0x0a16, 0x3000 },
+ { 0x8700, 0x0a14, 0x2000 },
+ { 0x0700, 0x0a13, 0x0000 },
+ { 0x0700, 0x0a15, 0x0000 },
+ { 0x8700, 0x0a18, 0x2000 },
+ { 0x0700, 0x0a17, 0x0000 },
+ { 0x0700, 0x0a19, 0x0000 },
+ { 0x8700, 0x0a22, 0x4000 },
+ { 0x8700, 0x0a1e, 0x3000 },
+ { 0x8700, 0x0a1c, 0x2000 },
+ { 0x0700, 0x0a1b, 0x0000 },
+ { 0x0700, 0x0a1d, 0x0000 },
+ { 0x8700, 0x0a20, 0x2000 },
+ { 0x0700, 0x0a1f, 0x0000 },
+ { 0x0700, 0x0a21, 0x0000 },
+ { 0x8700, 0x0a26, 0x3000 },
+ { 0x8700, 0x0a24, 0x2000 },
+ { 0x0700, 0x0a23, 0x0000 },
+ { 0x0700, 0x0a25, 0x0000 },
+ { 0x8700, 0x0a28, 0x2000 },
+ { 0x0700, 0x0a27, 0x0000 },
+ { 0x0700, 0x0a2a, 0x0000 },
+ { 0x8d00, 0x0a6a, 0x6000 },
+ { 0x8c00, 0x0a41, 0x5000 },
+ { 0x8700, 0x0a35, 0x4000 },
+ { 0x8700, 0x0a2f, 0x3000 },
+ { 0x8700, 0x0a2d, 0x2000 },
+ { 0x0700, 0x0a2c, 0x0000 },
+ { 0x0700, 0x0a2e, 0x0000 },
+ { 0x8700, 0x0a32, 0x2000 },
+ { 0x0700, 0x0a30, 0x0000 },
+ { 0x0700, 0x0a33, 0x0000 },
+ { 0x8c00, 0x0a3c, 0x3000 },
+ { 0x8700, 0x0a38, 0x2000 },
+ { 0x0700, 0x0a36, 0x0000 },
+ { 0x0700, 0x0a39, 0x0000 },
+ { 0x8a00, 0x0a3f, 0x2000 },
+ { 0x0a00, 0x0a3e, 0x0000 },
+ { 0x0a00, 0x0a40, 0x0000 },
+ { 0x8700, 0x0a5a, 0x4000 },
+ { 0x8c00, 0x0a4b, 0x3000 },
+ { 0x8c00, 0x0a47, 0x2000 },
+ { 0x0c00, 0x0a42, 0x0000 },
+ { 0x0c00, 0x0a48, 0x0000 },
+ { 0x8c00, 0x0a4d, 0x2000 },
+ { 0x0c00, 0x0a4c, 0x0000 },
+ { 0x0700, 0x0a59, 0x0000 },
+ { 0x8d00, 0x0a66, 0x3000 },
+ { 0x8700, 0x0a5c, 0x2000 },
+ { 0x0700, 0x0a5b, 0x0000 },
+ { 0x0700, 0x0a5e, 0x0000 },
+ { 0x8d00, 0x0a68, 0x2000 },
+ { 0x0d00, 0x0a67, 0x0000 },
+ { 0x0d00, 0x0a69, 0x0000 },
+ { 0x8700, 0x0a87, 0x5000 },
+ { 0x8700, 0x0a72, 0x4000 },
+ { 0x8d00, 0x0a6e, 0x3000 },
+ { 0x8d00, 0x0a6c, 0x2000 },
+ { 0x0d00, 0x0a6b, 0x0000 },
+ { 0x0d00, 0x0a6d, 0x0000 },
+ { 0x8c00, 0x0a70, 0x2000 },
+ { 0x0d00, 0x0a6f, 0x0000 },
+ { 0x0c00, 0x0a71, 0x0000 },
+ { 0x8c00, 0x0a82, 0x3000 },
+ { 0x8700, 0x0a74, 0x2000 },
+ { 0x0700, 0x0a73, 0x0000 },
+ { 0x0c00, 0x0a81, 0x0000 },
+ { 0x8700, 0x0a85, 0x2000 },
+ { 0x0a00, 0x0a83, 0x0000 },
+ { 0x0700, 0x0a86, 0x0000 },
+ { 0x8700, 0x0a90, 0x4000 },
+ { 0x8700, 0x0a8b, 0x3000 },
+ { 0x8700, 0x0a89, 0x2000 },
+ { 0x0700, 0x0a88, 0x0000 },
+ { 0x0700, 0x0a8a, 0x0000 },
+ { 0x8700, 0x0a8d, 0x2000 },
+ { 0x0700, 0x0a8c, 0x0000 },
+ { 0x0700, 0x0a8f, 0x0000 },
+ { 0x8700, 0x0a95, 0x3000 },
+ { 0x8700, 0x0a93, 0x2000 },
+ { 0x0700, 0x0a91, 0x0000 },
+ { 0x0700, 0x0a94, 0x0000 },
+ { 0x8700, 0x0a97, 0x2000 },
+ { 0x0700, 0x0a96, 0x0000 },
+ { 0x0700, 0x0a98, 0x0000 },
+ { 0x8700, 0x10ef, 0xb000 },
+ { 0x8700, 0x0dc6, 0xa000 },
+ { 0x8700, 0x0c31, 0x9000 },
+ { 0x8700, 0x0b5f, 0x8000 },
+ { 0x8a00, 0x0b03, 0x7000 },
+ { 0x8a00, 0x0abe, 0x6000 },
+ { 0x8700, 0x0aaa, 0x5000 },
+ { 0x8700, 0x0aa1, 0x4000 },
+ { 0x8700, 0x0a9d, 0x3000 },
+ { 0x8700, 0x0a9b, 0x2000 },
+ { 0x0700, 0x0a9a, 0x0000 },
+ { 0x0700, 0x0a9c, 0x0000 },
+ { 0x8700, 0x0a9f, 0x2000 },
+ { 0x0700, 0x0a9e, 0x0000 },
+ { 0x0700, 0x0aa0, 0x0000 },
+ { 0x8700, 0x0aa5, 0x3000 },
+ { 0x8700, 0x0aa3, 0x2000 },
+ { 0x0700, 0x0aa2, 0x0000 },
+ { 0x0700, 0x0aa4, 0x0000 },
+ { 0x8700, 0x0aa7, 0x2000 },
+ { 0x0700, 0x0aa6, 0x0000 },
+ { 0x0700, 0x0aa8, 0x0000 },
+ { 0x8700, 0x0ab3, 0x4000 },
+ { 0x8700, 0x0aae, 0x3000 },
+ { 0x8700, 0x0aac, 0x2000 },
+ { 0x0700, 0x0aab, 0x0000 },
+ { 0x0700, 0x0aad, 0x0000 },
+ { 0x8700, 0x0ab0, 0x2000 },
+ { 0x0700, 0x0aaf, 0x0000 },
+ { 0x0700, 0x0ab2, 0x0000 },
+ { 0x8700, 0x0ab8, 0x3000 },
+ { 0x8700, 0x0ab6, 0x2000 },
+ { 0x0700, 0x0ab5, 0x0000 },
+ { 0x0700, 0x0ab7, 0x0000 },
+ { 0x8c00, 0x0abc, 0x2000 },
+ { 0x0700, 0x0ab9, 0x0000 },
+ { 0x0700, 0x0abd, 0x0000 },
+ { 0x8700, 0x0ae1, 0x5000 },
+ { 0x8c00, 0x0ac7, 0x4000 },
+ { 0x8c00, 0x0ac2, 0x3000 },
+ { 0x8a00, 0x0ac0, 0x2000 },
+ { 0x0a00, 0x0abf, 0x0000 },
+ { 0x0c00, 0x0ac1, 0x0000 },
+ { 0x8c00, 0x0ac4, 0x2000 },
+ { 0x0c00, 0x0ac3, 0x0000 },
+ { 0x0c00, 0x0ac5, 0x0000 },
+ { 0x8a00, 0x0acc, 0x3000 },
+ { 0x8a00, 0x0ac9, 0x2000 },
+ { 0x0c00, 0x0ac8, 0x0000 },
+ { 0x0a00, 0x0acb, 0x0000 },
+ { 0x8700, 0x0ad0, 0x2000 },
+ { 0x0c00, 0x0acd, 0x0000 },
+ { 0x0700, 0x0ae0, 0x0000 },
+ { 0x8d00, 0x0aeb, 0x4000 },
+ { 0x8d00, 0x0ae7, 0x3000 },
+ { 0x8c00, 0x0ae3, 0x2000 },
+ { 0x0c00, 0x0ae2, 0x0000 },
+ { 0x0d00, 0x0ae6, 0x0000 },
+ { 0x8d00, 0x0ae9, 0x2000 },
+ { 0x0d00, 0x0ae8, 0x0000 },
+ { 0x0d00, 0x0aea, 0x0000 },
+ { 0x8d00, 0x0aef, 0x3000 },
+ { 0x8d00, 0x0aed, 0x2000 },
+ { 0x0d00, 0x0aec, 0x0000 },
+ { 0x0d00, 0x0aee, 0x0000 },
+ { 0x8c00, 0x0b01, 0x2000 },
+ { 0x1700, 0x0af1, 0x0000 },
+ { 0x0a00, 0x0b02, 0x0000 },
+ { 0x8700, 0x0b28, 0x6000 },
+ { 0x8700, 0x0b18, 0x5000 },
+ { 0x8700, 0x0b0c, 0x4000 },
+ { 0x8700, 0x0b08, 0x3000 },
+ { 0x8700, 0x0b06, 0x2000 },
+ { 0x0700, 0x0b05, 0x0000 },
+ { 0x0700, 0x0b07, 0x0000 },
+ { 0x8700, 0x0b0a, 0x2000 },
+ { 0x0700, 0x0b09, 0x0000 },
+ { 0x0700, 0x0b0b, 0x0000 },
+ { 0x8700, 0x0b14, 0x3000 },
+ { 0x8700, 0x0b10, 0x2000 },
+ { 0x0700, 0x0b0f, 0x0000 },
+ { 0x0700, 0x0b13, 0x0000 },
+ { 0x8700, 0x0b16, 0x2000 },
+ { 0x0700, 0x0b15, 0x0000 },
+ { 0x0700, 0x0b17, 0x0000 },
+ { 0x8700, 0x0b20, 0x4000 },
+ { 0x8700, 0x0b1c, 0x3000 },
+ { 0x8700, 0x0b1a, 0x2000 },
+ { 0x0700, 0x0b19, 0x0000 },
+ { 0x0700, 0x0b1b, 0x0000 },
+ { 0x8700, 0x0b1e, 0x2000 },
+ { 0x0700, 0x0b1d, 0x0000 },
+ { 0x0700, 0x0b1f, 0x0000 },
+ { 0x8700, 0x0b24, 0x3000 },
+ { 0x8700, 0x0b22, 0x2000 },
+ { 0x0700, 0x0b21, 0x0000 },
+ { 0x0700, 0x0b23, 0x0000 },
+ { 0x8700, 0x0b26, 0x2000 },
+ { 0x0700, 0x0b25, 0x0000 },
+ { 0x0700, 0x0b27, 0x0000 },
+ { 0x8700, 0x0b3d, 0x5000 },
+ { 0x8700, 0x0b32, 0x4000 },
+ { 0x8700, 0x0b2d, 0x3000 },
+ { 0x8700, 0x0b2b, 0x2000 },
+ { 0x0700, 0x0b2a, 0x0000 },
+ { 0x0700, 0x0b2c, 0x0000 },
+ { 0x8700, 0x0b2f, 0x2000 },
+ { 0x0700, 0x0b2e, 0x0000 },
+ { 0x0700, 0x0b30, 0x0000 },
+ { 0x8700, 0x0b37, 0x3000 },
+ { 0x8700, 0x0b35, 0x2000 },
+ { 0x0700, 0x0b33, 0x0000 },
+ { 0x0700, 0x0b36, 0x0000 },
+ { 0x8700, 0x0b39, 0x2000 },
+ { 0x0700, 0x0b38, 0x0000 },
+ { 0x0c00, 0x0b3c, 0x0000 },
+ { 0x8a00, 0x0b48, 0x4000 },
+ { 0x8c00, 0x0b41, 0x3000 },
+ { 0x8c00, 0x0b3f, 0x2000 },
+ { 0x0a00, 0x0b3e, 0x0000 },
+ { 0x0a00, 0x0b40, 0x0000 },
+ { 0x8c00, 0x0b43, 0x2000 },
+ { 0x0c00, 0x0b42, 0x0000 },
+ { 0x0a00, 0x0b47, 0x0000 },
+ { 0x8c00, 0x0b56, 0x3000 },
+ { 0x8a00, 0x0b4c, 0x2000 },
+ { 0x0a00, 0x0b4b, 0x0000 },
+ { 0x0c00, 0x0b4d, 0x0000 },
+ { 0x8700, 0x0b5c, 0x2000 },
+ { 0x0a00, 0x0b57, 0x0000 },
+ { 0x0700, 0x0b5d, 0x0000 },
+ { 0x8d00, 0x0be7, 0x7000 },
+ { 0x8700, 0x0b9c, 0x6000 },
+ { 0x8700, 0x0b83, 0x5000 },
+ { 0x8d00, 0x0b6b, 0x4000 },
+ { 0x8d00, 0x0b67, 0x3000 },
+ { 0x8700, 0x0b61, 0x2000 },
+ { 0x0700, 0x0b60, 0x0000 },
+ { 0x0d00, 0x0b66, 0x0000 },
+ { 0x8d00, 0x0b69, 0x2000 },
+ { 0x0d00, 0x0b68, 0x0000 },
+ { 0x0d00, 0x0b6a, 0x0000 },
+ { 0x8d00, 0x0b6f, 0x3000 },
+ { 0x8d00, 0x0b6d, 0x2000 },
+ { 0x0d00, 0x0b6c, 0x0000 },
+ { 0x0d00, 0x0b6e, 0x0000 },
+ { 0x8700, 0x0b71, 0x2000 },
+ { 0x1a00, 0x0b70, 0x0000 },
+ { 0x0c00, 0x0b82, 0x0000 },
+ { 0x8700, 0x0b8f, 0x4000 },
+ { 0x8700, 0x0b88, 0x3000 },
+ { 0x8700, 0x0b86, 0x2000 },
+ { 0x0700, 0x0b85, 0x0000 },
+ { 0x0700, 0x0b87, 0x0000 },
+ { 0x8700, 0x0b8a, 0x2000 },
+ { 0x0700, 0x0b89, 0x0000 },
+ { 0x0700, 0x0b8e, 0x0000 },
+ { 0x8700, 0x0b94, 0x3000 },
+ { 0x8700, 0x0b92, 0x2000 },
+ { 0x0700, 0x0b90, 0x0000 },
+ { 0x0700, 0x0b93, 0x0000 },
+ { 0x8700, 0x0b99, 0x2000 },
+ { 0x0700, 0x0b95, 0x0000 },
+ { 0x0700, 0x0b9a, 0x0000 },
+ { 0x8700, 0x0bb7, 0x5000 },
+ { 0x8700, 0x0bae, 0x4000 },
+ { 0x8700, 0x0ba4, 0x3000 },
+ { 0x8700, 0x0b9f, 0x2000 },
+ { 0x0700, 0x0b9e, 0x0000 },
+ { 0x0700, 0x0ba3, 0x0000 },
+ { 0x8700, 0x0ba9, 0x2000 },
+ { 0x0700, 0x0ba8, 0x0000 },
+ { 0x0700, 0x0baa, 0x0000 },
+ { 0x8700, 0x0bb2, 0x3000 },
+ { 0x8700, 0x0bb0, 0x2000 },
+ { 0x0700, 0x0baf, 0x0000 },
+ { 0x0700, 0x0bb1, 0x0000 },
+ { 0x8700, 0x0bb4, 0x2000 },
+ { 0x0700, 0x0bb3, 0x0000 },
+ { 0x0700, 0x0bb5, 0x0000 },
+ { 0x8a00, 0x0bc6, 0x4000 },
+ { 0x8a00, 0x0bbf, 0x3000 },
+ { 0x8700, 0x0bb9, 0x2000 },
+ { 0x0700, 0x0bb8, 0x0000 },
+ { 0x0a00, 0x0bbe, 0x0000 },
+ { 0x8a00, 0x0bc1, 0x2000 },
+ { 0x0c00, 0x0bc0, 0x0000 },
+ { 0x0a00, 0x0bc2, 0x0000 },
+ { 0x8a00, 0x0bcb, 0x3000 },
+ { 0x8a00, 0x0bc8, 0x2000 },
+ { 0x0a00, 0x0bc7, 0x0000 },
+ { 0x0a00, 0x0bca, 0x0000 },
+ { 0x8c00, 0x0bcd, 0x2000 },
+ { 0x0a00, 0x0bcc, 0x0000 },
+ { 0x0a00, 0x0bd7, 0x0000 },
+ { 0x8700, 0x0c0f, 0x6000 },
+ { 0x9a00, 0x0bf7, 0x5000 },
+ { 0x8d00, 0x0bef, 0x4000 },
+ { 0x8d00, 0x0beb, 0x3000 },
+ { 0x8d00, 0x0be9, 0x2000 },
+ { 0x0d00, 0x0be8, 0x0000 },
+ { 0x0d00, 0x0bea, 0x0000 },
+ { 0x8d00, 0x0bed, 0x2000 },
+ { 0x0d00, 0x0bec, 0x0000 },
+ { 0x0d00, 0x0bee, 0x0000 },
+ { 0x9a00, 0x0bf3, 0x3000 },
+ { 0x8f00, 0x0bf1, 0x2000 },
+ { 0x0f00, 0x0bf0, 0x0000 },
+ { 0x0f00, 0x0bf2, 0x0000 },
+ { 0x9a00, 0x0bf5, 0x2000 },
+ { 0x1a00, 0x0bf4, 0x0000 },
+ { 0x1a00, 0x0bf6, 0x0000 },
+ { 0x8700, 0x0c06, 0x4000 },
+ { 0x8a00, 0x0c01, 0x3000 },
+ { 0x9700, 0x0bf9, 0x2000 },
+ { 0x1a00, 0x0bf8, 0x0000 },
+ { 0x1a00, 0x0bfa, 0x0000 },
+ { 0x8a00, 0x0c03, 0x2000 },
+ { 0x0a00, 0x0c02, 0x0000 },
+ { 0x0700, 0x0c05, 0x0000 },
+ { 0x8700, 0x0c0a, 0x3000 },
+ { 0x8700, 0x0c08, 0x2000 },
+ { 0x0700, 0x0c07, 0x0000 },
+ { 0x0700, 0x0c09, 0x0000 },
+ { 0x8700, 0x0c0c, 0x2000 },
+ { 0x0700, 0x0c0b, 0x0000 },
+ { 0x0700, 0x0c0e, 0x0000 },
+ { 0x8700, 0x0c20, 0x5000 },
+ { 0x8700, 0x0c18, 0x4000 },
+ { 0x8700, 0x0c14, 0x3000 },
+ { 0x8700, 0x0c12, 0x2000 },
+ { 0x0700, 0x0c10, 0x0000 },
+ { 0x0700, 0x0c13, 0x0000 },
+ { 0x8700, 0x0c16, 0x2000 },
+ { 0x0700, 0x0c15, 0x0000 },
+ { 0x0700, 0x0c17, 0x0000 },
+ { 0x8700, 0x0c1c, 0x3000 },
+ { 0x8700, 0x0c1a, 0x2000 },
+ { 0x0700, 0x0c19, 0x0000 },
+ { 0x0700, 0x0c1b, 0x0000 },
+ { 0x8700, 0x0c1e, 0x2000 },
+ { 0x0700, 0x0c1d, 0x0000 },
+ { 0x0700, 0x0c1f, 0x0000 },
+ { 0x8700, 0x0c28, 0x4000 },
+ { 0x8700, 0x0c24, 0x3000 },
+ { 0x8700, 0x0c22, 0x2000 },
+ { 0x0700, 0x0c21, 0x0000 },
+ { 0x0700, 0x0c23, 0x0000 },
+ { 0x8700, 0x0c26, 0x2000 },
+ { 0x0700, 0x0c25, 0x0000 },
+ { 0x0700, 0x0c27, 0x0000 },
+ { 0x8700, 0x0c2d, 0x3000 },
+ { 0x8700, 0x0c2b, 0x2000 },
+ { 0x0700, 0x0c2a, 0x0000 },
+ { 0x0700, 0x0c2c, 0x0000 },
+ { 0x8700, 0x0c2f, 0x2000 },
+ { 0x0700, 0x0c2e, 0x0000 },
+ { 0x0700, 0x0c30, 0x0000 },
+ { 0x8700, 0x0d0e, 0x8000 },
+ { 0x8700, 0x0ca1, 0x7000 },
+ { 0x8d00, 0x0c6c, 0x6000 },
+ { 0x8c00, 0x0c47, 0x5000 },
+ { 0x8c00, 0x0c3e, 0x4000 },
+ { 0x8700, 0x0c36, 0x3000 },
+ { 0x8700, 0x0c33, 0x2000 },
+ { 0x0700, 0x0c32, 0x0000 },
+ { 0x0700, 0x0c35, 0x0000 },
+ { 0x8700, 0x0c38, 0x2000 },
+ { 0x0700, 0x0c37, 0x0000 },
+ { 0x0700, 0x0c39, 0x0000 },
+ { 0x8a00, 0x0c42, 0x3000 },
+ { 0x8c00, 0x0c40, 0x2000 },
+ { 0x0c00, 0x0c3f, 0x0000 },
+ { 0x0a00, 0x0c41, 0x0000 },
+ { 0x8a00, 0x0c44, 0x2000 },
+ { 0x0a00, 0x0c43, 0x0000 },
+ { 0x0c00, 0x0c46, 0x0000 },
+ { 0x8700, 0x0c60, 0x4000 },
+ { 0x8c00, 0x0c4c, 0x3000 },
+ { 0x8c00, 0x0c4a, 0x2000 },
+ { 0x0c00, 0x0c48, 0x0000 },
+ { 0x0c00, 0x0c4b, 0x0000 },
+ { 0x8c00, 0x0c55, 0x2000 },
+ { 0x0c00, 0x0c4d, 0x0000 },
+ { 0x0c00, 0x0c56, 0x0000 },
+ { 0x8d00, 0x0c68, 0x3000 },
+ { 0x8d00, 0x0c66, 0x2000 },
+ { 0x0700, 0x0c61, 0x0000 },
+ { 0x0d00, 0x0c67, 0x0000 },
+ { 0x8d00, 0x0c6a, 0x2000 },
+ { 0x0d00, 0x0c69, 0x0000 },
+ { 0x0d00, 0x0c6b, 0x0000 },
+ { 0x8700, 0x0c90, 0x5000 },
+ { 0x8700, 0x0c87, 0x4000 },
+ { 0x8a00, 0x0c82, 0x3000 },
+ { 0x8d00, 0x0c6e, 0x2000 },
+ { 0x0d00, 0x0c6d, 0x0000 },
+ { 0x0d00, 0x0c6f, 0x0000 },
+ { 0x8700, 0x0c85, 0x2000 },
+ { 0x0a00, 0x0c83, 0x0000 },
+ { 0x0700, 0x0c86, 0x0000 },
+ { 0x8700, 0x0c8b, 0x3000 },
+ { 0x8700, 0x0c89, 0x2000 },
+ { 0x0700, 0x0c88, 0x0000 },
+ { 0x0700, 0x0c8a, 0x0000 },
+ { 0x8700, 0x0c8e, 0x2000 },
+ { 0x0700, 0x0c8c, 0x0000 },
+ { 0x0700, 0x0c8f, 0x0000 },
+ { 0x8700, 0x0c99, 0x4000 },
+ { 0x8700, 0x0c95, 0x3000 },
+ { 0x8700, 0x0c93, 0x2000 },
+ { 0x0700, 0x0c92, 0x0000 },
+ { 0x0700, 0x0c94, 0x0000 },
+ { 0x8700, 0x0c97, 0x2000 },
+ { 0x0700, 0x0c96, 0x0000 },
+ { 0x0700, 0x0c98, 0x0000 },
+ { 0x8700, 0x0c9d, 0x3000 },
+ { 0x8700, 0x0c9b, 0x2000 },
+ { 0x0700, 0x0c9a, 0x0000 },
+ { 0x0700, 0x0c9c, 0x0000 },
+ { 0x8700, 0x0c9f, 0x2000 },
+ { 0x0700, 0x0c9e, 0x0000 },
+ { 0x0700, 0x0ca0, 0x0000 },
+ { 0x8c00, 0x0cc6, 0x6000 },
+ { 0x8700, 0x0cb2, 0x5000 },
+ { 0x8700, 0x0caa, 0x4000 },
+ { 0x8700, 0x0ca5, 0x3000 },
+ { 0x8700, 0x0ca3, 0x2000 },
+ { 0x0700, 0x0ca2, 0x0000 },
+ { 0x0700, 0x0ca4, 0x0000 },
+ { 0x8700, 0x0ca7, 0x2000 },
+ { 0x0700, 0x0ca6, 0x0000 },
+ { 0x0700, 0x0ca8, 0x0000 },
+ { 0x8700, 0x0cae, 0x3000 },
+ { 0x8700, 0x0cac, 0x2000 },
+ { 0x0700, 0x0cab, 0x0000 },
+ { 0x0700, 0x0cad, 0x0000 },
+ { 0x8700, 0x0cb0, 0x2000 },
+ { 0x0700, 0x0caf, 0x0000 },
+ { 0x0700, 0x0cb1, 0x0000 },
+ { 0x8700, 0x0cbd, 0x4000 },
+ { 0x8700, 0x0cb7, 0x3000 },
+ { 0x8700, 0x0cb5, 0x2000 },
+ { 0x0700, 0x0cb3, 0x0000 },
+ { 0x0700, 0x0cb6, 0x0000 },
+ { 0x8700, 0x0cb9, 0x2000 },
+ { 0x0700, 0x0cb8, 0x0000 },
+ { 0x0c00, 0x0cbc, 0x0000 },
+ { 0x8a00, 0x0cc1, 0x3000 },
+ { 0x8c00, 0x0cbf, 0x2000 },
+ { 0x0a00, 0x0cbe, 0x0000 },
+ { 0x0a00, 0x0cc0, 0x0000 },
+ { 0x8a00, 0x0cc3, 0x2000 },
+ { 0x0a00, 0x0cc2, 0x0000 },
+ { 0x0a00, 0x0cc4, 0x0000 },
+ { 0x8d00, 0x0cea, 0x5000 },
+ { 0x8a00, 0x0cd6, 0x4000 },
+ { 0x8a00, 0x0ccb, 0x3000 },
+ { 0x8a00, 0x0cc8, 0x2000 },
+ { 0x0a00, 0x0cc7, 0x0000 },
+ { 0x0a00, 0x0cca, 0x0000 },
+ { 0x8c00, 0x0ccd, 0x2000 },
+ { 0x0c00, 0x0ccc, 0x0000 },
+ { 0x0a00, 0x0cd5, 0x0000 },
+ { 0x8d00, 0x0ce6, 0x3000 },
+ { 0x8700, 0x0ce0, 0x2000 },
+ { 0x0700, 0x0cde, 0x0000 },
+ { 0x0700, 0x0ce1, 0x0000 },
+ { 0x8d00, 0x0ce8, 0x2000 },
+ { 0x0d00, 0x0ce7, 0x0000 },
+ { 0x0d00, 0x0ce9, 0x0000 },
+ { 0x8700, 0x0d05, 0x4000 },
+ { 0x8d00, 0x0cee, 0x3000 },
+ { 0x8d00, 0x0cec, 0x2000 },
+ { 0x0d00, 0x0ceb, 0x0000 },
+ { 0x0d00, 0x0ced, 0x0000 },
+ { 0x8a00, 0x0d02, 0x2000 },
+ { 0x0d00, 0x0cef, 0x0000 },
+ { 0x0a00, 0x0d03, 0x0000 },
+ { 0x8700, 0x0d09, 0x3000 },
+ { 0x8700, 0x0d07, 0x2000 },
+ { 0x0700, 0x0d06, 0x0000 },
+ { 0x0700, 0x0d08, 0x0000 },
+ { 0x8700, 0x0d0b, 0x2000 },
+ { 0x0700, 0x0d0a, 0x0000 },
+ { 0x0700, 0x0d0c, 0x0000 },
+ { 0x8d00, 0x0d6c, 0x7000 },
+ { 0x8700, 0x0d30, 0x6000 },
+ { 0x8700, 0x0d1f, 0x5000 },
+ { 0x8700, 0x0d17, 0x4000 },
+ { 0x8700, 0x0d13, 0x3000 },
+ { 0x8700, 0x0d10, 0x2000 },
+ { 0x0700, 0x0d0f, 0x0000 },
+ { 0x0700, 0x0d12, 0x0000 },
+ { 0x8700, 0x0d15, 0x2000 },
+ { 0x0700, 0x0d14, 0x0000 },
+ { 0x0700, 0x0d16, 0x0000 },
+ { 0x8700, 0x0d1b, 0x3000 },
+ { 0x8700, 0x0d19, 0x2000 },
+ { 0x0700, 0x0d18, 0x0000 },
+ { 0x0700, 0x0d1a, 0x0000 },
+ { 0x8700, 0x0d1d, 0x2000 },
+ { 0x0700, 0x0d1c, 0x0000 },
+ { 0x0700, 0x0d1e, 0x0000 },
+ { 0x8700, 0x0d27, 0x4000 },
+ { 0x8700, 0x0d23, 0x3000 },
+ { 0x8700, 0x0d21, 0x2000 },
+ { 0x0700, 0x0d20, 0x0000 },
+ { 0x0700, 0x0d22, 0x0000 },
+ { 0x8700, 0x0d25, 0x2000 },
+ { 0x0700, 0x0d24, 0x0000 },
+ { 0x0700, 0x0d26, 0x0000 },
+ { 0x8700, 0x0d2c, 0x3000 },
+ { 0x8700, 0x0d2a, 0x2000 },
+ { 0x0700, 0x0d28, 0x0000 },
+ { 0x0700, 0x0d2b, 0x0000 },
+ { 0x8700, 0x0d2e, 0x2000 },
+ { 0x0700, 0x0d2d, 0x0000 },
+ { 0x0700, 0x0d2f, 0x0000 },
+ { 0x8a00, 0x0d46, 0x5000 },
+ { 0x8700, 0x0d38, 0x4000 },
+ { 0x8700, 0x0d34, 0x3000 },
+ { 0x8700, 0x0d32, 0x2000 },
+ { 0x0700, 0x0d31, 0x0000 },
+ { 0x0700, 0x0d33, 0x0000 },
+ { 0x8700, 0x0d36, 0x2000 },
+ { 0x0700, 0x0d35, 0x0000 },
+ { 0x0700, 0x0d37, 0x0000 },
+ { 0x8a00, 0x0d40, 0x3000 },
+ { 0x8a00, 0x0d3e, 0x2000 },
+ { 0x0700, 0x0d39, 0x0000 },
+ { 0x0a00, 0x0d3f, 0x0000 },
+ { 0x8c00, 0x0d42, 0x2000 },
+ { 0x0c00, 0x0d41, 0x0000 },
+ { 0x0c00, 0x0d43, 0x0000 },
+ { 0x8700, 0x0d60, 0x4000 },
+ { 0x8a00, 0x0d4b, 0x3000 },
+ { 0x8a00, 0x0d48, 0x2000 },
+ { 0x0a00, 0x0d47, 0x0000 },
+ { 0x0a00, 0x0d4a, 0x0000 },
+ { 0x8c00, 0x0d4d, 0x2000 },
+ { 0x0a00, 0x0d4c, 0x0000 },
+ { 0x0a00, 0x0d57, 0x0000 },
+ { 0x8d00, 0x0d68, 0x3000 },
+ { 0x8d00, 0x0d66, 0x2000 },
+ { 0x0700, 0x0d61, 0x0000 },
+ { 0x0d00, 0x0d67, 0x0000 },
+ { 0x8d00, 0x0d6a, 0x2000 },
+ { 0x0d00, 0x0d69, 0x0000 },
+ { 0x0d00, 0x0d6b, 0x0000 },
+ { 0x8700, 0x0da2, 0x6000 },
+ { 0x8700, 0x0d8f, 0x5000 },
+ { 0x8700, 0x0d87, 0x4000 },
+ { 0x8a00, 0x0d82, 0x3000 },
+ { 0x8d00, 0x0d6e, 0x2000 },
+ { 0x0d00, 0x0d6d, 0x0000 },
+ { 0x0d00, 0x0d6f, 0x0000 },
+ { 0x8700, 0x0d85, 0x2000 },
+ { 0x0a00, 0x0d83, 0x0000 },
+ { 0x0700, 0x0d86, 0x0000 },
+ { 0x8700, 0x0d8b, 0x3000 },
+ { 0x8700, 0x0d89, 0x2000 },
+ { 0x0700, 0x0d88, 0x0000 },
+ { 0x0700, 0x0d8a, 0x0000 },
+ { 0x8700, 0x0d8d, 0x2000 },
+ { 0x0700, 0x0d8c, 0x0000 },
+ { 0x0700, 0x0d8e, 0x0000 },
+ { 0x8700, 0x0d9a, 0x4000 },
+ { 0x8700, 0x0d93, 0x3000 },
+ { 0x8700, 0x0d91, 0x2000 },
+ { 0x0700, 0x0d90, 0x0000 },
+ { 0x0700, 0x0d92, 0x0000 },
+ { 0x8700, 0x0d95, 0x2000 },
+ { 0x0700, 0x0d94, 0x0000 },
+ { 0x0700, 0x0d96, 0x0000 },
+ { 0x8700, 0x0d9e, 0x3000 },
+ { 0x8700, 0x0d9c, 0x2000 },
+ { 0x0700, 0x0d9b, 0x0000 },
+ { 0x0700, 0x0d9d, 0x0000 },
+ { 0x8700, 0x0da0, 0x2000 },
+ { 0x0700, 0x0d9f, 0x0000 },
+ { 0x0700, 0x0da1, 0x0000 },
+ { 0x8700, 0x0db3, 0x5000 },
+ { 0x8700, 0x0daa, 0x4000 },
+ { 0x8700, 0x0da6, 0x3000 },
+ { 0x8700, 0x0da4, 0x2000 },
+ { 0x0700, 0x0da3, 0x0000 },
+ { 0x0700, 0x0da5, 0x0000 },
+ { 0x8700, 0x0da8, 0x2000 },
+ { 0x0700, 0x0da7, 0x0000 },
+ { 0x0700, 0x0da9, 0x0000 },
+ { 0x8700, 0x0dae, 0x3000 },
+ { 0x8700, 0x0dac, 0x2000 },
+ { 0x0700, 0x0dab, 0x0000 },
+ { 0x0700, 0x0dad, 0x0000 },
+ { 0x8700, 0x0db0, 0x2000 },
+ { 0x0700, 0x0daf, 0x0000 },
+ { 0x0700, 0x0db1, 0x0000 },
+ { 0x8700, 0x0dbb, 0x4000 },
+ { 0x8700, 0x0db7, 0x3000 },
+ { 0x8700, 0x0db5, 0x2000 },
+ { 0x0700, 0x0db4, 0x0000 },
+ { 0x0700, 0x0db6, 0x0000 },
+ { 0x8700, 0x0db9, 0x2000 },
+ { 0x0700, 0x0db8, 0x0000 },
+ { 0x0700, 0x0dba, 0x0000 },
+ { 0x8700, 0x0dc2, 0x3000 },
+ { 0x8700, 0x0dc0, 0x2000 },
+ { 0x0700, 0x0dbd, 0x0000 },
+ { 0x0700, 0x0dc1, 0x0000 },
+ { 0x8700, 0x0dc4, 0x2000 },
+ { 0x0700, 0x0dc3, 0x0000 },
+ { 0x0700, 0x0dc5, 0x0000 },
+ { 0x8700, 0x0f55, 0x9000 },
+ { 0x8700, 0x0ea5, 0x8000 },
+ { 0x8700, 0x0e2d, 0x7000 },
+ { 0x8700, 0x0e0d, 0x6000 },
+ { 0x8a00, 0x0ddf, 0x5000 },
+ { 0x8c00, 0x0dd6, 0x4000 },
+ { 0x8a00, 0x0dd1, 0x3000 },
+ { 0x8a00, 0x0dcf, 0x2000 },
+ { 0x0c00, 0x0dca, 0x0000 },
+ { 0x0a00, 0x0dd0, 0x0000 },
+ { 0x8c00, 0x0dd3, 0x2000 },
+ { 0x0c00, 0x0dd2, 0x0000 },
+ { 0x0c00, 0x0dd4, 0x0000 },
+ { 0x8a00, 0x0ddb, 0x3000 },
+ { 0x8a00, 0x0dd9, 0x2000 },
+ { 0x0a00, 0x0dd8, 0x0000 },
+ { 0x0a00, 0x0dda, 0x0000 },
+ { 0x8a00, 0x0ddd, 0x2000 },
+ { 0x0a00, 0x0ddc, 0x0000 },
+ { 0x0a00, 0x0dde, 0x0000 },
+ { 0x8700, 0x0e05, 0x4000 },
+ { 0x8700, 0x0e01, 0x3000 },
+ { 0x8a00, 0x0df3, 0x2000 },
+ { 0x0a00, 0x0df2, 0x0000 },
+ { 0x1500, 0x0df4, 0x0000 },
+ { 0x8700, 0x0e03, 0x2000 },
+ { 0x0700, 0x0e02, 0x0000 },
+ { 0x0700, 0x0e04, 0x0000 },
+ { 0x8700, 0x0e09, 0x3000 },
+ { 0x8700, 0x0e07, 0x2000 },
+ { 0x0700, 0x0e06, 0x0000 },
+ { 0x0700, 0x0e08, 0x0000 },
+ { 0x8700, 0x0e0b, 0x2000 },
+ { 0x0700, 0x0e0a, 0x0000 },
+ { 0x0700, 0x0e0c, 0x0000 },
+ { 0x8700, 0x0e1d, 0x5000 },
+ { 0x8700, 0x0e15, 0x4000 },
+ { 0x8700, 0x0e11, 0x3000 },
+ { 0x8700, 0x0e0f, 0x2000 },
+ { 0x0700, 0x0e0e, 0x0000 },
+ { 0x0700, 0x0e10, 0x0000 },
+ { 0x8700, 0x0e13, 0x2000 },
+ { 0x0700, 0x0e12, 0x0000 },
+ { 0x0700, 0x0e14, 0x0000 },
+ { 0x8700, 0x0e19, 0x3000 },
+ { 0x8700, 0x0e17, 0x2000 },
+ { 0x0700, 0x0e16, 0x0000 },
+ { 0x0700, 0x0e18, 0x0000 },
+ { 0x8700, 0x0e1b, 0x2000 },
+ { 0x0700, 0x0e1a, 0x0000 },
+ { 0x0700, 0x0e1c, 0x0000 },
+ { 0x8700, 0x0e25, 0x4000 },
+ { 0x8700, 0x0e21, 0x3000 },
+ { 0x8700, 0x0e1f, 0x2000 },
+ { 0x0700, 0x0e1e, 0x0000 },
+ { 0x0700, 0x0e20, 0x0000 },
+ { 0x8700, 0x0e23, 0x2000 },
+ { 0x0700, 0x0e22, 0x0000 },
+ { 0x0700, 0x0e24, 0x0000 },
+ { 0x8700, 0x0e29, 0x3000 },
+ { 0x8700, 0x0e27, 0x2000 },
+ { 0x0700, 0x0e26, 0x0000 },
+ { 0x0700, 0x0e28, 0x0000 },
+ { 0x8700, 0x0e2b, 0x2000 },
+ { 0x0700, 0x0e2a, 0x0000 },
+ { 0x0700, 0x0e2c, 0x0000 },
+ { 0x8d00, 0x0e51, 0x6000 },
+ { 0x8700, 0x0e41, 0x5000 },
+ { 0x8c00, 0x0e35, 0x4000 },
+ { 0x8c00, 0x0e31, 0x3000 },
+ { 0x8700, 0x0e2f, 0x2000 },
+ { 0x0700, 0x0e2e, 0x0000 },
+ { 0x0700, 0x0e30, 0x0000 },
+ { 0x8700, 0x0e33, 0x2000 },
+ { 0x0700, 0x0e32, 0x0000 },
+ { 0x0c00, 0x0e34, 0x0000 },
+ { 0x8c00, 0x0e39, 0x3000 },
+ { 0x8c00, 0x0e37, 0x2000 },
+ { 0x0c00, 0x0e36, 0x0000 },
+ { 0x0c00, 0x0e38, 0x0000 },
+ { 0x9700, 0x0e3f, 0x2000 },
+ { 0x0c00, 0x0e3a, 0x0000 },
+ { 0x0700, 0x0e40, 0x0000 },
+ { 0x8c00, 0x0e49, 0x4000 },
+ { 0x8700, 0x0e45, 0x3000 },
+ { 0x8700, 0x0e43, 0x2000 },
+ { 0x0700, 0x0e42, 0x0000 },
+ { 0x0700, 0x0e44, 0x0000 },
+ { 0x8c00, 0x0e47, 0x2000 },
+ { 0x0600, 0x0e46, 0x0000 },
+ { 0x0c00, 0x0e48, 0x0000 },
+ { 0x8c00, 0x0e4d, 0x3000 },
+ { 0x8c00, 0x0e4b, 0x2000 },
+ { 0x0c00, 0x0e4a, 0x0000 },
+ { 0x0c00, 0x0e4c, 0x0000 },
+ { 0x9500, 0x0e4f, 0x2000 },
+ { 0x0c00, 0x0e4e, 0x0000 },
+ { 0x0d00, 0x0e50, 0x0000 },
+ { 0x8700, 0x0e8a, 0x5000 },
+ { 0x8d00, 0x0e59, 0x4000 },
+ { 0x8d00, 0x0e55, 0x3000 },
+ { 0x8d00, 0x0e53, 0x2000 },
+ { 0x0d00, 0x0e52, 0x0000 },
+ { 0x0d00, 0x0e54, 0x0000 },
+ { 0x8d00, 0x0e57, 0x2000 },
+ { 0x0d00, 0x0e56, 0x0000 },
+ { 0x0d00, 0x0e58, 0x0000 },
+ { 0x8700, 0x0e82, 0x3000 },
+ { 0x9500, 0x0e5b, 0x2000 },
+ { 0x1500, 0x0e5a, 0x0000 },
+ { 0x0700, 0x0e81, 0x0000 },
+ { 0x8700, 0x0e87, 0x2000 },
+ { 0x0700, 0x0e84, 0x0000 },
+ { 0x0700, 0x0e88, 0x0000 },
+ { 0x8700, 0x0e9b, 0x4000 },
+ { 0x8700, 0x0e96, 0x3000 },
+ { 0x8700, 0x0e94, 0x2000 },
+ { 0x0700, 0x0e8d, 0x0000 },
+ { 0x0700, 0x0e95, 0x0000 },
+ { 0x8700, 0x0e99, 0x2000 },
+ { 0x0700, 0x0e97, 0x0000 },
+ { 0x0700, 0x0e9a, 0x0000 },
+ { 0x8700, 0x0e9f, 0x3000 },
+ { 0x8700, 0x0e9d, 0x2000 },
+ { 0x0700, 0x0e9c, 0x0000 },
+ { 0x0700, 0x0e9e, 0x0000 },
+ { 0x8700, 0x0ea2, 0x2000 },
+ { 0x0700, 0x0ea1, 0x0000 },
+ { 0x0700, 0x0ea3, 0x0000 },
+ { 0x9a00, 0x0f14, 0x7000 },
+ { 0x8d00, 0x0ed0, 0x6000 },
+ { 0x8c00, 0x0eb9, 0x5000 },
+ { 0x8c00, 0x0eb1, 0x4000 },
+ { 0x8700, 0x0ead, 0x3000 },
+ { 0x8700, 0x0eaa, 0x2000 },
+ { 0x0700, 0x0ea7, 0x0000 },
+ { 0x0700, 0x0eab, 0x0000 },
+ { 0x8700, 0x0eaf, 0x2000 },
+ { 0x0700, 0x0eae, 0x0000 },
+ { 0x0700, 0x0eb0, 0x0000 },
+ { 0x8c00, 0x0eb5, 0x3000 },
+ { 0x8700, 0x0eb3, 0x2000 },
+ { 0x0700, 0x0eb2, 0x0000 },
+ { 0x0c00, 0x0eb4, 0x0000 },
+ { 0x8c00, 0x0eb7, 0x2000 },
+ { 0x0c00, 0x0eb6, 0x0000 },
+ { 0x0c00, 0x0eb8, 0x0000 },
+ { 0x8700, 0x0ec4, 0x4000 },
+ { 0x8700, 0x0ec0, 0x3000 },
+ { 0x8c00, 0x0ebc, 0x2000 },
+ { 0x0c00, 0x0ebb, 0x0000 },
+ { 0x0700, 0x0ebd, 0x0000 },
+ { 0x8700, 0x0ec2, 0x2000 },
+ { 0x0700, 0x0ec1, 0x0000 },
+ { 0x0700, 0x0ec3, 0x0000 },
+ { 0x8c00, 0x0eca, 0x3000 },
+ { 0x8c00, 0x0ec8, 0x2000 },
+ { 0x0600, 0x0ec6, 0x0000 },
+ { 0x0c00, 0x0ec9, 0x0000 },
+ { 0x8c00, 0x0ecc, 0x2000 },
+ { 0x0c00, 0x0ecb, 0x0000 },
+ { 0x0c00, 0x0ecd, 0x0000 },
+ { 0x9500, 0x0f04, 0x5000 },
+ { 0x8d00, 0x0ed8, 0x4000 },
+ { 0x8d00, 0x0ed4, 0x3000 },
+ { 0x8d00, 0x0ed2, 0x2000 },
+ { 0x0d00, 0x0ed1, 0x0000 },
+ { 0x0d00, 0x0ed3, 0x0000 },
+ { 0x8d00, 0x0ed6, 0x2000 },
+ { 0x0d00, 0x0ed5, 0x0000 },
+ { 0x0d00, 0x0ed7, 0x0000 },
+ { 0x8700, 0x0f00, 0x3000 },
+ { 0x8700, 0x0edc, 0x2000 },
+ { 0x0d00, 0x0ed9, 0x0000 },
+ { 0x0700, 0x0edd, 0x0000 },
+ { 0x9a00, 0x0f02, 0x2000 },
+ { 0x1a00, 0x0f01, 0x0000 },
+ { 0x1a00, 0x0f03, 0x0000 },
+ { 0x9500, 0x0f0c, 0x4000 },
+ { 0x9500, 0x0f08, 0x3000 },
+ { 0x9500, 0x0f06, 0x2000 },
+ { 0x1500, 0x0f05, 0x0000 },
+ { 0x1500, 0x0f07, 0x0000 },
+ { 0x9500, 0x0f0a, 0x2000 },
+ { 0x1500, 0x0f09, 0x0000 },
+ { 0x1500, 0x0f0b, 0x0000 },
+ { 0x9500, 0x0f10, 0x3000 },
+ { 0x9500, 0x0f0e, 0x2000 },
+ { 0x1500, 0x0f0d, 0x0000 },
+ { 0x1500, 0x0f0f, 0x0000 },
+ { 0x9500, 0x0f12, 0x2000 },
+ { 0x1500, 0x0f11, 0x0000 },
+ { 0x1a00, 0x0f13, 0x0000 },
+ { 0x9a00, 0x0f34, 0x6000 },
+ { 0x8d00, 0x0f24, 0x5000 },
+ { 0x9a00, 0x0f1c, 0x4000 },
+ { 0x8c00, 0x0f18, 0x3000 },
+ { 0x9a00, 0x0f16, 0x2000 },
+ { 0x1a00, 0x0f15, 0x0000 },
+ { 0x1a00, 0x0f17, 0x0000 },
+ { 0x9a00, 0x0f1a, 0x2000 },
+ { 0x0c00, 0x0f19, 0x0000 },
+ { 0x1a00, 0x0f1b, 0x0000 },
+ { 0x8d00, 0x0f20, 0x3000 },
+ { 0x9a00, 0x0f1e, 0x2000 },
+ { 0x1a00, 0x0f1d, 0x0000 },
+ { 0x1a00, 0x0f1f, 0x0000 },
+ { 0x8d00, 0x0f22, 0x2000 },
+ { 0x0d00, 0x0f21, 0x0000 },
+ { 0x0d00, 0x0f23, 0x0000 },
+ { 0x8f00, 0x0f2c, 0x4000 },
+ { 0x8d00, 0x0f28, 0x3000 },
+ { 0x8d00, 0x0f26, 0x2000 },
+ { 0x0d00, 0x0f25, 0x0000 },
+ { 0x0d00, 0x0f27, 0x0000 },
+ { 0x8f00, 0x0f2a, 0x2000 },
+ { 0x0d00, 0x0f29, 0x0000 },
+ { 0x0f00, 0x0f2b, 0x0000 },
+ { 0x8f00, 0x0f30, 0x3000 },
+ { 0x8f00, 0x0f2e, 0x2000 },
+ { 0x0f00, 0x0f2d, 0x0000 },
+ { 0x0f00, 0x0f2f, 0x0000 },
+ { 0x8f00, 0x0f32, 0x2000 },
+ { 0x0f00, 0x0f31, 0x0000 },
+ { 0x0f00, 0x0f33, 0x0000 },
+ { 0x8700, 0x0f44, 0x5000 },
+ { 0x9600, 0x0f3c, 0x4000 },
+ { 0x9a00, 0x0f38, 0x3000 },
+ { 0x9a00, 0x0f36, 0x2000 },
+ { 0x0c00, 0x0f35, 0x0000 },
+ { 0x0c00, 0x0f37, 0x0000 },
+ { 0x9600, 0x0f3a, 0x2000 },
+ { 0x0c00, 0x0f39, 0x0000 },
+ { 0x1200, 0x0f3b, 0x0000 },
+ { 0x8700, 0x0f40, 0x3000 },
+ { 0x8a00, 0x0f3e, 0x2000 },
+ { 0x1200, 0x0f3d, 0x0000 },
+ { 0x0a00, 0x0f3f, 0x0000 },
+ { 0x8700, 0x0f42, 0x2000 },
+ { 0x0700, 0x0f41, 0x0000 },
+ { 0x0700, 0x0f43, 0x0000 },
+ { 0x8700, 0x0f4d, 0x4000 },
+ { 0x8700, 0x0f49, 0x3000 },
+ { 0x8700, 0x0f46, 0x2000 },
+ { 0x0700, 0x0f45, 0x0000 },
+ { 0x0700, 0x0f47, 0x0000 },
+ { 0x8700, 0x0f4b, 0x2000 },
+ { 0x0700, 0x0f4a, 0x0000 },
+ { 0x0700, 0x0f4c, 0x0000 },
+ { 0x8700, 0x0f51, 0x3000 },
+ { 0x8700, 0x0f4f, 0x2000 },
+ { 0x0700, 0x0f4e, 0x0000 },
+ { 0x0700, 0x0f50, 0x0000 },
+ { 0x8700, 0x0f53, 0x2000 },
+ { 0x0700, 0x0f52, 0x0000 },
+ { 0x0700, 0x0f54, 0x0000 },
+ { 0x8700, 0x1013, 0x8000 },
+ { 0x8c00, 0x0fa0, 0x7000 },
+ { 0x8c00, 0x0f7b, 0x6000 },
+ { 0x8700, 0x0f65, 0x5000 },
+ { 0x8700, 0x0f5d, 0x4000 },
+ { 0x8700, 0x0f59, 0x3000 },
+ { 0x8700, 0x0f57, 0x2000 },
+ { 0x0700, 0x0f56, 0x0000 },
+ { 0x0700, 0x0f58, 0x0000 },
+ { 0x8700, 0x0f5b, 0x2000 },
+ { 0x0700, 0x0f5a, 0x0000 },
+ { 0x0700, 0x0f5c, 0x0000 },
+ { 0x8700, 0x0f61, 0x3000 },
+ { 0x8700, 0x0f5f, 0x2000 },
+ { 0x0700, 0x0f5e, 0x0000 },
+ { 0x0700, 0x0f60, 0x0000 },
+ { 0x8700, 0x0f63, 0x2000 },
+ { 0x0700, 0x0f62, 0x0000 },
+ { 0x0700, 0x0f64, 0x0000 },
+ { 0x8c00, 0x0f73, 0x4000 },
+ { 0x8700, 0x0f69, 0x3000 },
+ { 0x8700, 0x0f67, 0x2000 },
+ { 0x0700, 0x0f66, 0x0000 },
+ { 0x0700, 0x0f68, 0x0000 },
+ { 0x8c00, 0x0f71, 0x2000 },
+ { 0x0700, 0x0f6a, 0x0000 },
+ { 0x0c00, 0x0f72, 0x0000 },
+ { 0x8c00, 0x0f77, 0x3000 },
+ { 0x8c00, 0x0f75, 0x2000 },
+ { 0x0c00, 0x0f74, 0x0000 },
+ { 0x0c00, 0x0f76, 0x0000 },
+ { 0x8c00, 0x0f79, 0x2000 },
+ { 0x0c00, 0x0f78, 0x0000 },
+ { 0x0c00, 0x0f7a, 0x0000 },
+ { 0x8700, 0x0f8b, 0x5000 },
+ { 0x8c00, 0x0f83, 0x4000 },
+ { 0x8a00, 0x0f7f, 0x3000 },
+ { 0x8c00, 0x0f7d, 0x2000 },
+ { 0x0c00, 0x0f7c, 0x0000 },
+ { 0x0c00, 0x0f7e, 0x0000 },
+ { 0x8c00, 0x0f81, 0x2000 },
+ { 0x0c00, 0x0f80, 0x0000 },
+ { 0x0c00, 0x0f82, 0x0000 },
+ { 0x8c00, 0x0f87, 0x3000 },
+ { 0x9500, 0x0f85, 0x2000 },
+ { 0x0c00, 0x0f84, 0x0000 },
+ { 0x0c00, 0x0f86, 0x0000 },
+ { 0x8700, 0x0f89, 0x2000 },
+ { 0x0700, 0x0f88, 0x0000 },
+ { 0x0700, 0x0f8a, 0x0000 },
+ { 0x8c00, 0x0f97, 0x4000 },
+ { 0x8c00, 0x0f93, 0x3000 },
+ { 0x8c00, 0x0f91, 0x2000 },
+ { 0x0c00, 0x0f90, 0x0000 },
+ { 0x0c00, 0x0f92, 0x0000 },
+ { 0x8c00, 0x0f95, 0x2000 },
+ { 0x0c00, 0x0f94, 0x0000 },
+ { 0x0c00, 0x0f96, 0x0000 },
+ { 0x8c00, 0x0f9c, 0x3000 },
+ { 0x8c00, 0x0f9a, 0x2000 },
+ { 0x0c00, 0x0f99, 0x0000 },
+ { 0x0c00, 0x0f9b, 0x0000 },
+ { 0x8c00, 0x0f9e, 0x2000 },
+ { 0x0c00, 0x0f9d, 0x0000 },
+ { 0x0c00, 0x0f9f, 0x0000 },
+ { 0x9a00, 0x0fc1, 0x6000 },
+ { 0x8c00, 0x0fb0, 0x5000 },
+ { 0x8c00, 0x0fa8, 0x4000 },
+ { 0x8c00, 0x0fa4, 0x3000 },
+ { 0x8c00, 0x0fa2, 0x2000 },
+ { 0x0c00, 0x0fa1, 0x0000 },
+ { 0x0c00, 0x0fa3, 0x0000 },
+ { 0x8c00, 0x0fa6, 0x2000 },
+ { 0x0c00, 0x0fa5, 0x0000 },
+ { 0x0c00, 0x0fa7, 0x0000 },
+ { 0x8c00, 0x0fac, 0x3000 },
+ { 0x8c00, 0x0faa, 0x2000 },
+ { 0x0c00, 0x0fa9, 0x0000 },
+ { 0x0c00, 0x0fab, 0x0000 },
+ { 0x8c00, 0x0fae, 0x2000 },
+ { 0x0c00, 0x0fad, 0x0000 },
+ { 0x0c00, 0x0faf, 0x0000 },
+ { 0x8c00, 0x0fb8, 0x4000 },
+ { 0x8c00, 0x0fb4, 0x3000 },
+ { 0x8c00, 0x0fb2, 0x2000 },
+ { 0x0c00, 0x0fb1, 0x0000 },
+ { 0x0c00, 0x0fb3, 0x0000 },
+ { 0x8c00, 0x0fb6, 0x2000 },
+ { 0x0c00, 0x0fb5, 0x0000 },
+ { 0x0c00, 0x0fb7, 0x0000 },
+ { 0x8c00, 0x0fbc, 0x3000 },
+ { 0x8c00, 0x0fba, 0x2000 },
+ { 0x0c00, 0x0fb9, 0x0000 },
+ { 0x0c00, 0x0fbb, 0x0000 },
+ { 0x9a00, 0x0fbf, 0x2000 },
+ { 0x1a00, 0x0fbe, 0x0000 },
+ { 0x1a00, 0x0fc0, 0x0000 },
+ { 0x8700, 0x1003, 0x5000 },
+ { 0x9a00, 0x0fc9, 0x4000 },
+ { 0x9a00, 0x0fc5, 0x3000 },
+ { 0x9a00, 0x0fc3, 0x2000 },
+ { 0x1a00, 0x0fc2, 0x0000 },
+ { 0x1a00, 0x0fc4, 0x0000 },
+ { 0x9a00, 0x0fc7, 0x2000 },
+ { 0x0c00, 0x0fc6, 0x0000 },
+ { 0x1a00, 0x0fc8, 0x0000 },
+ { 0x9a00, 0x0fcf, 0x3000 },
+ { 0x9a00, 0x0fcb, 0x2000 },
+ { 0x1a00, 0x0fca, 0x0000 },
+ { 0x1a00, 0x0fcc, 0x0000 },
+ { 0x8700, 0x1001, 0x2000 },
+ { 0x0700, 0x1000, 0x0000 },
+ { 0x0700, 0x1002, 0x0000 },
+ { 0x8700, 0x100b, 0x4000 },
+ { 0x8700, 0x1007, 0x3000 },
+ { 0x8700, 0x1005, 0x2000 },
+ { 0x0700, 0x1004, 0x0000 },
+ { 0x0700, 0x1006, 0x0000 },
+ { 0x8700, 0x1009, 0x2000 },
+ { 0x0700, 0x1008, 0x0000 },
+ { 0x0700, 0x100a, 0x0000 },
+ { 0x8700, 0x100f, 0x3000 },
+ { 0x8700, 0x100d, 0x2000 },
+ { 0x0700, 0x100c, 0x0000 },
+ { 0x0700, 0x100e, 0x0000 },
+ { 0x8700, 0x1011, 0x2000 },
+ { 0x0700, 0x1010, 0x0000 },
+ { 0x0700, 0x1012, 0x0000 },
+ { 0x8900, 0x10a5, 0x7000 },
+ { 0x8c00, 0x1039, 0x6000 },
+ { 0x8700, 0x1024, 0x5000 },
+ { 0x8700, 0x101b, 0x4000 },
+ { 0x8700, 0x1017, 0x3000 },
+ { 0x8700, 0x1015, 0x2000 },
+ { 0x0700, 0x1014, 0x0000 },
+ { 0x0700, 0x1016, 0x0000 },
+ { 0x8700, 0x1019, 0x2000 },
+ { 0x0700, 0x1018, 0x0000 },
+ { 0x0700, 0x101a, 0x0000 },
+ { 0x8700, 0x101f, 0x3000 },
+ { 0x8700, 0x101d, 0x2000 },
+ { 0x0700, 0x101c, 0x0000 },
+ { 0x0700, 0x101e, 0x0000 },
+ { 0x8700, 0x1021, 0x2000 },
+ { 0x0700, 0x1020, 0x0000 },
+ { 0x0700, 0x1023, 0x0000 },
+ { 0x8c00, 0x102e, 0x4000 },
+ { 0x8700, 0x1029, 0x3000 },
+ { 0x8700, 0x1026, 0x2000 },
+ { 0x0700, 0x1025, 0x0000 },
+ { 0x0700, 0x1027, 0x0000 },
+ { 0x8a00, 0x102c, 0x2000 },
+ { 0x0700, 0x102a, 0x0000 },
+ { 0x0c00, 0x102d, 0x0000 },
+ { 0x8c00, 0x1032, 0x3000 },
+ { 0x8c00, 0x1030, 0x2000 },
+ { 0x0c00, 0x102f, 0x0000 },
+ { 0x0a00, 0x1031, 0x0000 },
+ { 0x8c00, 0x1037, 0x2000 },
+ { 0x0c00, 0x1036, 0x0000 },
+ { 0x0a00, 0x1038, 0x0000 },
+ { 0x9500, 0x104f, 0x5000 },
+ { 0x8d00, 0x1047, 0x4000 },
+ { 0x8d00, 0x1043, 0x3000 },
+ { 0x8d00, 0x1041, 0x2000 },
+ { 0x0d00, 0x1040, 0x0000 },
+ { 0x0d00, 0x1042, 0x0000 },
+ { 0x8d00, 0x1045, 0x2000 },
+ { 0x0d00, 0x1044, 0x0000 },
+ { 0x0d00, 0x1046, 0x0000 },
+ { 0x9500, 0x104b, 0x3000 },
+ { 0x8d00, 0x1049, 0x2000 },
+ { 0x0d00, 0x1048, 0x0000 },
+ { 0x1500, 0x104a, 0x0000 },
+ { 0x9500, 0x104d, 0x2000 },
+ { 0x1500, 0x104c, 0x0000 },
+ { 0x1500, 0x104e, 0x0000 },
+ { 0x8a00, 0x1057, 0x4000 },
+ { 0x8700, 0x1053, 0x3000 },
+ { 0x8700, 0x1051, 0x2000 },
+ { 0x0700, 0x1050, 0x0000 },
+ { 0x0700, 0x1052, 0x0000 },
+ { 0x8700, 0x1055, 0x2000 },
+ { 0x0700, 0x1054, 0x0000 },
+ { 0x0a00, 0x1056, 0x0000 },
+ { 0x8900, 0x10a1, 0x3000 },
+ { 0x8c00, 0x1059, 0x2000 },
+ { 0x0c00, 0x1058, 0x0000 },
+ { 0x0900, 0x10a0, 0x0000 },
+ { 0x8900, 0x10a3, 0x2000 },
+ { 0x0900, 0x10a2, 0x0000 },
+ { 0x0900, 0x10a4, 0x0000 },
+ { 0x8900, 0x10c5, 0x6000 },
+ { 0x8900, 0x10b5, 0x5000 },
+ { 0x8900, 0x10ad, 0x4000 },
+ { 0x8900, 0x10a9, 0x3000 },
+ { 0x8900, 0x10a7, 0x2000 },
+ { 0x0900, 0x10a6, 0x0000 },
+ { 0x0900, 0x10a8, 0x0000 },
+ { 0x8900, 0x10ab, 0x2000 },
+ { 0x0900, 0x10aa, 0x0000 },
+ { 0x0900, 0x10ac, 0x0000 },
+ { 0x8900, 0x10b1, 0x3000 },
+ { 0x8900, 0x10af, 0x2000 },
+ { 0x0900, 0x10ae, 0x0000 },
+ { 0x0900, 0x10b0, 0x0000 },
+ { 0x8900, 0x10b3, 0x2000 },
+ { 0x0900, 0x10b2, 0x0000 },
+ { 0x0900, 0x10b4, 0x0000 },
+ { 0x8900, 0x10bd, 0x4000 },
+ { 0x8900, 0x10b9, 0x3000 },
+ { 0x8900, 0x10b7, 0x2000 },
+ { 0x0900, 0x10b6, 0x0000 },
+ { 0x0900, 0x10b8, 0x0000 },
+ { 0x8900, 0x10bb, 0x2000 },
+ { 0x0900, 0x10ba, 0x0000 },
+ { 0x0900, 0x10bc, 0x0000 },
+ { 0x8900, 0x10c1, 0x3000 },
+ { 0x8900, 0x10bf, 0x2000 },
+ { 0x0900, 0x10be, 0x0000 },
+ { 0x0900, 0x10c0, 0x0000 },
+ { 0x8900, 0x10c3, 0x2000 },
+ { 0x0900, 0x10c2, 0x0000 },
+ { 0x0900, 0x10c4, 0x0000 },
+ { 0x8700, 0x10df, 0x5000 },
+ { 0x8700, 0x10d7, 0x4000 },
+ { 0x8700, 0x10d3, 0x3000 },
+ { 0x8700, 0x10d1, 0x2000 },
+ { 0x0700, 0x10d0, 0x0000 },
+ { 0x0700, 0x10d2, 0x0000 },
+ { 0x8700, 0x10d5, 0x2000 },
+ { 0x0700, 0x10d4, 0x0000 },
+ { 0x0700, 0x10d6, 0x0000 },
+ { 0x8700, 0x10db, 0x3000 },
+ { 0x8700, 0x10d9, 0x2000 },
+ { 0x0700, 0x10d8, 0x0000 },
+ { 0x0700, 0x10da, 0x0000 },
+ { 0x8700, 0x10dd, 0x2000 },
+ { 0x0700, 0x10dc, 0x0000 },
+ { 0x0700, 0x10de, 0x0000 },
+ { 0x8700, 0x10e7, 0x4000 },
+ { 0x8700, 0x10e3, 0x3000 },
+ { 0x8700, 0x10e1, 0x2000 },
+ { 0x0700, 0x10e0, 0x0000 },
+ { 0x0700, 0x10e2, 0x0000 },
+ { 0x8700, 0x10e5, 0x2000 },
+ { 0x0700, 0x10e4, 0x0000 },
+ { 0x0700, 0x10e6, 0x0000 },
+ { 0x8700, 0x10eb, 0x3000 },
+ { 0x8700, 0x10e9, 0x2000 },
+ { 0x0700, 0x10e8, 0x0000 },
+ { 0x0700, 0x10ea, 0x0000 },
+ { 0x8700, 0x10ed, 0x2000 },
+ { 0x0700, 0x10ec, 0x0000 },
+ { 0x0700, 0x10ee, 0x0000 },
+ { 0x8700, 0x1322, 0xa000 },
+ { 0x8700, 0x1205, 0x9000 },
+ { 0x8700, 0x117a, 0x8000 },
+ { 0x8700, 0x1135, 0x7000 },
+ { 0x8700, 0x1115, 0x6000 },
+ { 0x8700, 0x1105, 0x5000 },
+ { 0x8700, 0x10f7, 0x4000 },
+ { 0x8700, 0x10f3, 0x3000 },
+ { 0x8700, 0x10f1, 0x2000 },
+ { 0x0700, 0x10f0, 0x0000 },
+ { 0x0700, 0x10f2, 0x0000 },
+ { 0x8700, 0x10f5, 0x2000 },
+ { 0x0700, 0x10f4, 0x0000 },
+ { 0x0700, 0x10f6, 0x0000 },
+ { 0x8700, 0x1101, 0x3000 },
+ { 0x9500, 0x10fb, 0x2000 },
+ { 0x0700, 0x10f8, 0x0000 },
+ { 0x0700, 0x1100, 0x0000 },
+ { 0x8700, 0x1103, 0x2000 },
+ { 0x0700, 0x1102, 0x0000 },
+ { 0x0700, 0x1104, 0x0000 },
+ { 0x8700, 0x110d, 0x4000 },
+ { 0x8700, 0x1109, 0x3000 },
+ { 0x8700, 0x1107, 0x2000 },
+ { 0x0700, 0x1106, 0x0000 },
+ { 0x0700, 0x1108, 0x0000 },
+ { 0x8700, 0x110b, 0x2000 },
+ { 0x0700, 0x110a, 0x0000 },
+ { 0x0700, 0x110c, 0x0000 },
+ { 0x8700, 0x1111, 0x3000 },
+ { 0x8700, 0x110f, 0x2000 },
+ { 0x0700, 0x110e, 0x0000 },
+ { 0x0700, 0x1110, 0x0000 },
+ { 0x8700, 0x1113, 0x2000 },
+ { 0x0700, 0x1112, 0x0000 },
+ { 0x0700, 0x1114, 0x0000 },
+ { 0x8700, 0x1125, 0x5000 },
+ { 0x8700, 0x111d, 0x4000 },
+ { 0x8700, 0x1119, 0x3000 },
+ { 0x8700, 0x1117, 0x2000 },
+ { 0x0700, 0x1116, 0x0000 },
+ { 0x0700, 0x1118, 0x0000 },
+ { 0x8700, 0x111b, 0x2000 },
+ { 0x0700, 0x111a, 0x0000 },
+ { 0x0700, 0x111c, 0x0000 },
+ { 0x8700, 0x1121, 0x3000 },
+ { 0x8700, 0x111f, 0x2000 },
+ { 0x0700, 0x111e, 0x0000 },
+ { 0x0700, 0x1120, 0x0000 },
+ { 0x8700, 0x1123, 0x2000 },
+ { 0x0700, 0x1122, 0x0000 },
+ { 0x0700, 0x1124, 0x0000 },
+ { 0x8700, 0x112d, 0x4000 },
+ { 0x8700, 0x1129, 0x3000 },
+ { 0x8700, 0x1127, 0x2000 },
+ { 0x0700, 0x1126, 0x0000 },
+ { 0x0700, 0x1128, 0x0000 },
+ { 0x8700, 0x112b, 0x2000 },
+ { 0x0700, 0x112a, 0x0000 },
+ { 0x0700, 0x112c, 0x0000 },
+ { 0x8700, 0x1131, 0x3000 },
+ { 0x8700, 0x112f, 0x2000 },
+ { 0x0700, 0x112e, 0x0000 },
+ { 0x0700, 0x1130, 0x0000 },
+ { 0x8700, 0x1133, 0x2000 },
+ { 0x0700, 0x1132, 0x0000 },
+ { 0x0700, 0x1134, 0x0000 },
+ { 0x8700, 0x1155, 0x6000 },
+ { 0x8700, 0x1145, 0x5000 },
+ { 0x8700, 0x113d, 0x4000 },
+ { 0x8700, 0x1139, 0x3000 },
+ { 0x8700, 0x1137, 0x2000 },
+ { 0x0700, 0x1136, 0x0000 },
+ { 0x0700, 0x1138, 0x0000 },
+ { 0x8700, 0x113b, 0x2000 },
+ { 0x0700, 0x113a, 0x0000 },
+ { 0x0700, 0x113c, 0x0000 },
+ { 0x8700, 0x1141, 0x3000 },
+ { 0x8700, 0x113f, 0x2000 },
+ { 0x0700, 0x113e, 0x0000 },
+ { 0x0700, 0x1140, 0x0000 },
+ { 0x8700, 0x1143, 0x2000 },
+ { 0x0700, 0x1142, 0x0000 },
+ { 0x0700, 0x1144, 0x0000 },
+ { 0x8700, 0x114d, 0x4000 },
+ { 0x8700, 0x1149, 0x3000 },
+ { 0x8700, 0x1147, 0x2000 },
+ { 0x0700, 0x1146, 0x0000 },
+ { 0x0700, 0x1148, 0x0000 },
+ { 0x8700, 0x114b, 0x2000 },
+ { 0x0700, 0x114a, 0x0000 },
+ { 0x0700, 0x114c, 0x0000 },
+ { 0x8700, 0x1151, 0x3000 },
+ { 0x8700, 0x114f, 0x2000 },
+ { 0x0700, 0x114e, 0x0000 },
+ { 0x0700, 0x1150, 0x0000 },
+ { 0x8700, 0x1153, 0x2000 },
+ { 0x0700, 0x1152, 0x0000 },
+ { 0x0700, 0x1154, 0x0000 },
+ { 0x8700, 0x116a, 0x5000 },
+ { 0x8700, 0x1162, 0x4000 },
+ { 0x8700, 0x1159, 0x3000 },
+ { 0x8700, 0x1157, 0x2000 },
+ { 0x0700, 0x1156, 0x0000 },
+ { 0x0700, 0x1158, 0x0000 },
+ { 0x8700, 0x1160, 0x2000 },
+ { 0x0700, 0x115f, 0x0000 },
+ { 0x0700, 0x1161, 0x0000 },
+ { 0x8700, 0x1166, 0x3000 },
+ { 0x8700, 0x1164, 0x2000 },
+ { 0x0700, 0x1163, 0x0000 },
+ { 0x0700, 0x1165, 0x0000 },
+ { 0x8700, 0x1168, 0x2000 },
+ { 0x0700, 0x1167, 0x0000 },
+ { 0x0700, 0x1169, 0x0000 },
+ { 0x8700, 0x1172, 0x4000 },
+ { 0x8700, 0x116e, 0x3000 },
+ { 0x8700, 0x116c, 0x2000 },
+ { 0x0700, 0x116b, 0x0000 },
+ { 0x0700, 0x116d, 0x0000 },
+ { 0x8700, 0x1170, 0x2000 },
+ { 0x0700, 0x116f, 0x0000 },
+ { 0x0700, 0x1171, 0x0000 },
+ { 0x8700, 0x1176, 0x3000 },
+ { 0x8700, 0x1174, 0x2000 },
+ { 0x0700, 0x1173, 0x0000 },
+ { 0x0700, 0x1175, 0x0000 },
+ { 0x8700, 0x1178, 0x2000 },
+ { 0x0700, 0x1177, 0x0000 },
+ { 0x0700, 0x1179, 0x0000 },
+ { 0x8700, 0x11bf, 0x7000 },
+ { 0x8700, 0x119a, 0x6000 },
+ { 0x8700, 0x118a, 0x5000 },
+ { 0x8700, 0x1182, 0x4000 },
+ { 0x8700, 0x117e, 0x3000 },
+ { 0x8700, 0x117c, 0x2000 },
+ { 0x0700, 0x117b, 0x0000 },
+ { 0x0700, 0x117d, 0x0000 },
+ { 0x8700, 0x1180, 0x2000 },
+ { 0x0700, 0x117f, 0x0000 },
+ { 0x0700, 0x1181, 0x0000 },
+ { 0x8700, 0x1186, 0x3000 },
+ { 0x8700, 0x1184, 0x2000 },
+ { 0x0700, 0x1183, 0x0000 },
+ { 0x0700, 0x1185, 0x0000 },
+ { 0x8700, 0x1188, 0x2000 },
+ { 0x0700, 0x1187, 0x0000 },
+ { 0x0700, 0x1189, 0x0000 },
+ { 0x8700, 0x1192, 0x4000 },
+ { 0x8700, 0x118e, 0x3000 },
+ { 0x8700, 0x118c, 0x2000 },
+ { 0x0700, 0x118b, 0x0000 },
+ { 0x0700, 0x118d, 0x0000 },
+ { 0x8700, 0x1190, 0x2000 },
+ { 0x0700, 0x118f, 0x0000 },
+ { 0x0700, 0x1191, 0x0000 },
+ { 0x8700, 0x1196, 0x3000 },
+ { 0x8700, 0x1194, 0x2000 },
+ { 0x0700, 0x1193, 0x0000 },
+ { 0x0700, 0x1195, 0x0000 },
+ { 0x8700, 0x1198, 0x2000 },
+ { 0x0700, 0x1197, 0x0000 },
+ { 0x0700, 0x1199, 0x0000 },
+ { 0x8700, 0x11af, 0x5000 },
+ { 0x8700, 0x11a2, 0x4000 },
+ { 0x8700, 0x119e, 0x3000 },
+ { 0x8700, 0x119c, 0x2000 },
+ { 0x0700, 0x119b, 0x0000 },
+ { 0x0700, 0x119d, 0x0000 },
+ { 0x8700, 0x11a0, 0x2000 },
+ { 0x0700, 0x119f, 0x0000 },
+ { 0x0700, 0x11a1, 0x0000 },
+ { 0x8700, 0x11ab, 0x3000 },
+ { 0x8700, 0x11a9, 0x2000 },
+ { 0x0700, 0x11a8, 0x0000 },
+ { 0x0700, 0x11aa, 0x0000 },
+ { 0x8700, 0x11ad, 0x2000 },
+ { 0x0700, 0x11ac, 0x0000 },
+ { 0x0700, 0x11ae, 0x0000 },
+ { 0x8700, 0x11b7, 0x4000 },
+ { 0x8700, 0x11b3, 0x3000 },
+ { 0x8700, 0x11b1, 0x2000 },
+ { 0x0700, 0x11b0, 0x0000 },
+ { 0x0700, 0x11b2, 0x0000 },
+ { 0x8700, 0x11b5, 0x2000 },
+ { 0x0700, 0x11b4, 0x0000 },
+ { 0x0700, 0x11b6, 0x0000 },
+ { 0x8700, 0x11bb, 0x3000 },
+ { 0x8700, 0x11b9, 0x2000 },
+ { 0x0700, 0x11b8, 0x0000 },
+ { 0x0700, 0x11ba, 0x0000 },
+ { 0x8700, 0x11bd, 0x2000 },
+ { 0x0700, 0x11bc, 0x0000 },
+ { 0x0700, 0x11be, 0x0000 },
+ { 0x8700, 0x11df, 0x6000 },
+ { 0x8700, 0x11cf, 0x5000 },
+ { 0x8700, 0x11c7, 0x4000 },
+ { 0x8700, 0x11c3, 0x3000 },
+ { 0x8700, 0x11c1, 0x2000 },
+ { 0x0700, 0x11c0, 0x0000 },
+ { 0x0700, 0x11c2, 0x0000 },
+ { 0x8700, 0x11c5, 0x2000 },
+ { 0x0700, 0x11c4, 0x0000 },
+ { 0x0700, 0x11c6, 0x0000 },
+ { 0x8700, 0x11cb, 0x3000 },
+ { 0x8700, 0x11c9, 0x2000 },
+ { 0x0700, 0x11c8, 0x0000 },
+ { 0x0700, 0x11ca, 0x0000 },
+ { 0x8700, 0x11cd, 0x2000 },
+ { 0x0700, 0x11cc, 0x0000 },
+ { 0x0700, 0x11ce, 0x0000 },
+ { 0x8700, 0x11d7, 0x4000 },
+ { 0x8700, 0x11d3, 0x3000 },
+ { 0x8700, 0x11d1, 0x2000 },
+ { 0x0700, 0x11d0, 0x0000 },
+ { 0x0700, 0x11d2, 0x0000 },
+ { 0x8700, 0x11d5, 0x2000 },
+ { 0x0700, 0x11d4, 0x0000 },
+ { 0x0700, 0x11d6, 0x0000 },
+ { 0x8700, 0x11db, 0x3000 },
+ { 0x8700, 0x11d9, 0x2000 },
+ { 0x0700, 0x11d8, 0x0000 },
+ { 0x0700, 0x11da, 0x0000 },
+ { 0x8700, 0x11dd, 0x2000 },
+ { 0x0700, 0x11dc, 0x0000 },
+ { 0x0700, 0x11de, 0x0000 },
+ { 0x8700, 0x11ef, 0x5000 },
+ { 0x8700, 0x11e7, 0x4000 },
+ { 0x8700, 0x11e3, 0x3000 },
+ { 0x8700, 0x11e1, 0x2000 },
+ { 0x0700, 0x11e0, 0x0000 },
+ { 0x0700, 0x11e2, 0x0000 },
+ { 0x8700, 0x11e5, 0x2000 },
+ { 0x0700, 0x11e4, 0x0000 },
+ { 0x0700, 0x11e6, 0x0000 },
+ { 0x8700, 0x11eb, 0x3000 },
+ { 0x8700, 0x11e9, 0x2000 },
+ { 0x0700, 0x11e8, 0x0000 },
+ { 0x0700, 0x11ea, 0x0000 },
+ { 0x8700, 0x11ed, 0x2000 },
+ { 0x0700, 0x11ec, 0x0000 },
+ { 0x0700, 0x11ee, 0x0000 },
+ { 0x8700, 0x11f7, 0x4000 },
+ { 0x8700, 0x11f3, 0x3000 },
+ { 0x8700, 0x11f1, 0x2000 },
+ { 0x0700, 0x11f0, 0x0000 },
+ { 0x0700, 0x11f2, 0x0000 },
+ { 0x8700, 0x11f5, 0x2000 },
+ { 0x0700, 0x11f4, 0x0000 },
+ { 0x0700, 0x11f6, 0x0000 },
+ { 0x8700, 0x1201, 0x3000 },
+ { 0x8700, 0x11f9, 0x2000 },
+ { 0x0700, 0x11f8, 0x0000 },
+ { 0x0700, 0x1200, 0x0000 },
+ { 0x8700, 0x1203, 0x2000 },
+ { 0x0700, 0x1202, 0x0000 },
+ { 0x0700, 0x1204, 0x0000 },
+ { 0x8700, 0x1292, 0x8000 },
+ { 0x8700, 0x1246, 0x7000 },
+ { 0x8700, 0x1226, 0x6000 },
+ { 0x8700, 0x1216, 0x5000 },
+ { 0x8700, 0x120e, 0x4000 },
+ { 0x8700, 0x120a, 0x3000 },
+ { 0x8700, 0x1208, 0x2000 },
+ { 0x0700, 0x1206, 0x0000 },
+ { 0x0700, 0x1209, 0x0000 },
+ { 0x8700, 0x120c, 0x2000 },
+ { 0x0700, 0x120b, 0x0000 },
+ { 0x0700, 0x120d, 0x0000 },
+ { 0x8700, 0x1212, 0x3000 },
+ { 0x8700, 0x1210, 0x2000 },
+ { 0x0700, 0x120f, 0x0000 },
+ { 0x0700, 0x1211, 0x0000 },
+ { 0x8700, 0x1214, 0x2000 },
+ { 0x0700, 0x1213, 0x0000 },
+ { 0x0700, 0x1215, 0x0000 },
+ { 0x8700, 0x121e, 0x4000 },
+ { 0x8700, 0x121a, 0x3000 },
+ { 0x8700, 0x1218, 0x2000 },
+ { 0x0700, 0x1217, 0x0000 },
+ { 0x0700, 0x1219, 0x0000 },
+ { 0x8700, 0x121c, 0x2000 },
+ { 0x0700, 0x121b, 0x0000 },
+ { 0x0700, 0x121d, 0x0000 },
+ { 0x8700, 0x1222, 0x3000 },
+ { 0x8700, 0x1220, 0x2000 },
+ { 0x0700, 0x121f, 0x0000 },
+ { 0x0700, 0x1221, 0x0000 },
+ { 0x8700, 0x1224, 0x2000 },
+ { 0x0700, 0x1223, 0x0000 },
+ { 0x0700, 0x1225, 0x0000 },
+ { 0x8700, 0x1236, 0x5000 },
+ { 0x8700, 0x122e, 0x4000 },
+ { 0x8700, 0x122a, 0x3000 },
+ { 0x8700, 0x1228, 0x2000 },
+ { 0x0700, 0x1227, 0x0000 },
+ { 0x0700, 0x1229, 0x0000 },
+ { 0x8700, 0x122c, 0x2000 },
+ { 0x0700, 0x122b, 0x0000 },
+ { 0x0700, 0x122d, 0x0000 },
+ { 0x8700, 0x1232, 0x3000 },
+ { 0x8700, 0x1230, 0x2000 },
+ { 0x0700, 0x122f, 0x0000 },
+ { 0x0700, 0x1231, 0x0000 },
+ { 0x8700, 0x1234, 0x2000 },
+ { 0x0700, 0x1233, 0x0000 },
+ { 0x0700, 0x1235, 0x0000 },
+ { 0x8700, 0x123e, 0x4000 },
+ { 0x8700, 0x123a, 0x3000 },
+ { 0x8700, 0x1238, 0x2000 },
+ { 0x0700, 0x1237, 0x0000 },
+ { 0x0700, 0x1239, 0x0000 },
+ { 0x8700, 0x123c, 0x2000 },
+ { 0x0700, 0x123b, 0x0000 },
+ { 0x0700, 0x123d, 0x0000 },
+ { 0x8700, 0x1242, 0x3000 },
+ { 0x8700, 0x1240, 0x2000 },
+ { 0x0700, 0x123f, 0x0000 },
+ { 0x0700, 0x1241, 0x0000 },
+ { 0x8700, 0x1244, 0x2000 },
+ { 0x0700, 0x1243, 0x0000 },
+ { 0x0700, 0x1245, 0x0000 },
+ { 0x8700, 0x126e, 0x6000 },
+ { 0x8700, 0x125c, 0x5000 },
+ { 0x8700, 0x1252, 0x4000 },
+ { 0x8700, 0x124c, 0x3000 },
+ { 0x8700, 0x124a, 0x2000 },
+ { 0x0700, 0x1248, 0x0000 },
+ { 0x0700, 0x124b, 0x0000 },
+ { 0x8700, 0x1250, 0x2000 },
+ { 0x0700, 0x124d, 0x0000 },
+ { 0x0700, 0x1251, 0x0000 },
+ { 0x8700, 0x1256, 0x3000 },
+ { 0x8700, 0x1254, 0x2000 },
+ { 0x0700, 0x1253, 0x0000 },
+ { 0x0700, 0x1255, 0x0000 },
+ { 0x8700, 0x125a, 0x2000 },
+ { 0x0700, 0x1258, 0x0000 },
+ { 0x0700, 0x125b, 0x0000 },
+ { 0x8700, 0x1266, 0x4000 },
+ { 0x8700, 0x1262, 0x3000 },
+ { 0x8700, 0x1260, 0x2000 },
+ { 0x0700, 0x125d, 0x0000 },
+ { 0x0700, 0x1261, 0x0000 },
+ { 0x8700, 0x1264, 0x2000 },
+ { 0x0700, 0x1263, 0x0000 },
+ { 0x0700, 0x1265, 0x0000 },
+ { 0x8700, 0x126a, 0x3000 },
+ { 0x8700, 0x1268, 0x2000 },
+ { 0x0700, 0x1267, 0x0000 },
+ { 0x0700, 0x1269, 0x0000 },
+ { 0x8700, 0x126c, 0x2000 },
+ { 0x0700, 0x126b, 0x0000 },
+ { 0x0700, 0x126d, 0x0000 },
+ { 0x8700, 0x127e, 0x5000 },
+ { 0x8700, 0x1276, 0x4000 },
+ { 0x8700, 0x1272, 0x3000 },
+ { 0x8700, 0x1270, 0x2000 },
+ { 0x0700, 0x126f, 0x0000 },
+ { 0x0700, 0x1271, 0x0000 },
+ { 0x8700, 0x1274, 0x2000 },
+ { 0x0700, 0x1273, 0x0000 },
+ { 0x0700, 0x1275, 0x0000 },
+ { 0x8700, 0x127a, 0x3000 },
+ { 0x8700, 0x1278, 0x2000 },
+ { 0x0700, 0x1277, 0x0000 },
+ { 0x0700, 0x1279, 0x0000 },
+ { 0x8700, 0x127c, 0x2000 },
+ { 0x0700, 0x127b, 0x0000 },
+ { 0x0700, 0x127d, 0x0000 },
+ { 0x8700, 0x1286, 0x4000 },
+ { 0x8700, 0x1282, 0x3000 },
+ { 0x8700, 0x1280, 0x2000 },
+ { 0x0700, 0x127f, 0x0000 },
+ { 0x0700, 0x1281, 0x0000 },
+ { 0x8700, 0x1284, 0x2000 },
+ { 0x0700, 0x1283, 0x0000 },
+ { 0x0700, 0x1285, 0x0000 },
+ { 0x8700, 0x128c, 0x3000 },
+ { 0x8700, 0x128a, 0x2000 },
+ { 0x0700, 0x1288, 0x0000 },
+ { 0x0700, 0x128b, 0x0000 },
+ { 0x8700, 0x1290, 0x2000 },
+ { 0x0700, 0x128d, 0x0000 },
+ { 0x0700, 0x1291, 0x0000 },
+ { 0x8700, 0x12dc, 0x7000 },
+ { 0x8700, 0x12b4, 0x6000 },
+ { 0x8700, 0x12a2, 0x5000 },
+ { 0x8700, 0x129a, 0x4000 },
+ { 0x8700, 0x1296, 0x3000 },
+ { 0x8700, 0x1294, 0x2000 },
+ { 0x0700, 0x1293, 0x0000 },
+ { 0x0700, 0x1295, 0x0000 },
+ { 0x8700, 0x1298, 0x2000 },
+ { 0x0700, 0x1297, 0x0000 },
+ { 0x0700, 0x1299, 0x0000 },
+ { 0x8700, 0x129e, 0x3000 },
+ { 0x8700, 0x129c, 0x2000 },
+ { 0x0700, 0x129b, 0x0000 },
+ { 0x0700, 0x129d, 0x0000 },
+ { 0x8700, 0x12a0, 0x2000 },
+ { 0x0700, 0x129f, 0x0000 },
+ { 0x0700, 0x12a1, 0x0000 },
+ { 0x8700, 0x12aa, 0x4000 },
+ { 0x8700, 0x12a6, 0x3000 },
+ { 0x8700, 0x12a4, 0x2000 },
+ { 0x0700, 0x12a3, 0x0000 },
+ { 0x0700, 0x12a5, 0x0000 },
+ { 0x8700, 0x12a8, 0x2000 },
+ { 0x0700, 0x12a7, 0x0000 },
+ { 0x0700, 0x12a9, 0x0000 },
+ { 0x8700, 0x12ae, 0x3000 },
+ { 0x8700, 0x12ac, 0x2000 },
+ { 0x0700, 0x12ab, 0x0000 },
+ { 0x0700, 0x12ad, 0x0000 },
+ { 0x8700, 0x12b2, 0x2000 },
+ { 0x0700, 0x12b0, 0x0000 },
+ { 0x0700, 0x12b3, 0x0000 },
+ { 0x8700, 0x12ca, 0x5000 },
+ { 0x8700, 0x12be, 0x4000 },
+ { 0x8700, 0x12ba, 0x3000 },
+ { 0x8700, 0x12b8, 0x2000 },
+ { 0x0700, 0x12b5, 0x0000 },
+ { 0x0700, 0x12b9, 0x0000 },
+ { 0x8700, 0x12bc, 0x2000 },
+ { 0x0700, 0x12bb, 0x0000 },
+ { 0x0700, 0x12bd, 0x0000 },
+ { 0x8700, 0x12c4, 0x3000 },
+ { 0x8700, 0x12c2, 0x2000 },
+ { 0x0700, 0x12c0, 0x0000 },
+ { 0x0700, 0x12c3, 0x0000 },
+ { 0x8700, 0x12c8, 0x2000 },
+ { 0x0700, 0x12c5, 0x0000 },
+ { 0x0700, 0x12c9, 0x0000 },
+ { 0x8700, 0x12d3, 0x4000 },
+ { 0x8700, 0x12ce, 0x3000 },
+ { 0x8700, 0x12cc, 0x2000 },
+ { 0x0700, 0x12cb, 0x0000 },
+ { 0x0700, 0x12cd, 0x0000 },
+ { 0x8700, 0x12d1, 0x2000 },
+ { 0x0700, 0x12d0, 0x0000 },
+ { 0x0700, 0x12d2, 0x0000 },
+ { 0x8700, 0x12d8, 0x3000 },
+ { 0x8700, 0x12d5, 0x2000 },
+ { 0x0700, 0x12d4, 0x0000 },
+ { 0x0700, 0x12d6, 0x0000 },
+ { 0x8700, 0x12da, 0x2000 },
+ { 0x0700, 0x12d9, 0x0000 },
+ { 0x0700, 0x12db, 0x0000 },
+ { 0x8700, 0x12fd, 0x6000 },
+ { 0x8700, 0x12ec, 0x5000 },
+ { 0x8700, 0x12e4, 0x4000 },
+ { 0x8700, 0x12e0, 0x3000 },
+ { 0x8700, 0x12de, 0x2000 },
+ { 0x0700, 0x12dd, 0x0000 },
+ { 0x0700, 0x12df, 0x0000 },
+ { 0x8700, 0x12e2, 0x2000 },
+ { 0x0700, 0x12e1, 0x0000 },
+ { 0x0700, 0x12e3, 0x0000 },
+ { 0x8700, 0x12e8, 0x3000 },
+ { 0x8700, 0x12e6, 0x2000 },
+ { 0x0700, 0x12e5, 0x0000 },
+ { 0x0700, 0x12e7, 0x0000 },
+ { 0x8700, 0x12ea, 0x2000 },
+ { 0x0700, 0x12e9, 0x0000 },
+ { 0x0700, 0x12eb, 0x0000 },
+ { 0x8700, 0x12f5, 0x4000 },
+ { 0x8700, 0x12f1, 0x3000 },
+ { 0x8700, 0x12ee, 0x2000 },
+ { 0x0700, 0x12ed, 0x0000 },
+ { 0x0700, 0x12f0, 0x0000 },
+ { 0x8700, 0x12f3, 0x2000 },
+ { 0x0700, 0x12f2, 0x0000 },
+ { 0x0700, 0x12f4, 0x0000 },
+ { 0x8700, 0x12f9, 0x3000 },
+ { 0x8700, 0x12f7, 0x2000 },
+ { 0x0700, 0x12f6, 0x0000 },
+ { 0x0700, 0x12f8, 0x0000 },
+ { 0x8700, 0x12fb, 0x2000 },
+ { 0x0700, 0x12fa, 0x0000 },
+ { 0x0700, 0x12fc, 0x0000 },
+ { 0x8700, 0x130d, 0x5000 },
+ { 0x8700, 0x1305, 0x4000 },
+ { 0x8700, 0x1301, 0x3000 },
+ { 0x8700, 0x12ff, 0x2000 },
+ { 0x0700, 0x12fe, 0x0000 },
+ { 0x0700, 0x1300, 0x0000 },
+ { 0x8700, 0x1303, 0x2000 },
+ { 0x0700, 0x1302, 0x0000 },
+ { 0x0700, 0x1304, 0x0000 },
+ { 0x8700, 0x1309, 0x3000 },
+ { 0x8700, 0x1307, 0x2000 },
+ { 0x0700, 0x1306, 0x0000 },
+ { 0x0700, 0x1308, 0x0000 },
+ { 0x8700, 0x130b, 0x2000 },
+ { 0x0700, 0x130a, 0x0000 },
+ { 0x0700, 0x130c, 0x0000 },
+ { 0x8700, 0x1319, 0x4000 },
+ { 0x8700, 0x1313, 0x3000 },
+ { 0x8700, 0x1310, 0x2000 },
+ { 0x0700, 0x130e, 0x0000 },
+ { 0x0700, 0x1312, 0x0000 },
+ { 0x8700, 0x1315, 0x2000 },
+ { 0x0700, 0x1314, 0x0000 },
+ { 0x0700, 0x1318, 0x0000 },
+ { 0x8700, 0x131d, 0x3000 },
+ { 0x8700, 0x131b, 0x2000 },
+ { 0x0700, 0x131a, 0x0000 },
+ { 0x0700, 0x131c, 0x0000 },
+ { 0x8700, 0x1320, 0x2000 },
+ { 0x0700, 0x131e, 0x0000 },
+ { 0x0700, 0x1321, 0x0000 },
+ { 0x8700, 0x1458, 0x9000 },
+ { 0x8700, 0x13cc, 0x8000 },
+ { 0x8d00, 0x1369, 0x7000 },
+ { 0x8700, 0x1342, 0x6000 },
+ { 0x8700, 0x1332, 0x5000 },
+ { 0x8700, 0x132a, 0x4000 },
+ { 0x8700, 0x1326, 0x3000 },
+ { 0x8700, 0x1324, 0x2000 },
+ { 0x0700, 0x1323, 0x0000 },
+ { 0x0700, 0x1325, 0x0000 },
+ { 0x8700, 0x1328, 0x2000 },
+ { 0x0700, 0x1327, 0x0000 },
+ { 0x0700, 0x1329, 0x0000 },
+ { 0x8700, 0x132e, 0x3000 },
+ { 0x8700, 0x132c, 0x2000 },
+ { 0x0700, 0x132b, 0x0000 },
+ { 0x0700, 0x132d, 0x0000 },
+ { 0x8700, 0x1330, 0x2000 },
+ { 0x0700, 0x132f, 0x0000 },
+ { 0x0700, 0x1331, 0x0000 },
+ { 0x8700, 0x133a, 0x4000 },
+ { 0x8700, 0x1336, 0x3000 },
+ { 0x8700, 0x1334, 0x2000 },
+ { 0x0700, 0x1333, 0x0000 },
+ { 0x0700, 0x1335, 0x0000 },
+ { 0x8700, 0x1338, 0x2000 },
+ { 0x0700, 0x1337, 0x0000 },
+ { 0x0700, 0x1339, 0x0000 },
+ { 0x8700, 0x133e, 0x3000 },
+ { 0x8700, 0x133c, 0x2000 },
+ { 0x0700, 0x133b, 0x0000 },
+ { 0x0700, 0x133d, 0x0000 },
+ { 0x8700, 0x1340, 0x2000 },
+ { 0x0700, 0x133f, 0x0000 },
+ { 0x0700, 0x1341, 0x0000 },
+ { 0x8700, 0x1353, 0x5000 },
+ { 0x8700, 0x134b, 0x4000 },
+ { 0x8700, 0x1346, 0x3000 },
+ { 0x8700, 0x1344, 0x2000 },
+ { 0x0700, 0x1343, 0x0000 },
+ { 0x0700, 0x1345, 0x0000 },
+ { 0x8700, 0x1349, 0x2000 },
+ { 0x0700, 0x1348, 0x0000 },
+ { 0x0700, 0x134a, 0x0000 },
+ { 0x8700, 0x134f, 0x3000 },
+ { 0x8700, 0x134d, 0x2000 },
+ { 0x0700, 0x134c, 0x0000 },
+ { 0x0700, 0x134e, 0x0000 },
+ { 0x8700, 0x1351, 0x2000 },
+ { 0x0700, 0x1350, 0x0000 },
+ { 0x0700, 0x1352, 0x0000 },
+ { 0x9500, 0x1361, 0x4000 },
+ { 0x8700, 0x1357, 0x3000 },
+ { 0x8700, 0x1355, 0x2000 },
+ { 0x0700, 0x1354, 0x0000 },
+ { 0x0700, 0x1356, 0x0000 },
+ { 0x8700, 0x1359, 0x2000 },
+ { 0x0700, 0x1358, 0x0000 },
+ { 0x0700, 0x135a, 0x0000 },
+ { 0x9500, 0x1365, 0x3000 },
+ { 0x9500, 0x1363, 0x2000 },
+ { 0x1500, 0x1362, 0x0000 },
+ { 0x1500, 0x1364, 0x0000 },
+ { 0x9500, 0x1367, 0x2000 },
+ { 0x1500, 0x1366, 0x0000 },
+ { 0x1500, 0x1368, 0x0000 },
+ { 0x8700, 0x13ac, 0x6000 },
+ { 0x8f00, 0x1379, 0x5000 },
+ { 0x8d00, 0x1371, 0x4000 },
+ { 0x8d00, 0x136d, 0x3000 },
+ { 0x8d00, 0x136b, 0x2000 },
+ { 0x0d00, 0x136a, 0x0000 },
+ { 0x0d00, 0x136c, 0x0000 },
+ { 0x8d00, 0x136f, 0x2000 },
+ { 0x0d00, 0x136e, 0x0000 },
+ { 0x0d00, 0x1370, 0x0000 },
+ { 0x8f00, 0x1375, 0x3000 },
+ { 0x8f00, 0x1373, 0x2000 },
+ { 0x0f00, 0x1372, 0x0000 },
+ { 0x0f00, 0x1374, 0x0000 },
+ { 0x8f00, 0x1377, 0x2000 },
+ { 0x0f00, 0x1376, 0x0000 },
+ { 0x0f00, 0x1378, 0x0000 },
+ { 0x8700, 0x13a4, 0x4000 },
+ { 0x8700, 0x13a0, 0x3000 },
+ { 0x8f00, 0x137b, 0x2000 },
+ { 0x0f00, 0x137a, 0x0000 },
+ { 0x0f00, 0x137c, 0x0000 },
+ { 0x8700, 0x13a2, 0x2000 },
+ { 0x0700, 0x13a1, 0x0000 },
+ { 0x0700, 0x13a3, 0x0000 },
+ { 0x8700, 0x13a8, 0x3000 },
+ { 0x8700, 0x13a6, 0x2000 },
+ { 0x0700, 0x13a5, 0x0000 },
+ { 0x0700, 0x13a7, 0x0000 },
+ { 0x8700, 0x13aa, 0x2000 },
+ { 0x0700, 0x13a9, 0x0000 },
+ { 0x0700, 0x13ab, 0x0000 },
+ { 0x8700, 0x13bc, 0x5000 },
+ { 0x8700, 0x13b4, 0x4000 },
+ { 0x8700, 0x13b0, 0x3000 },
+ { 0x8700, 0x13ae, 0x2000 },
+ { 0x0700, 0x13ad, 0x0000 },
+ { 0x0700, 0x13af, 0x0000 },
+ { 0x8700, 0x13b2, 0x2000 },
+ { 0x0700, 0x13b1, 0x0000 },
+ { 0x0700, 0x13b3, 0x0000 },
+ { 0x8700, 0x13b8, 0x3000 },
+ { 0x8700, 0x13b6, 0x2000 },
+ { 0x0700, 0x13b5, 0x0000 },
+ { 0x0700, 0x13b7, 0x0000 },
+ { 0x8700, 0x13ba, 0x2000 },
+ { 0x0700, 0x13b9, 0x0000 },
+ { 0x0700, 0x13bb, 0x0000 },
+ { 0x8700, 0x13c4, 0x4000 },
+ { 0x8700, 0x13c0, 0x3000 },
+ { 0x8700, 0x13be, 0x2000 },
+ { 0x0700, 0x13bd, 0x0000 },
+ { 0x0700, 0x13bf, 0x0000 },
+ { 0x8700, 0x13c2, 0x2000 },
+ { 0x0700, 0x13c1, 0x0000 },
+ { 0x0700, 0x13c3, 0x0000 },
+ { 0x8700, 0x13c8, 0x3000 },
+ { 0x8700, 0x13c6, 0x2000 },
+ { 0x0700, 0x13c5, 0x0000 },
+ { 0x0700, 0x13c7, 0x0000 },
+ { 0x8700, 0x13ca, 0x2000 },
+ { 0x0700, 0x13c9, 0x0000 },
+ { 0x0700, 0x13cb, 0x0000 },
+ { 0x8700, 0x1418, 0x7000 },
+ { 0x8700, 0x13ec, 0x6000 },
+ { 0x8700, 0x13dc, 0x5000 },
+ { 0x8700, 0x13d4, 0x4000 },
+ { 0x8700, 0x13d0, 0x3000 },
+ { 0x8700, 0x13ce, 0x2000 },
+ { 0x0700, 0x13cd, 0x0000 },
+ { 0x0700, 0x13cf, 0x0000 },
+ { 0x8700, 0x13d2, 0x2000 },
+ { 0x0700, 0x13d1, 0x0000 },
+ { 0x0700, 0x13d3, 0x0000 },
+ { 0x8700, 0x13d8, 0x3000 },
+ { 0x8700, 0x13d6, 0x2000 },
+ { 0x0700, 0x13d5, 0x0000 },
+ { 0x0700, 0x13d7, 0x0000 },
+ { 0x8700, 0x13da, 0x2000 },
+ { 0x0700, 0x13d9, 0x0000 },
+ { 0x0700, 0x13db, 0x0000 },
+ { 0x8700, 0x13e4, 0x4000 },
+ { 0x8700, 0x13e0, 0x3000 },
+ { 0x8700, 0x13de, 0x2000 },
+ { 0x0700, 0x13dd, 0x0000 },
+ { 0x0700, 0x13df, 0x0000 },
+ { 0x8700, 0x13e2, 0x2000 },
+ { 0x0700, 0x13e1, 0x0000 },
+ { 0x0700, 0x13e3, 0x0000 },
+ { 0x8700, 0x13e8, 0x3000 },
+ { 0x8700, 0x13e6, 0x2000 },
+ { 0x0700, 0x13e5, 0x0000 },
+ { 0x0700, 0x13e7, 0x0000 },
+ { 0x8700, 0x13ea, 0x2000 },
+ { 0x0700, 0x13e9, 0x0000 },
+ { 0x0700, 0x13eb, 0x0000 },
+ { 0x8700, 0x1408, 0x5000 },
+ { 0x8700, 0x13f4, 0x4000 },
+ { 0x8700, 0x13f0, 0x3000 },
+ { 0x8700, 0x13ee, 0x2000 },
+ { 0x0700, 0x13ed, 0x0000 },
+ { 0x0700, 0x13ef, 0x0000 },
+ { 0x8700, 0x13f2, 0x2000 },
+ { 0x0700, 0x13f1, 0x0000 },
+ { 0x0700, 0x13f3, 0x0000 },
+ { 0x8700, 0x1404, 0x3000 },
+ { 0x8700, 0x1402, 0x2000 },
+ { 0x0700, 0x1401, 0x0000 },
+ { 0x0700, 0x1403, 0x0000 },
+ { 0x8700, 0x1406, 0x2000 },
+ { 0x0700, 0x1405, 0x0000 },
+ { 0x0700, 0x1407, 0x0000 },
+ { 0x8700, 0x1410, 0x4000 },
+ { 0x8700, 0x140c, 0x3000 },
+ { 0x8700, 0x140a, 0x2000 },
+ { 0x0700, 0x1409, 0x0000 },
+ { 0x0700, 0x140b, 0x0000 },
+ { 0x8700, 0x140e, 0x2000 },
+ { 0x0700, 0x140d, 0x0000 },
+ { 0x0700, 0x140f, 0x0000 },
+ { 0x8700, 0x1414, 0x3000 },
+ { 0x8700, 0x1412, 0x2000 },
+ { 0x0700, 0x1411, 0x0000 },
+ { 0x0700, 0x1413, 0x0000 },
+ { 0x8700, 0x1416, 0x2000 },
+ { 0x0700, 0x1415, 0x0000 },
+ { 0x0700, 0x1417, 0x0000 },
+ { 0x8700, 0x1438, 0x6000 },
+ { 0x8700, 0x1428, 0x5000 },
+ { 0x8700, 0x1420, 0x4000 },
+ { 0x8700, 0x141c, 0x3000 },
+ { 0x8700, 0x141a, 0x2000 },
+ { 0x0700, 0x1419, 0x0000 },
+ { 0x0700, 0x141b, 0x0000 },
+ { 0x8700, 0x141e, 0x2000 },
+ { 0x0700, 0x141d, 0x0000 },
+ { 0x0700, 0x141f, 0x0000 },
+ { 0x8700, 0x1424, 0x3000 },
+ { 0x8700, 0x1422, 0x2000 },
+ { 0x0700, 0x1421, 0x0000 },
+ { 0x0700, 0x1423, 0x0000 },
+ { 0x8700, 0x1426, 0x2000 },
+ { 0x0700, 0x1425, 0x0000 },
+ { 0x0700, 0x1427, 0x0000 },
+ { 0x8700, 0x1430, 0x4000 },
+ { 0x8700, 0x142c, 0x3000 },
+ { 0x8700, 0x142a, 0x2000 },
+ { 0x0700, 0x1429, 0x0000 },
+ { 0x0700, 0x142b, 0x0000 },
+ { 0x8700, 0x142e, 0x2000 },
+ { 0x0700, 0x142d, 0x0000 },
+ { 0x0700, 0x142f, 0x0000 },
+ { 0x8700, 0x1434, 0x3000 },
+ { 0x8700, 0x1432, 0x2000 },
+ { 0x0700, 0x1431, 0x0000 },
+ { 0x0700, 0x1433, 0x0000 },
+ { 0x8700, 0x1436, 0x2000 },
+ { 0x0700, 0x1435, 0x0000 },
+ { 0x0700, 0x1437, 0x0000 },
+ { 0x8700, 0x1448, 0x5000 },
+ { 0x8700, 0x1440, 0x4000 },
+ { 0x8700, 0x143c, 0x3000 },
+ { 0x8700, 0x143a, 0x2000 },
+ { 0x0700, 0x1439, 0x0000 },
+ { 0x0700, 0x143b, 0x0000 },
+ { 0x8700, 0x143e, 0x2000 },
+ { 0x0700, 0x143d, 0x0000 },
+ { 0x0700, 0x143f, 0x0000 },
+ { 0x8700, 0x1444, 0x3000 },
+ { 0x8700, 0x1442, 0x2000 },
+ { 0x0700, 0x1441, 0x0000 },
+ { 0x0700, 0x1443, 0x0000 },
+ { 0x8700, 0x1446, 0x2000 },
+ { 0x0700, 0x1445, 0x0000 },
+ { 0x0700, 0x1447, 0x0000 },
+ { 0x8700, 0x1450, 0x4000 },
+ { 0x8700, 0x144c, 0x3000 },
+ { 0x8700, 0x144a, 0x2000 },
+ { 0x0700, 0x1449, 0x0000 },
+ { 0x0700, 0x144b, 0x0000 },
+ { 0x8700, 0x144e, 0x2000 },
+ { 0x0700, 0x144d, 0x0000 },
+ { 0x0700, 0x144f, 0x0000 },
+ { 0x8700, 0x1454, 0x3000 },
+ { 0x8700, 0x1452, 0x2000 },
+ { 0x0700, 0x1451, 0x0000 },
+ { 0x0700, 0x1453, 0x0000 },
+ { 0x8700, 0x1456, 0x2000 },
+ { 0x0700, 0x1455, 0x0000 },
+ { 0x0700, 0x1457, 0x0000 },
+ { 0x8700, 0x14d8, 0x8000 },
+ { 0x8700, 0x1498, 0x7000 },
+ { 0x8700, 0x1478, 0x6000 },
+ { 0x8700, 0x1468, 0x5000 },
+ { 0x8700, 0x1460, 0x4000 },
+ { 0x8700, 0x145c, 0x3000 },
+ { 0x8700, 0x145a, 0x2000 },
+ { 0x0700, 0x1459, 0x0000 },
+ { 0x0700, 0x145b, 0x0000 },
+ { 0x8700, 0x145e, 0x2000 },
+ { 0x0700, 0x145d, 0x0000 },
+ { 0x0700, 0x145f, 0x0000 },
+ { 0x8700, 0x1464, 0x3000 },
+ { 0x8700, 0x1462, 0x2000 },
+ { 0x0700, 0x1461, 0x0000 },
+ { 0x0700, 0x1463, 0x0000 },
+ { 0x8700, 0x1466, 0x2000 },
+ { 0x0700, 0x1465, 0x0000 },
+ { 0x0700, 0x1467, 0x0000 },
+ { 0x8700, 0x1470, 0x4000 },
+ { 0x8700, 0x146c, 0x3000 },
+ { 0x8700, 0x146a, 0x2000 },
+ { 0x0700, 0x1469, 0x0000 },
+ { 0x0700, 0x146b, 0x0000 },
+ { 0x8700, 0x146e, 0x2000 },
+ { 0x0700, 0x146d, 0x0000 },
+ { 0x0700, 0x146f, 0x0000 },
+ { 0x8700, 0x1474, 0x3000 },
+ { 0x8700, 0x1472, 0x2000 },
+ { 0x0700, 0x1471, 0x0000 },
+ { 0x0700, 0x1473, 0x0000 },
+ { 0x8700, 0x1476, 0x2000 },
+ { 0x0700, 0x1475, 0x0000 },
+ { 0x0700, 0x1477, 0x0000 },
+ { 0x8700, 0x1488, 0x5000 },
+ { 0x8700, 0x1480, 0x4000 },
+ { 0x8700, 0x147c, 0x3000 },
+ { 0x8700, 0x147a, 0x2000 },
+ { 0x0700, 0x1479, 0x0000 },
+ { 0x0700, 0x147b, 0x0000 },
+ { 0x8700, 0x147e, 0x2000 },
+ { 0x0700, 0x147d, 0x0000 },
+ { 0x0700, 0x147f, 0x0000 },
+ { 0x8700, 0x1484, 0x3000 },
+ { 0x8700, 0x1482, 0x2000 },
+ { 0x0700, 0x1481, 0x0000 },
+ { 0x0700, 0x1483, 0x0000 },
+ { 0x8700, 0x1486, 0x2000 },
+ { 0x0700, 0x1485, 0x0000 },
+ { 0x0700, 0x1487, 0x0000 },
+ { 0x8700, 0x1490, 0x4000 },
+ { 0x8700, 0x148c, 0x3000 },
+ { 0x8700, 0x148a, 0x2000 },
+ { 0x0700, 0x1489, 0x0000 },
+ { 0x0700, 0x148b, 0x0000 },
+ { 0x8700, 0x148e, 0x2000 },
+ { 0x0700, 0x148d, 0x0000 },
+ { 0x0700, 0x148f, 0x0000 },
+ { 0x8700, 0x1494, 0x3000 },
+ { 0x8700, 0x1492, 0x2000 },
+ { 0x0700, 0x1491, 0x0000 },
+ { 0x0700, 0x1493, 0x0000 },
+ { 0x8700, 0x1496, 0x2000 },
+ { 0x0700, 0x1495, 0x0000 },
+ { 0x0700, 0x1497, 0x0000 },
+ { 0x8700, 0x14b8, 0x6000 },
+ { 0x8700, 0x14a8, 0x5000 },
+ { 0x8700, 0x14a0, 0x4000 },
+ { 0x8700, 0x149c, 0x3000 },
+ { 0x8700, 0x149a, 0x2000 },
+ { 0x0700, 0x1499, 0x0000 },
+ { 0x0700, 0x149b, 0x0000 },
+ { 0x8700, 0x149e, 0x2000 },
+ { 0x0700, 0x149d, 0x0000 },
+ { 0x0700, 0x149f, 0x0000 },
+ { 0x8700, 0x14a4, 0x3000 },
+ { 0x8700, 0x14a2, 0x2000 },
+ { 0x0700, 0x14a1, 0x0000 },
+ { 0x0700, 0x14a3, 0x0000 },
+ { 0x8700, 0x14a6, 0x2000 },
+ { 0x0700, 0x14a5, 0x0000 },
+ { 0x0700, 0x14a7, 0x0000 },
+ { 0x8700, 0x14b0, 0x4000 },
+ { 0x8700, 0x14ac, 0x3000 },
+ { 0x8700, 0x14aa, 0x2000 },
+ { 0x0700, 0x14a9, 0x0000 },
+ { 0x0700, 0x14ab, 0x0000 },
+ { 0x8700, 0x14ae, 0x2000 },
+ { 0x0700, 0x14ad, 0x0000 },
+ { 0x0700, 0x14af, 0x0000 },
+ { 0x8700, 0x14b4, 0x3000 },
+ { 0x8700, 0x14b2, 0x2000 },
+ { 0x0700, 0x14b1, 0x0000 },
+ { 0x0700, 0x14b3, 0x0000 },
+ { 0x8700, 0x14b6, 0x2000 },
+ { 0x0700, 0x14b5, 0x0000 },
+ { 0x0700, 0x14b7, 0x0000 },
+ { 0x8700, 0x14c8, 0x5000 },
+ { 0x8700, 0x14c0, 0x4000 },
+ { 0x8700, 0x14bc, 0x3000 },
+ { 0x8700, 0x14ba, 0x2000 },
+ { 0x0700, 0x14b9, 0x0000 },
+ { 0x0700, 0x14bb, 0x0000 },
+ { 0x8700, 0x14be, 0x2000 },
+ { 0x0700, 0x14bd, 0x0000 },
+ { 0x0700, 0x14bf, 0x0000 },
+ { 0x8700, 0x14c4, 0x3000 },
+ { 0x8700, 0x14c2, 0x2000 },
+ { 0x0700, 0x14c1, 0x0000 },
+ { 0x0700, 0x14c3, 0x0000 },
+ { 0x8700, 0x14c6, 0x2000 },
+ { 0x0700, 0x14c5, 0x0000 },
+ { 0x0700, 0x14c7, 0x0000 },
+ { 0x8700, 0x14d0, 0x4000 },
+ { 0x8700, 0x14cc, 0x3000 },
+ { 0x8700, 0x14ca, 0x2000 },
+ { 0x0700, 0x14c9, 0x0000 },
+ { 0x0700, 0x14cb, 0x0000 },
+ { 0x8700, 0x14ce, 0x2000 },
+ { 0x0700, 0x14cd, 0x0000 },
+ { 0x0700, 0x14cf, 0x0000 },
+ { 0x8700, 0x14d4, 0x3000 },
+ { 0x8700, 0x14d2, 0x2000 },
+ { 0x0700, 0x14d1, 0x0000 },
+ { 0x0700, 0x14d3, 0x0000 },
+ { 0x8700, 0x14d6, 0x2000 },
+ { 0x0700, 0x14d5, 0x0000 },
+ { 0x0700, 0x14d7, 0x0000 },
+ { 0x8700, 0x1518, 0x7000 },
+ { 0x8700, 0x14f8, 0x6000 },
+ { 0x8700, 0x14e8, 0x5000 },
+ { 0x8700, 0x14e0, 0x4000 },
+ { 0x8700, 0x14dc, 0x3000 },
+ { 0x8700, 0x14da, 0x2000 },
+ { 0x0700, 0x14d9, 0x0000 },
+ { 0x0700, 0x14db, 0x0000 },
+ { 0x8700, 0x14de, 0x2000 },
+ { 0x0700, 0x14dd, 0x0000 },
+ { 0x0700, 0x14df, 0x0000 },
+ { 0x8700, 0x14e4, 0x3000 },
+ { 0x8700, 0x14e2, 0x2000 },
+ { 0x0700, 0x14e1, 0x0000 },
+ { 0x0700, 0x14e3, 0x0000 },
+ { 0x8700, 0x14e6, 0x2000 },
+ { 0x0700, 0x14e5, 0x0000 },
+ { 0x0700, 0x14e7, 0x0000 },
+ { 0x8700, 0x14f0, 0x4000 },
+ { 0x8700, 0x14ec, 0x3000 },
+ { 0x8700, 0x14ea, 0x2000 },
+ { 0x0700, 0x14e9, 0x0000 },
+ { 0x0700, 0x14eb, 0x0000 },
+ { 0x8700, 0x14ee, 0x2000 },
+ { 0x0700, 0x14ed, 0x0000 },
+ { 0x0700, 0x14ef, 0x0000 },
+ { 0x8700, 0x14f4, 0x3000 },
+ { 0x8700, 0x14f2, 0x2000 },
+ { 0x0700, 0x14f1, 0x0000 },
+ { 0x0700, 0x14f3, 0x0000 },
+ { 0x8700, 0x14f6, 0x2000 },
+ { 0x0700, 0x14f5, 0x0000 },
+ { 0x0700, 0x14f7, 0x0000 },
+ { 0x8700, 0x1508, 0x5000 },
+ { 0x8700, 0x1500, 0x4000 },
+ { 0x8700, 0x14fc, 0x3000 },
+ { 0x8700, 0x14fa, 0x2000 },
+ { 0x0700, 0x14f9, 0x0000 },
+ { 0x0700, 0x14fb, 0x0000 },
+ { 0x8700, 0x14fe, 0x2000 },
+ { 0x0700, 0x14fd, 0x0000 },
+ { 0x0700, 0x14ff, 0x0000 },
+ { 0x8700, 0x1504, 0x3000 },
+ { 0x8700, 0x1502, 0x2000 },
+ { 0x0700, 0x1501, 0x0000 },
+ { 0x0700, 0x1503, 0x0000 },
+ { 0x8700, 0x1506, 0x2000 },
+ { 0x0700, 0x1505, 0x0000 },
+ { 0x0700, 0x1507, 0x0000 },
+ { 0x8700, 0x1510, 0x4000 },
+ { 0x8700, 0x150c, 0x3000 },
+ { 0x8700, 0x150a, 0x2000 },
+ { 0x0700, 0x1509, 0x0000 },
+ { 0x0700, 0x150b, 0x0000 },
+ { 0x8700, 0x150e, 0x2000 },
+ { 0x0700, 0x150d, 0x0000 },
+ { 0x0700, 0x150f, 0x0000 },
+ { 0x8700, 0x1514, 0x3000 },
+ { 0x8700, 0x1512, 0x2000 },
+ { 0x0700, 0x1511, 0x0000 },
+ { 0x0700, 0x1513, 0x0000 },
+ { 0x8700, 0x1516, 0x2000 },
+ { 0x0700, 0x1515, 0x0000 },
+ { 0x0700, 0x1517, 0x0000 },
+ { 0x8700, 0x1538, 0x6000 },
+ { 0x8700, 0x1528, 0x5000 },
+ { 0x8700, 0x1520, 0x4000 },
+ { 0x8700, 0x151c, 0x3000 },
+ { 0x8700, 0x151a, 0x2000 },
+ { 0x0700, 0x1519, 0x0000 },
+ { 0x0700, 0x151b, 0x0000 },
+ { 0x8700, 0x151e, 0x2000 },
+ { 0x0700, 0x151d, 0x0000 },
+ { 0x0700, 0x151f, 0x0000 },
+ { 0x8700, 0x1524, 0x3000 },
+ { 0x8700, 0x1522, 0x2000 },
+ { 0x0700, 0x1521, 0x0000 },
+ { 0x0700, 0x1523, 0x0000 },
+ { 0x8700, 0x1526, 0x2000 },
+ { 0x0700, 0x1525, 0x0000 },
+ { 0x0700, 0x1527, 0x0000 },
+ { 0x8700, 0x1530, 0x4000 },
+ { 0x8700, 0x152c, 0x3000 },
+ { 0x8700, 0x152a, 0x2000 },
+ { 0x0700, 0x1529, 0x0000 },
+ { 0x0700, 0x152b, 0x0000 },
+ { 0x8700, 0x152e, 0x2000 },
+ { 0x0700, 0x152d, 0x0000 },
+ { 0x0700, 0x152f, 0x0000 },
+ { 0x8700, 0x1534, 0x3000 },
+ { 0x8700, 0x1532, 0x2000 },
+ { 0x0700, 0x1531, 0x0000 },
+ { 0x0700, 0x1533, 0x0000 },
+ { 0x8700, 0x1536, 0x2000 },
+ { 0x0700, 0x1535, 0x0000 },
+ { 0x0700, 0x1537, 0x0000 },
+ { 0x8700, 0x1548, 0x5000 },
+ { 0x8700, 0x1540, 0x4000 },
+ { 0x8700, 0x153c, 0x3000 },
+ { 0x8700, 0x153a, 0x2000 },
+ { 0x0700, 0x1539, 0x0000 },
+ { 0x0700, 0x153b, 0x0000 },
+ { 0x8700, 0x153e, 0x2000 },
+ { 0x0700, 0x153d, 0x0000 },
+ { 0x0700, 0x153f, 0x0000 },
+ { 0x8700, 0x1544, 0x3000 },
+ { 0x8700, 0x1542, 0x2000 },
+ { 0x0700, 0x1541, 0x0000 },
+ { 0x0700, 0x1543, 0x0000 },
+ { 0x8700, 0x1546, 0x2000 },
+ { 0x0700, 0x1545, 0x0000 },
+ { 0x0700, 0x1547, 0x0000 },
+ { 0x8700, 0x1550, 0x4000 },
+ { 0x8700, 0x154c, 0x3000 },
+ { 0x8700, 0x154a, 0x2000 },
+ { 0x0700, 0x1549, 0x0000 },
+ { 0x0700, 0x154b, 0x0000 },
+ { 0x8700, 0x154e, 0x2000 },
+ { 0x0700, 0x154d, 0x0000 },
+ { 0x0700, 0x154f, 0x0000 },
+ { 0x8700, 0x1554, 0x3000 },
+ { 0x8700, 0x1552, 0x2000 },
+ { 0x0700, 0x1551, 0x0000 },
+ { 0x0700, 0x1553, 0x0000 },
+ { 0x8700, 0x1556, 0x2000 },
+ { 0x0700, 0x1555, 0x0000 },
+ { 0x0700, 0x1557, 0x0000 },
+ { 0x9900, 0x22ae, 0xc000 },
+ { 0x8900, 0x1e24, 0xb001 },
+ { 0x8700, 0x17a2, 0xa000 },
+ { 0x8700, 0x1658, 0x9000 },
+ { 0x8700, 0x15d8, 0x8000 },
+ { 0x8700, 0x1598, 0x7000 },
+ { 0x8700, 0x1578, 0x6000 },
+ { 0x8700, 0x1568, 0x5000 },
+ { 0x8700, 0x1560, 0x4000 },
+ { 0x8700, 0x155c, 0x3000 },
+ { 0x8700, 0x155a, 0x2000 },
+ { 0x0700, 0x1559, 0x0000 },
+ { 0x0700, 0x155b, 0x0000 },
+ { 0x8700, 0x155e, 0x2000 },
+ { 0x0700, 0x155d, 0x0000 },
+ { 0x0700, 0x155f, 0x0000 },
+ { 0x8700, 0x1564, 0x3000 },
+ { 0x8700, 0x1562, 0x2000 },
+ { 0x0700, 0x1561, 0x0000 },
+ { 0x0700, 0x1563, 0x0000 },
+ { 0x8700, 0x1566, 0x2000 },
+ { 0x0700, 0x1565, 0x0000 },
+ { 0x0700, 0x1567, 0x0000 },
+ { 0x8700, 0x1570, 0x4000 },
+ { 0x8700, 0x156c, 0x3000 },
+ { 0x8700, 0x156a, 0x2000 },
+ { 0x0700, 0x1569, 0x0000 },
+ { 0x0700, 0x156b, 0x0000 },
+ { 0x8700, 0x156e, 0x2000 },
+ { 0x0700, 0x156d, 0x0000 },
+ { 0x0700, 0x156f, 0x0000 },
+ { 0x8700, 0x1574, 0x3000 },
+ { 0x8700, 0x1572, 0x2000 },
+ { 0x0700, 0x1571, 0x0000 },
+ { 0x0700, 0x1573, 0x0000 },
+ { 0x8700, 0x1576, 0x2000 },
+ { 0x0700, 0x1575, 0x0000 },
+ { 0x0700, 0x1577, 0x0000 },
+ { 0x8700, 0x1588, 0x5000 },
+ { 0x8700, 0x1580, 0x4000 },
+ { 0x8700, 0x157c, 0x3000 },
+ { 0x8700, 0x157a, 0x2000 },
+ { 0x0700, 0x1579, 0x0000 },
+ { 0x0700, 0x157b, 0x0000 },
+ { 0x8700, 0x157e, 0x2000 },
+ { 0x0700, 0x157d, 0x0000 },
+ { 0x0700, 0x157f, 0x0000 },
+ { 0x8700, 0x1584, 0x3000 },
+ { 0x8700, 0x1582, 0x2000 },
+ { 0x0700, 0x1581, 0x0000 },
+ { 0x0700, 0x1583, 0x0000 },
+ { 0x8700, 0x1586, 0x2000 },
+ { 0x0700, 0x1585, 0x0000 },
+ { 0x0700, 0x1587, 0x0000 },
+ { 0x8700, 0x1590, 0x4000 },
+ { 0x8700, 0x158c, 0x3000 },
+ { 0x8700, 0x158a, 0x2000 },
+ { 0x0700, 0x1589, 0x0000 },
+ { 0x0700, 0x158b, 0x0000 },
+ { 0x8700, 0x158e, 0x2000 },
+ { 0x0700, 0x158d, 0x0000 },
+ { 0x0700, 0x158f, 0x0000 },
+ { 0x8700, 0x1594, 0x3000 },
+ { 0x8700, 0x1592, 0x2000 },
+ { 0x0700, 0x1591, 0x0000 },
+ { 0x0700, 0x1593, 0x0000 },
+ { 0x8700, 0x1596, 0x2000 },
+ { 0x0700, 0x1595, 0x0000 },
+ { 0x0700, 0x1597, 0x0000 },
+ { 0x8700, 0x15b8, 0x6000 },
+ { 0x8700, 0x15a8, 0x5000 },
+ { 0x8700, 0x15a0, 0x4000 },
+ { 0x8700, 0x159c, 0x3000 },
+ { 0x8700, 0x159a, 0x2000 },
+ { 0x0700, 0x1599, 0x0000 },
+ { 0x0700, 0x159b, 0x0000 },
+ { 0x8700, 0x159e, 0x2000 },
+ { 0x0700, 0x159d, 0x0000 },
+ { 0x0700, 0x159f, 0x0000 },
+ { 0x8700, 0x15a4, 0x3000 },
+ { 0x8700, 0x15a2, 0x2000 },
+ { 0x0700, 0x15a1, 0x0000 },
+ { 0x0700, 0x15a3, 0x0000 },
+ { 0x8700, 0x15a6, 0x2000 },
+ { 0x0700, 0x15a5, 0x0000 },
+ { 0x0700, 0x15a7, 0x0000 },
+ { 0x8700, 0x15b0, 0x4000 },
+ { 0x8700, 0x15ac, 0x3000 },
+ { 0x8700, 0x15aa, 0x2000 },
+ { 0x0700, 0x15a9, 0x0000 },
+ { 0x0700, 0x15ab, 0x0000 },
+ { 0x8700, 0x15ae, 0x2000 },
+ { 0x0700, 0x15ad, 0x0000 },
+ { 0x0700, 0x15af, 0x0000 },
+ { 0x8700, 0x15b4, 0x3000 },
+ { 0x8700, 0x15b2, 0x2000 },
+ { 0x0700, 0x15b1, 0x0000 },
+ { 0x0700, 0x15b3, 0x0000 },
+ { 0x8700, 0x15b6, 0x2000 },
+ { 0x0700, 0x15b5, 0x0000 },
+ { 0x0700, 0x15b7, 0x0000 },
+ { 0x8700, 0x15c8, 0x5000 },
+ { 0x8700, 0x15c0, 0x4000 },
+ { 0x8700, 0x15bc, 0x3000 },
+ { 0x8700, 0x15ba, 0x2000 },
+ { 0x0700, 0x15b9, 0x0000 },
+ { 0x0700, 0x15bb, 0x0000 },
+ { 0x8700, 0x15be, 0x2000 },
+ { 0x0700, 0x15bd, 0x0000 },
+ { 0x0700, 0x15bf, 0x0000 },
+ { 0x8700, 0x15c4, 0x3000 },
+ { 0x8700, 0x15c2, 0x2000 },
+ { 0x0700, 0x15c1, 0x0000 },
+ { 0x0700, 0x15c3, 0x0000 },
+ { 0x8700, 0x15c6, 0x2000 },
+ { 0x0700, 0x15c5, 0x0000 },
+ { 0x0700, 0x15c7, 0x0000 },
+ { 0x8700, 0x15d0, 0x4000 },
+ { 0x8700, 0x15cc, 0x3000 },
+ { 0x8700, 0x15ca, 0x2000 },
+ { 0x0700, 0x15c9, 0x0000 },
+ { 0x0700, 0x15cb, 0x0000 },
+ { 0x8700, 0x15ce, 0x2000 },
+ { 0x0700, 0x15cd, 0x0000 },
+ { 0x0700, 0x15cf, 0x0000 },
+ { 0x8700, 0x15d4, 0x3000 },
+ { 0x8700, 0x15d2, 0x2000 },
+ { 0x0700, 0x15d1, 0x0000 },
+ { 0x0700, 0x15d3, 0x0000 },
+ { 0x8700, 0x15d6, 0x2000 },
+ { 0x0700, 0x15d5, 0x0000 },
+ { 0x0700, 0x15d7, 0x0000 },
+ { 0x8700, 0x1618, 0x7000 },
+ { 0x8700, 0x15f8, 0x6000 },
+ { 0x8700, 0x15e8, 0x5000 },
+ { 0x8700, 0x15e0, 0x4000 },
+ { 0x8700, 0x15dc, 0x3000 },
+ { 0x8700, 0x15da, 0x2000 },
+ { 0x0700, 0x15d9, 0x0000 },
+ { 0x0700, 0x15db, 0x0000 },
+ { 0x8700, 0x15de, 0x2000 },
+ { 0x0700, 0x15dd, 0x0000 },
+ { 0x0700, 0x15df, 0x0000 },
+ { 0x8700, 0x15e4, 0x3000 },
+ { 0x8700, 0x15e2, 0x2000 },
+ { 0x0700, 0x15e1, 0x0000 },
+ { 0x0700, 0x15e3, 0x0000 },
+ { 0x8700, 0x15e6, 0x2000 },
+ { 0x0700, 0x15e5, 0x0000 },
+ { 0x0700, 0x15e7, 0x0000 },
+ { 0x8700, 0x15f0, 0x4000 },
+ { 0x8700, 0x15ec, 0x3000 },
+ { 0x8700, 0x15ea, 0x2000 },
+ { 0x0700, 0x15e9, 0x0000 },
+ { 0x0700, 0x15eb, 0x0000 },
+ { 0x8700, 0x15ee, 0x2000 },
+ { 0x0700, 0x15ed, 0x0000 },
+ { 0x0700, 0x15ef, 0x0000 },
+ { 0x8700, 0x15f4, 0x3000 },
+ { 0x8700, 0x15f2, 0x2000 },
+ { 0x0700, 0x15f1, 0x0000 },
+ { 0x0700, 0x15f3, 0x0000 },
+ { 0x8700, 0x15f6, 0x2000 },
+ { 0x0700, 0x15f5, 0x0000 },
+ { 0x0700, 0x15f7, 0x0000 },
+ { 0x8700, 0x1608, 0x5000 },
+ { 0x8700, 0x1600, 0x4000 },
+ { 0x8700, 0x15fc, 0x3000 },
+ { 0x8700, 0x15fa, 0x2000 },
+ { 0x0700, 0x15f9, 0x0000 },
+ { 0x0700, 0x15fb, 0x0000 },
+ { 0x8700, 0x15fe, 0x2000 },
+ { 0x0700, 0x15fd, 0x0000 },
+ { 0x0700, 0x15ff, 0x0000 },
+ { 0x8700, 0x1604, 0x3000 },
+ { 0x8700, 0x1602, 0x2000 },
+ { 0x0700, 0x1601, 0x0000 },
+ { 0x0700, 0x1603, 0x0000 },
+ { 0x8700, 0x1606, 0x2000 },
+ { 0x0700, 0x1605, 0x0000 },
+ { 0x0700, 0x1607, 0x0000 },
+ { 0x8700, 0x1610, 0x4000 },
+ { 0x8700, 0x160c, 0x3000 },
+ { 0x8700, 0x160a, 0x2000 },
+ { 0x0700, 0x1609, 0x0000 },
+ { 0x0700, 0x160b, 0x0000 },
+ { 0x8700, 0x160e, 0x2000 },
+ { 0x0700, 0x160d, 0x0000 },
+ { 0x0700, 0x160f, 0x0000 },
+ { 0x8700, 0x1614, 0x3000 },
+ { 0x8700, 0x1612, 0x2000 },
+ { 0x0700, 0x1611, 0x0000 },
+ { 0x0700, 0x1613, 0x0000 },
+ { 0x8700, 0x1616, 0x2000 },
+ { 0x0700, 0x1615, 0x0000 },
+ { 0x0700, 0x1617, 0x0000 },
+ { 0x8700, 0x1638, 0x6000 },
+ { 0x8700, 0x1628, 0x5000 },
+ { 0x8700, 0x1620, 0x4000 },
+ { 0x8700, 0x161c, 0x3000 },
+ { 0x8700, 0x161a, 0x2000 },
+ { 0x0700, 0x1619, 0x0000 },
+ { 0x0700, 0x161b, 0x0000 },
+ { 0x8700, 0x161e, 0x2000 },
+ { 0x0700, 0x161d, 0x0000 },
+ { 0x0700, 0x161f, 0x0000 },
+ { 0x8700, 0x1624, 0x3000 },
+ { 0x8700, 0x1622, 0x2000 },
+ { 0x0700, 0x1621, 0x0000 },
+ { 0x0700, 0x1623, 0x0000 },
+ { 0x8700, 0x1626, 0x2000 },
+ { 0x0700, 0x1625, 0x0000 },
+ { 0x0700, 0x1627, 0x0000 },
+ { 0x8700, 0x1630, 0x4000 },
+ { 0x8700, 0x162c, 0x3000 },
+ { 0x8700, 0x162a, 0x2000 },
+ { 0x0700, 0x1629, 0x0000 },
+ { 0x0700, 0x162b, 0x0000 },
+ { 0x8700, 0x162e, 0x2000 },
+ { 0x0700, 0x162d, 0x0000 },
+ { 0x0700, 0x162f, 0x0000 },
+ { 0x8700, 0x1634, 0x3000 },
+ { 0x8700, 0x1632, 0x2000 },
+ { 0x0700, 0x1631, 0x0000 },
+ { 0x0700, 0x1633, 0x0000 },
+ { 0x8700, 0x1636, 0x2000 },
+ { 0x0700, 0x1635, 0x0000 },
+ { 0x0700, 0x1637, 0x0000 },
+ { 0x8700, 0x1648, 0x5000 },
+ { 0x8700, 0x1640, 0x4000 },
+ { 0x8700, 0x163c, 0x3000 },
+ { 0x8700, 0x163a, 0x2000 },
+ { 0x0700, 0x1639, 0x0000 },
+ { 0x0700, 0x163b, 0x0000 },
+ { 0x8700, 0x163e, 0x2000 },
+ { 0x0700, 0x163d, 0x0000 },
+ { 0x0700, 0x163f, 0x0000 },
+ { 0x8700, 0x1644, 0x3000 },
+ { 0x8700, 0x1642, 0x2000 },
+ { 0x0700, 0x1641, 0x0000 },
+ { 0x0700, 0x1643, 0x0000 },
+ { 0x8700, 0x1646, 0x2000 },
+ { 0x0700, 0x1645, 0x0000 },
+ { 0x0700, 0x1647, 0x0000 },
+ { 0x8700, 0x1650, 0x4000 },
+ { 0x8700, 0x164c, 0x3000 },
+ { 0x8700, 0x164a, 0x2000 },
+ { 0x0700, 0x1649, 0x0000 },
+ { 0x0700, 0x164b, 0x0000 },
+ { 0x8700, 0x164e, 0x2000 },
+ { 0x0700, 0x164d, 0x0000 },
+ { 0x0700, 0x164f, 0x0000 },
+ { 0x8700, 0x1654, 0x3000 },
+ { 0x8700, 0x1652, 0x2000 },
+ { 0x0700, 0x1651, 0x0000 },
+ { 0x0700, 0x1653, 0x0000 },
+ { 0x8700, 0x1656, 0x2000 },
+ { 0x0700, 0x1655, 0x0000 },
+ { 0x0700, 0x1657, 0x0000 },
+ { 0x8700, 0x16e4, 0x8000 },
+ { 0x8700, 0x16a4, 0x7000 },
+ { 0x8700, 0x1681, 0x6000 },
+ { 0x8700, 0x1668, 0x5000 },
+ { 0x8700, 0x1660, 0x4000 },
+ { 0x8700, 0x165c, 0x3000 },
+ { 0x8700, 0x165a, 0x2000 },
+ { 0x0700, 0x1659, 0x0000 },
+ { 0x0700, 0x165b, 0x0000 },
+ { 0x8700, 0x165e, 0x2000 },
+ { 0x0700, 0x165d, 0x0000 },
+ { 0x0700, 0x165f, 0x0000 },
+ { 0x8700, 0x1664, 0x3000 },
+ { 0x8700, 0x1662, 0x2000 },
+ { 0x0700, 0x1661, 0x0000 },
+ { 0x0700, 0x1663, 0x0000 },
+ { 0x8700, 0x1666, 0x2000 },
+ { 0x0700, 0x1665, 0x0000 },
+ { 0x0700, 0x1667, 0x0000 },
+ { 0x8700, 0x1670, 0x4000 },
+ { 0x8700, 0x166c, 0x3000 },
+ { 0x8700, 0x166a, 0x2000 },
+ { 0x0700, 0x1669, 0x0000 },
+ { 0x0700, 0x166b, 0x0000 },
+ { 0x9500, 0x166e, 0x2000 },
+ { 0x1500, 0x166d, 0x0000 },
+ { 0x0700, 0x166f, 0x0000 },
+ { 0x8700, 0x1674, 0x3000 },
+ { 0x8700, 0x1672, 0x2000 },
+ { 0x0700, 0x1671, 0x0000 },
+ { 0x0700, 0x1673, 0x0000 },
+ { 0x8700, 0x1676, 0x2000 },
+ { 0x0700, 0x1675, 0x0000 },
+ { 0x1d00, 0x1680, 0x0000 },
+ { 0x8700, 0x1691, 0x5000 },
+ { 0x8700, 0x1689, 0x4000 },
+ { 0x8700, 0x1685, 0x3000 },
+ { 0x8700, 0x1683, 0x2000 },
+ { 0x0700, 0x1682, 0x0000 },
+ { 0x0700, 0x1684, 0x0000 },
+ { 0x8700, 0x1687, 0x2000 },
+ { 0x0700, 0x1686, 0x0000 },
+ { 0x0700, 0x1688, 0x0000 },
+ { 0x8700, 0x168d, 0x3000 },
+ { 0x8700, 0x168b, 0x2000 },
+ { 0x0700, 0x168a, 0x0000 },
+ { 0x0700, 0x168c, 0x0000 },
+ { 0x8700, 0x168f, 0x2000 },
+ { 0x0700, 0x168e, 0x0000 },
+ { 0x0700, 0x1690, 0x0000 },
+ { 0x8700, 0x1699, 0x4000 },
+ { 0x8700, 0x1695, 0x3000 },
+ { 0x8700, 0x1693, 0x2000 },
+ { 0x0700, 0x1692, 0x0000 },
+ { 0x0700, 0x1694, 0x0000 },
+ { 0x8700, 0x1697, 0x2000 },
+ { 0x0700, 0x1696, 0x0000 },
+ { 0x0700, 0x1698, 0x0000 },
+ { 0x8700, 0x16a0, 0x3000 },
+ { 0x9600, 0x169b, 0x2000 },
+ { 0x0700, 0x169a, 0x0000 },
+ { 0x1200, 0x169c, 0x0000 },
+ { 0x8700, 0x16a2, 0x2000 },
+ { 0x0700, 0x16a1, 0x0000 },
+ { 0x0700, 0x16a3, 0x0000 },
+ { 0x8700, 0x16c4, 0x6000 },
+ { 0x8700, 0x16b4, 0x5000 },
+ { 0x8700, 0x16ac, 0x4000 },
+ { 0x8700, 0x16a8, 0x3000 },
+ { 0x8700, 0x16a6, 0x2000 },
+ { 0x0700, 0x16a5, 0x0000 },
+ { 0x0700, 0x16a7, 0x0000 },
+ { 0x8700, 0x16aa, 0x2000 },
+ { 0x0700, 0x16a9, 0x0000 },
+ { 0x0700, 0x16ab, 0x0000 },
+ { 0x8700, 0x16b0, 0x3000 },
+ { 0x8700, 0x16ae, 0x2000 },
+ { 0x0700, 0x16ad, 0x0000 },
+ { 0x0700, 0x16af, 0x0000 },
+ { 0x8700, 0x16b2, 0x2000 },
+ { 0x0700, 0x16b1, 0x0000 },
+ { 0x0700, 0x16b3, 0x0000 },
+ { 0x8700, 0x16bc, 0x4000 },
+ { 0x8700, 0x16b8, 0x3000 },
+ { 0x8700, 0x16b6, 0x2000 },
+ { 0x0700, 0x16b5, 0x0000 },
+ { 0x0700, 0x16b7, 0x0000 },
+ { 0x8700, 0x16ba, 0x2000 },
+ { 0x0700, 0x16b9, 0x0000 },
+ { 0x0700, 0x16bb, 0x0000 },
+ { 0x8700, 0x16c0, 0x3000 },
+ { 0x8700, 0x16be, 0x2000 },
+ { 0x0700, 0x16bd, 0x0000 },
+ { 0x0700, 0x16bf, 0x0000 },
+ { 0x8700, 0x16c2, 0x2000 },
+ { 0x0700, 0x16c1, 0x0000 },
+ { 0x0700, 0x16c3, 0x0000 },
+ { 0x8700, 0x16d4, 0x5000 },
+ { 0x8700, 0x16cc, 0x4000 },
+ { 0x8700, 0x16c8, 0x3000 },
+ { 0x8700, 0x16c6, 0x2000 },
+ { 0x0700, 0x16c5, 0x0000 },
+ { 0x0700, 0x16c7, 0x0000 },
+ { 0x8700, 0x16ca, 0x2000 },
+ { 0x0700, 0x16c9, 0x0000 },
+ { 0x0700, 0x16cb, 0x0000 },
+ { 0x8700, 0x16d0, 0x3000 },
+ { 0x8700, 0x16ce, 0x2000 },
+ { 0x0700, 0x16cd, 0x0000 },
+ { 0x0700, 0x16cf, 0x0000 },
+ { 0x8700, 0x16d2, 0x2000 },
+ { 0x0700, 0x16d1, 0x0000 },
+ { 0x0700, 0x16d3, 0x0000 },
+ { 0x8700, 0x16dc, 0x4000 },
+ { 0x8700, 0x16d8, 0x3000 },
+ { 0x8700, 0x16d6, 0x2000 },
+ { 0x0700, 0x16d5, 0x0000 },
+ { 0x0700, 0x16d7, 0x0000 },
+ { 0x8700, 0x16da, 0x2000 },
+ { 0x0700, 0x16d9, 0x0000 },
+ { 0x0700, 0x16db, 0x0000 },
+ { 0x8700, 0x16e0, 0x3000 },
+ { 0x8700, 0x16de, 0x2000 },
+ { 0x0700, 0x16dd, 0x0000 },
+ { 0x0700, 0x16df, 0x0000 },
+ { 0x8700, 0x16e2, 0x2000 },
+ { 0x0700, 0x16e1, 0x0000 },
+ { 0x0700, 0x16e3, 0x0000 },
+ { 0x8700, 0x1748, 0x7000 },
+ { 0x8c00, 0x1714, 0x6000 },
+ { 0x8700, 0x1703, 0x5000 },
+ { 0x9500, 0x16ec, 0x4000 },
+ { 0x8700, 0x16e8, 0x3000 },
+ { 0x8700, 0x16e6, 0x2000 },
+ { 0x0700, 0x16e5, 0x0000 },
+ { 0x0700, 0x16e7, 0x0000 },
+ { 0x8700, 0x16ea, 0x2000 },
+ { 0x0700, 0x16e9, 0x0000 },
+ { 0x1500, 0x16eb, 0x0000 },
+ { 0x8e00, 0x16f0, 0x3000 },
+ { 0x8e00, 0x16ee, 0x2000 },
+ { 0x1500, 0x16ed, 0x0000 },
+ { 0x0e00, 0x16ef, 0x0000 },
+ { 0x8700, 0x1701, 0x2000 },
+ { 0x0700, 0x1700, 0x0000 },
+ { 0x0700, 0x1702, 0x0000 },
+ { 0x8700, 0x170b, 0x4000 },
+ { 0x8700, 0x1707, 0x3000 },
+ { 0x8700, 0x1705, 0x2000 },
+ { 0x0700, 0x1704, 0x0000 },
+ { 0x0700, 0x1706, 0x0000 },
+ { 0x8700, 0x1709, 0x2000 },
+ { 0x0700, 0x1708, 0x0000 },
+ { 0x0700, 0x170a, 0x0000 },
+ { 0x8700, 0x1710, 0x3000 },
+ { 0x8700, 0x170e, 0x2000 },
+ { 0x0700, 0x170c, 0x0000 },
+ { 0x0700, 0x170f, 0x0000 },
+ { 0x8c00, 0x1712, 0x2000 },
+ { 0x0700, 0x1711, 0x0000 },
+ { 0x0c00, 0x1713, 0x0000 },
+ { 0x8700, 0x172f, 0x5000 },
+ { 0x8700, 0x1727, 0x4000 },
+ { 0x8700, 0x1723, 0x3000 },
+ { 0x8700, 0x1721, 0x2000 },
+ { 0x0700, 0x1720, 0x0000 },
+ { 0x0700, 0x1722, 0x0000 },
+ { 0x8700, 0x1725, 0x2000 },
+ { 0x0700, 0x1724, 0x0000 },
+ { 0x0700, 0x1726, 0x0000 },
+ { 0x8700, 0x172b, 0x3000 },
+ { 0x8700, 0x1729, 0x2000 },
+ { 0x0700, 0x1728, 0x0000 },
+ { 0x0700, 0x172a, 0x0000 },
+ { 0x8700, 0x172d, 0x2000 },
+ { 0x0700, 0x172c, 0x0000 },
+ { 0x0700, 0x172e, 0x0000 },
+ { 0x8700, 0x1740, 0x4000 },
+ { 0x8c00, 0x1733, 0x3000 },
+ { 0x8700, 0x1731, 0x2000 },
+ { 0x0700, 0x1730, 0x0000 },
+ { 0x0c00, 0x1732, 0x0000 },
+ { 0x9500, 0x1735, 0x2000 },
+ { 0x0c00, 0x1734, 0x0000 },
+ { 0x1500, 0x1736, 0x0000 },
+ { 0x8700, 0x1744, 0x3000 },
+ { 0x8700, 0x1742, 0x2000 },
+ { 0x0700, 0x1741, 0x0000 },
+ { 0x0700, 0x1743, 0x0000 },
+ { 0x8700, 0x1746, 0x2000 },
+ { 0x0700, 0x1745, 0x0000 },
+ { 0x0700, 0x1747, 0x0000 },
+ { 0x8700, 0x1782, 0x6000 },
+ { 0x8700, 0x1764, 0x5000 },
+ { 0x8700, 0x1750, 0x4000 },
+ { 0x8700, 0x174c, 0x3000 },
+ { 0x8700, 0x174a, 0x2000 },
+ { 0x0700, 0x1749, 0x0000 },
+ { 0x0700, 0x174b, 0x0000 },
+ { 0x8700, 0x174e, 0x2000 },
+ { 0x0700, 0x174d, 0x0000 },
+ { 0x0700, 0x174f, 0x0000 },
+ { 0x8700, 0x1760, 0x3000 },
+ { 0x8c00, 0x1752, 0x2000 },
+ { 0x0700, 0x1751, 0x0000 },
+ { 0x0c00, 0x1753, 0x0000 },
+ { 0x8700, 0x1762, 0x2000 },
+ { 0x0700, 0x1761, 0x0000 },
+ { 0x0700, 0x1763, 0x0000 },
+ { 0x8700, 0x176c, 0x4000 },
+ { 0x8700, 0x1768, 0x3000 },
+ { 0x8700, 0x1766, 0x2000 },
+ { 0x0700, 0x1765, 0x0000 },
+ { 0x0700, 0x1767, 0x0000 },
+ { 0x8700, 0x176a, 0x2000 },
+ { 0x0700, 0x1769, 0x0000 },
+ { 0x0700, 0x176b, 0x0000 },
+ { 0x8c00, 0x1772, 0x3000 },
+ { 0x8700, 0x176f, 0x2000 },
+ { 0x0700, 0x176e, 0x0000 },
+ { 0x0700, 0x1770, 0x0000 },
+ { 0x8700, 0x1780, 0x2000 },
+ { 0x0c00, 0x1773, 0x0000 },
+ { 0x0700, 0x1781, 0x0000 },
+ { 0x8700, 0x1792, 0x5000 },
+ { 0x8700, 0x178a, 0x4000 },
+ { 0x8700, 0x1786, 0x3000 },
+ { 0x8700, 0x1784, 0x2000 },
+ { 0x0700, 0x1783, 0x0000 },
+ { 0x0700, 0x1785, 0x0000 },
+ { 0x8700, 0x1788, 0x2000 },
+ { 0x0700, 0x1787, 0x0000 },
+ { 0x0700, 0x1789, 0x0000 },
+ { 0x8700, 0x178e, 0x3000 },
+ { 0x8700, 0x178c, 0x2000 },
+ { 0x0700, 0x178b, 0x0000 },
+ { 0x0700, 0x178d, 0x0000 },
+ { 0x8700, 0x1790, 0x2000 },
+ { 0x0700, 0x178f, 0x0000 },
+ { 0x0700, 0x1791, 0x0000 },
+ { 0x8700, 0x179a, 0x4000 },
+ { 0x8700, 0x1796, 0x3000 },
+ { 0x8700, 0x1794, 0x2000 },
+ { 0x0700, 0x1793, 0x0000 },
+ { 0x0700, 0x1795, 0x0000 },
+ { 0x8700, 0x1798, 0x2000 },
+ { 0x0700, 0x1797, 0x0000 },
+ { 0x0700, 0x1799, 0x0000 },
+ { 0x8700, 0x179e, 0x3000 },
+ { 0x8700, 0x179c, 0x2000 },
+ { 0x0700, 0x179b, 0x0000 },
+ { 0x0700, 0x179d, 0x0000 },
+ { 0x8700, 0x17a0, 0x2000 },
+ { 0x0700, 0x179f, 0x0000 },
+ { 0x0700, 0x17a1, 0x0000 },
+ { 0x8700, 0x1915, 0x9000 },
+ { 0x8700, 0x1837, 0x8000 },
+ { 0x8d00, 0x17e4, 0x7000 },
+ { 0x8a00, 0x17c2, 0x6000 },
+ { 0x8700, 0x17b2, 0x5000 },
+ { 0x8700, 0x17aa, 0x4000 },
+ { 0x8700, 0x17a6, 0x3000 },
+ { 0x8700, 0x17a4, 0x2000 },
+ { 0x0700, 0x17a3, 0x0000 },
+ { 0x0700, 0x17a5, 0x0000 },
+ { 0x8700, 0x17a8, 0x2000 },
+ { 0x0700, 0x17a7, 0x0000 },
+ { 0x0700, 0x17a9, 0x0000 },
+ { 0x8700, 0x17ae, 0x3000 },
+ { 0x8700, 0x17ac, 0x2000 },
+ { 0x0700, 0x17ab, 0x0000 },
+ { 0x0700, 0x17ad, 0x0000 },
+ { 0x8700, 0x17b0, 0x2000 },
+ { 0x0700, 0x17af, 0x0000 },
+ { 0x0700, 0x17b1, 0x0000 },
+ { 0x8c00, 0x17ba, 0x4000 },
+ { 0x8a00, 0x17b6, 0x3000 },
+ { 0x8100, 0x17b4, 0x2000 },
+ { 0x0700, 0x17b3, 0x0000 },
+ { 0x0100, 0x17b5, 0x0000 },
+ { 0x8c00, 0x17b8, 0x2000 },
+ { 0x0c00, 0x17b7, 0x0000 },
+ { 0x0c00, 0x17b9, 0x0000 },
+ { 0x8a00, 0x17be, 0x3000 },
+ { 0x8c00, 0x17bc, 0x2000 },
+ { 0x0c00, 0x17bb, 0x0000 },
+ { 0x0c00, 0x17bd, 0x0000 },
+ { 0x8a00, 0x17c0, 0x2000 },
+ { 0x0a00, 0x17bf, 0x0000 },
+ { 0x0a00, 0x17c1, 0x0000 },
+ { 0x8c00, 0x17d2, 0x5000 },
+ { 0x8c00, 0x17ca, 0x4000 },
+ { 0x8c00, 0x17c6, 0x3000 },
+ { 0x8a00, 0x17c4, 0x2000 },
+ { 0x0a00, 0x17c3, 0x0000 },
+ { 0x0a00, 0x17c5, 0x0000 },
+ { 0x8a00, 0x17c8, 0x2000 },
+ { 0x0a00, 0x17c7, 0x0000 },
+ { 0x0c00, 0x17c9, 0x0000 },
+ { 0x8c00, 0x17ce, 0x3000 },
+ { 0x8c00, 0x17cc, 0x2000 },
+ { 0x0c00, 0x17cb, 0x0000 },
+ { 0x0c00, 0x17cd, 0x0000 },
+ { 0x8c00, 0x17d0, 0x2000 },
+ { 0x0c00, 0x17cf, 0x0000 },
+ { 0x0c00, 0x17d1, 0x0000 },
+ { 0x9500, 0x17da, 0x4000 },
+ { 0x9500, 0x17d6, 0x3000 },
+ { 0x9500, 0x17d4, 0x2000 },
+ { 0x0c00, 0x17d3, 0x0000 },
+ { 0x1500, 0x17d5, 0x0000 },
+ { 0x9500, 0x17d8, 0x2000 },
+ { 0x0600, 0x17d7, 0x0000 },
+ { 0x1500, 0x17d9, 0x0000 },
+ { 0x8d00, 0x17e0, 0x3000 },
+ { 0x8700, 0x17dc, 0x2000 },
+ { 0x1700, 0x17db, 0x0000 },
+ { 0x0c00, 0x17dd, 0x0000 },
+ { 0x8d00, 0x17e2, 0x2000 },
+ { 0x0d00, 0x17e1, 0x0000 },
+ { 0x0d00, 0x17e3, 0x0000 },
+ { 0x8d00, 0x1811, 0x6000 },
+ { 0x9500, 0x1800, 0x5000 },
+ { 0x8f00, 0x17f2, 0x4000 },
+ { 0x8d00, 0x17e8, 0x3000 },
+ { 0x8d00, 0x17e6, 0x2000 },
+ { 0x0d00, 0x17e5, 0x0000 },
+ { 0x0d00, 0x17e7, 0x0000 },
+ { 0x8f00, 0x17f0, 0x2000 },
+ { 0x0d00, 0x17e9, 0x0000 },
+ { 0x0f00, 0x17f1, 0x0000 },
+ { 0x8f00, 0x17f6, 0x3000 },
+ { 0x8f00, 0x17f4, 0x2000 },
+ { 0x0f00, 0x17f3, 0x0000 },
+ { 0x0f00, 0x17f5, 0x0000 },
+ { 0x8f00, 0x17f8, 0x2000 },
+ { 0x0f00, 0x17f7, 0x0000 },
+ { 0x0f00, 0x17f9, 0x0000 },
+ { 0x9500, 0x1808, 0x4000 },
+ { 0x9500, 0x1804, 0x3000 },
+ { 0x9500, 0x1802, 0x2000 },
+ { 0x1500, 0x1801, 0x0000 },
+ { 0x1500, 0x1803, 0x0000 },
+ { 0x9100, 0x1806, 0x2000 },
+ { 0x1500, 0x1805, 0x0000 },
+ { 0x1500, 0x1807, 0x0000 },
+ { 0x8c00, 0x180c, 0x3000 },
+ { 0x9500, 0x180a, 0x2000 },
+ { 0x1500, 0x1809, 0x0000 },
+ { 0x0c00, 0x180b, 0x0000 },
+ { 0x9d00, 0x180e, 0x2000 },
+ { 0x0c00, 0x180d, 0x0000 },
+ { 0x0d00, 0x1810, 0x0000 },
+ { 0x8700, 0x1827, 0x5000 },
+ { 0x8d00, 0x1819, 0x4000 },
+ { 0x8d00, 0x1815, 0x3000 },
+ { 0x8d00, 0x1813, 0x2000 },
+ { 0x0d00, 0x1812, 0x0000 },
+ { 0x0d00, 0x1814, 0x0000 },
+ { 0x8d00, 0x1817, 0x2000 },
+ { 0x0d00, 0x1816, 0x0000 },
+ { 0x0d00, 0x1818, 0x0000 },
+ { 0x8700, 0x1823, 0x3000 },
+ { 0x8700, 0x1821, 0x2000 },
+ { 0x0700, 0x1820, 0x0000 },
+ { 0x0700, 0x1822, 0x0000 },
+ { 0x8700, 0x1825, 0x2000 },
+ { 0x0700, 0x1824, 0x0000 },
+ { 0x0700, 0x1826, 0x0000 },
+ { 0x8700, 0x182f, 0x4000 },
+ { 0x8700, 0x182b, 0x3000 },
+ { 0x8700, 0x1829, 0x2000 },
+ { 0x0700, 0x1828, 0x0000 },
+ { 0x0700, 0x182a, 0x0000 },
+ { 0x8700, 0x182d, 0x2000 },
+ { 0x0700, 0x182c, 0x0000 },
+ { 0x0700, 0x182e, 0x0000 },
+ { 0x8700, 0x1833, 0x3000 },
+ { 0x8700, 0x1831, 0x2000 },
+ { 0x0700, 0x1830, 0x0000 },
+ { 0x0700, 0x1832, 0x0000 },
+ { 0x8700, 0x1835, 0x2000 },
+ { 0x0700, 0x1834, 0x0000 },
+ { 0x0700, 0x1836, 0x0000 },
+ { 0x8700, 0x1877, 0x7000 },
+ { 0x8700, 0x1857, 0x6000 },
+ { 0x8700, 0x1847, 0x5000 },
+ { 0x8700, 0x183f, 0x4000 },
+ { 0x8700, 0x183b, 0x3000 },
+ { 0x8700, 0x1839, 0x2000 },
+ { 0x0700, 0x1838, 0x0000 },
+ { 0x0700, 0x183a, 0x0000 },
+ { 0x8700, 0x183d, 0x2000 },
+ { 0x0700, 0x183c, 0x0000 },
+ { 0x0700, 0x183e, 0x0000 },
+ { 0x8600, 0x1843, 0x3000 },
+ { 0x8700, 0x1841, 0x2000 },
+ { 0x0700, 0x1840, 0x0000 },
+ { 0x0700, 0x1842, 0x0000 },
+ { 0x8700, 0x1845, 0x2000 },
+ { 0x0700, 0x1844, 0x0000 },
+ { 0x0700, 0x1846, 0x0000 },
+ { 0x8700, 0x184f, 0x4000 },
+ { 0x8700, 0x184b, 0x3000 },
+ { 0x8700, 0x1849, 0x2000 },
+ { 0x0700, 0x1848, 0x0000 },
+ { 0x0700, 0x184a, 0x0000 },
+ { 0x8700, 0x184d, 0x2000 },
+ { 0x0700, 0x184c, 0x0000 },
+ { 0x0700, 0x184e, 0x0000 },
+ { 0x8700, 0x1853, 0x3000 },
+ { 0x8700, 0x1851, 0x2000 },
+ { 0x0700, 0x1850, 0x0000 },
+ { 0x0700, 0x1852, 0x0000 },
+ { 0x8700, 0x1855, 0x2000 },
+ { 0x0700, 0x1854, 0x0000 },
+ { 0x0700, 0x1856, 0x0000 },
+ { 0x8700, 0x1867, 0x5000 },
+ { 0x8700, 0x185f, 0x4000 },
+ { 0x8700, 0x185b, 0x3000 },
+ { 0x8700, 0x1859, 0x2000 },
+ { 0x0700, 0x1858, 0x0000 },
+ { 0x0700, 0x185a, 0x0000 },
+ { 0x8700, 0x185d, 0x2000 },
+ { 0x0700, 0x185c, 0x0000 },
+ { 0x0700, 0x185e, 0x0000 },
+ { 0x8700, 0x1863, 0x3000 },
+ { 0x8700, 0x1861, 0x2000 },
+ { 0x0700, 0x1860, 0x0000 },
+ { 0x0700, 0x1862, 0x0000 },
+ { 0x8700, 0x1865, 0x2000 },
+ { 0x0700, 0x1864, 0x0000 },
+ { 0x0700, 0x1866, 0x0000 },
+ { 0x8700, 0x186f, 0x4000 },
+ { 0x8700, 0x186b, 0x3000 },
+ { 0x8700, 0x1869, 0x2000 },
+ { 0x0700, 0x1868, 0x0000 },
+ { 0x0700, 0x186a, 0x0000 },
+ { 0x8700, 0x186d, 0x2000 },
+ { 0x0700, 0x186c, 0x0000 },
+ { 0x0700, 0x186e, 0x0000 },
+ { 0x8700, 0x1873, 0x3000 },
+ { 0x8700, 0x1871, 0x2000 },
+ { 0x0700, 0x1870, 0x0000 },
+ { 0x0700, 0x1872, 0x0000 },
+ { 0x8700, 0x1875, 0x2000 },
+ { 0x0700, 0x1874, 0x0000 },
+ { 0x0700, 0x1876, 0x0000 },
+ { 0x8700, 0x189f, 0x6000 },
+ { 0x8700, 0x188f, 0x5000 },
+ { 0x8700, 0x1887, 0x4000 },
+ { 0x8700, 0x1883, 0x3000 },
+ { 0x8700, 0x1881, 0x2000 },
+ { 0x0700, 0x1880, 0x0000 },
+ { 0x0700, 0x1882, 0x0000 },
+ { 0x8700, 0x1885, 0x2000 },
+ { 0x0700, 0x1884, 0x0000 },
+ { 0x0700, 0x1886, 0x0000 },
+ { 0x8700, 0x188b, 0x3000 },
+ { 0x8700, 0x1889, 0x2000 },
+ { 0x0700, 0x1888, 0x0000 },
+ { 0x0700, 0x188a, 0x0000 },
+ { 0x8700, 0x188d, 0x2000 },
+ { 0x0700, 0x188c, 0x0000 },
+ { 0x0700, 0x188e, 0x0000 },
+ { 0x8700, 0x1897, 0x4000 },
+ { 0x8700, 0x1893, 0x3000 },
+ { 0x8700, 0x1891, 0x2000 },
+ { 0x0700, 0x1890, 0x0000 },
+ { 0x0700, 0x1892, 0x0000 },
+ { 0x8700, 0x1895, 0x2000 },
+ { 0x0700, 0x1894, 0x0000 },
+ { 0x0700, 0x1896, 0x0000 },
+ { 0x8700, 0x189b, 0x3000 },
+ { 0x8700, 0x1899, 0x2000 },
+ { 0x0700, 0x1898, 0x0000 },
+ { 0x0700, 0x189a, 0x0000 },
+ { 0x8700, 0x189d, 0x2000 },
+ { 0x0700, 0x189c, 0x0000 },
+ { 0x0700, 0x189e, 0x0000 },
+ { 0x8700, 0x1905, 0x5000 },
+ { 0x8700, 0x18a7, 0x4000 },
+ { 0x8700, 0x18a3, 0x3000 },
+ { 0x8700, 0x18a1, 0x2000 },
+ { 0x0700, 0x18a0, 0x0000 },
+ { 0x0700, 0x18a2, 0x0000 },
+ { 0x8700, 0x18a5, 0x2000 },
+ { 0x0700, 0x18a4, 0x0000 },
+ { 0x0700, 0x18a6, 0x0000 },
+ { 0x8700, 0x1901, 0x3000 },
+ { 0x8c00, 0x18a9, 0x2000 },
+ { 0x0700, 0x18a8, 0x0000 },
+ { 0x0700, 0x1900, 0x0000 },
+ { 0x8700, 0x1903, 0x2000 },
+ { 0x0700, 0x1902, 0x0000 },
+ { 0x0700, 0x1904, 0x0000 },
+ { 0x8700, 0x190d, 0x4000 },
+ { 0x8700, 0x1909, 0x3000 },
+ { 0x8700, 0x1907, 0x2000 },
+ { 0x0700, 0x1906, 0x0000 },
+ { 0x0700, 0x1908, 0x0000 },
+ { 0x8700, 0x190b, 0x2000 },
+ { 0x0700, 0x190a, 0x0000 },
+ { 0x0700, 0x190c, 0x0000 },
+ { 0x8700, 0x1911, 0x3000 },
+ { 0x8700, 0x190f, 0x2000 },
+ { 0x0700, 0x190e, 0x0000 },
+ { 0x0700, 0x1910, 0x0000 },
+ { 0x8700, 0x1913, 0x2000 },
+ { 0x0700, 0x1912, 0x0000 },
+ { 0x0700, 0x1914, 0x0000 },
+ { 0x8500, 0x1d10, 0x8000 },
+ { 0x8700, 0x1963, 0x7000 },
+ { 0x9a00, 0x1940, 0x6000 },
+ { 0x8c00, 0x1928, 0x5000 },
+ { 0x8c00, 0x1920, 0x4000 },
+ { 0x8700, 0x1919, 0x3000 },
+ { 0x8700, 0x1917, 0x2000 },
+ { 0x0700, 0x1916, 0x0000 },
+ { 0x0700, 0x1918, 0x0000 },
+ { 0x8700, 0x191b, 0x2000 },
+ { 0x0700, 0x191a, 0x0000 },
+ { 0x0700, 0x191c, 0x0000 },
+ { 0x8a00, 0x1924, 0x3000 },
+ { 0x8c00, 0x1922, 0x2000 },
+ { 0x0c00, 0x1921, 0x0000 },
+ { 0x0a00, 0x1923, 0x0000 },
+ { 0x8a00, 0x1926, 0x2000 },
+ { 0x0a00, 0x1925, 0x0000 },
+ { 0x0c00, 0x1927, 0x0000 },
+ { 0x8a00, 0x1934, 0x4000 },
+ { 0x8a00, 0x1930, 0x3000 },
+ { 0x8a00, 0x192a, 0x2000 },
+ { 0x0a00, 0x1929, 0x0000 },
+ { 0x0a00, 0x192b, 0x0000 },
+ { 0x8c00, 0x1932, 0x2000 },
+ { 0x0a00, 0x1931, 0x0000 },
+ { 0x0a00, 0x1933, 0x0000 },
+ { 0x8a00, 0x1938, 0x3000 },
+ { 0x8a00, 0x1936, 0x2000 },
+ { 0x0a00, 0x1935, 0x0000 },
+ { 0x0a00, 0x1937, 0x0000 },
+ { 0x8c00, 0x193a, 0x2000 },
+ { 0x0c00, 0x1939, 0x0000 },
+ { 0x0c00, 0x193b, 0x0000 },
+ { 0x8700, 0x1953, 0x5000 },
+ { 0x8d00, 0x194b, 0x4000 },
+ { 0x8d00, 0x1947, 0x3000 },
+ { 0x9500, 0x1945, 0x2000 },
+ { 0x1500, 0x1944, 0x0000 },
+ { 0x0d00, 0x1946, 0x0000 },
+ { 0x8d00, 0x1949, 0x2000 },
+ { 0x0d00, 0x1948, 0x0000 },
+ { 0x0d00, 0x194a, 0x0000 },
+ { 0x8d00, 0x194f, 0x3000 },
+ { 0x8d00, 0x194d, 0x2000 },
+ { 0x0d00, 0x194c, 0x0000 },
+ { 0x0d00, 0x194e, 0x0000 },
+ { 0x8700, 0x1951, 0x2000 },
+ { 0x0700, 0x1950, 0x0000 },
+ { 0x0700, 0x1952, 0x0000 },
+ { 0x8700, 0x195b, 0x4000 },
+ { 0x8700, 0x1957, 0x3000 },
+ { 0x8700, 0x1955, 0x2000 },
+ { 0x0700, 0x1954, 0x0000 },
+ { 0x0700, 0x1956, 0x0000 },
+ { 0x8700, 0x1959, 0x2000 },
+ { 0x0700, 0x1958, 0x0000 },
+ { 0x0700, 0x195a, 0x0000 },
+ { 0x8700, 0x195f, 0x3000 },
+ { 0x8700, 0x195d, 0x2000 },
+ { 0x0700, 0x195c, 0x0000 },
+ { 0x0700, 0x195e, 0x0000 },
+ { 0x8700, 0x1961, 0x2000 },
+ { 0x0700, 0x1960, 0x0000 },
+ { 0x0700, 0x1962, 0x0000 },
+ { 0x9a00, 0x19f0, 0x6000 },
+ { 0x9a00, 0x19e0, 0x5000 },
+ { 0x8700, 0x196b, 0x4000 },
+ { 0x8700, 0x1967, 0x3000 },
+ { 0x8700, 0x1965, 0x2000 },
+ { 0x0700, 0x1964, 0x0000 },
+ { 0x0700, 0x1966, 0x0000 },
+ { 0x8700, 0x1969, 0x2000 },
+ { 0x0700, 0x1968, 0x0000 },
+ { 0x0700, 0x196a, 0x0000 },
+ { 0x8700, 0x1971, 0x3000 },
+ { 0x8700, 0x196d, 0x2000 },
+ { 0x0700, 0x196c, 0x0000 },
+ { 0x0700, 0x1970, 0x0000 },
+ { 0x8700, 0x1973, 0x2000 },
+ { 0x0700, 0x1972, 0x0000 },
+ { 0x0700, 0x1974, 0x0000 },
+ { 0x9a00, 0x19e8, 0x4000 },
+ { 0x9a00, 0x19e4, 0x3000 },
+ { 0x9a00, 0x19e2, 0x2000 },
+ { 0x1a00, 0x19e1, 0x0000 },
+ { 0x1a00, 0x19e3, 0x0000 },
+ { 0x9a00, 0x19e6, 0x2000 },
+ { 0x1a00, 0x19e5, 0x0000 },
+ { 0x1a00, 0x19e7, 0x0000 },
+ { 0x9a00, 0x19ec, 0x3000 },
+ { 0x9a00, 0x19ea, 0x2000 },
+ { 0x1a00, 0x19e9, 0x0000 },
+ { 0x1a00, 0x19eb, 0x0000 },
+ { 0x9a00, 0x19ee, 0x2000 },
+ { 0x1a00, 0x19ed, 0x0000 },
+ { 0x1a00, 0x19ef, 0x0000 },
+ { 0x8500, 0x1d00, 0x5000 },
+ { 0x9a00, 0x19f8, 0x4000 },
+ { 0x9a00, 0x19f4, 0x3000 },
+ { 0x9a00, 0x19f2, 0x2000 },
+ { 0x1a00, 0x19f1, 0x0000 },
+ { 0x1a00, 0x19f3, 0x0000 },
+ { 0x9a00, 0x19f6, 0x2000 },
+ { 0x1a00, 0x19f5, 0x0000 },
+ { 0x1a00, 0x19f7, 0x0000 },
+ { 0x9a00, 0x19fc, 0x3000 },
+ { 0x9a00, 0x19fa, 0x2000 },
+ { 0x1a00, 0x19f9, 0x0000 },
+ { 0x1a00, 0x19fb, 0x0000 },
+ { 0x9a00, 0x19fe, 0x2000 },
+ { 0x1a00, 0x19fd, 0x0000 },
+ { 0x1a00, 0x19ff, 0x0000 },
+ { 0x8500, 0x1d08, 0x4000 },
+ { 0x8500, 0x1d04, 0x3000 },
+ { 0x8500, 0x1d02, 0x2000 },
+ { 0x0500, 0x1d01, 0x0000 },
+ { 0x0500, 0x1d03, 0x0000 },
+ { 0x8500, 0x1d06, 0x2000 },
+ { 0x0500, 0x1d05, 0x0000 },
+ { 0x0500, 0x1d07, 0x0000 },
+ { 0x8500, 0x1d0c, 0x3000 },
+ { 0x8500, 0x1d0a, 0x2000 },
+ { 0x0500, 0x1d09, 0x0000 },
+ { 0x0500, 0x1d0b, 0x0000 },
+ { 0x8500, 0x1d0e, 0x2000 },
+ { 0x0500, 0x1d0d, 0x0000 },
+ { 0x0500, 0x1d0f, 0x0000 },
+ { 0x8600, 0x1d50, 0x7000 },
+ { 0x8600, 0x1d30, 0x6000 },
+ { 0x8500, 0x1d20, 0x5000 },
+ { 0x8500, 0x1d18, 0x4000 },
+ { 0x8500, 0x1d14, 0x3000 },
+ { 0x8500, 0x1d12, 0x2000 },
+ { 0x0500, 0x1d11, 0x0000 },
+ { 0x0500, 0x1d13, 0x0000 },
+ { 0x8500, 0x1d16, 0x2000 },
+ { 0x0500, 0x1d15, 0x0000 },
+ { 0x0500, 0x1d17, 0x0000 },
+ { 0x8500, 0x1d1c, 0x3000 },
+ { 0x8500, 0x1d1a, 0x2000 },
+ { 0x0500, 0x1d19, 0x0000 },
+ { 0x0500, 0x1d1b, 0x0000 },
+ { 0x8500, 0x1d1e, 0x2000 },
+ { 0x0500, 0x1d1d, 0x0000 },
+ { 0x0500, 0x1d1f, 0x0000 },
+ { 0x8500, 0x1d28, 0x4000 },
+ { 0x8500, 0x1d24, 0x3000 },
+ { 0x8500, 0x1d22, 0x2000 },
+ { 0x0500, 0x1d21, 0x0000 },
+ { 0x0500, 0x1d23, 0x0000 },
+ { 0x8500, 0x1d26, 0x2000 },
+ { 0x0500, 0x1d25, 0x0000 },
+ { 0x0500, 0x1d27, 0x0000 },
+ { 0x8600, 0x1d2c, 0x3000 },
+ { 0x8500, 0x1d2a, 0x2000 },
+ { 0x0500, 0x1d29, 0x0000 },
+ { 0x0500, 0x1d2b, 0x0000 },
+ { 0x8600, 0x1d2e, 0x2000 },
+ { 0x0600, 0x1d2d, 0x0000 },
+ { 0x0600, 0x1d2f, 0x0000 },
+ { 0x8600, 0x1d40, 0x5000 },
+ { 0x8600, 0x1d38, 0x4000 },
+ { 0x8600, 0x1d34, 0x3000 },
+ { 0x8600, 0x1d32, 0x2000 },
+ { 0x0600, 0x1d31, 0x0000 },
+ { 0x0600, 0x1d33, 0x0000 },
+ { 0x8600, 0x1d36, 0x2000 },
+ { 0x0600, 0x1d35, 0x0000 },
+ { 0x0600, 0x1d37, 0x0000 },
+ { 0x8600, 0x1d3c, 0x3000 },
+ { 0x8600, 0x1d3a, 0x2000 },
+ { 0x0600, 0x1d39, 0x0000 },
+ { 0x0600, 0x1d3b, 0x0000 },
+ { 0x8600, 0x1d3e, 0x2000 },
+ { 0x0600, 0x1d3d, 0x0000 },
+ { 0x0600, 0x1d3f, 0x0000 },
+ { 0x8600, 0x1d48, 0x4000 },
+ { 0x8600, 0x1d44, 0x3000 },
+ { 0x8600, 0x1d42, 0x2000 },
+ { 0x0600, 0x1d41, 0x0000 },
+ { 0x0600, 0x1d43, 0x0000 },
+ { 0x8600, 0x1d46, 0x2000 },
+ { 0x0600, 0x1d45, 0x0000 },
+ { 0x0600, 0x1d47, 0x0000 },
+ { 0x8600, 0x1d4c, 0x3000 },
+ { 0x8600, 0x1d4a, 0x2000 },
+ { 0x0600, 0x1d49, 0x0000 },
+ { 0x0600, 0x1d4b, 0x0000 },
+ { 0x8600, 0x1d4e, 0x2000 },
+ { 0x0600, 0x1d4d, 0x0000 },
+ { 0x0600, 0x1d4f, 0x0000 },
+ { 0x8900, 0x1e04, 0x6001 },
+ { 0x8600, 0x1d60, 0x5000 },
+ { 0x8600, 0x1d58, 0x4000 },
+ { 0x8600, 0x1d54, 0x3000 },
+ { 0x8600, 0x1d52, 0x2000 },
+ { 0x0600, 0x1d51, 0x0000 },
+ { 0x0600, 0x1d53, 0x0000 },
+ { 0x8600, 0x1d56, 0x2000 },
+ { 0x0600, 0x1d55, 0x0000 },
+ { 0x0600, 0x1d57, 0x0000 },
+ { 0x8600, 0x1d5c, 0x3000 },
+ { 0x8600, 0x1d5a, 0x2000 },
+ { 0x0600, 0x1d59, 0x0000 },
+ { 0x0600, 0x1d5b, 0x0000 },
+ { 0x8600, 0x1d5e, 0x2000 },
+ { 0x0600, 0x1d5d, 0x0000 },
+ { 0x0600, 0x1d5f, 0x0000 },
+ { 0x8500, 0x1d68, 0x4000 },
+ { 0x8500, 0x1d64, 0x3000 },
+ { 0x8500, 0x1d62, 0x2000 },
+ { 0x0600, 0x1d61, 0x0000 },
+ { 0x0500, 0x1d63, 0x0000 },
+ { 0x8500, 0x1d66, 0x2000 },
+ { 0x0500, 0x1d65, 0x0000 },
+ { 0x0500, 0x1d67, 0x0000 },
+ { 0x8900, 0x1e00, 0x3001 },
+ { 0x8500, 0x1d6a, 0x2000 },
+ { 0x0500, 0x1d69, 0x0000 },
+ { 0x0500, 0x1d6b, 0x0000 },
+ { 0x8900, 0x1e02, 0x2001 },
+ { 0x0500, 0x1e01, 0x0fff },
+ { 0x0500, 0x1e03, 0x0fff },
+ { 0x8900, 0x1e14, 0x5001 },
+ { 0x8900, 0x1e0c, 0x4001 },
+ { 0x8900, 0x1e08, 0x3001 },
+ { 0x8900, 0x1e06, 0x2001 },
+ { 0x0500, 0x1e05, 0x0fff },
+ { 0x0500, 0x1e07, 0x0fff },
+ { 0x8900, 0x1e0a, 0x2001 },
+ { 0x0500, 0x1e09, 0x0fff },
+ { 0x0500, 0x1e0b, 0x0fff },
+ { 0x8900, 0x1e10, 0x3001 },
+ { 0x8900, 0x1e0e, 0x2001 },
+ { 0x0500, 0x1e0d, 0x0fff },
+ { 0x0500, 0x1e0f, 0x0fff },
+ { 0x8900, 0x1e12, 0x2001 },
+ { 0x0500, 0x1e11, 0x0fff },
+ { 0x0500, 0x1e13, 0x0fff },
+ { 0x8900, 0x1e1c, 0x4001 },
+ { 0x8900, 0x1e18, 0x3001 },
+ { 0x8900, 0x1e16, 0x2001 },
+ { 0x0500, 0x1e15, 0x0fff },
+ { 0x0500, 0x1e17, 0x0fff },
+ { 0x8900, 0x1e1a, 0x2001 },
+ { 0x0500, 0x1e19, 0x0fff },
+ { 0x0500, 0x1e1b, 0x0fff },
+ { 0x8900, 0x1e20, 0x3001 },
+ { 0x8900, 0x1e1e, 0x2001 },
+ { 0x0500, 0x1e1d, 0x0fff },
+ { 0x0500, 0x1e1f, 0x0fff },
+ { 0x8900, 0x1e22, 0x2001 },
+ { 0x0500, 0x1e21, 0x0fff },
+ { 0x0500, 0x1e23, 0x0fff },
+ { 0x9600, 0x2045, 0xa000 },
+ { 0x8500, 0x1f32, 0x9008 },
+ { 0x8900, 0x1ea8, 0x8001 },
+ { 0x8900, 0x1e64, 0x7001 },
+ { 0x8900, 0x1e44, 0x6001 },
+ { 0x8900, 0x1e34, 0x5001 },
+ { 0x8900, 0x1e2c, 0x4001 },
+ { 0x8900, 0x1e28, 0x3001 },
+ { 0x8900, 0x1e26, 0x2001 },
+ { 0x0500, 0x1e25, 0x0fff },
+ { 0x0500, 0x1e27, 0x0fff },
+ { 0x8900, 0x1e2a, 0x2001 },
+ { 0x0500, 0x1e29, 0x0fff },
+ { 0x0500, 0x1e2b, 0x0fff },
+ { 0x8900, 0x1e30, 0x3001 },
+ { 0x8900, 0x1e2e, 0x2001 },
+ { 0x0500, 0x1e2d, 0x0fff },
+ { 0x0500, 0x1e2f, 0x0fff },
+ { 0x8900, 0x1e32, 0x2001 },
+ { 0x0500, 0x1e31, 0x0fff },
+ { 0x0500, 0x1e33, 0x0fff },
+ { 0x8900, 0x1e3c, 0x4001 },
+ { 0x8900, 0x1e38, 0x3001 },
+ { 0x8900, 0x1e36, 0x2001 },
+ { 0x0500, 0x1e35, 0x0fff },
+ { 0x0500, 0x1e37, 0x0fff },
+ { 0x8900, 0x1e3a, 0x2001 },
+ { 0x0500, 0x1e39, 0x0fff },
+ { 0x0500, 0x1e3b, 0x0fff },
+ { 0x8900, 0x1e40, 0x3001 },
+ { 0x8900, 0x1e3e, 0x2001 },
+ { 0x0500, 0x1e3d, 0x0fff },
+ { 0x0500, 0x1e3f, 0x0fff },
+ { 0x8900, 0x1e42, 0x2001 },
+ { 0x0500, 0x1e41, 0x0fff },
+ { 0x0500, 0x1e43, 0x0fff },
+ { 0x8900, 0x1e54, 0x5001 },
+ { 0x8900, 0x1e4c, 0x4001 },
+ { 0x8900, 0x1e48, 0x3001 },
+ { 0x8900, 0x1e46, 0x2001 },
+ { 0x0500, 0x1e45, 0x0fff },
+ { 0x0500, 0x1e47, 0x0fff },
+ { 0x8900, 0x1e4a, 0x2001 },
+ { 0x0500, 0x1e49, 0x0fff },
+ { 0x0500, 0x1e4b, 0x0fff },
+ { 0x8900, 0x1e50, 0x3001 },
+ { 0x8900, 0x1e4e, 0x2001 },
+ { 0x0500, 0x1e4d, 0x0fff },
+ { 0x0500, 0x1e4f, 0x0fff },
+ { 0x8900, 0x1e52, 0x2001 },
+ { 0x0500, 0x1e51, 0x0fff },
+ { 0x0500, 0x1e53, 0x0fff },
+ { 0x8900, 0x1e5c, 0x4001 },
+ { 0x8900, 0x1e58, 0x3001 },
+ { 0x8900, 0x1e56, 0x2001 },
+ { 0x0500, 0x1e55, 0x0fff },
+ { 0x0500, 0x1e57, 0x0fff },
+ { 0x8900, 0x1e5a, 0x2001 },
+ { 0x0500, 0x1e59, 0x0fff },
+ { 0x0500, 0x1e5b, 0x0fff },
+ { 0x8900, 0x1e60, 0x3001 },
+ { 0x8900, 0x1e5e, 0x2001 },
+ { 0x0500, 0x1e5d, 0x0fff },
+ { 0x0500, 0x1e5f, 0x0fff },
+ { 0x8900, 0x1e62, 0x2001 },
+ { 0x0500, 0x1e61, 0x0fff },
+ { 0x0500, 0x1e63, 0x0fff },
+ { 0x8900, 0x1e84, 0x6001 },
+ { 0x8900, 0x1e74, 0x5001 },
+ { 0x8900, 0x1e6c, 0x4001 },
+ { 0x8900, 0x1e68, 0x3001 },
+ { 0x8900, 0x1e66, 0x2001 },
+ { 0x0500, 0x1e65, 0x0fff },
+ { 0x0500, 0x1e67, 0x0fff },
+ { 0x8900, 0x1e6a, 0x2001 },
+ { 0x0500, 0x1e69, 0x0fff },
+ { 0x0500, 0x1e6b, 0x0fff },
+ { 0x8900, 0x1e70, 0x3001 },
+ { 0x8900, 0x1e6e, 0x2001 },
+ { 0x0500, 0x1e6d, 0x0fff },
+ { 0x0500, 0x1e6f, 0x0fff },
+ { 0x8900, 0x1e72, 0x2001 },
+ { 0x0500, 0x1e71, 0x0fff },
+ { 0x0500, 0x1e73, 0x0fff },
+ { 0x8900, 0x1e7c, 0x4001 },
+ { 0x8900, 0x1e78, 0x3001 },
+ { 0x8900, 0x1e76, 0x2001 },
+ { 0x0500, 0x1e75, 0x0fff },
+ { 0x0500, 0x1e77, 0x0fff },
+ { 0x8900, 0x1e7a, 0x2001 },
+ { 0x0500, 0x1e79, 0x0fff },
+ { 0x0500, 0x1e7b, 0x0fff },
+ { 0x8900, 0x1e80, 0x3001 },
+ { 0x8900, 0x1e7e, 0x2001 },
+ { 0x0500, 0x1e7d, 0x0fff },
+ { 0x0500, 0x1e7f, 0x0fff },
+ { 0x8900, 0x1e82, 0x2001 },
+ { 0x0500, 0x1e81, 0x0fff },
+ { 0x0500, 0x1e83, 0x0fff },
+ { 0x8900, 0x1e94, 0x5001 },
+ { 0x8900, 0x1e8c, 0x4001 },
+ { 0x8900, 0x1e88, 0x3001 },
+ { 0x8900, 0x1e86, 0x2001 },
+ { 0x0500, 0x1e85, 0x0fff },
+ { 0x0500, 0x1e87, 0x0fff },
+ { 0x8900, 0x1e8a, 0x2001 },
+ { 0x0500, 0x1e89, 0x0fff },
+ { 0x0500, 0x1e8b, 0x0fff },
+ { 0x8900, 0x1e90, 0x3001 },
+ { 0x8900, 0x1e8e, 0x2001 },
+ { 0x0500, 0x1e8d, 0x0fff },
+ { 0x0500, 0x1e8f, 0x0fff },
+ { 0x8900, 0x1e92, 0x2001 },
+ { 0x0500, 0x1e91, 0x0fff },
+ { 0x0500, 0x1e93, 0x0fff },
+ { 0x8900, 0x1ea0, 0x4001 },
+ { 0x8500, 0x1e98, 0x3000 },
+ { 0x8500, 0x1e96, 0x2000 },
+ { 0x0500, 0x1e95, 0x0fff },
+ { 0x0500, 0x1e97, 0x0000 },
+ { 0x8500, 0x1e9a, 0x2000 },
+ { 0x0500, 0x1e99, 0x0000 },
+ { 0x0500, 0x1e9b, 0x0fc5 },
+ { 0x8900, 0x1ea4, 0x3001 },
+ { 0x8900, 0x1ea2, 0x2001 },
+ { 0x0500, 0x1ea1, 0x0fff },
+ { 0x0500, 0x1ea3, 0x0fff },
+ { 0x8900, 0x1ea6, 0x2001 },
+ { 0x0500, 0x1ea5, 0x0fff },
+ { 0x0500, 0x1ea7, 0x0fff },
+ { 0x8900, 0x1ee8, 0x7001 },
+ { 0x8900, 0x1ec8, 0x6001 },
+ { 0x8900, 0x1eb8, 0x5001 },
+ { 0x8900, 0x1eb0, 0x4001 },
+ { 0x8900, 0x1eac, 0x3001 },
+ { 0x8900, 0x1eaa, 0x2001 },
+ { 0x0500, 0x1ea9, 0x0fff },
+ { 0x0500, 0x1eab, 0x0fff },
+ { 0x8900, 0x1eae, 0x2001 },
+ { 0x0500, 0x1ead, 0x0fff },
+ { 0x0500, 0x1eaf, 0x0fff },
+ { 0x8900, 0x1eb4, 0x3001 },
+ { 0x8900, 0x1eb2, 0x2001 },
+ { 0x0500, 0x1eb1, 0x0fff },
+ { 0x0500, 0x1eb3, 0x0fff },
+ { 0x8900, 0x1eb6, 0x2001 },
+ { 0x0500, 0x1eb5, 0x0fff },
+ { 0x0500, 0x1eb7, 0x0fff },
+ { 0x8900, 0x1ec0, 0x4001 },
+ { 0x8900, 0x1ebc, 0x3001 },
+ { 0x8900, 0x1eba, 0x2001 },
+ { 0x0500, 0x1eb9, 0x0fff },
+ { 0x0500, 0x1ebb, 0x0fff },
+ { 0x8900, 0x1ebe, 0x2001 },
+ { 0x0500, 0x1ebd, 0x0fff },
+ { 0x0500, 0x1ebf, 0x0fff },
+ { 0x8900, 0x1ec4, 0x3001 },
+ { 0x8900, 0x1ec2, 0x2001 },
+ { 0x0500, 0x1ec1, 0x0fff },
+ { 0x0500, 0x1ec3, 0x0fff },
+ { 0x8900, 0x1ec6, 0x2001 },
+ { 0x0500, 0x1ec5, 0x0fff },
+ { 0x0500, 0x1ec7, 0x0fff },
+ { 0x8900, 0x1ed8, 0x5001 },
+ { 0x8900, 0x1ed0, 0x4001 },
+ { 0x8900, 0x1ecc, 0x3001 },
+ { 0x8900, 0x1eca, 0x2001 },
+ { 0x0500, 0x1ec9, 0x0fff },
+ { 0x0500, 0x1ecb, 0x0fff },
+ { 0x8900, 0x1ece, 0x2001 },
+ { 0x0500, 0x1ecd, 0x0fff },
+ { 0x0500, 0x1ecf, 0x0fff },
+ { 0x8900, 0x1ed4, 0x3001 },
+ { 0x8900, 0x1ed2, 0x2001 },
+ { 0x0500, 0x1ed1, 0x0fff },
+ { 0x0500, 0x1ed3, 0x0fff },
+ { 0x8900, 0x1ed6, 0x2001 },
+ { 0x0500, 0x1ed5, 0x0fff },
+ { 0x0500, 0x1ed7, 0x0fff },
+ { 0x8900, 0x1ee0, 0x4001 },
+ { 0x8900, 0x1edc, 0x3001 },
+ { 0x8900, 0x1eda, 0x2001 },
+ { 0x0500, 0x1ed9, 0x0fff },
+ { 0x0500, 0x1edb, 0x0fff },
+ { 0x8900, 0x1ede, 0x2001 },
+ { 0x0500, 0x1edd, 0x0fff },
+ { 0x0500, 0x1edf, 0x0fff },
+ { 0x8900, 0x1ee4, 0x3001 },
+ { 0x8900, 0x1ee2, 0x2001 },
+ { 0x0500, 0x1ee1, 0x0fff },
+ { 0x0500, 0x1ee3, 0x0fff },
+ { 0x8900, 0x1ee6, 0x2001 },
+ { 0x0500, 0x1ee5, 0x0fff },
+ { 0x0500, 0x1ee7, 0x0fff },
+ { 0x8900, 0x1f0e, 0x6ff8 },
+ { 0x8900, 0x1ef8, 0x5001 },
+ { 0x8900, 0x1ef0, 0x4001 },
+ { 0x8900, 0x1eec, 0x3001 },
+ { 0x8900, 0x1eea, 0x2001 },
+ { 0x0500, 0x1ee9, 0x0fff },
+ { 0x0500, 0x1eeb, 0x0fff },
+ { 0x8900, 0x1eee, 0x2001 },
+ { 0x0500, 0x1eed, 0x0fff },
+ { 0x0500, 0x1eef, 0x0fff },
+ { 0x8900, 0x1ef4, 0x3001 },
+ { 0x8900, 0x1ef2, 0x2001 },
+ { 0x0500, 0x1ef1, 0x0fff },
+ { 0x0500, 0x1ef3, 0x0fff },
+ { 0x8900, 0x1ef6, 0x2001 },
+ { 0x0500, 0x1ef5, 0x0fff },
+ { 0x0500, 0x1ef7, 0x0fff },
+ { 0x8500, 0x1f06, 0x4008 },
+ { 0x8500, 0x1f02, 0x3008 },
+ { 0x8500, 0x1f00, 0x2008 },
+ { 0x0500, 0x1ef9, 0x0fff },
+ { 0x0500, 0x1f01, 0x0008 },
+ { 0x8500, 0x1f04, 0x2008 },
+ { 0x0500, 0x1f03, 0x0008 },
+ { 0x0500, 0x1f05, 0x0008 },
+ { 0x8900, 0x1f0a, 0x3ff8 },
+ { 0x8900, 0x1f08, 0x2ff8 },
+ { 0x0500, 0x1f07, 0x0008 },
+ { 0x0900, 0x1f09, 0x0ff8 },
+ { 0x8900, 0x1f0c, 0x2ff8 },
+ { 0x0900, 0x1f0b, 0x0ff8 },
+ { 0x0900, 0x1f0d, 0x0ff8 },
+ { 0x8500, 0x1f22, 0x5008 },
+ { 0x8900, 0x1f18, 0x4ff8 },
+ { 0x8500, 0x1f12, 0x3008 },
+ { 0x8500, 0x1f10, 0x2008 },
+ { 0x0900, 0x1f0f, 0x0ff8 },
+ { 0x0500, 0x1f11, 0x0008 },
+ { 0x8500, 0x1f14, 0x2008 },
+ { 0x0500, 0x1f13, 0x0008 },
+ { 0x0500, 0x1f15, 0x0008 },
+ { 0x8900, 0x1f1c, 0x3ff8 },
+ { 0x8900, 0x1f1a, 0x2ff8 },
+ { 0x0900, 0x1f19, 0x0ff8 },
+ { 0x0900, 0x1f1b, 0x0ff8 },
+ { 0x8500, 0x1f20, 0x2008 },
+ { 0x0900, 0x1f1d, 0x0ff8 },
+ { 0x0500, 0x1f21, 0x0008 },
+ { 0x8900, 0x1f2a, 0x4ff8 },
+ { 0x8500, 0x1f26, 0x3008 },
+ { 0x8500, 0x1f24, 0x2008 },
+ { 0x0500, 0x1f23, 0x0008 },
+ { 0x0500, 0x1f25, 0x0008 },
+ { 0x8900, 0x1f28, 0x2ff8 },
+ { 0x0500, 0x1f27, 0x0008 },
+ { 0x0900, 0x1f29, 0x0ff8 },
+ { 0x8900, 0x1f2e, 0x3ff8 },
+ { 0x8900, 0x1f2c, 0x2ff8 },
+ { 0x0900, 0x1f2b, 0x0ff8 },
+ { 0x0900, 0x1f2d, 0x0ff8 },
+ { 0x8500, 0x1f30, 0x2008 },
+ { 0x0900, 0x1f2f, 0x0ff8 },
+ { 0x0500, 0x1f31, 0x0008 },
+ { 0x9800, 0x1fbd, 0x8000 },
+ { 0x8500, 0x1f7a, 0x7070 },
+ { 0x8500, 0x1f56, 0x6000 },
+ { 0x8500, 0x1f42, 0x5008 },
+ { 0x8900, 0x1f3a, 0x4ff8 },
+ { 0x8500, 0x1f36, 0x3008 },
+ { 0x8500, 0x1f34, 0x2008 },
+ { 0x0500, 0x1f33, 0x0008 },
+ { 0x0500, 0x1f35, 0x0008 },
+ { 0x8900, 0x1f38, 0x2ff8 },
+ { 0x0500, 0x1f37, 0x0008 },
+ { 0x0900, 0x1f39, 0x0ff8 },
+ { 0x8900, 0x1f3e, 0x3ff8 },
+ { 0x8900, 0x1f3c, 0x2ff8 },
+ { 0x0900, 0x1f3b, 0x0ff8 },
+ { 0x0900, 0x1f3d, 0x0ff8 },
+ { 0x8500, 0x1f40, 0x2008 },
+ { 0x0900, 0x1f3f, 0x0ff8 },
+ { 0x0500, 0x1f41, 0x0008 },
+ { 0x8900, 0x1f4c, 0x4ff8 },
+ { 0x8900, 0x1f48, 0x3ff8 },
+ { 0x8500, 0x1f44, 0x2008 },
+ { 0x0500, 0x1f43, 0x0008 },
+ { 0x0500, 0x1f45, 0x0008 },
+ { 0x8900, 0x1f4a, 0x2ff8 },
+ { 0x0900, 0x1f49, 0x0ff8 },
+ { 0x0900, 0x1f4b, 0x0ff8 },
+ { 0x8500, 0x1f52, 0x3000 },
+ { 0x8500, 0x1f50, 0x2000 },
+ { 0x0900, 0x1f4d, 0x0ff8 },
+ { 0x0500, 0x1f51, 0x0008 },
+ { 0x8500, 0x1f54, 0x2000 },
+ { 0x0500, 0x1f53, 0x0008 },
+ { 0x0500, 0x1f55, 0x0008 },
+ { 0x8900, 0x1f6a, 0x5ff8 },
+ { 0x8500, 0x1f62, 0x4008 },
+ { 0x8900, 0x1f5d, 0x3ff8 },
+ { 0x8900, 0x1f59, 0x2ff8 },
+ { 0x0500, 0x1f57, 0x0008 },
+ { 0x0900, 0x1f5b, 0x0ff8 },
+ { 0x8500, 0x1f60, 0x2008 },
+ { 0x0900, 0x1f5f, 0x0ff8 },
+ { 0x0500, 0x1f61, 0x0008 },
+ { 0x8500, 0x1f66, 0x3008 },
+ { 0x8500, 0x1f64, 0x2008 },
+ { 0x0500, 0x1f63, 0x0008 },
+ { 0x0500, 0x1f65, 0x0008 },
+ { 0x8900, 0x1f68, 0x2ff8 },
+ { 0x0500, 0x1f67, 0x0008 },
+ { 0x0900, 0x1f69, 0x0ff8 },
+ { 0x8500, 0x1f72, 0x4056 },
+ { 0x8900, 0x1f6e, 0x3ff8 },
+ { 0x8900, 0x1f6c, 0x2ff8 },
+ { 0x0900, 0x1f6b, 0x0ff8 },
+ { 0x0900, 0x1f6d, 0x0ff8 },
+ { 0x8500, 0x1f70, 0x204a },
+ { 0x0900, 0x1f6f, 0x0ff8 },
+ { 0x0500, 0x1f71, 0x004a },
+ { 0x8500, 0x1f76, 0x3064 },
+ { 0x8500, 0x1f74, 0x2056 },
+ { 0x0500, 0x1f73, 0x0056 },
+ { 0x0500, 0x1f75, 0x0056 },
+ { 0x8500, 0x1f78, 0x2080 },
+ { 0x0500, 0x1f77, 0x0064 },
+ { 0x0500, 0x1f79, 0x0080 },
+ { 0x8800, 0x1f9c, 0x6000 },
+ { 0x8800, 0x1f8c, 0x5000 },
+ { 0x8500, 0x1f84, 0x4008 },
+ { 0x8500, 0x1f80, 0x3008 },
+ { 0x8500, 0x1f7c, 0x207e },
+ { 0x0500, 0x1f7b, 0x0070 },
+ { 0x0500, 0x1f7d, 0x007e },
+ { 0x8500, 0x1f82, 0x2008 },
+ { 0x0500, 0x1f81, 0x0008 },
+ { 0x0500, 0x1f83, 0x0008 },
+ { 0x8800, 0x1f88, 0x3000 },
+ { 0x8500, 0x1f86, 0x2008 },
+ { 0x0500, 0x1f85, 0x0008 },
+ { 0x0500, 0x1f87, 0x0008 },
+ { 0x8800, 0x1f8a, 0x2000 },
+ { 0x0800, 0x1f89, 0x0000 },
+ { 0x0800, 0x1f8b, 0x0000 },
+ { 0x8500, 0x1f94, 0x4008 },
+ { 0x8500, 0x1f90, 0x3008 },
+ { 0x8800, 0x1f8e, 0x2000 },
+ { 0x0800, 0x1f8d, 0x0000 },
+ { 0x0800, 0x1f8f, 0x0000 },
+ { 0x8500, 0x1f92, 0x2008 },
+ { 0x0500, 0x1f91, 0x0008 },
+ { 0x0500, 0x1f93, 0x0008 },
+ { 0x8800, 0x1f98, 0x3000 },
+ { 0x8500, 0x1f96, 0x2008 },
+ { 0x0500, 0x1f95, 0x0008 },
+ { 0x0500, 0x1f97, 0x0008 },
+ { 0x8800, 0x1f9a, 0x2000 },
+ { 0x0800, 0x1f99, 0x0000 },
+ { 0x0800, 0x1f9b, 0x0000 },
+ { 0x8800, 0x1fac, 0x5000 },
+ { 0x8500, 0x1fa4, 0x4008 },
+ { 0x8500, 0x1fa0, 0x3008 },
+ { 0x8800, 0x1f9e, 0x2000 },
+ { 0x0800, 0x1f9d, 0x0000 },
+ { 0x0800, 0x1f9f, 0x0000 },
+ { 0x8500, 0x1fa2, 0x2008 },
+ { 0x0500, 0x1fa1, 0x0008 },
+ { 0x0500, 0x1fa3, 0x0008 },
+ { 0x8800, 0x1fa8, 0x3000 },
+ { 0x8500, 0x1fa6, 0x2008 },
+ { 0x0500, 0x1fa5, 0x0008 },
+ { 0x0500, 0x1fa7, 0x0008 },
+ { 0x8800, 0x1faa, 0x2000 },
+ { 0x0800, 0x1fa9, 0x0000 },
+ { 0x0800, 0x1fab, 0x0000 },
+ { 0x8500, 0x1fb4, 0x4000 },
+ { 0x8500, 0x1fb0, 0x3008 },
+ { 0x8800, 0x1fae, 0x2000 },
+ { 0x0800, 0x1fad, 0x0000 },
+ { 0x0800, 0x1faf, 0x0000 },
+ { 0x8500, 0x1fb2, 0x2000 },
+ { 0x0500, 0x1fb1, 0x0008 },
+ { 0x0500, 0x1fb3, 0x0009 },
+ { 0x8900, 0x1fb9, 0x3ff8 },
+ { 0x8500, 0x1fb7, 0x2000 },
+ { 0x0500, 0x1fb6, 0x0000 },
+ { 0x0900, 0x1fb8, 0x0ff8 },
+ { 0x8900, 0x1fbb, 0x2fb6 },
+ { 0x0900, 0x1fba, 0x0fb6 },
+ { 0x0800, 0x1fbc, 0x0000 },
+ { 0x9d00, 0x2005, 0x7000 },
+ { 0x8500, 0x1fe1, 0x6008 },
+ { 0x9800, 0x1fce, 0x5000 },
+ { 0x8500, 0x1fc6, 0x4000 },
+ { 0x9800, 0x1fc1, 0x3000 },
+ { 0x9800, 0x1fbf, 0x2000 },
+ { 0x0500, 0x1fbe, 0x0000 },
+ { 0x1800, 0x1fc0, 0x0000 },
+ { 0x8500, 0x1fc3, 0x2009 },
+ { 0x0500, 0x1fc2, 0x0000 },
+ { 0x0500, 0x1fc4, 0x0000 },
+ { 0x8900, 0x1fca, 0x3faa },
+ { 0x8900, 0x1fc8, 0x2faa },
+ { 0x0500, 0x1fc7, 0x0000 },
+ { 0x0900, 0x1fc9, 0x0faa },
+ { 0x8800, 0x1fcc, 0x2000 },
+ { 0x0900, 0x1fcb, 0x0faa },
+ { 0x1800, 0x1fcd, 0x0000 },
+ { 0x8900, 0x1fd8, 0x4ff8 },
+ { 0x8500, 0x1fd2, 0x3000 },
+ { 0x8500, 0x1fd0, 0x2008 },
+ { 0x1800, 0x1fcf, 0x0000 },
+ { 0x0500, 0x1fd1, 0x0008 },
+ { 0x8500, 0x1fd6, 0x2000 },
+ { 0x0500, 0x1fd3, 0x0000 },
+ { 0x0500, 0x1fd7, 0x0000 },
+ { 0x9800, 0x1fdd, 0x3000 },
+ { 0x8900, 0x1fda, 0x2f9c },
+ { 0x0900, 0x1fd9, 0x0ff8 },
+ { 0x0900, 0x1fdb, 0x0f9c },
+ { 0x9800, 0x1fdf, 0x2000 },
+ { 0x1800, 0x1fde, 0x0000 },
+ { 0x0500, 0x1fe0, 0x0008 },
+ { 0x8500, 0x1ff3, 0x5009 },
+ { 0x8900, 0x1fe9, 0x4ff8 },
+ { 0x8500, 0x1fe5, 0x3007 },
+ { 0x8500, 0x1fe3, 0x2000 },
+ { 0x0500, 0x1fe2, 0x0000 },
+ { 0x0500, 0x1fe4, 0x0000 },
+ { 0x8500, 0x1fe7, 0x2000 },
+ { 0x0500, 0x1fe6, 0x0000 },
+ { 0x0900, 0x1fe8, 0x0ff8 },
+ { 0x9800, 0x1fed, 0x3000 },
+ { 0x8900, 0x1feb, 0x2f90 },
+ { 0x0900, 0x1fea, 0x0f90 },
+ { 0x0900, 0x1fec, 0x0ff9 },
+ { 0x9800, 0x1fef, 0x2000 },
+ { 0x1800, 0x1fee, 0x0000 },
+ { 0x0500, 0x1ff2, 0x0000 },
+ { 0x8800, 0x1ffc, 0x4000 },
+ { 0x8900, 0x1ff8, 0x3f80 },
+ { 0x8500, 0x1ff6, 0x2000 },
+ { 0x0500, 0x1ff4, 0x0000 },
+ { 0x0500, 0x1ff7, 0x0000 },
+ { 0x8900, 0x1ffa, 0x2f82 },
+ { 0x0900, 0x1ff9, 0x0f80 },
+ { 0x0900, 0x1ffb, 0x0f82 },
+ { 0x9d00, 0x2001, 0x3000 },
+ { 0x9800, 0x1ffe, 0x2000 },
+ { 0x1800, 0x1ffd, 0x0000 },
+ { 0x1d00, 0x2000, 0x0000 },
+ { 0x9d00, 0x2003, 0x2000 },
+ { 0x1d00, 0x2002, 0x0000 },
+ { 0x1d00, 0x2004, 0x0000 },
+ { 0x9500, 0x2025, 0x6000 },
+ { 0x9100, 0x2015, 0x5000 },
+ { 0x8100, 0x200d, 0x4000 },
+ { 0x9d00, 0x2009, 0x3000 },
+ { 0x9d00, 0x2007, 0x2000 },
+ { 0x1d00, 0x2006, 0x0000 },
+ { 0x1d00, 0x2008, 0x0000 },
+ { 0x9d00, 0x200b, 0x2000 },
+ { 0x1d00, 0x200a, 0x0000 },
+ { 0x0100, 0x200c, 0x0000 },
+ { 0x9100, 0x2011, 0x3000 },
+ { 0x8100, 0x200f, 0x2000 },
+ { 0x0100, 0x200e, 0x0000 },
+ { 0x1100, 0x2010, 0x0000 },
+ { 0x9100, 0x2013, 0x2000 },
+ { 0x1100, 0x2012, 0x0000 },
+ { 0x1100, 0x2014, 0x0000 },
+ { 0x9300, 0x201d, 0x4000 },
+ { 0x9300, 0x2019, 0x3000 },
+ { 0x9500, 0x2017, 0x2000 },
+ { 0x1500, 0x2016, 0x0000 },
+ { 0x1400, 0x2018, 0x0000 },
+ { 0x9400, 0x201b, 0x2000 },
+ { 0x1600, 0x201a, 0x0000 },
+ { 0x1400, 0x201c, 0x0000 },
+ { 0x9500, 0x2021, 0x3000 },
+ { 0x9400, 0x201f, 0x2000 },
+ { 0x1600, 0x201e, 0x0000 },
+ { 0x1500, 0x2020, 0x0000 },
+ { 0x9500, 0x2023, 0x2000 },
+ { 0x1500, 0x2022, 0x0000 },
+ { 0x1500, 0x2024, 0x0000 },
+ { 0x9500, 0x2035, 0x5000 },
+ { 0x8100, 0x202d, 0x4000 },
+ { 0x9c00, 0x2029, 0x3000 },
+ { 0x9500, 0x2027, 0x2000 },
+ { 0x1500, 0x2026, 0x0000 },
+ { 0x1b00, 0x2028, 0x0000 },
+ { 0x8100, 0x202b, 0x2000 },
+ { 0x0100, 0x202a, 0x0000 },
+ { 0x0100, 0x202c, 0x0000 },
+ { 0x9500, 0x2031, 0x3000 },
+ { 0x9d00, 0x202f, 0x2000 },
+ { 0x0100, 0x202e, 0x0000 },
+ { 0x1500, 0x2030, 0x0000 },
+ { 0x9500, 0x2033, 0x2000 },
+ { 0x1500, 0x2032, 0x0000 },
+ { 0x1500, 0x2034, 0x0000 },
+ { 0x9500, 0x203d, 0x4000 },
+ { 0x9400, 0x2039, 0x3000 },
+ { 0x9500, 0x2037, 0x2000 },
+ { 0x1500, 0x2036, 0x0000 },
+ { 0x1500, 0x2038, 0x0000 },
+ { 0x9500, 0x203b, 0x2000 },
+ { 0x1300, 0x203a, 0x0000 },
+ { 0x1500, 0x203c, 0x0000 },
+ { 0x9500, 0x2041, 0x3000 },
+ { 0x9000, 0x203f, 0x2000 },
+ { 0x1500, 0x203e, 0x0000 },
+ { 0x1000, 0x2040, 0x0000 },
+ { 0x9500, 0x2043, 0x2000 },
+ { 0x1500, 0x2042, 0x0000 },
+ { 0x1900, 0x2044, 0x0000 },
+ { 0x9900, 0x21ae, 0x9000 },
+ { 0x8900, 0x211a, 0x8000 },
+ { 0x9700, 0x20a7, 0x7000 },
+ { 0x8f00, 0x2076, 0x6000 },
+ { 0x9500, 0x2057, 0x5000 },
+ { 0x9500, 0x204d, 0x4000 },
+ { 0x9500, 0x2049, 0x3000 },
+ { 0x9500, 0x2047, 0x2000 },
+ { 0x1200, 0x2046, 0x0000 },
+ { 0x1500, 0x2048, 0x0000 },
+ { 0x9500, 0x204b, 0x2000 },
+ { 0x1500, 0x204a, 0x0000 },
+ { 0x1500, 0x204c, 0x0000 },
+ { 0x9500, 0x2051, 0x3000 },
+ { 0x9500, 0x204f, 0x2000 },
+ { 0x1500, 0x204e, 0x0000 },
+ { 0x1500, 0x2050, 0x0000 },
+ { 0x9500, 0x2053, 0x2000 },
+ { 0x1900, 0x2052, 0x0000 },
+ { 0x1000, 0x2054, 0x0000 },
+ { 0x8100, 0x206c, 0x4000 },
+ { 0x8100, 0x2062, 0x3000 },
+ { 0x8100, 0x2060, 0x2000 },
+ { 0x1d00, 0x205f, 0x0000 },
+ { 0x0100, 0x2061, 0x0000 },
+ { 0x8100, 0x206a, 0x2000 },
+ { 0x0100, 0x2063, 0x0000 },
+ { 0x0100, 0x206b, 0x0000 },
+ { 0x8f00, 0x2070, 0x3000 },
+ { 0x8100, 0x206e, 0x2000 },
+ { 0x0100, 0x206d, 0x0000 },
+ { 0x0100, 0x206f, 0x0000 },
+ { 0x8f00, 0x2074, 0x2000 },
+ { 0x0500, 0x2071, 0x0000 },
+ { 0x0f00, 0x2075, 0x0000 },
+ { 0x8f00, 0x2086, 0x5000 },
+ { 0x9200, 0x207e, 0x4000 },
+ { 0x9900, 0x207a, 0x3000 },
+ { 0x8f00, 0x2078, 0x2000 },
+ { 0x0f00, 0x2077, 0x0000 },
+ { 0x0f00, 0x2079, 0x0000 },
+ { 0x9900, 0x207c, 0x2000 },
+ { 0x1900, 0x207b, 0x0000 },
+ { 0x1600, 0x207d, 0x0000 },
+ { 0x8f00, 0x2082, 0x3000 },
+ { 0x8f00, 0x2080, 0x2000 },
+ { 0x0500, 0x207f, 0x0000 },
+ { 0x0f00, 0x2081, 0x0000 },
+ { 0x8f00, 0x2084, 0x2000 },
+ { 0x0f00, 0x2083, 0x0000 },
+ { 0x0f00, 0x2085, 0x0000 },
+ { 0x9200, 0x208e, 0x4000 },
+ { 0x9900, 0x208a, 0x3000 },
+ { 0x8f00, 0x2088, 0x2000 },
+ { 0x0f00, 0x2087, 0x0000 },
+ { 0x0f00, 0x2089, 0x0000 },
+ { 0x9900, 0x208c, 0x2000 },
+ { 0x1900, 0x208b, 0x0000 },
+ { 0x1600, 0x208d, 0x0000 },
+ { 0x9700, 0x20a3, 0x3000 },
+ { 0x9700, 0x20a1, 0x2000 },
+ { 0x1700, 0x20a0, 0x0000 },
+ { 0x1700, 0x20a2, 0x0000 },
+ { 0x9700, 0x20a5, 0x2000 },
+ { 0x1700, 0x20a4, 0x0000 },
+ { 0x1700, 0x20a6, 0x0000 },
+ { 0x8c00, 0x20e5, 0x6000 },
+ { 0x8c00, 0x20d5, 0x5000 },
+ { 0x9700, 0x20af, 0x4000 },
+ { 0x9700, 0x20ab, 0x3000 },
+ { 0x9700, 0x20a9, 0x2000 },
+ { 0x1700, 0x20a8, 0x0000 },
+ { 0x1700, 0x20aa, 0x0000 },
+ { 0x9700, 0x20ad, 0x2000 },
+ { 0x1700, 0x20ac, 0x0000 },
+ { 0x1700, 0x20ae, 0x0000 },
+ { 0x8c00, 0x20d1, 0x3000 },
+ { 0x9700, 0x20b1, 0x2000 },
+ { 0x1700, 0x20b0, 0x0000 },
+ { 0x0c00, 0x20d0, 0x0000 },
+ { 0x8c00, 0x20d3, 0x2000 },
+ { 0x0c00, 0x20d2, 0x0000 },
+ { 0x0c00, 0x20d4, 0x0000 },
+ { 0x8b00, 0x20dd, 0x4000 },
+ { 0x8c00, 0x20d9, 0x3000 },
+ { 0x8c00, 0x20d7, 0x2000 },
+ { 0x0c00, 0x20d6, 0x0000 },
+ { 0x0c00, 0x20d8, 0x0000 },
+ { 0x8c00, 0x20db, 0x2000 },
+ { 0x0c00, 0x20da, 0x0000 },
+ { 0x0c00, 0x20dc, 0x0000 },
+ { 0x8c00, 0x20e1, 0x3000 },
+ { 0x8b00, 0x20df, 0x2000 },
+ { 0x0b00, 0x20de, 0x0000 },
+ { 0x0b00, 0x20e0, 0x0000 },
+ { 0x8b00, 0x20e3, 0x2000 },
+ { 0x0b00, 0x20e2, 0x0000 },
+ { 0x0b00, 0x20e4, 0x0000 },
+ { 0x8500, 0x210a, 0x5000 },
+ { 0x8900, 0x2102, 0x4000 },
+ { 0x8c00, 0x20e9, 0x3000 },
+ { 0x8c00, 0x20e7, 0x2000 },
+ { 0x0c00, 0x20e6, 0x0000 },
+ { 0x0c00, 0x20e8, 0x0000 },
+ { 0x9a00, 0x2100, 0x2000 },
+ { 0x0c00, 0x20ea, 0x0000 },
+ { 0x1a00, 0x2101, 0x0000 },
+ { 0x9a00, 0x2106, 0x3000 },
+ { 0x9a00, 0x2104, 0x2000 },
+ { 0x1a00, 0x2103, 0x0000 },
+ { 0x1a00, 0x2105, 0x0000 },
+ { 0x9a00, 0x2108, 0x2000 },
+ { 0x0900, 0x2107, 0x0000 },
+ { 0x1a00, 0x2109, 0x0000 },
+ { 0x8900, 0x2112, 0x4000 },
+ { 0x8500, 0x210e, 0x3000 },
+ { 0x8900, 0x210c, 0x2000 },
+ { 0x0900, 0x210b, 0x0000 },
+ { 0x0900, 0x210d, 0x0000 },
+ { 0x8900, 0x2110, 0x2000 },
+ { 0x0500, 0x210f, 0x0000 },
+ { 0x0900, 0x2111, 0x0000 },
+ { 0x9a00, 0x2116, 0x3000 },
+ { 0x9a00, 0x2114, 0x2000 },
+ { 0x0500, 0x2113, 0x0000 },
+ { 0x0900, 0x2115, 0x0000 },
+ { 0x9a00, 0x2118, 0x2000 },
+ { 0x1a00, 0x2117, 0x0000 },
+ { 0x0900, 0x2119, 0x0000 },
+ { 0x8e00, 0x2162, 0x7000 },
+ { 0x9a00, 0x213a, 0x6000 },
+ { 0x8900, 0x212a, 0x5000 },
+ { 0x9a00, 0x2122, 0x4000 },
+ { 0x9a00, 0x211e, 0x3000 },
+ { 0x8900, 0x211c, 0x2000 },
+ { 0x0900, 0x211b, 0x0000 },
+ { 0x0900, 0x211d, 0x0000 },
+ { 0x9a00, 0x2120, 0x2000 },
+ { 0x1a00, 0x211f, 0x0000 },
+ { 0x1a00, 0x2121, 0x0000 },
+ { 0x8900, 0x2126, 0x3000 },
+ { 0x8900, 0x2124, 0x2000 },
+ { 0x1a00, 0x2123, 0x0000 },
+ { 0x1a00, 0x2125, 0x0000 },
+ { 0x8900, 0x2128, 0x2000 },
+ { 0x1a00, 0x2127, 0x0000 },
+ { 0x1a00, 0x2129, 0x0000 },
+ { 0x9a00, 0x2132, 0x4000 },
+ { 0x9a00, 0x212e, 0x3000 },
+ { 0x8900, 0x212c, 0x2000 },
+ { 0x0900, 0x212b, 0x0000 },
+ { 0x0900, 0x212d, 0x0000 },
+ { 0x8900, 0x2130, 0x2000 },
+ { 0x0500, 0x212f, 0x0000 },
+ { 0x0900, 0x2131, 0x0000 },
+ { 0x8700, 0x2136, 0x3000 },
+ { 0x8500, 0x2134, 0x2000 },
+ { 0x0900, 0x2133, 0x0000 },
+ { 0x0700, 0x2135, 0x0000 },
+ { 0x8700, 0x2138, 0x2000 },
+ { 0x0700, 0x2137, 0x0000 },
+ { 0x0500, 0x2139, 0x0000 },
+ { 0x9900, 0x214b, 0x5000 },
+ { 0x9900, 0x2143, 0x4000 },
+ { 0x8900, 0x213f, 0x3000 },
+ { 0x8500, 0x213d, 0x2000 },
+ { 0x1a00, 0x213b, 0x0000 },
+ { 0x0900, 0x213e, 0x0000 },
+ { 0x9900, 0x2141, 0x2000 },
+ { 0x1900, 0x2140, 0x0000 },
+ { 0x1900, 0x2142, 0x0000 },
+ { 0x8500, 0x2147, 0x3000 },
+ { 0x8900, 0x2145, 0x2000 },
+ { 0x1900, 0x2144, 0x0000 },
+ { 0x0500, 0x2146, 0x0000 },
+ { 0x8500, 0x2149, 0x2000 },
+ { 0x0500, 0x2148, 0x0000 },
+ { 0x1a00, 0x214a, 0x0000 },
+ { 0x8f00, 0x215a, 0x4000 },
+ { 0x8f00, 0x2156, 0x3000 },
+ { 0x8f00, 0x2154, 0x2000 },
+ { 0x0f00, 0x2153, 0x0000 },
+ { 0x0f00, 0x2155, 0x0000 },
+ { 0x8f00, 0x2158, 0x2000 },
+ { 0x0f00, 0x2157, 0x0000 },
+ { 0x0f00, 0x2159, 0x0000 },
+ { 0x8f00, 0x215e, 0x3000 },
+ { 0x8f00, 0x215c, 0x2000 },
+ { 0x0f00, 0x215b, 0x0000 },
+ { 0x0f00, 0x215d, 0x0000 },
+ { 0x8e00, 0x2160, 0x2000 },
+ { 0x0f00, 0x215f, 0x0000 },
+ { 0x0e00, 0x2161, 0x0000 },
+ { 0x8e00, 0x2182, 0x6000 },
+ { 0x8e00, 0x2172, 0x5000 },
+ { 0x8e00, 0x216a, 0x4000 },
+ { 0x8e00, 0x2166, 0x3000 },
+ { 0x8e00, 0x2164, 0x2000 },
+ { 0x0e00, 0x2163, 0x0000 },
+ { 0x0e00, 0x2165, 0x0000 },
+ { 0x8e00, 0x2168, 0x2000 },
+ { 0x0e00, 0x2167, 0x0000 },
+ { 0x0e00, 0x2169, 0x0000 },
+ { 0x8e00, 0x216e, 0x3000 },
+ { 0x8e00, 0x216c, 0x2000 },
+ { 0x0e00, 0x216b, 0x0000 },
+ { 0x0e00, 0x216d, 0x0000 },
+ { 0x8e00, 0x2170, 0x2000 },
+ { 0x0e00, 0x216f, 0x0000 },
+ { 0x0e00, 0x2171, 0x0000 },
+ { 0x8e00, 0x217a, 0x4000 },
+ { 0x8e00, 0x2176, 0x3000 },
+ { 0x8e00, 0x2174, 0x2000 },
+ { 0x0e00, 0x2173, 0x0000 },
+ { 0x0e00, 0x2175, 0x0000 },
+ { 0x8e00, 0x2178, 0x2000 },
+ { 0x0e00, 0x2177, 0x0000 },
+ { 0x0e00, 0x2179, 0x0000 },
+ { 0x8e00, 0x217e, 0x3000 },
+ { 0x8e00, 0x217c, 0x2000 },
+ { 0x0e00, 0x217b, 0x0000 },
+ { 0x0e00, 0x217d, 0x0000 },
+ { 0x8e00, 0x2180, 0x2000 },
+ { 0x0e00, 0x217f, 0x0000 },
+ { 0x0e00, 0x2181, 0x0000 },
+ { 0x9a00, 0x219e, 0x5000 },
+ { 0x9a00, 0x2196, 0x4000 },
+ { 0x9900, 0x2192, 0x3000 },
+ { 0x9900, 0x2190, 0x2000 },
+ { 0x0e00, 0x2183, 0x0000 },
+ { 0x1900, 0x2191, 0x0000 },
+ { 0x9900, 0x2194, 0x2000 },
+ { 0x1900, 0x2193, 0x0000 },
+ { 0x1a00, 0x2195, 0x0000 },
+ { 0x9900, 0x219a, 0x3000 },
+ { 0x9a00, 0x2198, 0x2000 },
+ { 0x1a00, 0x2197, 0x0000 },
+ { 0x1a00, 0x2199, 0x0000 },
+ { 0x9a00, 0x219c, 0x2000 },
+ { 0x1900, 0x219b, 0x0000 },
+ { 0x1a00, 0x219d, 0x0000 },
+ { 0x9900, 0x21a6, 0x4000 },
+ { 0x9a00, 0x21a2, 0x3000 },
+ { 0x9900, 0x21a0, 0x2000 },
+ { 0x1a00, 0x219f, 0x0000 },
+ { 0x1a00, 0x21a1, 0x0000 },
+ { 0x9a00, 0x21a4, 0x2000 },
+ { 0x1900, 0x21a3, 0x0000 },
+ { 0x1a00, 0x21a5, 0x0000 },
+ { 0x9a00, 0x21aa, 0x3000 },
+ { 0x9a00, 0x21a8, 0x2000 },
+ { 0x1a00, 0x21a7, 0x0000 },
+ { 0x1a00, 0x21a9, 0x0000 },
+ { 0x9a00, 0x21ac, 0x2000 },
+ { 0x1a00, 0x21ab, 0x0000 },
+ { 0x1a00, 0x21ad, 0x0000 },
+ { 0x9900, 0x222e, 0x8000 },
+ { 0x9a00, 0x21ee, 0x7000 },
+ { 0x9900, 0x21ce, 0x6000 },
+ { 0x9a00, 0x21be, 0x5000 },
+ { 0x9a00, 0x21b6, 0x4000 },
+ { 0x9a00, 0x21b2, 0x3000 },
+ { 0x9a00, 0x21b0, 0x2000 },
+ { 0x1a00, 0x21af, 0x0000 },
+ { 0x1a00, 0x21b1, 0x0000 },
+ { 0x9a00, 0x21b4, 0x2000 },
+ { 0x1a00, 0x21b3, 0x0000 },
+ { 0x1a00, 0x21b5, 0x0000 },
+ { 0x9a00, 0x21ba, 0x3000 },
+ { 0x9a00, 0x21b8, 0x2000 },
+ { 0x1a00, 0x21b7, 0x0000 },
+ { 0x1a00, 0x21b9, 0x0000 },
+ { 0x9a00, 0x21bc, 0x2000 },
+ { 0x1a00, 0x21bb, 0x0000 },
+ { 0x1a00, 0x21bd, 0x0000 },
+ { 0x9a00, 0x21c6, 0x4000 },
+ { 0x9a00, 0x21c2, 0x3000 },
+ { 0x9a00, 0x21c0, 0x2000 },
+ { 0x1a00, 0x21bf, 0x0000 },
+ { 0x1a00, 0x21c1, 0x0000 },
+ { 0x9a00, 0x21c4, 0x2000 },
+ { 0x1a00, 0x21c3, 0x0000 },
+ { 0x1a00, 0x21c5, 0x0000 },
+ { 0x9a00, 0x21ca, 0x3000 },
+ { 0x9a00, 0x21c8, 0x2000 },
+ { 0x1a00, 0x21c7, 0x0000 },
+ { 0x1a00, 0x21c9, 0x0000 },
+ { 0x9a00, 0x21cc, 0x2000 },
+ { 0x1a00, 0x21cb, 0x0000 },
+ { 0x1a00, 0x21cd, 0x0000 },
+ { 0x9a00, 0x21de, 0x5000 },
+ { 0x9a00, 0x21d6, 0x4000 },
+ { 0x9900, 0x21d2, 0x3000 },
+ { 0x9a00, 0x21d0, 0x2000 },
+ { 0x1900, 0x21cf, 0x0000 },
+ { 0x1a00, 0x21d1, 0x0000 },
+ { 0x9900, 0x21d4, 0x2000 },
+ { 0x1a00, 0x21d3, 0x0000 },
+ { 0x1a00, 0x21d5, 0x0000 },
+ { 0x9a00, 0x21da, 0x3000 },
+ { 0x9a00, 0x21d8, 0x2000 },
+ { 0x1a00, 0x21d7, 0x0000 },
+ { 0x1a00, 0x21d9, 0x0000 },
+ { 0x9a00, 0x21dc, 0x2000 },
+ { 0x1a00, 0x21db, 0x0000 },
+ { 0x1a00, 0x21dd, 0x0000 },
+ { 0x9a00, 0x21e6, 0x4000 },
+ { 0x9a00, 0x21e2, 0x3000 },
+ { 0x9a00, 0x21e0, 0x2000 },
+ { 0x1a00, 0x21df, 0x0000 },
+ { 0x1a00, 0x21e1, 0x0000 },
+ { 0x9a00, 0x21e4, 0x2000 },
+ { 0x1a00, 0x21e3, 0x0000 },
+ { 0x1a00, 0x21e5, 0x0000 },
+ { 0x9a00, 0x21ea, 0x3000 },
+ { 0x9a00, 0x21e8, 0x2000 },
+ { 0x1a00, 0x21e7, 0x0000 },
+ { 0x1a00, 0x21e9, 0x0000 },
+ { 0x9a00, 0x21ec, 0x2000 },
+ { 0x1a00, 0x21eb, 0x0000 },
+ { 0x1a00, 0x21ed, 0x0000 },
+ { 0x9900, 0x220e, 0x6000 },
+ { 0x9900, 0x21fe, 0x5000 },
+ { 0x9900, 0x21f6, 0x4000 },
+ { 0x9a00, 0x21f2, 0x3000 },
+ { 0x9a00, 0x21f0, 0x2000 },
+ { 0x1a00, 0x21ef, 0x0000 },
+ { 0x1a00, 0x21f1, 0x0000 },
+ { 0x9900, 0x21f4, 0x2000 },
+ { 0x1a00, 0x21f3, 0x0000 },
+ { 0x1900, 0x21f5, 0x0000 },
+ { 0x9900, 0x21fa, 0x3000 },
+ { 0x9900, 0x21f8, 0x2000 },
+ { 0x1900, 0x21f7, 0x0000 },
+ { 0x1900, 0x21f9, 0x0000 },
+ { 0x9900, 0x21fc, 0x2000 },
+ { 0x1900, 0x21fb, 0x0000 },
+ { 0x1900, 0x21fd, 0x0000 },
+ { 0x9900, 0x2206, 0x4000 },
+ { 0x9900, 0x2202, 0x3000 },
+ { 0x9900, 0x2200, 0x2000 },
+ { 0x1900, 0x21ff, 0x0000 },
+ { 0x1900, 0x2201, 0x0000 },
+ { 0x9900, 0x2204, 0x2000 },
+ { 0x1900, 0x2203, 0x0000 },
+ { 0x1900, 0x2205, 0x0000 },
+ { 0x9900, 0x220a, 0x3000 },
+ { 0x9900, 0x2208, 0x2000 },
+ { 0x1900, 0x2207, 0x0000 },
+ { 0x1900, 0x2209, 0x0000 },
+ { 0x9900, 0x220c, 0x2000 },
+ { 0x1900, 0x220b, 0x0000 },
+ { 0x1900, 0x220d, 0x0000 },
+ { 0x9900, 0x221e, 0x5000 },
+ { 0x9900, 0x2216, 0x4000 },
+ { 0x9900, 0x2212, 0x3000 },
+ { 0x9900, 0x2210, 0x2000 },
+ { 0x1900, 0x220f, 0x0000 },
+ { 0x1900, 0x2211, 0x0000 },
+ { 0x9900, 0x2214, 0x2000 },
+ { 0x1900, 0x2213, 0x0000 },
+ { 0x1900, 0x2215, 0x0000 },
+ { 0x9900, 0x221a, 0x3000 },
+ { 0x9900, 0x2218, 0x2000 },
+ { 0x1900, 0x2217, 0x0000 },
+ { 0x1900, 0x2219, 0x0000 },
+ { 0x9900, 0x221c, 0x2000 },
+ { 0x1900, 0x221b, 0x0000 },
+ { 0x1900, 0x221d, 0x0000 },
+ { 0x9900, 0x2226, 0x4000 },
+ { 0x9900, 0x2222, 0x3000 },
+ { 0x9900, 0x2220, 0x2000 },
+ { 0x1900, 0x221f, 0x0000 },
+ { 0x1900, 0x2221, 0x0000 },
+ { 0x9900, 0x2224, 0x2000 },
+ { 0x1900, 0x2223, 0x0000 },
+ { 0x1900, 0x2225, 0x0000 },
+ { 0x9900, 0x222a, 0x3000 },
+ { 0x9900, 0x2228, 0x2000 },
+ { 0x1900, 0x2227, 0x0000 },
+ { 0x1900, 0x2229, 0x0000 },
+ { 0x9900, 0x222c, 0x2000 },
+ { 0x1900, 0x222b, 0x0000 },
+ { 0x1900, 0x222d, 0x0000 },
+ { 0x9900, 0x226e, 0x7000 },
+ { 0x9900, 0x224e, 0x6000 },
+ { 0x9900, 0x223e, 0x5000 },
+ { 0x9900, 0x2236, 0x4000 },
+ { 0x9900, 0x2232, 0x3000 },
+ { 0x9900, 0x2230, 0x2000 },
+ { 0x1900, 0x222f, 0x0000 },
+ { 0x1900, 0x2231, 0x0000 },
+ { 0x9900, 0x2234, 0x2000 },
+ { 0x1900, 0x2233, 0x0000 },
+ { 0x1900, 0x2235, 0x0000 },
+ { 0x9900, 0x223a, 0x3000 },
+ { 0x9900, 0x2238, 0x2000 },
+ { 0x1900, 0x2237, 0x0000 },
+ { 0x1900, 0x2239, 0x0000 },
+ { 0x9900, 0x223c, 0x2000 },
+ { 0x1900, 0x223b, 0x0000 },
+ { 0x1900, 0x223d, 0x0000 },
+ { 0x9900, 0x2246, 0x4000 },
+ { 0x9900, 0x2242, 0x3000 },
+ { 0x9900, 0x2240, 0x2000 },
+ { 0x1900, 0x223f, 0x0000 },
+ { 0x1900, 0x2241, 0x0000 },
+ { 0x9900, 0x2244, 0x2000 },
+ { 0x1900, 0x2243, 0x0000 },
+ { 0x1900, 0x2245, 0x0000 },
+ { 0x9900, 0x224a, 0x3000 },
+ { 0x9900, 0x2248, 0x2000 },
+ { 0x1900, 0x2247, 0x0000 },
+ { 0x1900, 0x2249, 0x0000 },
+ { 0x9900, 0x224c, 0x2000 },
+ { 0x1900, 0x224b, 0x0000 },
+ { 0x1900, 0x224d, 0x0000 },
+ { 0x9900, 0x225e, 0x5000 },
+ { 0x9900, 0x2256, 0x4000 },
+ { 0x9900, 0x2252, 0x3000 },
+ { 0x9900, 0x2250, 0x2000 },
+ { 0x1900, 0x224f, 0x0000 },
+ { 0x1900, 0x2251, 0x0000 },
+ { 0x9900, 0x2254, 0x2000 },
+ { 0x1900, 0x2253, 0x0000 },
+ { 0x1900, 0x2255, 0x0000 },
+ { 0x9900, 0x225a, 0x3000 },
+ { 0x9900, 0x2258, 0x2000 },
+ { 0x1900, 0x2257, 0x0000 },
+ { 0x1900, 0x2259, 0x0000 },
+ { 0x9900, 0x225c, 0x2000 },
+ { 0x1900, 0x225b, 0x0000 },
+ { 0x1900, 0x225d, 0x0000 },
+ { 0x9900, 0x2266, 0x4000 },
+ { 0x9900, 0x2262, 0x3000 },
+ { 0x9900, 0x2260, 0x2000 },
+ { 0x1900, 0x225f, 0x0000 },
+ { 0x1900, 0x2261, 0x0000 },
+ { 0x9900, 0x2264, 0x2000 },
+ { 0x1900, 0x2263, 0x0000 },
+ { 0x1900, 0x2265, 0x0000 },
+ { 0x9900, 0x226a, 0x3000 },
+ { 0x9900, 0x2268, 0x2000 },
+ { 0x1900, 0x2267, 0x0000 },
+ { 0x1900, 0x2269, 0x0000 },
+ { 0x9900, 0x226c, 0x2000 },
+ { 0x1900, 0x226b, 0x0000 },
+ { 0x1900, 0x226d, 0x0000 },
+ { 0x9900, 0x228e, 0x6000 },
+ { 0x9900, 0x227e, 0x5000 },
+ { 0x9900, 0x2276, 0x4000 },
+ { 0x9900, 0x2272, 0x3000 },
+ { 0x9900, 0x2270, 0x2000 },
+ { 0x1900, 0x226f, 0x0000 },
+ { 0x1900, 0x2271, 0x0000 },
+ { 0x9900, 0x2274, 0x2000 },
+ { 0x1900, 0x2273, 0x0000 },
+ { 0x1900, 0x2275, 0x0000 },
+ { 0x9900, 0x227a, 0x3000 },
+ { 0x9900, 0x2278, 0x2000 },
+ { 0x1900, 0x2277, 0x0000 },
+ { 0x1900, 0x2279, 0x0000 },
+ { 0x9900, 0x227c, 0x2000 },
+ { 0x1900, 0x227b, 0x0000 },
+ { 0x1900, 0x227d, 0x0000 },
+ { 0x9900, 0x2286, 0x4000 },
+ { 0x9900, 0x2282, 0x3000 },
+ { 0x9900, 0x2280, 0x2000 },
+ { 0x1900, 0x227f, 0x0000 },
+ { 0x1900, 0x2281, 0x0000 },
+ { 0x9900, 0x2284, 0x2000 },
+ { 0x1900, 0x2283, 0x0000 },
+ { 0x1900, 0x2285, 0x0000 },
+ { 0x9900, 0x228a, 0x3000 },
+ { 0x9900, 0x2288, 0x2000 },
+ { 0x1900, 0x2287, 0x0000 },
+ { 0x1900, 0x2289, 0x0000 },
+ { 0x9900, 0x228c, 0x2000 },
+ { 0x1900, 0x228b, 0x0000 },
+ { 0x1900, 0x228d, 0x0000 },
+ { 0x9900, 0x229e, 0x5000 },
+ { 0x9900, 0x2296, 0x4000 },
+ { 0x9900, 0x2292, 0x3000 },
+ { 0x9900, 0x2290, 0x2000 },
+ { 0x1900, 0x228f, 0x0000 },
+ { 0x1900, 0x2291, 0x0000 },
+ { 0x9900, 0x2294, 0x2000 },
+ { 0x1900, 0x2293, 0x0000 },
+ { 0x1900, 0x2295, 0x0000 },
+ { 0x9900, 0x229a, 0x3000 },
+ { 0x9900, 0x2298, 0x2000 },
+ { 0x1900, 0x2297, 0x0000 },
+ { 0x1900, 0x2299, 0x0000 },
+ { 0x9900, 0x229c, 0x2000 },
+ { 0x1900, 0x229b, 0x0000 },
+ { 0x1900, 0x229d, 0x0000 },
+ { 0x9900, 0x22a6, 0x4000 },
+ { 0x9900, 0x22a2, 0x3000 },
+ { 0x9900, 0x22a0, 0x2000 },
+ { 0x1900, 0x229f, 0x0000 },
+ { 0x1900, 0x22a1, 0x0000 },
+ { 0x9900, 0x22a4, 0x2000 },
+ { 0x1900, 0x22a3, 0x0000 },
+ { 0x1900, 0x22a5, 0x0000 },
+ { 0x9900, 0x22aa, 0x3000 },
+ { 0x9900, 0x22a8, 0x2000 },
+ { 0x1900, 0x22a7, 0x0000 },
+ { 0x1900, 0x22a9, 0x0000 },
+ { 0x9900, 0x22ac, 0x2000 },
+ { 0x1900, 0x22ab, 0x0000 },
+ { 0x1900, 0x22ad, 0x0000 },
+ { 0x8f00, 0x2787, 0xb000 },
+ { 0x9a00, 0x250b, 0xa000 },
+ { 0x9900, 0x23ae, 0x9000 },
+ { 0x9a00, 0x232e, 0x8000 },
+ { 0x9900, 0x22ee, 0x7000 },
+ { 0x9900, 0x22ce, 0x6000 },
+ { 0x9900, 0x22be, 0x5000 },
+ { 0x9900, 0x22b6, 0x4000 },
+ { 0x9900, 0x22b2, 0x3000 },
+ { 0x9900, 0x22b0, 0x2000 },
+ { 0x1900, 0x22af, 0x0000 },
+ { 0x1900, 0x22b1, 0x0000 },
+ { 0x9900, 0x22b4, 0x2000 },
+ { 0x1900, 0x22b3, 0x0000 },
+ { 0x1900, 0x22b5, 0x0000 },
+ { 0x9900, 0x22ba, 0x3000 },
+ { 0x9900, 0x22b8, 0x2000 },
+ { 0x1900, 0x22b7, 0x0000 },
+ { 0x1900, 0x22b9, 0x0000 },
+ { 0x9900, 0x22bc, 0x2000 },
+ { 0x1900, 0x22bb, 0x0000 },
+ { 0x1900, 0x22bd, 0x0000 },
+ { 0x9900, 0x22c6, 0x4000 },
+ { 0x9900, 0x22c2, 0x3000 },
+ { 0x9900, 0x22c0, 0x2000 },
+ { 0x1900, 0x22bf, 0x0000 },
+ { 0x1900, 0x22c1, 0x0000 },
+ { 0x9900, 0x22c4, 0x2000 },
+ { 0x1900, 0x22c3, 0x0000 },
+ { 0x1900, 0x22c5, 0x0000 },
+ { 0x9900, 0x22ca, 0x3000 },
+ { 0x9900, 0x22c8, 0x2000 },
+ { 0x1900, 0x22c7, 0x0000 },
+ { 0x1900, 0x22c9, 0x0000 },
+ { 0x9900, 0x22cc, 0x2000 },
+ { 0x1900, 0x22cb, 0x0000 },
+ { 0x1900, 0x22cd, 0x0000 },
+ { 0x9900, 0x22de, 0x5000 },
+ { 0x9900, 0x22d6, 0x4000 },
+ { 0x9900, 0x22d2, 0x3000 },
+ { 0x9900, 0x22d0, 0x2000 },
+ { 0x1900, 0x22cf, 0x0000 },
+ { 0x1900, 0x22d1, 0x0000 },
+ { 0x9900, 0x22d4, 0x2000 },
+ { 0x1900, 0x22d3, 0x0000 },
+ { 0x1900, 0x22d5, 0x0000 },
+ { 0x9900, 0x22da, 0x3000 },
+ { 0x9900, 0x22d8, 0x2000 },
+ { 0x1900, 0x22d7, 0x0000 },
+ { 0x1900, 0x22d9, 0x0000 },
+ { 0x9900, 0x22dc, 0x2000 },
+ { 0x1900, 0x22db, 0x0000 },
+ { 0x1900, 0x22dd, 0x0000 },
+ { 0x9900, 0x22e6, 0x4000 },
+ { 0x9900, 0x22e2, 0x3000 },
+ { 0x9900, 0x22e0, 0x2000 },
+ { 0x1900, 0x22df, 0x0000 },
+ { 0x1900, 0x22e1, 0x0000 },
+ { 0x9900, 0x22e4, 0x2000 },
+ { 0x1900, 0x22e3, 0x0000 },
+ { 0x1900, 0x22e5, 0x0000 },
+ { 0x9900, 0x22ea, 0x3000 },
+ { 0x9900, 0x22e8, 0x2000 },
+ { 0x1900, 0x22e7, 0x0000 },
+ { 0x1900, 0x22e9, 0x0000 },
+ { 0x9900, 0x22ec, 0x2000 },
+ { 0x1900, 0x22eb, 0x0000 },
+ { 0x1900, 0x22ed, 0x0000 },
+ { 0x9a00, 0x230e, 0x6000 },
+ { 0x9900, 0x22fe, 0x5000 },
+ { 0x9900, 0x22f6, 0x4000 },
+ { 0x9900, 0x22f2, 0x3000 },
+ { 0x9900, 0x22f0, 0x2000 },
+ { 0x1900, 0x22ef, 0x0000 },
+ { 0x1900, 0x22f1, 0x0000 },
+ { 0x9900, 0x22f4, 0x2000 },
+ { 0x1900, 0x22f3, 0x0000 },
+ { 0x1900, 0x22f5, 0x0000 },
+ { 0x9900, 0x22fa, 0x3000 },
+ { 0x9900, 0x22f8, 0x2000 },
+ { 0x1900, 0x22f7, 0x0000 },
+ { 0x1900, 0x22f9, 0x0000 },
+ { 0x9900, 0x22fc, 0x2000 },
+ { 0x1900, 0x22fb, 0x0000 },
+ { 0x1900, 0x22fd, 0x0000 },
+ { 0x9a00, 0x2306, 0x4000 },
+ { 0x9a00, 0x2302, 0x3000 },
+ { 0x9a00, 0x2300, 0x2000 },
+ { 0x1900, 0x22ff, 0x0000 },
+ { 0x1a00, 0x2301, 0x0000 },
+ { 0x9a00, 0x2304, 0x2000 },
+ { 0x1a00, 0x2303, 0x0000 },
+ { 0x1a00, 0x2305, 0x0000 },
+ { 0x9900, 0x230a, 0x3000 },
+ { 0x9900, 0x2308, 0x2000 },
+ { 0x1a00, 0x2307, 0x0000 },
+ { 0x1900, 0x2309, 0x0000 },
+ { 0x9a00, 0x230c, 0x2000 },
+ { 0x1900, 0x230b, 0x0000 },
+ { 0x1a00, 0x230d, 0x0000 },
+ { 0x9a00, 0x231e, 0x5000 },
+ { 0x9a00, 0x2316, 0x4000 },
+ { 0x9a00, 0x2312, 0x3000 },
+ { 0x9a00, 0x2310, 0x2000 },
+ { 0x1a00, 0x230f, 0x0000 },
+ { 0x1a00, 0x2311, 0x0000 },
+ { 0x9a00, 0x2314, 0x2000 },
+ { 0x1a00, 0x2313, 0x0000 },
+ { 0x1a00, 0x2315, 0x0000 },
+ { 0x9a00, 0x231a, 0x3000 },
+ { 0x9a00, 0x2318, 0x2000 },
+ { 0x1a00, 0x2317, 0x0000 },
+ { 0x1a00, 0x2319, 0x0000 },
+ { 0x9a00, 0x231c, 0x2000 },
+ { 0x1a00, 0x231b, 0x0000 },
+ { 0x1a00, 0x231d, 0x0000 },
+ { 0x9a00, 0x2326, 0x4000 },
+ { 0x9a00, 0x2322, 0x3000 },
+ { 0x9900, 0x2320, 0x2000 },
+ { 0x1a00, 0x231f, 0x0000 },
+ { 0x1900, 0x2321, 0x0000 },
+ { 0x9a00, 0x2324, 0x2000 },
+ { 0x1a00, 0x2323, 0x0000 },
+ { 0x1a00, 0x2325, 0x0000 },
+ { 0x9200, 0x232a, 0x3000 },
+ { 0x9a00, 0x2328, 0x2000 },
+ { 0x1a00, 0x2327, 0x0000 },
+ { 0x1600, 0x2329, 0x0000 },
+ { 0x9a00, 0x232c, 0x2000 },
+ { 0x1a00, 0x232b, 0x0000 },
+ { 0x1a00, 0x232d, 0x0000 },
+ { 0x9a00, 0x236e, 0x7000 },
+ { 0x9a00, 0x234e, 0x6000 },
+ { 0x9a00, 0x233e, 0x5000 },
+ { 0x9a00, 0x2336, 0x4000 },
+ { 0x9a00, 0x2332, 0x3000 },
+ { 0x9a00, 0x2330, 0x2000 },
+ { 0x1a00, 0x232f, 0x0000 },
+ { 0x1a00, 0x2331, 0x0000 },
+ { 0x9a00, 0x2334, 0x2000 },
+ { 0x1a00, 0x2333, 0x0000 },
+ { 0x1a00, 0x2335, 0x0000 },
+ { 0x9a00, 0x233a, 0x3000 },
+ { 0x9a00, 0x2338, 0x2000 },
+ { 0x1a00, 0x2337, 0x0000 },
+ { 0x1a00, 0x2339, 0x0000 },
+ { 0x9a00, 0x233c, 0x2000 },
+ { 0x1a00, 0x233b, 0x0000 },
+ { 0x1a00, 0x233d, 0x0000 },
+ { 0x9a00, 0x2346, 0x4000 },
+ { 0x9a00, 0x2342, 0x3000 },
+ { 0x9a00, 0x2340, 0x2000 },
+ { 0x1a00, 0x233f, 0x0000 },
+ { 0x1a00, 0x2341, 0x0000 },
+ { 0x9a00, 0x2344, 0x2000 },
+ { 0x1a00, 0x2343, 0x0000 },
+ { 0x1a00, 0x2345, 0x0000 },
+ { 0x9a00, 0x234a, 0x3000 },
+ { 0x9a00, 0x2348, 0x2000 },
+ { 0x1a00, 0x2347, 0x0000 },
+ { 0x1a00, 0x2349, 0x0000 },
+ { 0x9a00, 0x234c, 0x2000 },
+ { 0x1a00, 0x234b, 0x0000 },
+ { 0x1a00, 0x234d, 0x0000 },
+ { 0x9a00, 0x235e, 0x5000 },
+ { 0x9a00, 0x2356, 0x4000 },
+ { 0x9a00, 0x2352, 0x3000 },
+ { 0x9a00, 0x2350, 0x2000 },
+ { 0x1a00, 0x234f, 0x0000 },
+ { 0x1a00, 0x2351, 0x0000 },
+ { 0x9a00, 0x2354, 0x2000 },
+ { 0x1a00, 0x2353, 0x0000 },
+ { 0x1a00, 0x2355, 0x0000 },
+ { 0x9a00, 0x235a, 0x3000 },
+ { 0x9a00, 0x2358, 0x2000 },
+ { 0x1a00, 0x2357, 0x0000 },
+ { 0x1a00, 0x2359, 0x0000 },
+ { 0x9a00, 0x235c, 0x2000 },
+ { 0x1a00, 0x235b, 0x0000 },
+ { 0x1a00, 0x235d, 0x0000 },
+ { 0x9a00, 0x2366, 0x4000 },
+ { 0x9a00, 0x2362, 0x3000 },
+ { 0x9a00, 0x2360, 0x2000 },
+ { 0x1a00, 0x235f, 0x0000 },
+ { 0x1a00, 0x2361, 0x0000 },
+ { 0x9a00, 0x2364, 0x2000 },
+ { 0x1a00, 0x2363, 0x0000 },
+ { 0x1a00, 0x2365, 0x0000 },
+ { 0x9a00, 0x236a, 0x3000 },
+ { 0x9a00, 0x2368, 0x2000 },
+ { 0x1a00, 0x2367, 0x0000 },
+ { 0x1a00, 0x2369, 0x0000 },
+ { 0x9a00, 0x236c, 0x2000 },
+ { 0x1a00, 0x236b, 0x0000 },
+ { 0x1a00, 0x236d, 0x0000 },
+ { 0x9a00, 0x238e, 0x6000 },
+ { 0x9a00, 0x237e, 0x5000 },
+ { 0x9a00, 0x2376, 0x4000 },
+ { 0x9a00, 0x2372, 0x3000 },
+ { 0x9a00, 0x2370, 0x2000 },
+ { 0x1a00, 0x236f, 0x0000 },
+ { 0x1a00, 0x2371, 0x0000 },
+ { 0x9a00, 0x2374, 0x2000 },
+ { 0x1a00, 0x2373, 0x0000 },
+ { 0x1a00, 0x2375, 0x0000 },
+ { 0x9a00, 0x237a, 0x3000 },
+ { 0x9a00, 0x2378, 0x2000 },
+ { 0x1a00, 0x2377, 0x0000 },
+ { 0x1a00, 0x2379, 0x0000 },
+ { 0x9900, 0x237c, 0x2000 },
+ { 0x1a00, 0x237b, 0x0000 },
+ { 0x1a00, 0x237d, 0x0000 },
+ { 0x9a00, 0x2386, 0x4000 },
+ { 0x9a00, 0x2382, 0x3000 },
+ { 0x9a00, 0x2380, 0x2000 },
+ { 0x1a00, 0x237f, 0x0000 },
+ { 0x1a00, 0x2381, 0x0000 },
+ { 0x9a00, 0x2384, 0x2000 },
+ { 0x1a00, 0x2383, 0x0000 },
+ { 0x1a00, 0x2385, 0x0000 },
+ { 0x9a00, 0x238a, 0x3000 },
+ { 0x9a00, 0x2388, 0x2000 },
+ { 0x1a00, 0x2387, 0x0000 },
+ { 0x1a00, 0x2389, 0x0000 },
+ { 0x9a00, 0x238c, 0x2000 },
+ { 0x1a00, 0x238b, 0x0000 },
+ { 0x1a00, 0x238d, 0x0000 },
+ { 0x9900, 0x239e, 0x5000 },
+ { 0x9a00, 0x2396, 0x4000 },
+ { 0x9a00, 0x2392, 0x3000 },
+ { 0x9a00, 0x2390, 0x2000 },
+ { 0x1a00, 0x238f, 0x0000 },
+ { 0x1a00, 0x2391, 0x0000 },
+ { 0x9a00, 0x2394, 0x2000 },
+ { 0x1a00, 0x2393, 0x0000 },
+ { 0x1a00, 0x2395, 0x0000 },
+ { 0x9a00, 0x239a, 0x3000 },
+ { 0x9a00, 0x2398, 0x2000 },
+ { 0x1a00, 0x2397, 0x0000 },
+ { 0x1a00, 0x2399, 0x0000 },
+ { 0x9900, 0x239c, 0x2000 },
+ { 0x1900, 0x239b, 0x0000 },
+ { 0x1900, 0x239d, 0x0000 },
+ { 0x9900, 0x23a6, 0x4000 },
+ { 0x9900, 0x23a2, 0x3000 },
+ { 0x9900, 0x23a0, 0x2000 },
+ { 0x1900, 0x239f, 0x0000 },
+ { 0x1900, 0x23a1, 0x0000 },
+ { 0x9900, 0x23a4, 0x2000 },
+ { 0x1900, 0x23a3, 0x0000 },
+ { 0x1900, 0x23a5, 0x0000 },
+ { 0x9900, 0x23aa, 0x3000 },
+ { 0x9900, 0x23a8, 0x2000 },
+ { 0x1900, 0x23a7, 0x0000 },
+ { 0x1900, 0x23a9, 0x0000 },
+ { 0x9900, 0x23ac, 0x2000 },
+ { 0x1900, 0x23ab, 0x0000 },
+ { 0x1900, 0x23ad, 0x0000 },
+ { 0x8f00, 0x248b, 0x8000 },
+ { 0x9a00, 0x241d, 0x7000 },
+ { 0x9a00, 0x23ce, 0x6000 },
+ { 0x9a00, 0x23be, 0x5000 },
+ { 0x9500, 0x23b6, 0x4000 },
+ { 0x9900, 0x23b2, 0x3000 },
+ { 0x9900, 0x23b0, 0x2000 },
+ { 0x1900, 0x23af, 0x0000 },
+ { 0x1900, 0x23b1, 0x0000 },
+ { 0x9600, 0x23b4, 0x2000 },
+ { 0x1900, 0x23b3, 0x0000 },
+ { 0x1200, 0x23b5, 0x0000 },
+ { 0x9a00, 0x23ba, 0x3000 },
+ { 0x9a00, 0x23b8, 0x2000 },
+ { 0x1a00, 0x23b7, 0x0000 },
+ { 0x1a00, 0x23b9, 0x0000 },
+ { 0x9a00, 0x23bc, 0x2000 },
+ { 0x1a00, 0x23bb, 0x0000 },
+ { 0x1a00, 0x23bd, 0x0000 },
+ { 0x9a00, 0x23c6, 0x4000 },
+ { 0x9a00, 0x23c2, 0x3000 },
+ { 0x9a00, 0x23c0, 0x2000 },
+ { 0x1a00, 0x23bf, 0x0000 },
+ { 0x1a00, 0x23c1, 0x0000 },
+ { 0x9a00, 0x23c4, 0x2000 },
+ { 0x1a00, 0x23c3, 0x0000 },
+ { 0x1a00, 0x23c5, 0x0000 },
+ { 0x9a00, 0x23ca, 0x3000 },
+ { 0x9a00, 0x23c8, 0x2000 },
+ { 0x1a00, 0x23c7, 0x0000 },
+ { 0x1a00, 0x23c9, 0x0000 },
+ { 0x9a00, 0x23cc, 0x2000 },
+ { 0x1a00, 0x23cb, 0x0000 },
+ { 0x1a00, 0x23cd, 0x0000 },
+ { 0x9a00, 0x240d, 0x5000 },
+ { 0x9a00, 0x2405, 0x4000 },
+ { 0x9a00, 0x2401, 0x3000 },
+ { 0x9a00, 0x23d0, 0x2000 },
+ { 0x1a00, 0x23cf, 0x0000 },
+ { 0x1a00, 0x2400, 0x0000 },
+ { 0x9a00, 0x2403, 0x2000 },
+ { 0x1a00, 0x2402, 0x0000 },
+ { 0x1a00, 0x2404, 0x0000 },
+ { 0x9a00, 0x2409, 0x3000 },
+ { 0x9a00, 0x2407, 0x2000 },
+ { 0x1a00, 0x2406, 0x0000 },
+ { 0x1a00, 0x2408, 0x0000 },
+ { 0x9a00, 0x240b, 0x2000 },
+ { 0x1a00, 0x240a, 0x0000 },
+ { 0x1a00, 0x240c, 0x0000 },
+ { 0x9a00, 0x2415, 0x4000 },
+ { 0x9a00, 0x2411, 0x3000 },
+ { 0x9a00, 0x240f, 0x2000 },
+ { 0x1a00, 0x240e, 0x0000 },
+ { 0x1a00, 0x2410, 0x0000 },
+ { 0x9a00, 0x2413, 0x2000 },
+ { 0x1a00, 0x2412, 0x0000 },
+ { 0x1a00, 0x2414, 0x0000 },
+ { 0x9a00, 0x2419, 0x3000 },
+ { 0x9a00, 0x2417, 0x2000 },
+ { 0x1a00, 0x2416, 0x0000 },
+ { 0x1a00, 0x2418, 0x0000 },
+ { 0x9a00, 0x241b, 0x2000 },
+ { 0x1a00, 0x241a, 0x0000 },
+ { 0x1a00, 0x241c, 0x0000 },
+ { 0x8f00, 0x246b, 0x6000 },
+ { 0x9a00, 0x2446, 0x5000 },
+ { 0x9a00, 0x2425, 0x4000 },
+ { 0x9a00, 0x2421, 0x3000 },
+ { 0x9a00, 0x241f, 0x2000 },
+ { 0x1a00, 0x241e, 0x0000 },
+ { 0x1a00, 0x2420, 0x0000 },
+ { 0x9a00, 0x2423, 0x2000 },
+ { 0x1a00, 0x2422, 0x0000 },
+ { 0x1a00, 0x2424, 0x0000 },
+ { 0x9a00, 0x2442, 0x3000 },
+ { 0x9a00, 0x2440, 0x2000 },
+ { 0x1a00, 0x2426, 0x0000 },
+ { 0x1a00, 0x2441, 0x0000 },
+ { 0x9a00, 0x2444, 0x2000 },
+ { 0x1a00, 0x2443, 0x0000 },
+ { 0x1a00, 0x2445, 0x0000 },
+ { 0x8f00, 0x2463, 0x4000 },
+ { 0x9a00, 0x244a, 0x3000 },
+ { 0x9a00, 0x2448, 0x2000 },
+ { 0x1a00, 0x2447, 0x0000 },
+ { 0x1a00, 0x2449, 0x0000 },
+ { 0x8f00, 0x2461, 0x2000 },
+ { 0x0f00, 0x2460, 0x0000 },
+ { 0x0f00, 0x2462, 0x0000 },
+ { 0x8f00, 0x2467, 0x3000 },
+ { 0x8f00, 0x2465, 0x2000 },
+ { 0x0f00, 0x2464, 0x0000 },
+ { 0x0f00, 0x2466, 0x0000 },
+ { 0x8f00, 0x2469, 0x2000 },
+ { 0x0f00, 0x2468, 0x0000 },
+ { 0x0f00, 0x246a, 0x0000 },
+ { 0x8f00, 0x247b, 0x5000 },
+ { 0x8f00, 0x2473, 0x4000 },
+ { 0x8f00, 0x246f, 0x3000 },
+ { 0x8f00, 0x246d, 0x2000 },
+ { 0x0f00, 0x246c, 0x0000 },
+ { 0x0f00, 0x246e, 0x0000 },
+ { 0x8f00, 0x2471, 0x2000 },
+ { 0x0f00, 0x2470, 0x0000 },
+ { 0x0f00, 0x2472, 0x0000 },
+ { 0x8f00, 0x2477, 0x3000 },
+ { 0x8f00, 0x2475, 0x2000 },
+ { 0x0f00, 0x2474, 0x0000 },
+ { 0x0f00, 0x2476, 0x0000 },
+ { 0x8f00, 0x2479, 0x2000 },
+ { 0x0f00, 0x2478, 0x0000 },
+ { 0x0f00, 0x247a, 0x0000 },
+ { 0x8f00, 0x2483, 0x4000 },
+ { 0x8f00, 0x247f, 0x3000 },
+ { 0x8f00, 0x247d, 0x2000 },
+ { 0x0f00, 0x247c, 0x0000 },
+ { 0x0f00, 0x247e, 0x0000 },
+ { 0x8f00, 0x2481, 0x2000 },
+ { 0x0f00, 0x2480, 0x0000 },
+ { 0x0f00, 0x2482, 0x0000 },
+ { 0x8f00, 0x2487, 0x3000 },
+ { 0x8f00, 0x2485, 0x2000 },
+ { 0x0f00, 0x2484, 0x0000 },
+ { 0x0f00, 0x2486, 0x0000 },
+ { 0x8f00, 0x2489, 0x2000 },
+ { 0x0f00, 0x2488, 0x0000 },
+ { 0x0f00, 0x248a, 0x0000 },
+ { 0x9a00, 0x24cb, 0x7000 },
+ { 0x9a00, 0x24ab, 0x6000 },
+ { 0x8f00, 0x249b, 0x5000 },
+ { 0x8f00, 0x2493, 0x4000 },
+ { 0x8f00, 0x248f, 0x3000 },
+ { 0x8f00, 0x248d, 0x2000 },
+ { 0x0f00, 0x248c, 0x0000 },
+ { 0x0f00, 0x248e, 0x0000 },
+ { 0x8f00, 0x2491, 0x2000 },
+ { 0x0f00, 0x2490, 0x0000 },
+ { 0x0f00, 0x2492, 0x0000 },
+ { 0x8f00, 0x2497, 0x3000 },
+ { 0x8f00, 0x2495, 0x2000 },
+ { 0x0f00, 0x2494, 0x0000 },
+ { 0x0f00, 0x2496, 0x0000 },
+ { 0x8f00, 0x2499, 0x2000 },
+ { 0x0f00, 0x2498, 0x0000 },
+ { 0x0f00, 0x249a, 0x0000 },
+ { 0x9a00, 0x24a3, 0x4000 },
+ { 0x9a00, 0x249f, 0x3000 },
+ { 0x9a00, 0x249d, 0x2000 },
+ { 0x1a00, 0x249c, 0x0000 },
+ { 0x1a00, 0x249e, 0x0000 },
+ { 0x9a00, 0x24a1, 0x2000 },
+ { 0x1a00, 0x24a0, 0x0000 },
+ { 0x1a00, 0x24a2, 0x0000 },
+ { 0x9a00, 0x24a7, 0x3000 },
+ { 0x9a00, 0x24a5, 0x2000 },
+ { 0x1a00, 0x24a4, 0x0000 },
+ { 0x1a00, 0x24a6, 0x0000 },
+ { 0x9a00, 0x24a9, 0x2000 },
+ { 0x1a00, 0x24a8, 0x0000 },
+ { 0x1a00, 0x24aa, 0x0000 },
+ { 0x9a00, 0x24bb, 0x5000 },
+ { 0x9a00, 0x24b3, 0x4000 },
+ { 0x9a00, 0x24af, 0x3000 },
+ { 0x9a00, 0x24ad, 0x2000 },
+ { 0x1a00, 0x24ac, 0x0000 },
+ { 0x1a00, 0x24ae, 0x0000 },
+ { 0x9a00, 0x24b1, 0x2000 },
+ { 0x1a00, 0x24b0, 0x0000 },
+ { 0x1a00, 0x24b2, 0x0000 },
+ { 0x9a00, 0x24b7, 0x3000 },
+ { 0x9a00, 0x24b5, 0x2000 },
+ { 0x1a00, 0x24b4, 0x0000 },
+ { 0x1a00, 0x24b6, 0x0000 },
+ { 0x9a00, 0x24b9, 0x2000 },
+ { 0x1a00, 0x24b8, 0x0000 },
+ { 0x1a00, 0x24ba, 0x0000 },
+ { 0x9a00, 0x24c3, 0x4000 },
+ { 0x9a00, 0x24bf, 0x3000 },
+ { 0x9a00, 0x24bd, 0x2000 },
+ { 0x1a00, 0x24bc, 0x0000 },
+ { 0x1a00, 0x24be, 0x0000 },
+ { 0x9a00, 0x24c1, 0x2000 },
+ { 0x1a00, 0x24c0, 0x0000 },
+ { 0x1a00, 0x24c2, 0x0000 },
+ { 0x9a00, 0x24c7, 0x3000 },
+ { 0x9a00, 0x24c5, 0x2000 },
+ { 0x1a00, 0x24c4, 0x0000 },
+ { 0x1a00, 0x24c6, 0x0000 },
+ { 0x9a00, 0x24c9, 0x2000 },
+ { 0x1a00, 0x24c8, 0x0000 },
+ { 0x1a00, 0x24ca, 0x0000 },
+ { 0x8f00, 0x24eb, 0x6000 },
+ { 0x9a00, 0x24db, 0x5000 },
+ { 0x9a00, 0x24d3, 0x4000 },
+ { 0x9a00, 0x24cf, 0x3000 },
+ { 0x9a00, 0x24cd, 0x2000 },
+ { 0x1a00, 0x24cc, 0x0000 },
+ { 0x1a00, 0x24ce, 0x0000 },
+ { 0x9a00, 0x24d1, 0x2000 },
+ { 0x1a00, 0x24d0, 0x0000 },
+ { 0x1a00, 0x24d2, 0x0000 },
+ { 0x9a00, 0x24d7, 0x3000 },
+ { 0x9a00, 0x24d5, 0x2000 },
+ { 0x1a00, 0x24d4, 0x0000 },
+ { 0x1a00, 0x24d6, 0x0000 },
+ { 0x9a00, 0x24d9, 0x2000 },
+ { 0x1a00, 0x24d8, 0x0000 },
+ { 0x1a00, 0x24da, 0x0000 },
+ { 0x9a00, 0x24e3, 0x4000 },
+ { 0x9a00, 0x24df, 0x3000 },
+ { 0x9a00, 0x24dd, 0x2000 },
+ { 0x1a00, 0x24dc, 0x0000 },
+ { 0x1a00, 0x24de, 0x0000 },
+ { 0x9a00, 0x24e1, 0x2000 },
+ { 0x1a00, 0x24e0, 0x0000 },
+ { 0x1a00, 0x24e2, 0x0000 },
+ { 0x9a00, 0x24e7, 0x3000 },
+ { 0x9a00, 0x24e5, 0x2000 },
+ { 0x1a00, 0x24e4, 0x0000 },
+ { 0x1a00, 0x24e6, 0x0000 },
+ { 0x9a00, 0x24e9, 0x2000 },
+ { 0x1a00, 0x24e8, 0x0000 },
+ { 0x0f00, 0x24ea, 0x0000 },
+ { 0x8f00, 0x24fb, 0x5000 },
+ { 0x8f00, 0x24f3, 0x4000 },
+ { 0x8f00, 0x24ef, 0x3000 },
+ { 0x8f00, 0x24ed, 0x2000 },
+ { 0x0f00, 0x24ec, 0x0000 },
+ { 0x0f00, 0x24ee, 0x0000 },
+ { 0x8f00, 0x24f1, 0x2000 },
+ { 0x0f00, 0x24f0, 0x0000 },
+ { 0x0f00, 0x24f2, 0x0000 },
+ { 0x8f00, 0x24f7, 0x3000 },
+ { 0x8f00, 0x24f5, 0x2000 },
+ { 0x0f00, 0x24f4, 0x0000 },
+ { 0x0f00, 0x24f6, 0x0000 },
+ { 0x8f00, 0x24f9, 0x2000 },
+ { 0x0f00, 0x24f8, 0x0000 },
+ { 0x0f00, 0x24fa, 0x0000 },
+ { 0x9a00, 0x2503, 0x4000 },
+ { 0x8f00, 0x24ff, 0x3000 },
+ { 0x8f00, 0x24fd, 0x2000 },
+ { 0x0f00, 0x24fc, 0x0000 },
+ { 0x0f00, 0x24fe, 0x0000 },
+ { 0x9a00, 0x2501, 0x2000 },
+ { 0x1a00, 0x2500, 0x0000 },
+ { 0x1a00, 0x2502, 0x0000 },
+ { 0x9a00, 0x2507, 0x3000 },
+ { 0x9a00, 0x2505, 0x2000 },
+ { 0x1a00, 0x2504, 0x0000 },
+ { 0x1a00, 0x2506, 0x0000 },
+ { 0x9a00, 0x2509, 0x2000 },
+ { 0x1a00, 0x2508, 0x0000 },
+ { 0x1a00, 0x250a, 0x0000 },
+ { 0x9a00, 0x260b, 0x9000 },
+ { 0x9a00, 0x258b, 0x8000 },
+ { 0x9a00, 0x254b, 0x7000 },
+ { 0x9a00, 0x252b, 0x6000 },
+ { 0x9a00, 0x251b, 0x5000 },
+ { 0x9a00, 0x2513, 0x4000 },
+ { 0x9a00, 0x250f, 0x3000 },
+ { 0x9a00, 0x250d, 0x2000 },
+ { 0x1a00, 0x250c, 0x0000 },
+ { 0x1a00, 0x250e, 0x0000 },
+ { 0x9a00, 0x2511, 0x2000 },
+ { 0x1a00, 0x2510, 0x0000 },
+ { 0x1a00, 0x2512, 0x0000 },
+ { 0x9a00, 0x2517, 0x3000 },
+ { 0x9a00, 0x2515, 0x2000 },
+ { 0x1a00, 0x2514, 0x0000 },
+ { 0x1a00, 0x2516, 0x0000 },
+ { 0x9a00, 0x2519, 0x2000 },
+ { 0x1a00, 0x2518, 0x0000 },
+ { 0x1a00, 0x251a, 0x0000 },
+ { 0x9a00, 0x2523, 0x4000 },
+ { 0x9a00, 0x251f, 0x3000 },
+ { 0x9a00, 0x251d, 0x2000 },
+ { 0x1a00, 0x251c, 0x0000 },
+ { 0x1a00, 0x251e, 0x0000 },
+ { 0x9a00, 0x2521, 0x2000 },
+ { 0x1a00, 0x2520, 0x0000 },
+ { 0x1a00, 0x2522, 0x0000 },
+ { 0x9a00, 0x2527, 0x3000 },
+ { 0x9a00, 0x2525, 0x2000 },
+ { 0x1a00, 0x2524, 0x0000 },
+ { 0x1a00, 0x2526, 0x0000 },
+ { 0x9a00, 0x2529, 0x2000 },
+ { 0x1a00, 0x2528, 0x0000 },
+ { 0x1a00, 0x252a, 0x0000 },
+ { 0x9a00, 0x253b, 0x5000 },
+ { 0x9a00, 0x2533, 0x4000 },
+ { 0x9a00, 0x252f, 0x3000 },
+ { 0x9a00, 0x252d, 0x2000 },
+ { 0x1a00, 0x252c, 0x0000 },
+ { 0x1a00, 0x252e, 0x0000 },
+ { 0x9a00, 0x2531, 0x2000 },
+ { 0x1a00, 0x2530, 0x0000 },
+ { 0x1a00, 0x2532, 0x0000 },
+ { 0x9a00, 0x2537, 0x3000 },
+ { 0x9a00, 0x2535, 0x2000 },
+ { 0x1a00, 0x2534, 0x0000 },
+ { 0x1a00, 0x2536, 0x0000 },
+ { 0x9a00, 0x2539, 0x2000 },
+ { 0x1a00, 0x2538, 0x0000 },
+ { 0x1a00, 0x253a, 0x0000 },
+ { 0x9a00, 0x2543, 0x4000 },
+ { 0x9a00, 0x253f, 0x3000 },
+ { 0x9a00, 0x253d, 0x2000 },
+ { 0x1a00, 0x253c, 0x0000 },
+ { 0x1a00, 0x253e, 0x0000 },
+ { 0x9a00, 0x2541, 0x2000 },
+ { 0x1a00, 0x2540, 0x0000 },
+ { 0x1a00, 0x2542, 0x0000 },
+ { 0x9a00, 0x2547, 0x3000 },
+ { 0x9a00, 0x2545, 0x2000 },
+ { 0x1a00, 0x2544, 0x0000 },
+ { 0x1a00, 0x2546, 0x0000 },
+ { 0x9a00, 0x2549, 0x2000 },
+ { 0x1a00, 0x2548, 0x0000 },
+ { 0x1a00, 0x254a, 0x0000 },
+ { 0x9a00, 0x256b, 0x6000 },
+ { 0x9a00, 0x255b, 0x5000 },
+ { 0x9a00, 0x2553, 0x4000 },
+ { 0x9a00, 0x254f, 0x3000 },
+ { 0x9a00, 0x254d, 0x2000 },
+ { 0x1a00, 0x254c, 0x0000 },
+ { 0x1a00, 0x254e, 0x0000 },
+ { 0x9a00, 0x2551, 0x2000 },
+ { 0x1a00, 0x2550, 0x0000 },
+ { 0x1a00, 0x2552, 0x0000 },
+ { 0x9a00, 0x2557, 0x3000 },
+ { 0x9a00, 0x2555, 0x2000 },
+ { 0x1a00, 0x2554, 0x0000 },
+ { 0x1a00, 0x2556, 0x0000 },
+ { 0x9a00, 0x2559, 0x2000 },
+ { 0x1a00, 0x2558, 0x0000 },
+ { 0x1a00, 0x255a, 0x0000 },
+ { 0x9a00, 0x2563, 0x4000 },
+ { 0x9a00, 0x255f, 0x3000 },
+ { 0x9a00, 0x255d, 0x2000 },
+ { 0x1a00, 0x255c, 0x0000 },
+ { 0x1a00, 0x255e, 0x0000 },
+ { 0x9a00, 0x2561, 0x2000 },
+ { 0x1a00, 0x2560, 0x0000 },
+ { 0x1a00, 0x2562, 0x0000 },
+ { 0x9a00, 0x2567, 0x3000 },
+ { 0x9a00, 0x2565, 0x2000 },
+ { 0x1a00, 0x2564, 0x0000 },
+ { 0x1a00, 0x2566, 0x0000 },
+ { 0x9a00, 0x2569, 0x2000 },
+ { 0x1a00, 0x2568, 0x0000 },
+ { 0x1a00, 0x256a, 0x0000 },
+ { 0x9a00, 0x257b, 0x5000 },
+ { 0x9a00, 0x2573, 0x4000 },
+ { 0x9a00, 0x256f, 0x3000 },
+ { 0x9a00, 0x256d, 0x2000 },
+ { 0x1a00, 0x256c, 0x0000 },
+ { 0x1a00, 0x256e, 0x0000 },
+ { 0x9a00, 0x2571, 0x2000 },
+ { 0x1a00, 0x2570, 0x0000 },
+ { 0x1a00, 0x2572, 0x0000 },
+ { 0x9a00, 0x2577, 0x3000 },
+ { 0x9a00, 0x2575, 0x2000 },
+ { 0x1a00, 0x2574, 0x0000 },
+ { 0x1a00, 0x2576, 0x0000 },
+ { 0x9a00, 0x2579, 0x2000 },
+ { 0x1a00, 0x2578, 0x0000 },
+ { 0x1a00, 0x257a, 0x0000 },
+ { 0x9a00, 0x2583, 0x4000 },
+ { 0x9a00, 0x257f, 0x3000 },
+ { 0x9a00, 0x257d, 0x2000 },
+ { 0x1a00, 0x257c, 0x0000 },
+ { 0x1a00, 0x257e, 0x0000 },
+ { 0x9a00, 0x2581, 0x2000 },
+ { 0x1a00, 0x2580, 0x0000 },
+ { 0x1a00, 0x2582, 0x0000 },
+ { 0x9a00, 0x2587, 0x3000 },
+ { 0x9a00, 0x2585, 0x2000 },
+ { 0x1a00, 0x2584, 0x0000 },
+ { 0x1a00, 0x2586, 0x0000 },
+ { 0x9a00, 0x2589, 0x2000 },
+ { 0x1a00, 0x2588, 0x0000 },
+ { 0x1a00, 0x258a, 0x0000 },
+ { 0x9a00, 0x25cb, 0x7000 },
+ { 0x9a00, 0x25ab, 0x6000 },
+ { 0x9a00, 0x259b, 0x5000 },
+ { 0x9a00, 0x2593, 0x4000 },
+ { 0x9a00, 0x258f, 0x3000 },
+ { 0x9a00, 0x258d, 0x2000 },
+ { 0x1a00, 0x258c, 0x0000 },
+ { 0x1a00, 0x258e, 0x0000 },
+ { 0x9a00, 0x2591, 0x2000 },
+ { 0x1a00, 0x2590, 0x0000 },
+ { 0x1a00, 0x2592, 0x0000 },
+ { 0x9a00, 0x2597, 0x3000 },
+ { 0x9a00, 0x2595, 0x2000 },
+ { 0x1a00, 0x2594, 0x0000 },
+ { 0x1a00, 0x2596, 0x0000 },
+ { 0x9a00, 0x2599, 0x2000 },
+ { 0x1a00, 0x2598, 0x0000 },
+ { 0x1a00, 0x259a, 0x0000 },
+ { 0x9a00, 0x25a3, 0x4000 },
+ { 0x9a00, 0x259f, 0x3000 },
+ { 0x9a00, 0x259d, 0x2000 },
+ { 0x1a00, 0x259c, 0x0000 },
+ { 0x1a00, 0x259e, 0x0000 },
+ { 0x9a00, 0x25a1, 0x2000 },
+ { 0x1a00, 0x25a0, 0x0000 },
+ { 0x1a00, 0x25a2, 0x0000 },
+ { 0x9a00, 0x25a7, 0x3000 },
+ { 0x9a00, 0x25a5, 0x2000 },
+ { 0x1a00, 0x25a4, 0x0000 },
+ { 0x1a00, 0x25a6, 0x0000 },
+ { 0x9a00, 0x25a9, 0x2000 },
+ { 0x1a00, 0x25a8, 0x0000 },
+ { 0x1a00, 0x25aa, 0x0000 },
+ { 0x9a00, 0x25bb, 0x5000 },
+ { 0x9a00, 0x25b3, 0x4000 },
+ { 0x9a00, 0x25af, 0x3000 },
+ { 0x9a00, 0x25ad, 0x2000 },
+ { 0x1a00, 0x25ac, 0x0000 },
+ { 0x1a00, 0x25ae, 0x0000 },
+ { 0x9a00, 0x25b1, 0x2000 },
+ { 0x1a00, 0x25b0, 0x0000 },
+ { 0x1a00, 0x25b2, 0x0000 },
+ { 0x9900, 0x25b7, 0x3000 },
+ { 0x9a00, 0x25b5, 0x2000 },
+ { 0x1a00, 0x25b4, 0x0000 },
+ { 0x1a00, 0x25b6, 0x0000 },
+ { 0x9a00, 0x25b9, 0x2000 },
+ { 0x1a00, 0x25b8, 0x0000 },
+ { 0x1a00, 0x25ba, 0x0000 },
+ { 0x9a00, 0x25c3, 0x4000 },
+ { 0x9a00, 0x25bf, 0x3000 },
+ { 0x9a00, 0x25bd, 0x2000 },
+ { 0x1a00, 0x25bc, 0x0000 },
+ { 0x1a00, 0x25be, 0x0000 },
+ { 0x9900, 0x25c1, 0x2000 },
+ { 0x1a00, 0x25c0, 0x0000 },
+ { 0x1a00, 0x25c2, 0x0000 },
+ { 0x9a00, 0x25c7, 0x3000 },
+ { 0x9a00, 0x25c5, 0x2000 },
+ { 0x1a00, 0x25c4, 0x0000 },
+ { 0x1a00, 0x25c6, 0x0000 },
+ { 0x9a00, 0x25c9, 0x2000 },
+ { 0x1a00, 0x25c8, 0x0000 },
+ { 0x1a00, 0x25ca, 0x0000 },
+ { 0x9a00, 0x25eb, 0x6000 },
+ { 0x9a00, 0x25db, 0x5000 },
+ { 0x9a00, 0x25d3, 0x4000 },
+ { 0x9a00, 0x25cf, 0x3000 },
+ { 0x9a00, 0x25cd, 0x2000 },
+ { 0x1a00, 0x25cc, 0x0000 },
+ { 0x1a00, 0x25ce, 0x0000 },
+ { 0x9a00, 0x25d1, 0x2000 },
+ { 0x1a00, 0x25d0, 0x0000 },
+ { 0x1a00, 0x25d2, 0x0000 },
+ { 0x9a00, 0x25d7, 0x3000 },
+ { 0x9a00, 0x25d5, 0x2000 },
+ { 0x1a00, 0x25d4, 0x0000 },
+ { 0x1a00, 0x25d6, 0x0000 },
+ { 0x9a00, 0x25d9, 0x2000 },
+ { 0x1a00, 0x25d8, 0x0000 },
+ { 0x1a00, 0x25da, 0x0000 },
+ { 0x9a00, 0x25e3, 0x4000 },
+ { 0x9a00, 0x25df, 0x3000 },
+ { 0x9a00, 0x25dd, 0x2000 },
+ { 0x1a00, 0x25dc, 0x0000 },
+ { 0x1a00, 0x25de, 0x0000 },
+ { 0x9a00, 0x25e1, 0x2000 },
+ { 0x1a00, 0x25e0, 0x0000 },
+ { 0x1a00, 0x25e2, 0x0000 },
+ { 0x9a00, 0x25e7, 0x3000 },
+ { 0x9a00, 0x25e5, 0x2000 },
+ { 0x1a00, 0x25e4, 0x0000 },
+ { 0x1a00, 0x25e6, 0x0000 },
+ { 0x9a00, 0x25e9, 0x2000 },
+ { 0x1a00, 0x25e8, 0x0000 },
+ { 0x1a00, 0x25ea, 0x0000 },
+ { 0x9900, 0x25fb, 0x5000 },
+ { 0x9a00, 0x25f3, 0x4000 },
+ { 0x9a00, 0x25ef, 0x3000 },
+ { 0x9a00, 0x25ed, 0x2000 },
+ { 0x1a00, 0x25ec, 0x0000 },
+ { 0x1a00, 0x25ee, 0x0000 },
+ { 0x9a00, 0x25f1, 0x2000 },
+ { 0x1a00, 0x25f0, 0x0000 },
+ { 0x1a00, 0x25f2, 0x0000 },
+ { 0x9a00, 0x25f7, 0x3000 },
+ { 0x9a00, 0x25f5, 0x2000 },
+ { 0x1a00, 0x25f4, 0x0000 },
+ { 0x1a00, 0x25f6, 0x0000 },
+ { 0x9900, 0x25f9, 0x2000 },
+ { 0x1900, 0x25f8, 0x0000 },
+ { 0x1900, 0x25fa, 0x0000 },
+ { 0x9a00, 0x2603, 0x4000 },
+ { 0x9900, 0x25ff, 0x3000 },
+ { 0x9900, 0x25fd, 0x2000 },
+ { 0x1900, 0x25fc, 0x0000 },
+ { 0x1900, 0x25fe, 0x0000 },
+ { 0x9a00, 0x2601, 0x2000 },
+ { 0x1a00, 0x2600, 0x0000 },
+ { 0x1a00, 0x2602, 0x0000 },
+ { 0x9a00, 0x2607, 0x3000 },
+ { 0x9a00, 0x2605, 0x2000 },
+ { 0x1a00, 0x2604, 0x0000 },
+ { 0x1a00, 0x2606, 0x0000 },
+ { 0x9a00, 0x2609, 0x2000 },
+ { 0x1a00, 0x2608, 0x0000 },
+ { 0x1a00, 0x260a, 0x0000 },
+ { 0x9a00, 0x268e, 0x8000 },
+ { 0x9a00, 0x264c, 0x7000 },
+ { 0x9a00, 0x262c, 0x6000 },
+ { 0x9a00, 0x261c, 0x5000 },
+ { 0x9a00, 0x2613, 0x4000 },
+ { 0x9a00, 0x260f, 0x3000 },
+ { 0x9a00, 0x260d, 0x2000 },
+ { 0x1a00, 0x260c, 0x0000 },
+ { 0x1a00, 0x260e, 0x0000 },
+ { 0x9a00, 0x2611, 0x2000 },
+ { 0x1a00, 0x2610, 0x0000 },
+ { 0x1a00, 0x2612, 0x0000 },
+ { 0x9a00, 0x2617, 0x3000 },
+ { 0x9a00, 0x2615, 0x2000 },
+ { 0x1a00, 0x2614, 0x0000 },
+ { 0x1a00, 0x2616, 0x0000 },
+ { 0x9a00, 0x261a, 0x2000 },
+ { 0x1a00, 0x2619, 0x0000 },
+ { 0x1a00, 0x261b, 0x0000 },
+ { 0x9a00, 0x2624, 0x4000 },
+ { 0x9a00, 0x2620, 0x3000 },
+ { 0x9a00, 0x261e, 0x2000 },
+ { 0x1a00, 0x261d, 0x0000 },
+ { 0x1a00, 0x261f, 0x0000 },
+ { 0x9a00, 0x2622, 0x2000 },
+ { 0x1a00, 0x2621, 0x0000 },
+ { 0x1a00, 0x2623, 0x0000 },
+ { 0x9a00, 0x2628, 0x3000 },
+ { 0x9a00, 0x2626, 0x2000 },
+ { 0x1a00, 0x2625, 0x0000 },
+ { 0x1a00, 0x2627, 0x0000 },
+ { 0x9a00, 0x262a, 0x2000 },
+ { 0x1a00, 0x2629, 0x0000 },
+ { 0x1a00, 0x262b, 0x0000 },
+ { 0x9a00, 0x263c, 0x5000 },
+ { 0x9a00, 0x2634, 0x4000 },
+ { 0x9a00, 0x2630, 0x3000 },
+ { 0x9a00, 0x262e, 0x2000 },
+ { 0x1a00, 0x262d, 0x0000 },
+ { 0x1a00, 0x262f, 0x0000 },
+ { 0x9a00, 0x2632, 0x2000 },
+ { 0x1a00, 0x2631, 0x0000 },
+ { 0x1a00, 0x2633, 0x0000 },
+ { 0x9a00, 0x2638, 0x3000 },
+ { 0x9a00, 0x2636, 0x2000 },
+ { 0x1a00, 0x2635, 0x0000 },
+ { 0x1a00, 0x2637, 0x0000 },
+ { 0x9a00, 0x263a, 0x2000 },
+ { 0x1a00, 0x2639, 0x0000 },
+ { 0x1a00, 0x263b, 0x0000 },
+ { 0x9a00, 0x2644, 0x4000 },
+ { 0x9a00, 0x2640, 0x3000 },
+ { 0x9a00, 0x263e, 0x2000 },
+ { 0x1a00, 0x263d, 0x0000 },
+ { 0x1a00, 0x263f, 0x0000 },
+ { 0x9a00, 0x2642, 0x2000 },
+ { 0x1a00, 0x2641, 0x0000 },
+ { 0x1a00, 0x2643, 0x0000 },
+ { 0x9a00, 0x2648, 0x3000 },
+ { 0x9a00, 0x2646, 0x2000 },
+ { 0x1a00, 0x2645, 0x0000 },
+ { 0x1a00, 0x2647, 0x0000 },
+ { 0x9a00, 0x264a, 0x2000 },
+ { 0x1a00, 0x2649, 0x0000 },
+ { 0x1a00, 0x264b, 0x0000 },
+ { 0x9a00, 0x266c, 0x6000 },
+ { 0x9a00, 0x265c, 0x5000 },
+ { 0x9a00, 0x2654, 0x4000 },
+ { 0x9a00, 0x2650, 0x3000 },
+ { 0x9a00, 0x264e, 0x2000 },
+ { 0x1a00, 0x264d, 0x0000 },
+ { 0x1a00, 0x264f, 0x0000 },
+ { 0x9a00, 0x2652, 0x2000 },
+ { 0x1a00, 0x2651, 0x0000 },
+ { 0x1a00, 0x2653, 0x0000 },
+ { 0x9a00, 0x2658, 0x3000 },
+ { 0x9a00, 0x2656, 0x2000 },
+ { 0x1a00, 0x2655, 0x0000 },
+ { 0x1a00, 0x2657, 0x0000 },
+ { 0x9a00, 0x265a, 0x2000 },
+ { 0x1a00, 0x2659, 0x0000 },
+ { 0x1a00, 0x265b, 0x0000 },
+ { 0x9a00, 0x2664, 0x4000 },
+ { 0x9a00, 0x2660, 0x3000 },
+ { 0x9a00, 0x265e, 0x2000 },
+ { 0x1a00, 0x265d, 0x0000 },
+ { 0x1a00, 0x265f, 0x0000 },
+ { 0x9a00, 0x2662, 0x2000 },
+ { 0x1a00, 0x2661, 0x0000 },
+ { 0x1a00, 0x2663, 0x0000 },
+ { 0x9a00, 0x2668, 0x3000 },
+ { 0x9a00, 0x2666, 0x2000 },
+ { 0x1a00, 0x2665, 0x0000 },
+ { 0x1a00, 0x2667, 0x0000 },
+ { 0x9a00, 0x266a, 0x2000 },
+ { 0x1a00, 0x2669, 0x0000 },
+ { 0x1a00, 0x266b, 0x0000 },
+ { 0x9a00, 0x267c, 0x5000 },
+ { 0x9a00, 0x2674, 0x4000 },
+ { 0x9a00, 0x2670, 0x3000 },
+ { 0x9a00, 0x266e, 0x2000 },
+ { 0x1a00, 0x266d, 0x0000 },
+ { 0x1900, 0x266f, 0x0000 },
+ { 0x9a00, 0x2672, 0x2000 },
+ { 0x1a00, 0x2671, 0x0000 },
+ { 0x1a00, 0x2673, 0x0000 },
+ { 0x9a00, 0x2678, 0x3000 },
+ { 0x9a00, 0x2676, 0x2000 },
+ { 0x1a00, 0x2675, 0x0000 },
+ { 0x1a00, 0x2677, 0x0000 },
+ { 0x9a00, 0x267a, 0x2000 },
+ { 0x1a00, 0x2679, 0x0000 },
+ { 0x1a00, 0x267b, 0x0000 },
+ { 0x9a00, 0x2686, 0x4000 },
+ { 0x9a00, 0x2682, 0x3000 },
+ { 0x9a00, 0x2680, 0x2000 },
+ { 0x1a00, 0x267d, 0x0000 },
+ { 0x1a00, 0x2681, 0x0000 },
+ { 0x9a00, 0x2684, 0x2000 },
+ { 0x1a00, 0x2683, 0x0000 },
+ { 0x1a00, 0x2685, 0x0000 },
+ { 0x9a00, 0x268a, 0x3000 },
+ { 0x9a00, 0x2688, 0x2000 },
+ { 0x1a00, 0x2687, 0x0000 },
+ { 0x1a00, 0x2689, 0x0000 },
+ { 0x9a00, 0x268c, 0x2000 },
+ { 0x1a00, 0x268b, 0x0000 },
+ { 0x1a00, 0x268d, 0x0000 },
+ { 0x9a00, 0x273f, 0x7000 },
+ { 0x9a00, 0x271e, 0x6000 },
+ { 0x9a00, 0x270e, 0x5000 },
+ { 0x9a00, 0x2703, 0x4000 },
+ { 0x9a00, 0x26a0, 0x3000 },
+ { 0x9a00, 0x2690, 0x2000 },
+ { 0x1a00, 0x268f, 0x0000 },
+ { 0x1a00, 0x2691, 0x0000 },
+ { 0x9a00, 0x2701, 0x2000 },
+ { 0x1a00, 0x26a1, 0x0000 },
+ { 0x1a00, 0x2702, 0x0000 },
+ { 0x9a00, 0x2708, 0x3000 },
+ { 0x9a00, 0x2706, 0x2000 },
+ { 0x1a00, 0x2704, 0x0000 },
+ { 0x1a00, 0x2707, 0x0000 },
+ { 0x9a00, 0x270c, 0x2000 },
+ { 0x1a00, 0x2709, 0x0000 },
+ { 0x1a00, 0x270d, 0x0000 },
+ { 0x9a00, 0x2716, 0x4000 },
+ { 0x9a00, 0x2712, 0x3000 },
+ { 0x9a00, 0x2710, 0x2000 },
+ { 0x1a00, 0x270f, 0x0000 },
+ { 0x1a00, 0x2711, 0x0000 },
+ { 0x9a00, 0x2714, 0x2000 },
+ { 0x1a00, 0x2713, 0x0000 },
+ { 0x1a00, 0x2715, 0x0000 },
+ { 0x9a00, 0x271a, 0x3000 },
+ { 0x9a00, 0x2718, 0x2000 },
+ { 0x1a00, 0x2717, 0x0000 },
+ { 0x1a00, 0x2719, 0x0000 },
+ { 0x9a00, 0x271c, 0x2000 },
+ { 0x1a00, 0x271b, 0x0000 },
+ { 0x1a00, 0x271d, 0x0000 },
+ { 0x9a00, 0x272f, 0x5000 },
+ { 0x9a00, 0x2726, 0x4000 },
+ { 0x9a00, 0x2722, 0x3000 },
+ { 0x9a00, 0x2720, 0x2000 },
+ { 0x1a00, 0x271f, 0x0000 },
+ { 0x1a00, 0x2721, 0x0000 },
+ { 0x9a00, 0x2724, 0x2000 },
+ { 0x1a00, 0x2723, 0x0000 },
+ { 0x1a00, 0x2725, 0x0000 },
+ { 0x9a00, 0x272b, 0x3000 },
+ { 0x9a00, 0x2729, 0x2000 },
+ { 0x1a00, 0x2727, 0x0000 },
+ { 0x1a00, 0x272a, 0x0000 },
+ { 0x9a00, 0x272d, 0x2000 },
+ { 0x1a00, 0x272c, 0x0000 },
+ { 0x1a00, 0x272e, 0x0000 },
+ { 0x9a00, 0x2737, 0x4000 },
+ { 0x9a00, 0x2733, 0x3000 },
+ { 0x9a00, 0x2731, 0x2000 },
+ { 0x1a00, 0x2730, 0x0000 },
+ { 0x1a00, 0x2732, 0x0000 },
+ { 0x9a00, 0x2735, 0x2000 },
+ { 0x1a00, 0x2734, 0x0000 },
+ { 0x1a00, 0x2736, 0x0000 },
+ { 0x9a00, 0x273b, 0x3000 },
+ { 0x9a00, 0x2739, 0x2000 },
+ { 0x1a00, 0x2738, 0x0000 },
+ { 0x1a00, 0x273a, 0x0000 },
+ { 0x9a00, 0x273d, 0x2000 },
+ { 0x1a00, 0x273c, 0x0000 },
+ { 0x1a00, 0x273e, 0x0000 },
+ { 0x9a00, 0x2767, 0x6000 },
+ { 0x9a00, 0x2751, 0x5000 },
+ { 0x9a00, 0x2747, 0x4000 },
+ { 0x9a00, 0x2743, 0x3000 },
+ { 0x9a00, 0x2741, 0x2000 },
+ { 0x1a00, 0x2740, 0x0000 },
+ { 0x1a00, 0x2742, 0x0000 },
+ { 0x9a00, 0x2745, 0x2000 },
+ { 0x1a00, 0x2744, 0x0000 },
+ { 0x1a00, 0x2746, 0x0000 },
+ { 0x9a00, 0x274b, 0x3000 },
+ { 0x9a00, 0x2749, 0x2000 },
+ { 0x1a00, 0x2748, 0x0000 },
+ { 0x1a00, 0x274a, 0x0000 },
+ { 0x9a00, 0x274f, 0x2000 },
+ { 0x1a00, 0x274d, 0x0000 },
+ { 0x1a00, 0x2750, 0x0000 },
+ { 0x9a00, 0x275d, 0x4000 },
+ { 0x9a00, 0x2759, 0x3000 },
+ { 0x9a00, 0x2756, 0x2000 },
+ { 0x1a00, 0x2752, 0x0000 },
+ { 0x1a00, 0x2758, 0x0000 },
+ { 0x9a00, 0x275b, 0x2000 },
+ { 0x1a00, 0x275a, 0x0000 },
+ { 0x1a00, 0x275c, 0x0000 },
+ { 0x9a00, 0x2763, 0x3000 },
+ { 0x9a00, 0x2761, 0x2000 },
+ { 0x1a00, 0x275e, 0x0000 },
+ { 0x1a00, 0x2762, 0x0000 },
+ { 0x9a00, 0x2765, 0x2000 },
+ { 0x1a00, 0x2764, 0x0000 },
+ { 0x1a00, 0x2766, 0x0000 },
+ { 0x8f00, 0x2777, 0x5000 },
+ { 0x9200, 0x276f, 0x4000 },
+ { 0x9200, 0x276b, 0x3000 },
+ { 0x9200, 0x2769, 0x2000 },
+ { 0x1600, 0x2768, 0x0000 },
+ { 0x1600, 0x276a, 0x0000 },
+ { 0x9200, 0x276d, 0x2000 },
+ { 0x1600, 0x276c, 0x0000 },
+ { 0x1600, 0x276e, 0x0000 },
+ { 0x9200, 0x2773, 0x3000 },
+ { 0x9200, 0x2771, 0x2000 },
+ { 0x1600, 0x2770, 0x0000 },
+ { 0x1600, 0x2772, 0x0000 },
+ { 0x9200, 0x2775, 0x2000 },
+ { 0x1600, 0x2774, 0x0000 },
+ { 0x0f00, 0x2776, 0x0000 },
+ { 0x8f00, 0x277f, 0x4000 },
+ { 0x8f00, 0x277b, 0x3000 },
+ { 0x8f00, 0x2779, 0x2000 },
+ { 0x0f00, 0x2778, 0x0000 },
+ { 0x0f00, 0x277a, 0x0000 },
+ { 0x8f00, 0x277d, 0x2000 },
+ { 0x0f00, 0x277c, 0x0000 },
+ { 0x0f00, 0x277e, 0x0000 },
+ { 0x8f00, 0x2783, 0x3000 },
+ { 0x8f00, 0x2781, 0x2000 },
+ { 0x0f00, 0x2780, 0x0000 },
+ { 0x0f00, 0x2782, 0x0000 },
+ { 0x8f00, 0x2785, 0x2000 },
+ { 0x0f00, 0x2784, 0x0000 },
+ { 0x0f00, 0x2786, 0x0000 },
+ { 0x9900, 0x29a0, 0xa000 },
+ { 0x9a00, 0x28a0, 0x9000 },
+ { 0x9a00, 0x2820, 0x8000 },
+ { 0x9900, 0x27dc, 0x7000 },
+ { 0x9a00, 0x27aa, 0x6000 },
+ { 0x9a00, 0x279a, 0x5000 },
+ { 0x8f00, 0x278f, 0x4000 },
+ { 0x8f00, 0x278b, 0x3000 },
+ { 0x8f00, 0x2789, 0x2000 },
+ { 0x0f00, 0x2788, 0x0000 },
+ { 0x0f00, 0x278a, 0x0000 },
+ { 0x8f00, 0x278d, 0x2000 },
+ { 0x0f00, 0x278c, 0x0000 },
+ { 0x0f00, 0x278e, 0x0000 },
+ { 0x8f00, 0x2793, 0x3000 },
+ { 0x8f00, 0x2791, 0x2000 },
+ { 0x0f00, 0x2790, 0x0000 },
+ { 0x0f00, 0x2792, 0x0000 },
+ { 0x9a00, 0x2798, 0x2000 },
+ { 0x1a00, 0x2794, 0x0000 },
+ { 0x1a00, 0x2799, 0x0000 },
+ { 0x9a00, 0x27a2, 0x4000 },
+ { 0x9a00, 0x279e, 0x3000 },
+ { 0x9a00, 0x279c, 0x2000 },
+ { 0x1a00, 0x279b, 0x0000 },
+ { 0x1a00, 0x279d, 0x0000 },
+ { 0x9a00, 0x27a0, 0x2000 },
+ { 0x1a00, 0x279f, 0x0000 },
+ { 0x1a00, 0x27a1, 0x0000 },
+ { 0x9a00, 0x27a6, 0x3000 },
+ { 0x9a00, 0x27a4, 0x2000 },
+ { 0x1a00, 0x27a3, 0x0000 },
+ { 0x1a00, 0x27a5, 0x0000 },
+ { 0x9a00, 0x27a8, 0x2000 },
+ { 0x1a00, 0x27a7, 0x0000 },
+ { 0x1a00, 0x27a9, 0x0000 },
+ { 0x9a00, 0x27bb, 0x5000 },
+ { 0x9a00, 0x27b3, 0x4000 },
+ { 0x9a00, 0x27ae, 0x3000 },
+ { 0x9a00, 0x27ac, 0x2000 },
+ { 0x1a00, 0x27ab, 0x0000 },
+ { 0x1a00, 0x27ad, 0x0000 },
+ { 0x9a00, 0x27b1, 0x2000 },
+ { 0x1a00, 0x27af, 0x0000 },
+ { 0x1a00, 0x27b2, 0x0000 },
+ { 0x9a00, 0x27b7, 0x3000 },
+ { 0x9a00, 0x27b5, 0x2000 },
+ { 0x1a00, 0x27b4, 0x0000 },
+ { 0x1a00, 0x27b6, 0x0000 },
+ { 0x9a00, 0x27b9, 0x2000 },
+ { 0x1a00, 0x27b8, 0x0000 },
+ { 0x1a00, 0x27ba, 0x0000 },
+ { 0x9900, 0x27d4, 0x4000 },
+ { 0x9900, 0x27d0, 0x3000 },
+ { 0x9a00, 0x27bd, 0x2000 },
+ { 0x1a00, 0x27bc, 0x0000 },
+ { 0x1a00, 0x27be, 0x0000 },
+ { 0x9900, 0x27d2, 0x2000 },
+ { 0x1900, 0x27d1, 0x0000 },
+ { 0x1900, 0x27d3, 0x0000 },
+ { 0x9900, 0x27d8, 0x3000 },
+ { 0x9900, 0x27d6, 0x2000 },
+ { 0x1900, 0x27d5, 0x0000 },
+ { 0x1900, 0x27d7, 0x0000 },
+ { 0x9900, 0x27da, 0x2000 },
+ { 0x1900, 0x27d9, 0x0000 },
+ { 0x1900, 0x27db, 0x0000 },
+ { 0x9a00, 0x2800, 0x6000 },
+ { 0x9900, 0x27f0, 0x5000 },
+ { 0x9900, 0x27e4, 0x4000 },
+ { 0x9900, 0x27e0, 0x3000 },
+ { 0x9900, 0x27de, 0x2000 },
+ { 0x1900, 0x27dd, 0x0000 },
+ { 0x1900, 0x27df, 0x0000 },
+ { 0x9900, 0x27e2, 0x2000 },
+ { 0x1900, 0x27e1, 0x0000 },
+ { 0x1900, 0x27e3, 0x0000 },
+ { 0x9600, 0x27e8, 0x3000 },
+ { 0x9600, 0x27e6, 0x2000 },
+ { 0x1900, 0x27e5, 0x0000 },
+ { 0x1200, 0x27e7, 0x0000 },
+ { 0x9600, 0x27ea, 0x2000 },
+ { 0x1200, 0x27e9, 0x0000 },
+ { 0x1200, 0x27eb, 0x0000 },
+ { 0x9900, 0x27f8, 0x4000 },
+ { 0x9900, 0x27f4, 0x3000 },
+ { 0x9900, 0x27f2, 0x2000 },
+ { 0x1900, 0x27f1, 0x0000 },
+ { 0x1900, 0x27f3, 0x0000 },
+ { 0x9900, 0x27f6, 0x2000 },
+ { 0x1900, 0x27f5, 0x0000 },
+ { 0x1900, 0x27f7, 0x0000 },
+ { 0x9900, 0x27fc, 0x3000 },
+ { 0x9900, 0x27fa, 0x2000 },
+ { 0x1900, 0x27f9, 0x0000 },
+ { 0x1900, 0x27fb, 0x0000 },
+ { 0x9900, 0x27fe, 0x2000 },
+ { 0x1900, 0x27fd, 0x0000 },
+ { 0x1900, 0x27ff, 0x0000 },
+ { 0x9a00, 0x2810, 0x5000 },
+ { 0x9a00, 0x2808, 0x4000 },
+ { 0x9a00, 0x2804, 0x3000 },
+ { 0x9a00, 0x2802, 0x2000 },
+ { 0x1a00, 0x2801, 0x0000 },
+ { 0x1a00, 0x2803, 0x0000 },
+ { 0x9a00, 0x2806, 0x2000 },
+ { 0x1a00, 0x2805, 0x0000 },
+ { 0x1a00, 0x2807, 0x0000 },
+ { 0x9a00, 0x280c, 0x3000 },
+ { 0x9a00, 0x280a, 0x2000 },
+ { 0x1a00, 0x2809, 0x0000 },
+ { 0x1a00, 0x280b, 0x0000 },
+ { 0x9a00, 0x280e, 0x2000 },
+ { 0x1a00, 0x280d, 0x0000 },
+ { 0x1a00, 0x280f, 0x0000 },
+ { 0x9a00, 0x2818, 0x4000 },
+ { 0x9a00, 0x2814, 0x3000 },
+ { 0x9a00, 0x2812, 0x2000 },
+ { 0x1a00, 0x2811, 0x0000 },
+ { 0x1a00, 0x2813, 0x0000 },
+ { 0x9a00, 0x2816, 0x2000 },
+ { 0x1a00, 0x2815, 0x0000 },
+ { 0x1a00, 0x2817, 0x0000 },
+ { 0x9a00, 0x281c, 0x3000 },
+ { 0x9a00, 0x281a, 0x2000 },
+ { 0x1a00, 0x2819, 0x0000 },
+ { 0x1a00, 0x281b, 0x0000 },
+ { 0x9a00, 0x281e, 0x2000 },
+ { 0x1a00, 0x281d, 0x0000 },
+ { 0x1a00, 0x281f, 0x0000 },
+ { 0x9a00, 0x2860, 0x7000 },
+ { 0x9a00, 0x2840, 0x6000 },
+ { 0x9a00, 0x2830, 0x5000 },
+ { 0x9a00, 0x2828, 0x4000 },
+ { 0x9a00, 0x2824, 0x3000 },
+ { 0x9a00, 0x2822, 0x2000 },
+ { 0x1a00, 0x2821, 0x0000 },
+ { 0x1a00, 0x2823, 0x0000 },
+ { 0x9a00, 0x2826, 0x2000 },
+ { 0x1a00, 0x2825, 0x0000 },
+ { 0x1a00, 0x2827, 0x0000 },
+ { 0x9a00, 0x282c, 0x3000 },
+ { 0x9a00, 0x282a, 0x2000 },
+ { 0x1a00, 0x2829, 0x0000 },
+ { 0x1a00, 0x282b, 0x0000 },
+ { 0x9a00, 0x282e, 0x2000 },
+ { 0x1a00, 0x282d, 0x0000 },
+ { 0x1a00, 0x282f, 0x0000 },
+ { 0x9a00, 0x2838, 0x4000 },
+ { 0x9a00, 0x2834, 0x3000 },
+ { 0x9a00, 0x2832, 0x2000 },
+ { 0x1a00, 0x2831, 0x0000 },
+ { 0x1a00, 0x2833, 0x0000 },
+ { 0x9a00, 0x2836, 0x2000 },
+ { 0x1a00, 0x2835, 0x0000 },
+ { 0x1a00, 0x2837, 0x0000 },
+ { 0x9a00, 0x283c, 0x3000 },
+ { 0x9a00, 0x283a, 0x2000 },
+ { 0x1a00, 0x2839, 0x0000 },
+ { 0x1a00, 0x283b, 0x0000 },
+ { 0x9a00, 0x283e, 0x2000 },
+ { 0x1a00, 0x283d, 0x0000 },
+ { 0x1a00, 0x283f, 0x0000 },
+ { 0x9a00, 0x2850, 0x5000 },
+ { 0x9a00, 0x2848, 0x4000 },
+ { 0x9a00, 0x2844, 0x3000 },
+ { 0x9a00, 0x2842, 0x2000 },
+ { 0x1a00, 0x2841, 0x0000 },
+ { 0x1a00, 0x2843, 0x0000 },
+ { 0x9a00, 0x2846, 0x2000 },
+ { 0x1a00, 0x2845, 0x0000 },
+ { 0x1a00, 0x2847, 0x0000 },
+ { 0x9a00, 0x284c, 0x3000 },
+ { 0x9a00, 0x284a, 0x2000 },
+ { 0x1a00, 0x2849, 0x0000 },
+ { 0x1a00, 0x284b, 0x0000 },
+ { 0x9a00, 0x284e, 0x2000 },
+ { 0x1a00, 0x284d, 0x0000 },
+ { 0x1a00, 0x284f, 0x0000 },
+ { 0x9a00, 0x2858, 0x4000 },
+ { 0x9a00, 0x2854, 0x3000 },
+ { 0x9a00, 0x2852, 0x2000 },
+ { 0x1a00, 0x2851, 0x0000 },
+ { 0x1a00, 0x2853, 0x0000 },
+ { 0x9a00, 0x2856, 0x2000 },
+ { 0x1a00, 0x2855, 0x0000 },
+ { 0x1a00, 0x2857, 0x0000 },
+ { 0x9a00, 0x285c, 0x3000 },
+ { 0x9a00, 0x285a, 0x2000 },
+ { 0x1a00, 0x2859, 0x0000 },
+ { 0x1a00, 0x285b, 0x0000 },
+ { 0x9a00, 0x285e, 0x2000 },
+ { 0x1a00, 0x285d, 0x0000 },
+ { 0x1a00, 0x285f, 0x0000 },
+ { 0x9a00, 0x2880, 0x6000 },
+ { 0x9a00, 0x2870, 0x5000 },
+ { 0x9a00, 0x2868, 0x4000 },
+ { 0x9a00, 0x2864, 0x3000 },
+ { 0x9a00, 0x2862, 0x2000 },
+ { 0x1a00, 0x2861, 0x0000 },
+ { 0x1a00, 0x2863, 0x0000 },
+ { 0x9a00, 0x2866, 0x2000 },
+ { 0x1a00, 0x2865, 0x0000 },
+ { 0x1a00, 0x2867, 0x0000 },
+ { 0x9a00, 0x286c, 0x3000 },
+ { 0x9a00, 0x286a, 0x2000 },
+ { 0x1a00, 0x2869, 0x0000 },
+ { 0x1a00, 0x286b, 0x0000 },
+ { 0x9a00, 0x286e, 0x2000 },
+ { 0x1a00, 0x286d, 0x0000 },
+ { 0x1a00, 0x286f, 0x0000 },
+ { 0x9a00, 0x2878, 0x4000 },
+ { 0x9a00, 0x2874, 0x3000 },
+ { 0x9a00, 0x2872, 0x2000 },
+ { 0x1a00, 0x2871, 0x0000 },
+ { 0x1a00, 0x2873, 0x0000 },
+ { 0x9a00, 0x2876, 0x2000 },
+ { 0x1a00, 0x2875, 0x0000 },
+ { 0x1a00, 0x2877, 0x0000 },
+ { 0x9a00, 0x287c, 0x3000 },
+ { 0x9a00, 0x287a, 0x2000 },
+ { 0x1a00, 0x2879, 0x0000 },
+ { 0x1a00, 0x287b, 0x0000 },
+ { 0x9a00, 0x287e, 0x2000 },
+ { 0x1a00, 0x287d, 0x0000 },
+ { 0x1a00, 0x287f, 0x0000 },
+ { 0x9a00, 0x2890, 0x5000 },
+ { 0x9a00, 0x2888, 0x4000 },
+ { 0x9a00, 0x2884, 0x3000 },
+ { 0x9a00, 0x2882, 0x2000 },
+ { 0x1a00, 0x2881, 0x0000 },
+ { 0x1a00, 0x2883, 0x0000 },
+ { 0x9a00, 0x2886, 0x2000 },
+ { 0x1a00, 0x2885, 0x0000 },
+ { 0x1a00, 0x2887, 0x0000 },
+ { 0x9a00, 0x288c, 0x3000 },
+ { 0x9a00, 0x288a, 0x2000 },
+ { 0x1a00, 0x2889, 0x0000 },
+ { 0x1a00, 0x288b, 0x0000 },
+ { 0x9a00, 0x288e, 0x2000 },
+ { 0x1a00, 0x288d, 0x0000 },
+ { 0x1a00, 0x288f, 0x0000 },
+ { 0x9a00, 0x2898, 0x4000 },
+ { 0x9a00, 0x2894, 0x3000 },
+ { 0x9a00, 0x2892, 0x2000 },
+ { 0x1a00, 0x2891, 0x0000 },
+ { 0x1a00, 0x2893, 0x0000 },
+ { 0x9a00, 0x2896, 0x2000 },
+ { 0x1a00, 0x2895, 0x0000 },
+ { 0x1a00, 0x2897, 0x0000 },
+ { 0x9a00, 0x289c, 0x3000 },
+ { 0x9a00, 0x289a, 0x2000 },
+ { 0x1a00, 0x2899, 0x0000 },
+ { 0x1a00, 0x289b, 0x0000 },
+ { 0x9a00, 0x289e, 0x2000 },
+ { 0x1a00, 0x289d, 0x0000 },
+ { 0x1a00, 0x289f, 0x0000 },
+ { 0x9900, 0x2920, 0x8000 },
+ { 0x9a00, 0x28e0, 0x7000 },
+ { 0x9a00, 0x28c0, 0x6000 },
+ { 0x9a00, 0x28b0, 0x5000 },
+ { 0x9a00, 0x28a8, 0x4000 },
+ { 0x9a00, 0x28a4, 0x3000 },
+ { 0x9a00, 0x28a2, 0x2000 },
+ { 0x1a00, 0x28a1, 0x0000 },
+ { 0x1a00, 0x28a3, 0x0000 },
+ { 0x9a00, 0x28a6, 0x2000 },
+ { 0x1a00, 0x28a5, 0x0000 },
+ { 0x1a00, 0x28a7, 0x0000 },
+ { 0x9a00, 0x28ac, 0x3000 },
+ { 0x9a00, 0x28aa, 0x2000 },
+ { 0x1a00, 0x28a9, 0x0000 },
+ { 0x1a00, 0x28ab, 0x0000 },
+ { 0x9a00, 0x28ae, 0x2000 },
+ { 0x1a00, 0x28ad, 0x0000 },
+ { 0x1a00, 0x28af, 0x0000 },
+ { 0x9a00, 0x28b8, 0x4000 },
+ { 0x9a00, 0x28b4, 0x3000 },
+ { 0x9a00, 0x28b2, 0x2000 },
+ { 0x1a00, 0x28b1, 0x0000 },
+ { 0x1a00, 0x28b3, 0x0000 },
+ { 0x9a00, 0x28b6, 0x2000 },
+ { 0x1a00, 0x28b5, 0x0000 },
+ { 0x1a00, 0x28b7, 0x0000 },
+ { 0x9a00, 0x28bc, 0x3000 },
+ { 0x9a00, 0x28ba, 0x2000 },
+ { 0x1a00, 0x28b9, 0x0000 },
+ { 0x1a00, 0x28bb, 0x0000 },
+ { 0x9a00, 0x28be, 0x2000 },
+ { 0x1a00, 0x28bd, 0x0000 },
+ { 0x1a00, 0x28bf, 0x0000 },
+ { 0x9a00, 0x28d0, 0x5000 },
+ { 0x9a00, 0x28c8, 0x4000 },
+ { 0x9a00, 0x28c4, 0x3000 },
+ { 0x9a00, 0x28c2, 0x2000 },
+ { 0x1a00, 0x28c1, 0x0000 },
+ { 0x1a00, 0x28c3, 0x0000 },
+ { 0x9a00, 0x28c6, 0x2000 },
+ { 0x1a00, 0x28c5, 0x0000 },
+ { 0x1a00, 0x28c7, 0x0000 },
+ { 0x9a00, 0x28cc, 0x3000 },
+ { 0x9a00, 0x28ca, 0x2000 },
+ { 0x1a00, 0x28c9, 0x0000 },
+ { 0x1a00, 0x28cb, 0x0000 },
+ { 0x9a00, 0x28ce, 0x2000 },
+ { 0x1a00, 0x28cd, 0x0000 },
+ { 0x1a00, 0x28cf, 0x0000 },
+ { 0x9a00, 0x28d8, 0x4000 },
+ { 0x9a00, 0x28d4, 0x3000 },
+ { 0x9a00, 0x28d2, 0x2000 },
+ { 0x1a00, 0x28d1, 0x0000 },
+ { 0x1a00, 0x28d3, 0x0000 },
+ { 0x9a00, 0x28d6, 0x2000 },
+ { 0x1a00, 0x28d5, 0x0000 },
+ { 0x1a00, 0x28d7, 0x0000 },
+ { 0x9a00, 0x28dc, 0x3000 },
+ { 0x9a00, 0x28da, 0x2000 },
+ { 0x1a00, 0x28d9, 0x0000 },
+ { 0x1a00, 0x28db, 0x0000 },
+ { 0x9a00, 0x28de, 0x2000 },
+ { 0x1a00, 0x28dd, 0x0000 },
+ { 0x1a00, 0x28df, 0x0000 },
+ { 0x9900, 0x2900, 0x6000 },
+ { 0x9a00, 0x28f0, 0x5000 },
+ { 0x9a00, 0x28e8, 0x4000 },
+ { 0x9a00, 0x28e4, 0x3000 },
+ { 0x9a00, 0x28e2, 0x2000 },
+ { 0x1a00, 0x28e1, 0x0000 },
+ { 0x1a00, 0x28e3, 0x0000 },
+ { 0x9a00, 0x28e6, 0x2000 },
+ { 0x1a00, 0x28e5, 0x0000 },
+ { 0x1a00, 0x28e7, 0x0000 },
+ { 0x9a00, 0x28ec, 0x3000 },
+ { 0x9a00, 0x28ea, 0x2000 },
+ { 0x1a00, 0x28e9, 0x0000 },
+ { 0x1a00, 0x28eb, 0x0000 },
+ { 0x9a00, 0x28ee, 0x2000 },
+ { 0x1a00, 0x28ed, 0x0000 },
+ { 0x1a00, 0x28ef, 0x0000 },
+ { 0x9a00, 0x28f8, 0x4000 },
+ { 0x9a00, 0x28f4, 0x3000 },
+ { 0x9a00, 0x28f2, 0x2000 },
+ { 0x1a00, 0x28f1, 0x0000 },
+ { 0x1a00, 0x28f3, 0x0000 },
+ { 0x9a00, 0x28f6, 0x2000 },
+ { 0x1a00, 0x28f5, 0x0000 },
+ { 0x1a00, 0x28f7, 0x0000 },
+ { 0x9a00, 0x28fc, 0x3000 },
+ { 0x9a00, 0x28fa, 0x2000 },
+ { 0x1a00, 0x28f9, 0x0000 },
+ { 0x1a00, 0x28fb, 0x0000 },
+ { 0x9a00, 0x28fe, 0x2000 },
+ { 0x1a00, 0x28fd, 0x0000 },
+ { 0x1a00, 0x28ff, 0x0000 },
+ { 0x9900, 0x2910, 0x5000 },
+ { 0x9900, 0x2908, 0x4000 },
+ { 0x9900, 0x2904, 0x3000 },
+ { 0x9900, 0x2902, 0x2000 },
+ { 0x1900, 0x2901, 0x0000 },
+ { 0x1900, 0x2903, 0x0000 },
+ { 0x9900, 0x2906, 0x2000 },
+ { 0x1900, 0x2905, 0x0000 },
+ { 0x1900, 0x2907, 0x0000 },
+ { 0x9900, 0x290c, 0x3000 },
+ { 0x9900, 0x290a, 0x2000 },
+ { 0x1900, 0x2909, 0x0000 },
+ { 0x1900, 0x290b, 0x0000 },
+ { 0x9900, 0x290e, 0x2000 },
+ { 0x1900, 0x290d, 0x0000 },
+ { 0x1900, 0x290f, 0x0000 },
+ { 0x9900, 0x2918, 0x4000 },
+ { 0x9900, 0x2914, 0x3000 },
+ { 0x9900, 0x2912, 0x2000 },
+ { 0x1900, 0x2911, 0x0000 },
+ { 0x1900, 0x2913, 0x0000 },
+ { 0x9900, 0x2916, 0x2000 },
+ { 0x1900, 0x2915, 0x0000 },
+ { 0x1900, 0x2917, 0x0000 },
+ { 0x9900, 0x291c, 0x3000 },
+ { 0x9900, 0x291a, 0x2000 },
+ { 0x1900, 0x2919, 0x0000 },
+ { 0x1900, 0x291b, 0x0000 },
+ { 0x9900, 0x291e, 0x2000 },
+ { 0x1900, 0x291d, 0x0000 },
+ { 0x1900, 0x291f, 0x0000 },
+ { 0x9900, 0x2960, 0x7000 },
+ { 0x9900, 0x2940, 0x6000 },
+ { 0x9900, 0x2930, 0x5000 },
+ { 0x9900, 0x2928, 0x4000 },
+ { 0x9900, 0x2924, 0x3000 },
+ { 0x9900, 0x2922, 0x2000 },
+ { 0x1900, 0x2921, 0x0000 },
+ { 0x1900, 0x2923, 0x0000 },
+ { 0x9900, 0x2926, 0x2000 },
+ { 0x1900, 0x2925, 0x0000 },
+ { 0x1900, 0x2927, 0x0000 },
+ { 0x9900, 0x292c, 0x3000 },
+ { 0x9900, 0x292a, 0x2000 },
+ { 0x1900, 0x2929, 0x0000 },
+ { 0x1900, 0x292b, 0x0000 },
+ { 0x9900, 0x292e, 0x2000 },
+ { 0x1900, 0x292d, 0x0000 },
+ { 0x1900, 0x292f, 0x0000 },
+ { 0x9900, 0x2938, 0x4000 },
+ { 0x9900, 0x2934, 0x3000 },
+ { 0x9900, 0x2932, 0x2000 },
+ { 0x1900, 0x2931, 0x0000 },
+ { 0x1900, 0x2933, 0x0000 },
+ { 0x9900, 0x2936, 0x2000 },
+ { 0x1900, 0x2935, 0x0000 },
+ { 0x1900, 0x2937, 0x0000 },
+ { 0x9900, 0x293c, 0x3000 },
+ { 0x9900, 0x293a, 0x2000 },
+ { 0x1900, 0x2939, 0x0000 },
+ { 0x1900, 0x293b, 0x0000 },
+ { 0x9900, 0x293e, 0x2000 },
+ { 0x1900, 0x293d, 0x0000 },
+ { 0x1900, 0x293f, 0x0000 },
+ { 0x9900, 0x2950, 0x5000 },
+ { 0x9900, 0x2948, 0x4000 },
+ { 0x9900, 0x2944, 0x3000 },
+ { 0x9900, 0x2942, 0x2000 },
+ { 0x1900, 0x2941, 0x0000 },
+ { 0x1900, 0x2943, 0x0000 },
+ { 0x9900, 0x2946, 0x2000 },
+ { 0x1900, 0x2945, 0x0000 },
+ { 0x1900, 0x2947, 0x0000 },
+ { 0x9900, 0x294c, 0x3000 },
+ { 0x9900, 0x294a, 0x2000 },
+ { 0x1900, 0x2949, 0x0000 },
+ { 0x1900, 0x294b, 0x0000 },
+ { 0x9900, 0x294e, 0x2000 },
+ { 0x1900, 0x294d, 0x0000 },
+ { 0x1900, 0x294f, 0x0000 },
+ { 0x9900, 0x2958, 0x4000 },
+ { 0x9900, 0x2954, 0x3000 },
+ { 0x9900, 0x2952, 0x2000 },
+ { 0x1900, 0x2951, 0x0000 },
+ { 0x1900, 0x2953, 0x0000 },
+ { 0x9900, 0x2956, 0x2000 },
+ { 0x1900, 0x2955, 0x0000 },
+ { 0x1900, 0x2957, 0x0000 },
+ { 0x9900, 0x295c, 0x3000 },
+ { 0x9900, 0x295a, 0x2000 },
+ { 0x1900, 0x2959, 0x0000 },
+ { 0x1900, 0x295b, 0x0000 },
+ { 0x9900, 0x295e, 0x2000 },
+ { 0x1900, 0x295d, 0x0000 },
+ { 0x1900, 0x295f, 0x0000 },
+ { 0x9900, 0x2980, 0x6000 },
+ { 0x9900, 0x2970, 0x5000 },
+ { 0x9900, 0x2968, 0x4000 },
+ { 0x9900, 0x2964, 0x3000 },
+ { 0x9900, 0x2962, 0x2000 },
+ { 0x1900, 0x2961, 0x0000 },
+ { 0x1900, 0x2963, 0x0000 },
+ { 0x9900, 0x2966, 0x2000 },
+ { 0x1900, 0x2965, 0x0000 },
+ { 0x1900, 0x2967, 0x0000 },
+ { 0x9900, 0x296c, 0x3000 },
+ { 0x9900, 0x296a, 0x2000 },
+ { 0x1900, 0x2969, 0x0000 },
+ { 0x1900, 0x296b, 0x0000 },
+ { 0x9900, 0x296e, 0x2000 },
+ { 0x1900, 0x296d, 0x0000 },
+ { 0x1900, 0x296f, 0x0000 },
+ { 0x9900, 0x2978, 0x4000 },
+ { 0x9900, 0x2974, 0x3000 },
+ { 0x9900, 0x2972, 0x2000 },
+ { 0x1900, 0x2971, 0x0000 },
+ { 0x1900, 0x2973, 0x0000 },
+ { 0x9900, 0x2976, 0x2000 },
+ { 0x1900, 0x2975, 0x0000 },
+ { 0x1900, 0x2977, 0x0000 },
+ { 0x9900, 0x297c, 0x3000 },
+ { 0x9900, 0x297a, 0x2000 },
+ { 0x1900, 0x2979, 0x0000 },
+ { 0x1900, 0x297b, 0x0000 },
+ { 0x9900, 0x297e, 0x2000 },
+ { 0x1900, 0x297d, 0x0000 },
+ { 0x1900, 0x297f, 0x0000 },
+ { 0x9200, 0x2990, 0x5000 },
+ { 0x9200, 0x2988, 0x4000 },
+ { 0x9200, 0x2984, 0x3000 },
+ { 0x9900, 0x2982, 0x2000 },
+ { 0x1900, 0x2981, 0x0000 },
+ { 0x1600, 0x2983, 0x0000 },
+ { 0x9200, 0x2986, 0x2000 },
+ { 0x1600, 0x2985, 0x0000 },
+ { 0x1600, 0x2987, 0x0000 },
+ { 0x9200, 0x298c, 0x3000 },
+ { 0x9200, 0x298a, 0x2000 },
+ { 0x1600, 0x2989, 0x0000 },
+ { 0x1600, 0x298b, 0x0000 },
+ { 0x9200, 0x298e, 0x2000 },
+ { 0x1600, 0x298d, 0x0000 },
+ { 0x1600, 0x298f, 0x0000 },
+ { 0x9200, 0x2998, 0x4000 },
+ { 0x9200, 0x2994, 0x3000 },
+ { 0x9200, 0x2992, 0x2000 },
+ { 0x1600, 0x2991, 0x0000 },
+ { 0x1600, 0x2993, 0x0000 },
+ { 0x9200, 0x2996, 0x2000 },
+ { 0x1600, 0x2995, 0x0000 },
+ { 0x1600, 0x2997, 0x0000 },
+ { 0x9900, 0x299c, 0x3000 },
+ { 0x9900, 0x299a, 0x2000 },
+ { 0x1900, 0x2999, 0x0000 },
+ { 0x1900, 0x299b, 0x0000 },
+ { 0x9900, 0x299e, 0x2000 },
+ { 0x1900, 0x299d, 0x0000 },
+ { 0x1900, 0x299f, 0x0000 },
+ { 0x9900, 0x2aa0, 0x9000 },
+ { 0x9900, 0x2a20, 0x8000 },
+ { 0x9900, 0x29e0, 0x7000 },
+ { 0x9900, 0x29c0, 0x6000 },
+ { 0x9900, 0x29b0, 0x5000 },
+ { 0x9900, 0x29a8, 0x4000 },
+ { 0x9900, 0x29a4, 0x3000 },
+ { 0x9900, 0x29a2, 0x2000 },
+ { 0x1900, 0x29a1, 0x0000 },
+ { 0x1900, 0x29a3, 0x0000 },
+ { 0x9900, 0x29a6, 0x2000 },
+ { 0x1900, 0x29a5, 0x0000 },
+ { 0x1900, 0x29a7, 0x0000 },
+ { 0x9900, 0x29ac, 0x3000 },
+ { 0x9900, 0x29aa, 0x2000 },
+ { 0x1900, 0x29a9, 0x0000 },
+ { 0x1900, 0x29ab, 0x0000 },
+ { 0x9900, 0x29ae, 0x2000 },
+ { 0x1900, 0x29ad, 0x0000 },
+ { 0x1900, 0x29af, 0x0000 },
+ { 0x9900, 0x29b8, 0x4000 },
+ { 0x9900, 0x29b4, 0x3000 },
+ { 0x9900, 0x29b2, 0x2000 },
+ { 0x1900, 0x29b1, 0x0000 },
+ { 0x1900, 0x29b3, 0x0000 },
+ { 0x9900, 0x29b6, 0x2000 },
+ { 0x1900, 0x29b5, 0x0000 },
+ { 0x1900, 0x29b7, 0x0000 },
+ { 0x9900, 0x29bc, 0x3000 },
+ { 0x9900, 0x29ba, 0x2000 },
+ { 0x1900, 0x29b9, 0x0000 },
+ { 0x1900, 0x29bb, 0x0000 },
+ { 0x9900, 0x29be, 0x2000 },
+ { 0x1900, 0x29bd, 0x0000 },
+ { 0x1900, 0x29bf, 0x0000 },
+ { 0x9900, 0x29d0, 0x5000 },
+ { 0x9900, 0x29c8, 0x4000 },
+ { 0x9900, 0x29c4, 0x3000 },
+ { 0x9900, 0x29c2, 0x2000 },
+ { 0x1900, 0x29c1, 0x0000 },
+ { 0x1900, 0x29c3, 0x0000 },
+ { 0x9900, 0x29c6, 0x2000 },
+ { 0x1900, 0x29c5, 0x0000 },
+ { 0x1900, 0x29c7, 0x0000 },
+ { 0x9900, 0x29cc, 0x3000 },
+ { 0x9900, 0x29ca, 0x2000 },
+ { 0x1900, 0x29c9, 0x0000 },
+ { 0x1900, 0x29cb, 0x0000 },
+ { 0x9900, 0x29ce, 0x2000 },
+ { 0x1900, 0x29cd, 0x0000 },
+ { 0x1900, 0x29cf, 0x0000 },
+ { 0x9600, 0x29d8, 0x4000 },
+ { 0x9900, 0x29d4, 0x3000 },
+ { 0x9900, 0x29d2, 0x2000 },
+ { 0x1900, 0x29d1, 0x0000 },
+ { 0x1900, 0x29d3, 0x0000 },
+ { 0x9900, 0x29d6, 0x2000 },
+ { 0x1900, 0x29d5, 0x0000 },
+ { 0x1900, 0x29d7, 0x0000 },
+ { 0x9900, 0x29dc, 0x3000 },
+ { 0x9600, 0x29da, 0x2000 },
+ { 0x1200, 0x29d9, 0x0000 },
+ { 0x1200, 0x29db, 0x0000 },
+ { 0x9900, 0x29de, 0x2000 },
+ { 0x1900, 0x29dd, 0x0000 },
+ { 0x1900, 0x29df, 0x0000 },
+ { 0x9900, 0x2a00, 0x6000 },
+ { 0x9900, 0x29f0, 0x5000 },
+ { 0x9900, 0x29e8, 0x4000 },
+ { 0x9900, 0x29e4, 0x3000 },
+ { 0x9900, 0x29e2, 0x2000 },
+ { 0x1900, 0x29e1, 0x0000 },
+ { 0x1900, 0x29e3, 0x0000 },
+ { 0x9900, 0x29e6, 0x2000 },
+ { 0x1900, 0x29e5, 0x0000 },
+ { 0x1900, 0x29e7, 0x0000 },
+ { 0x9900, 0x29ec, 0x3000 },
+ { 0x9900, 0x29ea, 0x2000 },
+ { 0x1900, 0x29e9, 0x0000 },
+ { 0x1900, 0x29eb, 0x0000 },
+ { 0x9900, 0x29ee, 0x2000 },
+ { 0x1900, 0x29ed, 0x0000 },
+ { 0x1900, 0x29ef, 0x0000 },
+ { 0x9900, 0x29f8, 0x4000 },
+ { 0x9900, 0x29f4, 0x3000 },
+ { 0x9900, 0x29f2, 0x2000 },
+ { 0x1900, 0x29f1, 0x0000 },
+ { 0x1900, 0x29f3, 0x0000 },
+ { 0x9900, 0x29f6, 0x2000 },
+ { 0x1900, 0x29f5, 0x0000 },
+ { 0x1900, 0x29f7, 0x0000 },
+ { 0x9600, 0x29fc, 0x3000 },
+ { 0x9900, 0x29fa, 0x2000 },
+ { 0x1900, 0x29f9, 0x0000 },
+ { 0x1900, 0x29fb, 0x0000 },
+ { 0x9900, 0x29fe, 0x2000 },
+ { 0x1200, 0x29fd, 0x0000 },
+ { 0x1900, 0x29ff, 0x0000 },
+ { 0x9900, 0x2a10, 0x5000 },
+ { 0x9900, 0x2a08, 0x4000 },
+ { 0x9900, 0x2a04, 0x3000 },
+ { 0x9900, 0x2a02, 0x2000 },
+ { 0x1900, 0x2a01, 0x0000 },
+ { 0x1900, 0x2a03, 0x0000 },
+ { 0x9900, 0x2a06, 0x2000 },
+ { 0x1900, 0x2a05, 0x0000 },
+ { 0x1900, 0x2a07, 0x0000 },
+ { 0x9900, 0x2a0c, 0x3000 },
+ { 0x9900, 0x2a0a, 0x2000 },
+ { 0x1900, 0x2a09, 0x0000 },
+ { 0x1900, 0x2a0b, 0x0000 },
+ { 0x9900, 0x2a0e, 0x2000 },
+ { 0x1900, 0x2a0d, 0x0000 },
+ { 0x1900, 0x2a0f, 0x0000 },
+ { 0x9900, 0x2a18, 0x4000 },
+ { 0x9900, 0x2a14, 0x3000 },
+ { 0x9900, 0x2a12, 0x2000 },
+ { 0x1900, 0x2a11, 0x0000 },
+ { 0x1900, 0x2a13, 0x0000 },
+ { 0x9900, 0x2a16, 0x2000 },
+ { 0x1900, 0x2a15, 0x0000 },
+ { 0x1900, 0x2a17, 0x0000 },
+ { 0x9900, 0x2a1c, 0x3000 },
+ { 0x9900, 0x2a1a, 0x2000 },
+ { 0x1900, 0x2a19, 0x0000 },
+ { 0x1900, 0x2a1b, 0x0000 },
+ { 0x9900, 0x2a1e, 0x2000 },
+ { 0x1900, 0x2a1d, 0x0000 },
+ { 0x1900, 0x2a1f, 0x0000 },
+ { 0x9900, 0x2a60, 0x7000 },
+ { 0x9900, 0x2a40, 0x6000 },
+ { 0x9900, 0x2a30, 0x5000 },
+ { 0x9900, 0x2a28, 0x4000 },
+ { 0x9900, 0x2a24, 0x3000 },
+ { 0x9900, 0x2a22, 0x2000 },
+ { 0x1900, 0x2a21, 0x0000 },
+ { 0x1900, 0x2a23, 0x0000 },
+ { 0x9900, 0x2a26, 0x2000 },
+ { 0x1900, 0x2a25, 0x0000 },
+ { 0x1900, 0x2a27, 0x0000 },
+ { 0x9900, 0x2a2c, 0x3000 },
+ { 0x9900, 0x2a2a, 0x2000 },
+ { 0x1900, 0x2a29, 0x0000 },
+ { 0x1900, 0x2a2b, 0x0000 },
+ { 0x9900, 0x2a2e, 0x2000 },
+ { 0x1900, 0x2a2d, 0x0000 },
+ { 0x1900, 0x2a2f, 0x0000 },
+ { 0x9900, 0x2a38, 0x4000 },
+ { 0x9900, 0x2a34, 0x3000 },
+ { 0x9900, 0x2a32, 0x2000 },
+ { 0x1900, 0x2a31, 0x0000 },
+ { 0x1900, 0x2a33, 0x0000 },
+ { 0x9900, 0x2a36, 0x2000 },
+ { 0x1900, 0x2a35, 0x0000 },
+ { 0x1900, 0x2a37, 0x0000 },
+ { 0x9900, 0x2a3c, 0x3000 },
+ { 0x9900, 0x2a3a, 0x2000 },
+ { 0x1900, 0x2a39, 0x0000 },
+ { 0x1900, 0x2a3b, 0x0000 },
+ { 0x9900, 0x2a3e, 0x2000 },
+ { 0x1900, 0x2a3d, 0x0000 },
+ { 0x1900, 0x2a3f, 0x0000 },
+ { 0x9900, 0x2a50, 0x5000 },
+ { 0x9900, 0x2a48, 0x4000 },
+ { 0x9900, 0x2a44, 0x3000 },
+ { 0x9900, 0x2a42, 0x2000 },
+ { 0x1900, 0x2a41, 0x0000 },
+ { 0x1900, 0x2a43, 0x0000 },
+ { 0x9900, 0x2a46, 0x2000 },
+ { 0x1900, 0x2a45, 0x0000 },
+ { 0x1900, 0x2a47, 0x0000 },
+ { 0x9900, 0x2a4c, 0x3000 },
+ { 0x9900, 0x2a4a, 0x2000 },
+ { 0x1900, 0x2a49, 0x0000 },
+ { 0x1900, 0x2a4b, 0x0000 },
+ { 0x9900, 0x2a4e, 0x2000 },
+ { 0x1900, 0x2a4d, 0x0000 },
+ { 0x1900, 0x2a4f, 0x0000 },
+ { 0x9900, 0x2a58, 0x4000 },
+ { 0x9900, 0x2a54, 0x3000 },
+ { 0x9900, 0x2a52, 0x2000 },
+ { 0x1900, 0x2a51, 0x0000 },
+ { 0x1900, 0x2a53, 0x0000 },
+ { 0x9900, 0x2a56, 0x2000 },
+ { 0x1900, 0x2a55, 0x0000 },
+ { 0x1900, 0x2a57, 0x0000 },
+ { 0x9900, 0x2a5c, 0x3000 },
+ { 0x9900, 0x2a5a, 0x2000 },
+ { 0x1900, 0x2a59, 0x0000 },
+ { 0x1900, 0x2a5b, 0x0000 },
+ { 0x9900, 0x2a5e, 0x2000 },
+ { 0x1900, 0x2a5d, 0x0000 },
+ { 0x1900, 0x2a5f, 0x0000 },
+ { 0x9900, 0x2a80, 0x6000 },
+ { 0x9900, 0x2a70, 0x5000 },
+ { 0x9900, 0x2a68, 0x4000 },
+ { 0x9900, 0x2a64, 0x3000 },
+ { 0x9900, 0x2a62, 0x2000 },
+ { 0x1900, 0x2a61, 0x0000 },
+ { 0x1900, 0x2a63, 0x0000 },
+ { 0x9900, 0x2a66, 0x2000 },
+ { 0x1900, 0x2a65, 0x0000 },
+ { 0x1900, 0x2a67, 0x0000 },
+ { 0x9900, 0x2a6c, 0x3000 },
+ { 0x9900, 0x2a6a, 0x2000 },
+ { 0x1900, 0x2a69, 0x0000 },
+ { 0x1900, 0x2a6b, 0x0000 },
+ { 0x9900, 0x2a6e, 0x2000 },
+ { 0x1900, 0x2a6d, 0x0000 },
+ { 0x1900, 0x2a6f, 0x0000 },
+ { 0x9900, 0x2a78, 0x4000 },
+ { 0x9900, 0x2a74, 0x3000 },
+ { 0x9900, 0x2a72, 0x2000 },
+ { 0x1900, 0x2a71, 0x0000 },
+ { 0x1900, 0x2a73, 0x0000 },
+ { 0x9900, 0x2a76, 0x2000 },
+ { 0x1900, 0x2a75, 0x0000 },
+ { 0x1900, 0x2a77, 0x0000 },
+ { 0x9900, 0x2a7c, 0x3000 },
+ { 0x9900, 0x2a7a, 0x2000 },
+ { 0x1900, 0x2a79, 0x0000 },
+ { 0x1900, 0x2a7b, 0x0000 },
+ { 0x9900, 0x2a7e, 0x2000 },
+ { 0x1900, 0x2a7d, 0x0000 },
+ { 0x1900, 0x2a7f, 0x0000 },
+ { 0x9900, 0x2a90, 0x5000 },
+ { 0x9900, 0x2a88, 0x4000 },
+ { 0x9900, 0x2a84, 0x3000 },
+ { 0x9900, 0x2a82, 0x2000 },
+ { 0x1900, 0x2a81, 0x0000 },
+ { 0x1900, 0x2a83, 0x0000 },
+ { 0x9900, 0x2a86, 0x2000 },
+ { 0x1900, 0x2a85, 0x0000 },
+ { 0x1900, 0x2a87, 0x0000 },
+ { 0x9900, 0x2a8c, 0x3000 },
+ { 0x9900, 0x2a8a, 0x2000 },
+ { 0x1900, 0x2a89, 0x0000 },
+ { 0x1900, 0x2a8b, 0x0000 },
+ { 0x9900, 0x2a8e, 0x2000 },
+ { 0x1900, 0x2a8d, 0x0000 },
+ { 0x1900, 0x2a8f, 0x0000 },
+ { 0x9900, 0x2a98, 0x4000 },
+ { 0x9900, 0x2a94, 0x3000 },
+ { 0x9900, 0x2a92, 0x2000 },
+ { 0x1900, 0x2a91, 0x0000 },
+ { 0x1900, 0x2a93, 0x0000 },
+ { 0x9900, 0x2a96, 0x2000 },
+ { 0x1900, 0x2a95, 0x0000 },
+ { 0x1900, 0x2a97, 0x0000 },
+ { 0x9900, 0x2a9c, 0x3000 },
+ { 0x9900, 0x2a9a, 0x2000 },
+ { 0x1900, 0x2a99, 0x0000 },
+ { 0x1900, 0x2a9b, 0x0000 },
+ { 0x9900, 0x2a9e, 0x2000 },
+ { 0x1900, 0x2a9d, 0x0000 },
+ { 0x1900, 0x2a9f, 0x0000 },
+ { 0x9a00, 0x2e92, 0x8000 },
+ { 0x9900, 0x2ae0, 0x7000 },
+ { 0x9900, 0x2ac0, 0x6000 },
+ { 0x9900, 0x2ab0, 0x5000 },
+ { 0x9900, 0x2aa8, 0x4000 },
+ { 0x9900, 0x2aa4, 0x3000 },
+ { 0x9900, 0x2aa2, 0x2000 },
+ { 0x1900, 0x2aa1, 0x0000 },
+ { 0x1900, 0x2aa3, 0x0000 },
+ { 0x9900, 0x2aa6, 0x2000 },
+ { 0x1900, 0x2aa5, 0x0000 },
+ { 0x1900, 0x2aa7, 0x0000 },
+ { 0x9900, 0x2aac, 0x3000 },
+ { 0x9900, 0x2aaa, 0x2000 },
+ { 0x1900, 0x2aa9, 0x0000 },
+ { 0x1900, 0x2aab, 0x0000 },
+ { 0x9900, 0x2aae, 0x2000 },
+ { 0x1900, 0x2aad, 0x0000 },
+ { 0x1900, 0x2aaf, 0x0000 },
+ { 0x9900, 0x2ab8, 0x4000 },
+ { 0x9900, 0x2ab4, 0x3000 },
+ { 0x9900, 0x2ab2, 0x2000 },
+ { 0x1900, 0x2ab1, 0x0000 },
+ { 0x1900, 0x2ab3, 0x0000 },
+ { 0x9900, 0x2ab6, 0x2000 },
+ { 0x1900, 0x2ab5, 0x0000 },
+ { 0x1900, 0x2ab7, 0x0000 },
+ { 0x9900, 0x2abc, 0x3000 },
+ { 0x9900, 0x2aba, 0x2000 },
+ { 0x1900, 0x2ab9, 0x0000 },
+ { 0x1900, 0x2abb, 0x0000 },
+ { 0x9900, 0x2abe, 0x2000 },
+ { 0x1900, 0x2abd, 0x0000 },
+ { 0x1900, 0x2abf, 0x0000 },
+ { 0x9900, 0x2ad0, 0x5000 },
+ { 0x9900, 0x2ac8, 0x4000 },
+ { 0x9900, 0x2ac4, 0x3000 },
+ { 0x9900, 0x2ac2, 0x2000 },
+ { 0x1900, 0x2ac1, 0x0000 },
+ { 0x1900, 0x2ac3, 0x0000 },
+ { 0x9900, 0x2ac6, 0x2000 },
+ { 0x1900, 0x2ac5, 0x0000 },
+ { 0x1900, 0x2ac7, 0x0000 },
+ { 0x9900, 0x2acc, 0x3000 },
+ { 0x9900, 0x2aca, 0x2000 },
+ { 0x1900, 0x2ac9, 0x0000 },
+ { 0x1900, 0x2acb, 0x0000 },
+ { 0x9900, 0x2ace, 0x2000 },
+ { 0x1900, 0x2acd, 0x0000 },
+ { 0x1900, 0x2acf, 0x0000 },
+ { 0x9900, 0x2ad8, 0x4000 },
+ { 0x9900, 0x2ad4, 0x3000 },
+ { 0x9900, 0x2ad2, 0x2000 },
+ { 0x1900, 0x2ad1, 0x0000 },
+ { 0x1900, 0x2ad3, 0x0000 },
+ { 0x9900, 0x2ad6, 0x2000 },
+ { 0x1900, 0x2ad5, 0x0000 },
+ { 0x1900, 0x2ad7, 0x0000 },
+ { 0x9900, 0x2adc, 0x3000 },
+ { 0x9900, 0x2ada, 0x2000 },
+ { 0x1900, 0x2ad9, 0x0000 },
+ { 0x1900, 0x2adb, 0x0000 },
+ { 0x9900, 0x2ade, 0x2000 },
+ { 0x1900, 0x2add, 0x0000 },
+ { 0x1900, 0x2adf, 0x0000 },
+ { 0x9a00, 0x2b00, 0x6000 },
+ { 0x9900, 0x2af0, 0x5000 },
+ { 0x9900, 0x2ae8, 0x4000 },
+ { 0x9900, 0x2ae4, 0x3000 },
+ { 0x9900, 0x2ae2, 0x2000 },
+ { 0x1900, 0x2ae1, 0x0000 },
+ { 0x1900, 0x2ae3, 0x0000 },
+ { 0x9900, 0x2ae6, 0x2000 },
+ { 0x1900, 0x2ae5, 0x0000 },
+ { 0x1900, 0x2ae7, 0x0000 },
+ { 0x9900, 0x2aec, 0x3000 },
+ { 0x9900, 0x2aea, 0x2000 },
+ { 0x1900, 0x2ae9, 0x0000 },
+ { 0x1900, 0x2aeb, 0x0000 },
+ { 0x9900, 0x2aee, 0x2000 },
+ { 0x1900, 0x2aed, 0x0000 },
+ { 0x1900, 0x2aef, 0x0000 },
+ { 0x9900, 0x2af8, 0x4000 },
+ { 0x9900, 0x2af4, 0x3000 },
+ { 0x9900, 0x2af2, 0x2000 },
+ { 0x1900, 0x2af1, 0x0000 },
+ { 0x1900, 0x2af3, 0x0000 },
+ { 0x9900, 0x2af6, 0x2000 },
+ { 0x1900, 0x2af5, 0x0000 },
+ { 0x1900, 0x2af7, 0x0000 },
+ { 0x9900, 0x2afc, 0x3000 },
+ { 0x9900, 0x2afa, 0x2000 },
+ { 0x1900, 0x2af9, 0x0000 },
+ { 0x1900, 0x2afb, 0x0000 },
+ { 0x9900, 0x2afe, 0x2000 },
+ { 0x1900, 0x2afd, 0x0000 },
+ { 0x1900, 0x2aff, 0x0000 },
+ { 0x9a00, 0x2e82, 0x5000 },
+ { 0x9a00, 0x2b08, 0x4000 },
+ { 0x9a00, 0x2b04, 0x3000 },
+ { 0x9a00, 0x2b02, 0x2000 },
+ { 0x1a00, 0x2b01, 0x0000 },
+ { 0x1a00, 0x2b03, 0x0000 },
+ { 0x9a00, 0x2b06, 0x2000 },
+ { 0x1a00, 0x2b05, 0x0000 },
+ { 0x1a00, 0x2b07, 0x0000 },
+ { 0x9a00, 0x2b0c, 0x3000 },
+ { 0x9a00, 0x2b0a, 0x2000 },
+ { 0x1a00, 0x2b09, 0x0000 },
+ { 0x1a00, 0x2b0b, 0x0000 },
+ { 0x9a00, 0x2e80, 0x2000 },
+ { 0x1a00, 0x2b0d, 0x0000 },
+ { 0x1a00, 0x2e81, 0x0000 },
+ { 0x9a00, 0x2e8a, 0x4000 },
+ { 0x9a00, 0x2e86, 0x3000 },
+ { 0x9a00, 0x2e84, 0x2000 },
+ { 0x1a00, 0x2e83, 0x0000 },
+ { 0x1a00, 0x2e85, 0x0000 },
+ { 0x9a00, 0x2e88, 0x2000 },
+ { 0x1a00, 0x2e87, 0x0000 },
+ { 0x1a00, 0x2e89, 0x0000 },
+ { 0x9a00, 0x2e8e, 0x3000 },
+ { 0x9a00, 0x2e8c, 0x2000 },
+ { 0x1a00, 0x2e8b, 0x0000 },
+ { 0x1a00, 0x2e8d, 0x0000 },
+ { 0x9a00, 0x2e90, 0x2000 },
+ { 0x1a00, 0x2e8f, 0x0000 },
+ { 0x1a00, 0x2e91, 0x0000 },
+ { 0x9a00, 0x2ed3, 0x7000 },
+ { 0x9a00, 0x2eb3, 0x6000 },
+ { 0x9a00, 0x2ea3, 0x5000 },
+ { 0x9a00, 0x2e9b, 0x4000 },
+ { 0x9a00, 0x2e96, 0x3000 },
+ { 0x9a00, 0x2e94, 0x2000 },
+ { 0x1a00, 0x2e93, 0x0000 },
+ { 0x1a00, 0x2e95, 0x0000 },
+ { 0x9a00, 0x2e98, 0x2000 },
+ { 0x1a00, 0x2e97, 0x0000 },
+ { 0x1a00, 0x2e99, 0x0000 },
+ { 0x9a00, 0x2e9f, 0x3000 },
+ { 0x9a00, 0x2e9d, 0x2000 },
+ { 0x1a00, 0x2e9c, 0x0000 },
+ { 0x1a00, 0x2e9e, 0x0000 },
+ { 0x9a00, 0x2ea1, 0x2000 },
+ { 0x1a00, 0x2ea0, 0x0000 },
+ { 0x1a00, 0x2ea2, 0x0000 },
+ { 0x9a00, 0x2eab, 0x4000 },
+ { 0x9a00, 0x2ea7, 0x3000 },
+ { 0x9a00, 0x2ea5, 0x2000 },
+ { 0x1a00, 0x2ea4, 0x0000 },
+ { 0x1a00, 0x2ea6, 0x0000 },
+ { 0x9a00, 0x2ea9, 0x2000 },
+ { 0x1a00, 0x2ea8, 0x0000 },
+ { 0x1a00, 0x2eaa, 0x0000 },
+ { 0x9a00, 0x2eaf, 0x3000 },
+ { 0x9a00, 0x2ead, 0x2000 },
+ { 0x1a00, 0x2eac, 0x0000 },
+ { 0x1a00, 0x2eae, 0x0000 },
+ { 0x9a00, 0x2eb1, 0x2000 },
+ { 0x1a00, 0x2eb0, 0x0000 },
+ { 0x1a00, 0x2eb2, 0x0000 },
+ { 0x9a00, 0x2ec3, 0x5000 },
+ { 0x9a00, 0x2ebb, 0x4000 },
+ { 0x9a00, 0x2eb7, 0x3000 },
+ { 0x9a00, 0x2eb5, 0x2000 },
+ { 0x1a00, 0x2eb4, 0x0000 },
+ { 0x1a00, 0x2eb6, 0x0000 },
+ { 0x9a00, 0x2eb9, 0x2000 },
+ { 0x1a00, 0x2eb8, 0x0000 },
+ { 0x1a00, 0x2eba, 0x0000 },
+ { 0x9a00, 0x2ebf, 0x3000 },
+ { 0x9a00, 0x2ebd, 0x2000 },
+ { 0x1a00, 0x2ebc, 0x0000 },
+ { 0x1a00, 0x2ebe, 0x0000 },
+ { 0x9a00, 0x2ec1, 0x2000 },
+ { 0x1a00, 0x2ec0, 0x0000 },
+ { 0x1a00, 0x2ec2, 0x0000 },
+ { 0x9a00, 0x2ecb, 0x4000 },
+ { 0x9a00, 0x2ec7, 0x3000 },
+ { 0x9a00, 0x2ec5, 0x2000 },
+ { 0x1a00, 0x2ec4, 0x0000 },
+ { 0x1a00, 0x2ec6, 0x0000 },
+ { 0x9a00, 0x2ec9, 0x2000 },
+ { 0x1a00, 0x2ec8, 0x0000 },
+ { 0x1a00, 0x2eca, 0x0000 },
+ { 0x9a00, 0x2ecf, 0x3000 },
+ { 0x9a00, 0x2ecd, 0x2000 },
+ { 0x1a00, 0x2ecc, 0x0000 },
+ { 0x1a00, 0x2ece, 0x0000 },
+ { 0x9a00, 0x2ed1, 0x2000 },
+ { 0x1a00, 0x2ed0, 0x0000 },
+ { 0x1a00, 0x2ed2, 0x0000 },
+ { 0x9a00, 0x2ef3, 0x6000 },
+ { 0x9a00, 0x2ee3, 0x5000 },
+ { 0x9a00, 0x2edb, 0x4000 },
+ { 0x9a00, 0x2ed7, 0x3000 },
+ { 0x9a00, 0x2ed5, 0x2000 },
+ { 0x1a00, 0x2ed4, 0x0000 },
+ { 0x1a00, 0x2ed6, 0x0000 },
+ { 0x9a00, 0x2ed9, 0x2000 },
+ { 0x1a00, 0x2ed8, 0x0000 },
+ { 0x1a00, 0x2eda, 0x0000 },
+ { 0x9a00, 0x2edf, 0x3000 },
+ { 0x9a00, 0x2edd, 0x2000 },
+ { 0x1a00, 0x2edc, 0x0000 },
+ { 0x1a00, 0x2ede, 0x0000 },
+ { 0x9a00, 0x2ee1, 0x2000 },
+ { 0x1a00, 0x2ee0, 0x0000 },
+ { 0x1a00, 0x2ee2, 0x0000 },
+ { 0x9a00, 0x2eeb, 0x4000 },
+ { 0x9a00, 0x2ee7, 0x3000 },
+ { 0x9a00, 0x2ee5, 0x2000 },
+ { 0x1a00, 0x2ee4, 0x0000 },
+ { 0x1a00, 0x2ee6, 0x0000 },
+ { 0x9a00, 0x2ee9, 0x2000 },
+ { 0x1a00, 0x2ee8, 0x0000 },
+ { 0x1a00, 0x2eea, 0x0000 },
+ { 0x9a00, 0x2eef, 0x3000 },
+ { 0x9a00, 0x2eed, 0x2000 },
+ { 0x1a00, 0x2eec, 0x0000 },
+ { 0x1a00, 0x2eee, 0x0000 },
+ { 0x9a00, 0x2ef1, 0x2000 },
+ { 0x1a00, 0x2ef0, 0x0000 },
+ { 0x1a00, 0x2ef2, 0x0000 },
+ { 0x9a00, 0x2f0f, 0x5000 },
+ { 0x9a00, 0x2f07, 0x4000 },
+ { 0x9a00, 0x2f03, 0x3000 },
+ { 0x9a00, 0x2f01, 0x2000 },
+ { 0x1a00, 0x2f00, 0x0000 },
+ { 0x1a00, 0x2f02, 0x0000 },
+ { 0x9a00, 0x2f05, 0x2000 },
+ { 0x1a00, 0x2f04, 0x0000 },
+ { 0x1a00, 0x2f06, 0x0000 },
+ { 0x9a00, 0x2f0b, 0x3000 },
+ { 0x9a00, 0x2f09, 0x2000 },
+ { 0x1a00, 0x2f08, 0x0000 },
+ { 0x1a00, 0x2f0a, 0x0000 },
+ { 0x9a00, 0x2f0d, 0x2000 },
+ { 0x1a00, 0x2f0c, 0x0000 },
+ { 0x1a00, 0x2f0e, 0x0000 },
+ { 0x9a00, 0x2f17, 0x4000 },
+ { 0x9a00, 0x2f13, 0x3000 },
+ { 0x9a00, 0x2f11, 0x2000 },
+ { 0x1a00, 0x2f10, 0x0000 },
+ { 0x1a00, 0x2f12, 0x0000 },
+ { 0x9a00, 0x2f15, 0x2000 },
+ { 0x1a00, 0x2f14, 0x0000 },
+ { 0x1a00, 0x2f16, 0x0000 },
+ { 0x9a00, 0x2f1b, 0x3000 },
+ { 0x9a00, 0x2f19, 0x2000 },
+ { 0x1a00, 0x2f18, 0x0000 },
+ { 0x1a00, 0x2f1a, 0x0000 },
+ { 0x9a00, 0x2f1d, 0x2000 },
+ { 0x1a00, 0x2f1c, 0x0000 },
+ { 0x1a00, 0x2f1e, 0x0000 },
+ { 0x8701, 0x00f0, 0xd000 },
+ { 0x8700, 0xa34d, 0xc000 },
+ { 0x9a00, 0x3391, 0xb000 },
+ { 0x8700, 0x3149, 0xa000 },
+ { 0x9500, 0x303d, 0x9000 },
+ { 0x9a00, 0x2f9f, 0x8000 },
+ { 0x9a00, 0x2f5f, 0x7000 },
+ { 0x9a00, 0x2f3f, 0x6000 },
+ { 0x9a00, 0x2f2f, 0x5000 },
+ { 0x9a00, 0x2f27, 0x4000 },
+ { 0x9a00, 0x2f23, 0x3000 },
+ { 0x9a00, 0x2f21, 0x2000 },
+ { 0x1a00, 0x2f20, 0x0000 },
+ { 0x1a00, 0x2f22, 0x0000 },
+ { 0x9a00, 0x2f25, 0x2000 },
+ { 0x1a00, 0x2f24, 0x0000 },
+ { 0x1a00, 0x2f26, 0x0000 },
+ { 0x9a00, 0x2f2b, 0x3000 },
+ { 0x9a00, 0x2f29, 0x2000 },
+ { 0x1a00, 0x2f28, 0x0000 },
+ { 0x1a00, 0x2f2a, 0x0000 },
+ { 0x9a00, 0x2f2d, 0x2000 },
+ { 0x1a00, 0x2f2c, 0x0000 },
+ { 0x1a00, 0x2f2e, 0x0000 },
+ { 0x9a00, 0x2f37, 0x4000 },
+ { 0x9a00, 0x2f33, 0x3000 },
+ { 0x9a00, 0x2f31, 0x2000 },
+ { 0x1a00, 0x2f30, 0x0000 },
+ { 0x1a00, 0x2f32, 0x0000 },
+ { 0x9a00, 0x2f35, 0x2000 },
+ { 0x1a00, 0x2f34, 0x0000 },
+ { 0x1a00, 0x2f36, 0x0000 },
+ { 0x9a00, 0x2f3b, 0x3000 },
+ { 0x9a00, 0x2f39, 0x2000 },
+ { 0x1a00, 0x2f38, 0x0000 },
+ { 0x1a00, 0x2f3a, 0x0000 },
+ { 0x9a00, 0x2f3d, 0x2000 },
+ { 0x1a00, 0x2f3c, 0x0000 },
+ { 0x1a00, 0x2f3e, 0x0000 },
+ { 0x9a00, 0x2f4f, 0x5000 },
+ { 0x9a00, 0x2f47, 0x4000 },
+ { 0x9a00, 0x2f43, 0x3000 },
+ { 0x9a00, 0x2f41, 0x2000 },
+ { 0x1a00, 0x2f40, 0x0000 },
+ { 0x1a00, 0x2f42, 0x0000 },
+ { 0x9a00, 0x2f45, 0x2000 },
+ { 0x1a00, 0x2f44, 0x0000 },
+ { 0x1a00, 0x2f46, 0x0000 },
+ { 0x9a00, 0x2f4b, 0x3000 },
+ { 0x9a00, 0x2f49, 0x2000 },
+ { 0x1a00, 0x2f48, 0x0000 },
+ { 0x1a00, 0x2f4a, 0x0000 },
+ { 0x9a00, 0x2f4d, 0x2000 },
+ { 0x1a00, 0x2f4c, 0x0000 },
+ { 0x1a00, 0x2f4e, 0x0000 },
+ { 0x9a00, 0x2f57, 0x4000 },
+ { 0x9a00, 0x2f53, 0x3000 },
+ { 0x9a00, 0x2f51, 0x2000 },
+ { 0x1a00, 0x2f50, 0x0000 },
+ { 0x1a00, 0x2f52, 0x0000 },
+ { 0x9a00, 0x2f55, 0x2000 },
+ { 0x1a00, 0x2f54, 0x0000 },
+ { 0x1a00, 0x2f56, 0x0000 },
+ { 0x9a00, 0x2f5b, 0x3000 },
+ { 0x9a00, 0x2f59, 0x2000 },
+ { 0x1a00, 0x2f58, 0x0000 },
+ { 0x1a00, 0x2f5a, 0x0000 },
+ { 0x9a00, 0x2f5d, 0x2000 },
+ { 0x1a00, 0x2f5c, 0x0000 },
+ { 0x1a00, 0x2f5e, 0x0000 },
+ { 0x9a00, 0x2f7f, 0x6000 },
+ { 0x9a00, 0x2f6f, 0x5000 },
+ { 0x9a00, 0x2f67, 0x4000 },
+ { 0x9a00, 0x2f63, 0x3000 },
+ { 0x9a00, 0x2f61, 0x2000 },
+ { 0x1a00, 0x2f60, 0x0000 },
+ { 0x1a00, 0x2f62, 0x0000 },
+ { 0x9a00, 0x2f65, 0x2000 },
+ { 0x1a00, 0x2f64, 0x0000 },
+ { 0x1a00, 0x2f66, 0x0000 },
+ { 0x9a00, 0x2f6b, 0x3000 },
+ { 0x9a00, 0x2f69, 0x2000 },
+ { 0x1a00, 0x2f68, 0x0000 },
+ { 0x1a00, 0x2f6a, 0x0000 },
+ { 0x9a00, 0x2f6d, 0x2000 },
+ { 0x1a00, 0x2f6c, 0x0000 },
+ { 0x1a00, 0x2f6e, 0x0000 },
+ { 0x9a00, 0x2f77, 0x4000 },
+ { 0x9a00, 0x2f73, 0x3000 },
+ { 0x9a00, 0x2f71, 0x2000 },
+ { 0x1a00, 0x2f70, 0x0000 },
+ { 0x1a00, 0x2f72, 0x0000 },
+ { 0x9a00, 0x2f75, 0x2000 },
+ { 0x1a00, 0x2f74, 0x0000 },
+ { 0x1a00, 0x2f76, 0x0000 },
+ { 0x9a00, 0x2f7b, 0x3000 },
+ { 0x9a00, 0x2f79, 0x2000 },
+ { 0x1a00, 0x2f78, 0x0000 },
+ { 0x1a00, 0x2f7a, 0x0000 },
+ { 0x9a00, 0x2f7d, 0x2000 },
+ { 0x1a00, 0x2f7c, 0x0000 },
+ { 0x1a00, 0x2f7e, 0x0000 },
+ { 0x9a00, 0x2f8f, 0x5000 },
+ { 0x9a00, 0x2f87, 0x4000 },
+ { 0x9a00, 0x2f83, 0x3000 },
+ { 0x9a00, 0x2f81, 0x2000 },
+ { 0x1a00, 0x2f80, 0x0000 },
+ { 0x1a00, 0x2f82, 0x0000 },
+ { 0x9a00, 0x2f85, 0x2000 },
+ { 0x1a00, 0x2f84, 0x0000 },
+ { 0x1a00, 0x2f86, 0x0000 },
+ { 0x9a00, 0x2f8b, 0x3000 },
+ { 0x9a00, 0x2f89, 0x2000 },
+ { 0x1a00, 0x2f88, 0x0000 },
+ { 0x1a00, 0x2f8a, 0x0000 },
+ { 0x9a00, 0x2f8d, 0x2000 },
+ { 0x1a00, 0x2f8c, 0x0000 },
+ { 0x1a00, 0x2f8e, 0x0000 },
+ { 0x9a00, 0x2f97, 0x4000 },
+ { 0x9a00, 0x2f93, 0x3000 },
+ { 0x9a00, 0x2f91, 0x2000 },
+ { 0x1a00, 0x2f90, 0x0000 },
+ { 0x1a00, 0x2f92, 0x0000 },
+ { 0x9a00, 0x2f95, 0x2000 },
+ { 0x1a00, 0x2f94, 0x0000 },
+ { 0x1a00, 0x2f96, 0x0000 },
+ { 0x9a00, 0x2f9b, 0x3000 },
+ { 0x9a00, 0x2f99, 0x2000 },
+ { 0x1a00, 0x2f98, 0x0000 },
+ { 0x1a00, 0x2f9a, 0x0000 },
+ { 0x9a00, 0x2f9d, 0x2000 },
+ { 0x1a00, 0x2f9c, 0x0000 },
+ { 0x1a00, 0x2f9e, 0x0000 },
+ { 0x9a00, 0x2ff9, 0x7000 },
+ { 0x9a00, 0x2fbf, 0x6000 },
+ { 0x9a00, 0x2faf, 0x5000 },
+ { 0x9a00, 0x2fa7, 0x4000 },
+ { 0x9a00, 0x2fa3, 0x3000 },
+ { 0x9a00, 0x2fa1, 0x2000 },
+ { 0x1a00, 0x2fa0, 0x0000 },
+ { 0x1a00, 0x2fa2, 0x0000 },
+ { 0x9a00, 0x2fa5, 0x2000 },
+ { 0x1a00, 0x2fa4, 0x0000 },
+ { 0x1a00, 0x2fa6, 0x0000 },
+ { 0x9a00, 0x2fab, 0x3000 },
+ { 0x9a00, 0x2fa9, 0x2000 },
+ { 0x1a00, 0x2fa8, 0x0000 },
+ { 0x1a00, 0x2faa, 0x0000 },
+ { 0x9a00, 0x2fad, 0x2000 },
+ { 0x1a00, 0x2fac, 0x0000 },
+ { 0x1a00, 0x2fae, 0x0000 },
+ { 0x9a00, 0x2fb7, 0x4000 },
+ { 0x9a00, 0x2fb3, 0x3000 },
+ { 0x9a00, 0x2fb1, 0x2000 },
+ { 0x1a00, 0x2fb0, 0x0000 },
+ { 0x1a00, 0x2fb2, 0x0000 },
+ { 0x9a00, 0x2fb5, 0x2000 },
+ { 0x1a00, 0x2fb4, 0x0000 },
+ { 0x1a00, 0x2fb6, 0x0000 },
+ { 0x9a00, 0x2fbb, 0x3000 },
+ { 0x9a00, 0x2fb9, 0x2000 },
+ { 0x1a00, 0x2fb8, 0x0000 },
+ { 0x1a00, 0x2fba, 0x0000 },
+ { 0x9a00, 0x2fbd, 0x2000 },
+ { 0x1a00, 0x2fbc, 0x0000 },
+ { 0x1a00, 0x2fbe, 0x0000 },
+ { 0x9a00, 0x2fcf, 0x5000 },
+ { 0x9a00, 0x2fc7, 0x4000 },
+ { 0x9a00, 0x2fc3, 0x3000 },
+ { 0x9a00, 0x2fc1, 0x2000 },
+ { 0x1a00, 0x2fc0, 0x0000 },
+ { 0x1a00, 0x2fc2, 0x0000 },
+ { 0x9a00, 0x2fc5, 0x2000 },
+ { 0x1a00, 0x2fc4, 0x0000 },
+ { 0x1a00, 0x2fc6, 0x0000 },
+ { 0x9a00, 0x2fcb, 0x3000 },
+ { 0x9a00, 0x2fc9, 0x2000 },
+ { 0x1a00, 0x2fc8, 0x0000 },
+ { 0x1a00, 0x2fca, 0x0000 },
+ { 0x9a00, 0x2fcd, 0x2000 },
+ { 0x1a00, 0x2fcc, 0x0000 },
+ { 0x1a00, 0x2fce, 0x0000 },
+ { 0x9a00, 0x2ff1, 0x4000 },
+ { 0x9a00, 0x2fd3, 0x3000 },
+ { 0x9a00, 0x2fd1, 0x2000 },
+ { 0x1a00, 0x2fd0, 0x0000 },
+ { 0x1a00, 0x2fd2, 0x0000 },
+ { 0x9a00, 0x2fd5, 0x2000 },
+ { 0x1a00, 0x2fd4, 0x0000 },
+ { 0x1a00, 0x2ff0, 0x0000 },
+ { 0x9a00, 0x2ff5, 0x3000 },
+ { 0x9a00, 0x2ff3, 0x2000 },
+ { 0x1a00, 0x2ff2, 0x0000 },
+ { 0x1a00, 0x2ff4, 0x0000 },
+ { 0x9a00, 0x2ff7, 0x2000 },
+ { 0x1a00, 0x2ff6, 0x0000 },
+ { 0x1a00, 0x2ff8, 0x0000 },
+ { 0x9600, 0x301d, 0x6000 },
+ { 0x9200, 0x300d, 0x5000 },
+ { 0x8600, 0x3005, 0x4000 },
+ { 0x9500, 0x3001, 0x3000 },
+ { 0x9a00, 0x2ffb, 0x2000 },
+ { 0x1a00, 0x2ffa, 0x0000 },
+ { 0x1d00, 0x3000, 0x0000 },
+ { 0x9500, 0x3003, 0x2000 },
+ { 0x1500, 0x3002, 0x0000 },
+ { 0x1a00, 0x3004, 0x0000 },
+ { 0x9200, 0x3009, 0x3000 },
+ { 0x8e00, 0x3007, 0x2000 },
+ { 0x0700, 0x3006, 0x0000 },
+ { 0x1600, 0x3008, 0x0000 },
+ { 0x9200, 0x300b, 0x2000 },
+ { 0x1600, 0x300a, 0x0000 },
+ { 0x1600, 0x300c, 0x0000 },
+ { 0x9200, 0x3015, 0x4000 },
+ { 0x9200, 0x3011, 0x3000 },
+ { 0x9200, 0x300f, 0x2000 },
+ { 0x1600, 0x300e, 0x0000 },
+ { 0x1600, 0x3010, 0x0000 },
+ { 0x9a00, 0x3013, 0x2000 },
+ { 0x1a00, 0x3012, 0x0000 },
+ { 0x1600, 0x3014, 0x0000 },
+ { 0x9200, 0x3019, 0x3000 },
+ { 0x9200, 0x3017, 0x2000 },
+ { 0x1600, 0x3016, 0x0000 },
+ { 0x1600, 0x3018, 0x0000 },
+ { 0x9200, 0x301b, 0x2000 },
+ { 0x1600, 0x301a, 0x0000 },
+ { 0x1100, 0x301c, 0x0000 },
+ { 0x8c00, 0x302d, 0x5000 },
+ { 0x8e00, 0x3025, 0x4000 },
+ { 0x8e00, 0x3021, 0x3000 },
+ { 0x9200, 0x301f, 0x2000 },
+ { 0x1200, 0x301e, 0x0000 },
+ { 0x1a00, 0x3020, 0x0000 },
+ { 0x8e00, 0x3023, 0x2000 },
+ { 0x0e00, 0x3022, 0x0000 },
+ { 0x0e00, 0x3024, 0x0000 },
+ { 0x8e00, 0x3029, 0x3000 },
+ { 0x8e00, 0x3027, 0x2000 },
+ { 0x0e00, 0x3026, 0x0000 },
+ { 0x0e00, 0x3028, 0x0000 },
+ { 0x8c00, 0x302b, 0x2000 },
+ { 0x0c00, 0x302a, 0x0000 },
+ { 0x0c00, 0x302c, 0x0000 },
+ { 0x8600, 0x3035, 0x4000 },
+ { 0x8600, 0x3031, 0x3000 },
+ { 0x8c00, 0x302f, 0x2000 },
+ { 0x0c00, 0x302e, 0x0000 },
+ { 0x1100, 0x3030, 0x0000 },
+ { 0x8600, 0x3033, 0x2000 },
+ { 0x0600, 0x3032, 0x0000 },
+ { 0x0600, 0x3034, 0x0000 },
+ { 0x8e00, 0x3039, 0x3000 },
+ { 0x9a00, 0x3037, 0x2000 },
+ { 0x1a00, 0x3036, 0x0000 },
+ { 0x0e00, 0x3038, 0x0000 },
+ { 0x8600, 0x303b, 0x2000 },
+ { 0x0e00, 0x303a, 0x0000 },
+ { 0x0700, 0x303c, 0x0000 },
+ { 0x8700, 0x30c0, 0x8000 },
+ { 0x8700, 0x307e, 0x7000 },
+ { 0x8700, 0x305e, 0x6000 },
+ { 0x8700, 0x304e, 0x5000 },
+ { 0x8700, 0x3046, 0x4000 },
+ { 0x8700, 0x3042, 0x3000 },
+ { 0x9a00, 0x303f, 0x2000 },
+ { 0x1a00, 0x303e, 0x0000 },
+ { 0x0700, 0x3041, 0x0000 },
+ { 0x8700, 0x3044, 0x2000 },
+ { 0x0700, 0x3043, 0x0000 },
+ { 0x0700, 0x3045, 0x0000 },
+ { 0x8700, 0x304a, 0x3000 },
+ { 0x8700, 0x3048, 0x2000 },
+ { 0x0700, 0x3047, 0x0000 },
+ { 0x0700, 0x3049, 0x0000 },
+ { 0x8700, 0x304c, 0x2000 },
+ { 0x0700, 0x304b, 0x0000 },
+ { 0x0700, 0x304d, 0x0000 },
+ { 0x8700, 0x3056, 0x4000 },
+ { 0x8700, 0x3052, 0x3000 },
+ { 0x8700, 0x3050, 0x2000 },
+ { 0x0700, 0x304f, 0x0000 },
+ { 0x0700, 0x3051, 0x0000 },
+ { 0x8700, 0x3054, 0x2000 },
+ { 0x0700, 0x3053, 0x0000 },
+ { 0x0700, 0x3055, 0x0000 },
+ { 0x8700, 0x305a, 0x3000 },
+ { 0x8700, 0x3058, 0x2000 },
+ { 0x0700, 0x3057, 0x0000 },
+ { 0x0700, 0x3059, 0x0000 },
+ { 0x8700, 0x305c, 0x2000 },
+ { 0x0700, 0x305b, 0x0000 },
+ { 0x0700, 0x305d, 0x0000 },
+ { 0x8700, 0x306e, 0x5000 },
+ { 0x8700, 0x3066, 0x4000 },
+ { 0x8700, 0x3062, 0x3000 },
+ { 0x8700, 0x3060, 0x2000 },
+ { 0x0700, 0x305f, 0x0000 },
+ { 0x0700, 0x3061, 0x0000 },
+ { 0x8700, 0x3064, 0x2000 },
+ { 0x0700, 0x3063, 0x0000 },
+ { 0x0700, 0x3065, 0x0000 },
+ { 0x8700, 0x306a, 0x3000 },
+ { 0x8700, 0x3068, 0x2000 },
+ { 0x0700, 0x3067, 0x0000 },
+ { 0x0700, 0x3069, 0x0000 },
+ { 0x8700, 0x306c, 0x2000 },
+ { 0x0700, 0x306b, 0x0000 },
+ { 0x0700, 0x306d, 0x0000 },
+ { 0x8700, 0x3076, 0x4000 },
+ { 0x8700, 0x3072, 0x3000 },
+ { 0x8700, 0x3070, 0x2000 },
+ { 0x0700, 0x306f, 0x0000 },
+ { 0x0700, 0x3071, 0x0000 },
+ { 0x8700, 0x3074, 0x2000 },
+ { 0x0700, 0x3073, 0x0000 },
+ { 0x0700, 0x3075, 0x0000 },
+ { 0x8700, 0x307a, 0x3000 },
+ { 0x8700, 0x3078, 0x2000 },
+ { 0x0700, 0x3077, 0x0000 },
+ { 0x0700, 0x3079, 0x0000 },
+ { 0x8700, 0x307c, 0x2000 },
+ { 0x0700, 0x307b, 0x0000 },
+ { 0x0700, 0x307d, 0x0000 },
+ { 0x9100, 0x30a0, 0x6000 },
+ { 0x8700, 0x308e, 0x5000 },
+ { 0x8700, 0x3086, 0x4000 },
+ { 0x8700, 0x3082, 0x3000 },
+ { 0x8700, 0x3080, 0x2000 },
+ { 0x0700, 0x307f, 0x0000 },
+ { 0x0700, 0x3081, 0x0000 },
+ { 0x8700, 0x3084, 0x2000 },
+ { 0x0700, 0x3083, 0x0000 },
+ { 0x0700, 0x3085, 0x0000 },
+ { 0x8700, 0x308a, 0x3000 },
+ { 0x8700, 0x3088, 0x2000 },
+ { 0x0700, 0x3087, 0x0000 },
+ { 0x0700, 0x3089, 0x0000 },
+ { 0x8700, 0x308c, 0x2000 },
+ { 0x0700, 0x308b, 0x0000 },
+ { 0x0700, 0x308d, 0x0000 },
+ { 0x8700, 0x3096, 0x4000 },
+ { 0x8700, 0x3092, 0x3000 },
+ { 0x8700, 0x3090, 0x2000 },
+ { 0x0700, 0x308f, 0x0000 },
+ { 0x0700, 0x3091, 0x0000 },
+ { 0x8700, 0x3094, 0x2000 },
+ { 0x0700, 0x3093, 0x0000 },
+ { 0x0700, 0x3095, 0x0000 },
+ { 0x9800, 0x309c, 0x3000 },
+ { 0x8c00, 0x309a, 0x2000 },
+ { 0x0c00, 0x3099, 0x0000 },
+ { 0x1800, 0x309b, 0x0000 },
+ { 0x8600, 0x309e, 0x2000 },
+ { 0x0600, 0x309d, 0x0000 },
+ { 0x0700, 0x309f, 0x0000 },
+ { 0x8700, 0x30b0, 0x5000 },
+ { 0x8700, 0x30a8, 0x4000 },
+ { 0x8700, 0x30a4, 0x3000 },
+ { 0x8700, 0x30a2, 0x2000 },
+ { 0x0700, 0x30a1, 0x0000 },
+ { 0x0700, 0x30a3, 0x0000 },
+ { 0x8700, 0x30a6, 0x2000 },
+ { 0x0700, 0x30a5, 0x0000 },
+ { 0x0700, 0x30a7, 0x0000 },
+ { 0x8700, 0x30ac, 0x3000 },
+ { 0x8700, 0x30aa, 0x2000 },
+ { 0x0700, 0x30a9, 0x0000 },
+ { 0x0700, 0x30ab, 0x0000 },
+ { 0x8700, 0x30ae, 0x2000 },
+ { 0x0700, 0x30ad, 0x0000 },
+ { 0x0700, 0x30af, 0x0000 },
+ { 0x8700, 0x30b8, 0x4000 },
+ { 0x8700, 0x30b4, 0x3000 },
+ { 0x8700, 0x30b2, 0x2000 },
+ { 0x0700, 0x30b1, 0x0000 },
+ { 0x0700, 0x30b3, 0x0000 },
+ { 0x8700, 0x30b6, 0x2000 },
+ { 0x0700, 0x30b5, 0x0000 },
+ { 0x0700, 0x30b7, 0x0000 },
+ { 0x8700, 0x30bc, 0x3000 },
+ { 0x8700, 0x30ba, 0x2000 },
+ { 0x0700, 0x30b9, 0x0000 },
+ { 0x0700, 0x30bb, 0x0000 },
+ { 0x8700, 0x30be, 0x2000 },
+ { 0x0700, 0x30bd, 0x0000 },
+ { 0x0700, 0x30bf, 0x0000 },
+ { 0x8700, 0x3105, 0x7000 },
+ { 0x8700, 0x30e0, 0x6000 },
+ { 0x8700, 0x30d0, 0x5000 },
+ { 0x8700, 0x30c8, 0x4000 },
+ { 0x8700, 0x30c4, 0x3000 },
+ { 0x8700, 0x30c2, 0x2000 },
+ { 0x0700, 0x30c1, 0x0000 },
+ { 0x0700, 0x30c3, 0x0000 },
+ { 0x8700, 0x30c6, 0x2000 },
+ { 0x0700, 0x30c5, 0x0000 },
+ { 0x0700, 0x30c7, 0x0000 },
+ { 0x8700, 0x30cc, 0x3000 },
+ { 0x8700, 0x30ca, 0x2000 },
+ { 0x0700, 0x30c9, 0x0000 },
+ { 0x0700, 0x30cb, 0x0000 },
+ { 0x8700, 0x30ce, 0x2000 },
+ { 0x0700, 0x30cd, 0x0000 },
+ { 0x0700, 0x30cf, 0x0000 },
+ { 0x8700, 0x30d8, 0x4000 },
+ { 0x8700, 0x30d4, 0x3000 },
+ { 0x8700, 0x30d2, 0x2000 },
+ { 0x0700, 0x30d1, 0x0000 },
+ { 0x0700, 0x30d3, 0x0000 },
+ { 0x8700, 0x30d6, 0x2000 },
+ { 0x0700, 0x30d5, 0x0000 },
+ { 0x0700, 0x30d7, 0x0000 },
+ { 0x8700, 0x30dc, 0x3000 },
+ { 0x8700, 0x30da, 0x2000 },
+ { 0x0700, 0x30d9, 0x0000 },
+ { 0x0700, 0x30db, 0x0000 },
+ { 0x8700, 0x30de, 0x2000 },
+ { 0x0700, 0x30dd, 0x0000 },
+ { 0x0700, 0x30df, 0x0000 },
+ { 0x8700, 0x30f0, 0x5000 },
+ { 0x8700, 0x30e8, 0x4000 },
+ { 0x8700, 0x30e4, 0x3000 },
+ { 0x8700, 0x30e2, 0x2000 },
+ { 0x0700, 0x30e1, 0x0000 },
+ { 0x0700, 0x30e3, 0x0000 },
+ { 0x8700, 0x30e6, 0x2000 },
+ { 0x0700, 0x30e5, 0x0000 },
+ { 0x0700, 0x30e7, 0x0000 },
+ { 0x8700, 0x30ec, 0x3000 },
+ { 0x8700, 0x30ea, 0x2000 },
+ { 0x0700, 0x30e9, 0x0000 },
+ { 0x0700, 0x30eb, 0x0000 },
+ { 0x8700, 0x30ee, 0x2000 },
+ { 0x0700, 0x30ed, 0x0000 },
+ { 0x0700, 0x30ef, 0x0000 },
+ { 0x8700, 0x30f8, 0x4000 },
+ { 0x8700, 0x30f4, 0x3000 },
+ { 0x8700, 0x30f2, 0x2000 },
+ { 0x0700, 0x30f1, 0x0000 },
+ { 0x0700, 0x30f3, 0x0000 },
+ { 0x8700, 0x30f6, 0x2000 },
+ { 0x0700, 0x30f5, 0x0000 },
+ { 0x0700, 0x30f7, 0x0000 },
+ { 0x8600, 0x30fc, 0x3000 },
+ { 0x8700, 0x30fa, 0x2000 },
+ { 0x0700, 0x30f9, 0x0000 },
+ { 0x1000, 0x30fb, 0x0000 },
+ { 0x8600, 0x30fe, 0x2000 },
+ { 0x0600, 0x30fd, 0x0000 },
+ { 0x0700, 0x30ff, 0x0000 },
+ { 0x8700, 0x3125, 0x6000 },
+ { 0x8700, 0x3115, 0x5000 },
+ { 0x8700, 0x310d, 0x4000 },
+ { 0x8700, 0x3109, 0x3000 },
+ { 0x8700, 0x3107, 0x2000 },
+ { 0x0700, 0x3106, 0x0000 },
+ { 0x0700, 0x3108, 0x0000 },
+ { 0x8700, 0x310b, 0x2000 },
+ { 0x0700, 0x310a, 0x0000 },
+ { 0x0700, 0x310c, 0x0000 },
+ { 0x8700, 0x3111, 0x3000 },
+ { 0x8700, 0x310f, 0x2000 },
+ { 0x0700, 0x310e, 0x0000 },
+ { 0x0700, 0x3110, 0x0000 },
+ { 0x8700, 0x3113, 0x2000 },
+ { 0x0700, 0x3112, 0x0000 },
+ { 0x0700, 0x3114, 0x0000 },
+ { 0x8700, 0x311d, 0x4000 },
+ { 0x8700, 0x3119, 0x3000 },
+ { 0x8700, 0x3117, 0x2000 },
+ { 0x0700, 0x3116, 0x0000 },
+ { 0x0700, 0x3118, 0x0000 },
+ { 0x8700, 0x311b, 0x2000 },
+ { 0x0700, 0x311a, 0x0000 },
+ { 0x0700, 0x311c, 0x0000 },
+ { 0x8700, 0x3121, 0x3000 },
+ { 0x8700, 0x311f, 0x2000 },
+ { 0x0700, 0x311e, 0x0000 },
+ { 0x0700, 0x3120, 0x0000 },
+ { 0x8700, 0x3123, 0x2000 },
+ { 0x0700, 0x3122, 0x0000 },
+ { 0x0700, 0x3124, 0x0000 },
+ { 0x8700, 0x3139, 0x5000 },
+ { 0x8700, 0x3131, 0x4000 },
+ { 0x8700, 0x3129, 0x3000 },
+ { 0x8700, 0x3127, 0x2000 },
+ { 0x0700, 0x3126, 0x0000 },
+ { 0x0700, 0x3128, 0x0000 },
+ { 0x8700, 0x312b, 0x2000 },
+ { 0x0700, 0x312a, 0x0000 },
+ { 0x0700, 0x312c, 0x0000 },
+ { 0x8700, 0x3135, 0x3000 },
+ { 0x8700, 0x3133, 0x2000 },
+ { 0x0700, 0x3132, 0x0000 },
+ { 0x0700, 0x3134, 0x0000 },
+ { 0x8700, 0x3137, 0x2000 },
+ { 0x0700, 0x3136, 0x0000 },
+ { 0x0700, 0x3138, 0x0000 },
+ { 0x8700, 0x3141, 0x4000 },
+ { 0x8700, 0x313d, 0x3000 },
+ { 0x8700, 0x313b, 0x2000 },
+ { 0x0700, 0x313a, 0x0000 },
+ { 0x0700, 0x313c, 0x0000 },
+ { 0x8700, 0x313f, 0x2000 },
+ { 0x0700, 0x313e, 0x0000 },
+ { 0x0700, 0x3140, 0x0000 },
+ { 0x8700, 0x3145, 0x3000 },
+ { 0x8700, 0x3143, 0x2000 },
+ { 0x0700, 0x3142, 0x0000 },
+ { 0x0700, 0x3144, 0x0000 },
+ { 0x8700, 0x3147, 0x2000 },
+ { 0x0700, 0x3146, 0x0000 },
+ { 0x0700, 0x3148, 0x0000 },
+ { 0x9a00, 0x3290, 0x9000 },
+ { 0x9a00, 0x3202, 0x8000 },
+ { 0x8700, 0x3189, 0x7000 },
+ { 0x8700, 0x3169, 0x6000 },
+ { 0x8700, 0x3159, 0x5000 },
+ { 0x8700, 0x3151, 0x4000 },
+ { 0x8700, 0x314d, 0x3000 },
+ { 0x8700, 0x314b, 0x2000 },
+ { 0x0700, 0x314a, 0x0000 },
+ { 0x0700, 0x314c, 0x0000 },
+ { 0x8700, 0x314f, 0x2000 },
+ { 0x0700, 0x314e, 0x0000 },
+ { 0x0700, 0x3150, 0x0000 },
+ { 0x8700, 0x3155, 0x3000 },
+ { 0x8700, 0x3153, 0x2000 },
+ { 0x0700, 0x3152, 0x0000 },
+ { 0x0700, 0x3154, 0x0000 },
+ { 0x8700, 0x3157, 0x2000 },
+ { 0x0700, 0x3156, 0x0000 },
+ { 0x0700, 0x3158, 0x0000 },
+ { 0x8700, 0x3161, 0x4000 },
+ { 0x8700, 0x315d, 0x3000 },
+ { 0x8700, 0x315b, 0x2000 },
+ { 0x0700, 0x315a, 0x0000 },
+ { 0x0700, 0x315c, 0x0000 },
+ { 0x8700, 0x315f, 0x2000 },
+ { 0x0700, 0x315e, 0x0000 },
+ { 0x0700, 0x3160, 0x0000 },
+ { 0x8700, 0x3165, 0x3000 },
+ { 0x8700, 0x3163, 0x2000 },
+ { 0x0700, 0x3162, 0x0000 },
+ { 0x0700, 0x3164, 0x0000 },
+ { 0x8700, 0x3167, 0x2000 },
+ { 0x0700, 0x3166, 0x0000 },
+ { 0x0700, 0x3168, 0x0000 },
+ { 0x8700, 0x3179, 0x5000 },
+ { 0x8700, 0x3171, 0x4000 },
+ { 0x8700, 0x316d, 0x3000 },
+ { 0x8700, 0x316b, 0x2000 },
+ { 0x0700, 0x316a, 0x0000 },
+ { 0x0700, 0x316c, 0x0000 },
+ { 0x8700, 0x316f, 0x2000 },
+ { 0x0700, 0x316e, 0x0000 },
+ { 0x0700, 0x3170, 0x0000 },
+ { 0x8700, 0x3175, 0x3000 },
+ { 0x8700, 0x3173, 0x2000 },
+ { 0x0700, 0x3172, 0x0000 },
+ { 0x0700, 0x3174, 0x0000 },
+ { 0x8700, 0x3177, 0x2000 },
+ { 0x0700, 0x3176, 0x0000 },
+ { 0x0700, 0x3178, 0x0000 },
+ { 0x8700, 0x3181, 0x4000 },
+ { 0x8700, 0x317d, 0x3000 },
+ { 0x8700, 0x317b, 0x2000 },
+ { 0x0700, 0x317a, 0x0000 },
+ { 0x0700, 0x317c, 0x0000 },
+ { 0x8700, 0x317f, 0x2000 },
+ { 0x0700, 0x317e, 0x0000 },
+ { 0x0700, 0x3180, 0x0000 },
+ { 0x8700, 0x3185, 0x3000 },
+ { 0x8700, 0x3183, 0x2000 },
+ { 0x0700, 0x3182, 0x0000 },
+ { 0x0700, 0x3184, 0x0000 },
+ { 0x8700, 0x3187, 0x2000 },
+ { 0x0700, 0x3186, 0x0000 },
+ { 0x0700, 0x3188, 0x0000 },
+ { 0x8700, 0x31aa, 0x6000 },
+ { 0x9a00, 0x319a, 0x5000 },
+ { 0x8f00, 0x3192, 0x4000 },
+ { 0x8700, 0x318d, 0x3000 },
+ { 0x8700, 0x318b, 0x2000 },
+ { 0x0700, 0x318a, 0x0000 },
+ { 0x0700, 0x318c, 0x0000 },
+ { 0x9a00, 0x3190, 0x2000 },
+ { 0x0700, 0x318e, 0x0000 },
+ { 0x1a00, 0x3191, 0x0000 },
+ { 0x9a00, 0x3196, 0x3000 },
+ { 0x8f00, 0x3194, 0x2000 },
+ { 0x0f00, 0x3193, 0x0000 },
+ { 0x0f00, 0x3195, 0x0000 },
+ { 0x9a00, 0x3198, 0x2000 },
+ { 0x1a00, 0x3197, 0x0000 },
+ { 0x1a00, 0x3199, 0x0000 },
+ { 0x8700, 0x31a2, 0x4000 },
+ { 0x9a00, 0x319e, 0x3000 },
+ { 0x9a00, 0x319c, 0x2000 },
+ { 0x1a00, 0x319b, 0x0000 },
+ { 0x1a00, 0x319d, 0x0000 },
+ { 0x8700, 0x31a0, 0x2000 },
+ { 0x1a00, 0x319f, 0x0000 },
+ { 0x0700, 0x31a1, 0x0000 },
+ { 0x8700, 0x31a6, 0x3000 },
+ { 0x8700, 0x31a4, 0x2000 },
+ { 0x0700, 0x31a3, 0x0000 },
+ { 0x0700, 0x31a5, 0x0000 },
+ { 0x8700, 0x31a8, 0x2000 },
+ { 0x0700, 0x31a7, 0x0000 },
+ { 0x0700, 0x31a9, 0x0000 },
+ { 0x8700, 0x31f2, 0x5000 },
+ { 0x8700, 0x31b2, 0x4000 },
+ { 0x8700, 0x31ae, 0x3000 },
+ { 0x8700, 0x31ac, 0x2000 },
+ { 0x0700, 0x31ab, 0x0000 },
+ { 0x0700, 0x31ad, 0x0000 },
+ { 0x8700, 0x31b0, 0x2000 },
+ { 0x0700, 0x31af, 0x0000 },
+ { 0x0700, 0x31b1, 0x0000 },
+ { 0x8700, 0x31b6, 0x3000 },
+ { 0x8700, 0x31b4, 0x2000 },
+ { 0x0700, 0x31b3, 0x0000 },
+ { 0x0700, 0x31b5, 0x0000 },
+ { 0x8700, 0x31f0, 0x2000 },
+ { 0x0700, 0x31b7, 0x0000 },
+ { 0x0700, 0x31f1, 0x0000 },
+ { 0x8700, 0x31fa, 0x4000 },
+ { 0x8700, 0x31f6, 0x3000 },
+ { 0x8700, 0x31f4, 0x2000 },
+ { 0x0700, 0x31f3, 0x0000 },
+ { 0x0700, 0x31f5, 0x0000 },
+ { 0x8700, 0x31f8, 0x2000 },
+ { 0x0700, 0x31f7, 0x0000 },
+ { 0x0700, 0x31f9, 0x0000 },
+ { 0x8700, 0x31fe, 0x3000 },
+ { 0x8700, 0x31fc, 0x2000 },
+ { 0x0700, 0x31fb, 0x0000 },
+ { 0x0700, 0x31fd, 0x0000 },
+ { 0x9a00, 0x3200, 0x2000 },
+ { 0x0700, 0x31ff, 0x0000 },
+ { 0x1a00, 0x3201, 0x0000 },
+ { 0x9a00, 0x3243, 0x7000 },
+ { 0x8f00, 0x3223, 0x6000 },
+ { 0x9a00, 0x3212, 0x5000 },
+ { 0x9a00, 0x320a, 0x4000 },
+ { 0x9a00, 0x3206, 0x3000 },
+ { 0x9a00, 0x3204, 0x2000 },
+ { 0x1a00, 0x3203, 0x0000 },
+ { 0x1a00, 0x3205, 0x0000 },
+ { 0x9a00, 0x3208, 0x2000 },
+ { 0x1a00, 0x3207, 0x0000 },
+ { 0x1a00, 0x3209, 0x0000 },
+ { 0x9a00, 0x320e, 0x3000 },
+ { 0x9a00, 0x320c, 0x2000 },
+ { 0x1a00, 0x320b, 0x0000 },
+ { 0x1a00, 0x320d, 0x0000 },
+ { 0x9a00, 0x3210, 0x2000 },
+ { 0x1a00, 0x320f, 0x0000 },
+ { 0x1a00, 0x3211, 0x0000 },
+ { 0x9a00, 0x321a, 0x4000 },
+ { 0x9a00, 0x3216, 0x3000 },
+ { 0x9a00, 0x3214, 0x2000 },
+ { 0x1a00, 0x3213, 0x0000 },
+ { 0x1a00, 0x3215, 0x0000 },
+ { 0x9a00, 0x3218, 0x2000 },
+ { 0x1a00, 0x3217, 0x0000 },
+ { 0x1a00, 0x3219, 0x0000 },
+ { 0x9a00, 0x321e, 0x3000 },
+ { 0x9a00, 0x321c, 0x2000 },
+ { 0x1a00, 0x321b, 0x0000 },
+ { 0x1a00, 0x321d, 0x0000 },
+ { 0x8f00, 0x3221, 0x2000 },
+ { 0x0f00, 0x3220, 0x0000 },
+ { 0x0f00, 0x3222, 0x0000 },
+ { 0x9a00, 0x3233, 0x5000 },
+ { 0x9a00, 0x322b, 0x4000 },
+ { 0x8f00, 0x3227, 0x3000 },
+ { 0x8f00, 0x3225, 0x2000 },
+ { 0x0f00, 0x3224, 0x0000 },
+ { 0x0f00, 0x3226, 0x0000 },
+ { 0x8f00, 0x3229, 0x2000 },
+ { 0x0f00, 0x3228, 0x0000 },
+ { 0x1a00, 0x322a, 0x0000 },
+ { 0x9a00, 0x322f, 0x3000 },
+ { 0x9a00, 0x322d, 0x2000 },
+ { 0x1a00, 0x322c, 0x0000 },
+ { 0x1a00, 0x322e, 0x0000 },
+ { 0x9a00, 0x3231, 0x2000 },
+ { 0x1a00, 0x3230, 0x0000 },
+ { 0x1a00, 0x3232, 0x0000 },
+ { 0x9a00, 0x323b, 0x4000 },
+ { 0x9a00, 0x3237, 0x3000 },
+ { 0x9a00, 0x3235, 0x2000 },
+ { 0x1a00, 0x3234, 0x0000 },
+ { 0x1a00, 0x3236, 0x0000 },
+ { 0x9a00, 0x3239, 0x2000 },
+ { 0x1a00, 0x3238, 0x0000 },
+ { 0x1a00, 0x323a, 0x0000 },
+ { 0x9a00, 0x323f, 0x3000 },
+ { 0x9a00, 0x323d, 0x2000 },
+ { 0x1a00, 0x323c, 0x0000 },
+ { 0x1a00, 0x323e, 0x0000 },
+ { 0x9a00, 0x3241, 0x2000 },
+ { 0x1a00, 0x3240, 0x0000 },
+ { 0x1a00, 0x3242, 0x0000 },
+ { 0x9a00, 0x326f, 0x6000 },
+ { 0x8f00, 0x325f, 0x5000 },
+ { 0x8f00, 0x3257, 0x4000 },
+ { 0x8f00, 0x3253, 0x3000 },
+ { 0x8f00, 0x3251, 0x2000 },
+ { 0x1a00, 0x3250, 0x0000 },
+ { 0x0f00, 0x3252, 0x0000 },
+ { 0x8f00, 0x3255, 0x2000 },
+ { 0x0f00, 0x3254, 0x0000 },
+ { 0x0f00, 0x3256, 0x0000 },
+ { 0x8f00, 0x325b, 0x3000 },
+ { 0x8f00, 0x3259, 0x2000 },
+ { 0x0f00, 0x3258, 0x0000 },
+ { 0x0f00, 0x325a, 0x0000 },
+ { 0x8f00, 0x325d, 0x2000 },
+ { 0x0f00, 0x325c, 0x0000 },
+ { 0x0f00, 0x325e, 0x0000 },
+ { 0x9a00, 0x3267, 0x4000 },
+ { 0x9a00, 0x3263, 0x3000 },
+ { 0x9a00, 0x3261, 0x2000 },
+ { 0x1a00, 0x3260, 0x0000 },
+ { 0x1a00, 0x3262, 0x0000 },
+ { 0x9a00, 0x3265, 0x2000 },
+ { 0x1a00, 0x3264, 0x0000 },
+ { 0x1a00, 0x3266, 0x0000 },
+ { 0x9a00, 0x326b, 0x3000 },
+ { 0x9a00, 0x3269, 0x2000 },
+ { 0x1a00, 0x3268, 0x0000 },
+ { 0x1a00, 0x326a, 0x0000 },
+ { 0x9a00, 0x326d, 0x2000 },
+ { 0x1a00, 0x326c, 0x0000 },
+ { 0x1a00, 0x326e, 0x0000 },
+ { 0x8f00, 0x3280, 0x5000 },
+ { 0x9a00, 0x3277, 0x4000 },
+ { 0x9a00, 0x3273, 0x3000 },
+ { 0x9a00, 0x3271, 0x2000 },
+ { 0x1a00, 0x3270, 0x0000 },
+ { 0x1a00, 0x3272, 0x0000 },
+ { 0x9a00, 0x3275, 0x2000 },
+ { 0x1a00, 0x3274, 0x0000 },
+ { 0x1a00, 0x3276, 0x0000 },
+ { 0x9a00, 0x327b, 0x3000 },
+ { 0x9a00, 0x3279, 0x2000 },
+ { 0x1a00, 0x3278, 0x0000 },
+ { 0x1a00, 0x327a, 0x0000 },
+ { 0x9a00, 0x327d, 0x2000 },
+ { 0x1a00, 0x327c, 0x0000 },
+ { 0x1a00, 0x327f, 0x0000 },
+ { 0x8f00, 0x3288, 0x4000 },
+ { 0x8f00, 0x3284, 0x3000 },
+ { 0x8f00, 0x3282, 0x2000 },
+ { 0x0f00, 0x3281, 0x0000 },
+ { 0x0f00, 0x3283, 0x0000 },
+ { 0x8f00, 0x3286, 0x2000 },
+ { 0x0f00, 0x3285, 0x0000 },
+ { 0x0f00, 0x3287, 0x0000 },
+ { 0x9a00, 0x328c, 0x3000 },
+ { 0x9a00, 0x328a, 0x2000 },
+ { 0x0f00, 0x3289, 0x0000 },
+ { 0x1a00, 0x328b, 0x0000 },
+ { 0x9a00, 0x328e, 0x2000 },
+ { 0x1a00, 0x328d, 0x0000 },
+ { 0x1a00, 0x328f, 0x0000 },
+ { 0x9a00, 0x3311, 0x8000 },
+ { 0x9a00, 0x32d0, 0x7000 },
+ { 0x9a00, 0x32b0, 0x6000 },
+ { 0x9a00, 0x32a0, 0x5000 },
+ { 0x9a00, 0x3298, 0x4000 },
+ { 0x9a00, 0x3294, 0x3000 },
+ { 0x9a00, 0x3292, 0x2000 },
+ { 0x1a00, 0x3291, 0x0000 },
+ { 0x1a00, 0x3293, 0x0000 },
+ { 0x9a00, 0x3296, 0x2000 },
+ { 0x1a00, 0x3295, 0x0000 },
+ { 0x1a00, 0x3297, 0x0000 },
+ { 0x9a00, 0x329c, 0x3000 },
+ { 0x9a00, 0x329a, 0x2000 },
+ { 0x1a00, 0x3299, 0x0000 },
+ { 0x1a00, 0x329b, 0x0000 },
+ { 0x9a00, 0x329e, 0x2000 },
+ { 0x1a00, 0x329d, 0x0000 },
+ { 0x1a00, 0x329f, 0x0000 },
+ { 0x9a00, 0x32a8, 0x4000 },
+ { 0x9a00, 0x32a4, 0x3000 },
+ { 0x9a00, 0x32a2, 0x2000 },
+ { 0x1a00, 0x32a1, 0x0000 },
+ { 0x1a00, 0x32a3, 0x0000 },
+ { 0x9a00, 0x32a6, 0x2000 },
+ { 0x1a00, 0x32a5, 0x0000 },
+ { 0x1a00, 0x32a7, 0x0000 },
+ { 0x9a00, 0x32ac, 0x3000 },
+ { 0x9a00, 0x32aa, 0x2000 },
+ { 0x1a00, 0x32a9, 0x0000 },
+ { 0x1a00, 0x32ab, 0x0000 },
+ { 0x9a00, 0x32ae, 0x2000 },
+ { 0x1a00, 0x32ad, 0x0000 },
+ { 0x1a00, 0x32af, 0x0000 },
+ { 0x9a00, 0x32c0, 0x5000 },
+ { 0x8f00, 0x32b8, 0x4000 },
+ { 0x8f00, 0x32b4, 0x3000 },
+ { 0x8f00, 0x32b2, 0x2000 },
+ { 0x0f00, 0x32b1, 0x0000 },
+ { 0x0f00, 0x32b3, 0x0000 },
+ { 0x8f00, 0x32b6, 0x2000 },
+ { 0x0f00, 0x32b5, 0x0000 },
+ { 0x0f00, 0x32b7, 0x0000 },
+ { 0x8f00, 0x32bc, 0x3000 },
+ { 0x8f00, 0x32ba, 0x2000 },
+ { 0x0f00, 0x32b9, 0x0000 },
+ { 0x0f00, 0x32bb, 0x0000 },
+ { 0x8f00, 0x32be, 0x2000 },
+ { 0x0f00, 0x32bd, 0x0000 },
+ { 0x0f00, 0x32bf, 0x0000 },
+ { 0x9a00, 0x32c8, 0x4000 },
+ { 0x9a00, 0x32c4, 0x3000 },
+ { 0x9a00, 0x32c2, 0x2000 },
+ { 0x1a00, 0x32c1, 0x0000 },
+ { 0x1a00, 0x32c3, 0x0000 },
+ { 0x9a00, 0x32c6, 0x2000 },
+ { 0x1a00, 0x32c5, 0x0000 },
+ { 0x1a00, 0x32c7, 0x0000 },
+ { 0x9a00, 0x32cc, 0x3000 },
+ { 0x9a00, 0x32ca, 0x2000 },
+ { 0x1a00, 0x32c9, 0x0000 },
+ { 0x1a00, 0x32cb, 0x0000 },
+ { 0x9a00, 0x32ce, 0x2000 },
+ { 0x1a00, 0x32cd, 0x0000 },
+ { 0x1a00, 0x32cf, 0x0000 },
+ { 0x9a00, 0x32f0, 0x6000 },
+ { 0x9a00, 0x32e0, 0x5000 },
+ { 0x9a00, 0x32d8, 0x4000 },
+ { 0x9a00, 0x32d4, 0x3000 },
+ { 0x9a00, 0x32d2, 0x2000 },
+ { 0x1a00, 0x32d1, 0x0000 },
+ { 0x1a00, 0x32d3, 0x0000 },
+ { 0x9a00, 0x32d6, 0x2000 },
+ { 0x1a00, 0x32d5, 0x0000 },
+ { 0x1a00, 0x32d7, 0x0000 },
+ { 0x9a00, 0x32dc, 0x3000 },
+ { 0x9a00, 0x32da, 0x2000 },
+ { 0x1a00, 0x32d9, 0x0000 },
+ { 0x1a00, 0x32db, 0x0000 },
+ { 0x9a00, 0x32de, 0x2000 },
+ { 0x1a00, 0x32dd, 0x0000 },
+ { 0x1a00, 0x32df, 0x0000 },
+ { 0x9a00, 0x32e8, 0x4000 },
+ { 0x9a00, 0x32e4, 0x3000 },
+ { 0x9a00, 0x32e2, 0x2000 },
+ { 0x1a00, 0x32e1, 0x0000 },
+ { 0x1a00, 0x32e3, 0x0000 },
+ { 0x9a00, 0x32e6, 0x2000 },
+ { 0x1a00, 0x32e5, 0x0000 },
+ { 0x1a00, 0x32e7, 0x0000 },
+ { 0x9a00, 0x32ec, 0x3000 },
+ { 0x9a00, 0x32ea, 0x2000 },
+ { 0x1a00, 0x32e9, 0x0000 },
+ { 0x1a00, 0x32eb, 0x0000 },
+ { 0x9a00, 0x32ee, 0x2000 },
+ { 0x1a00, 0x32ed, 0x0000 },
+ { 0x1a00, 0x32ef, 0x0000 },
+ { 0x9a00, 0x3301, 0x5000 },
+ { 0x9a00, 0x32f8, 0x4000 },
+ { 0x9a00, 0x32f4, 0x3000 },
+ { 0x9a00, 0x32f2, 0x2000 },
+ { 0x1a00, 0x32f1, 0x0000 },
+ { 0x1a00, 0x32f3, 0x0000 },
+ { 0x9a00, 0x32f6, 0x2000 },
+ { 0x1a00, 0x32f5, 0x0000 },
+ { 0x1a00, 0x32f7, 0x0000 },
+ { 0x9a00, 0x32fc, 0x3000 },
+ { 0x9a00, 0x32fa, 0x2000 },
+ { 0x1a00, 0x32f9, 0x0000 },
+ { 0x1a00, 0x32fb, 0x0000 },
+ { 0x9a00, 0x32fe, 0x2000 },
+ { 0x1a00, 0x32fd, 0x0000 },
+ { 0x1a00, 0x3300, 0x0000 },
+ { 0x9a00, 0x3309, 0x4000 },
+ { 0x9a00, 0x3305, 0x3000 },
+ { 0x9a00, 0x3303, 0x2000 },
+ { 0x1a00, 0x3302, 0x0000 },
+ { 0x1a00, 0x3304, 0x0000 },
+ { 0x9a00, 0x3307, 0x2000 },
+ { 0x1a00, 0x3306, 0x0000 },
+ { 0x1a00, 0x3308, 0x0000 },
+ { 0x9a00, 0x330d, 0x3000 },
+ { 0x9a00, 0x330b, 0x2000 },
+ { 0x1a00, 0x330a, 0x0000 },
+ { 0x1a00, 0x330c, 0x0000 },
+ { 0x9a00, 0x330f, 0x2000 },
+ { 0x1a00, 0x330e, 0x0000 },
+ { 0x1a00, 0x3310, 0x0000 },
+ { 0x9a00, 0x3351, 0x7000 },
+ { 0x9a00, 0x3331, 0x6000 },
+ { 0x9a00, 0x3321, 0x5000 },
+ { 0x9a00, 0x3319, 0x4000 },
+ { 0x9a00, 0x3315, 0x3000 },
+ { 0x9a00, 0x3313, 0x2000 },
+ { 0x1a00, 0x3312, 0x0000 },
+ { 0x1a00, 0x3314, 0x0000 },
+ { 0x9a00, 0x3317, 0x2000 },
+ { 0x1a00, 0x3316, 0x0000 },
+ { 0x1a00, 0x3318, 0x0000 },
+ { 0x9a00, 0x331d, 0x3000 },
+ { 0x9a00, 0x331b, 0x2000 },
+ { 0x1a00, 0x331a, 0x0000 },
+ { 0x1a00, 0x331c, 0x0000 },
+ { 0x9a00, 0x331f, 0x2000 },
+ { 0x1a00, 0x331e, 0x0000 },
+ { 0x1a00, 0x3320, 0x0000 },
+ { 0x9a00, 0x3329, 0x4000 },
+ { 0x9a00, 0x3325, 0x3000 },
+ { 0x9a00, 0x3323, 0x2000 },
+ { 0x1a00, 0x3322, 0x0000 },
+ { 0x1a00, 0x3324, 0x0000 },
+ { 0x9a00, 0x3327, 0x2000 },
+ { 0x1a00, 0x3326, 0x0000 },
+ { 0x1a00, 0x3328, 0x0000 },
+ { 0x9a00, 0x332d, 0x3000 },
+ { 0x9a00, 0x332b, 0x2000 },
+ { 0x1a00, 0x332a, 0x0000 },
+ { 0x1a00, 0x332c, 0x0000 },
+ { 0x9a00, 0x332f, 0x2000 },
+ { 0x1a00, 0x332e, 0x0000 },
+ { 0x1a00, 0x3330, 0x0000 },
+ { 0x9a00, 0x3341, 0x5000 },
+ { 0x9a00, 0x3339, 0x4000 },
+ { 0x9a00, 0x3335, 0x3000 },
+ { 0x9a00, 0x3333, 0x2000 },
+ { 0x1a00, 0x3332, 0x0000 },
+ { 0x1a00, 0x3334, 0x0000 },
+ { 0x9a00, 0x3337, 0x2000 },
+ { 0x1a00, 0x3336, 0x0000 },
+ { 0x1a00, 0x3338, 0x0000 },
+ { 0x9a00, 0x333d, 0x3000 },
+ { 0x9a00, 0x333b, 0x2000 },
+ { 0x1a00, 0x333a, 0x0000 },
+ { 0x1a00, 0x333c, 0x0000 },
+ { 0x9a00, 0x333f, 0x2000 },
+ { 0x1a00, 0x333e, 0x0000 },
+ { 0x1a00, 0x3340, 0x0000 },
+ { 0x9a00, 0x3349, 0x4000 },
+ { 0x9a00, 0x3345, 0x3000 },
+ { 0x9a00, 0x3343, 0x2000 },
+ { 0x1a00, 0x3342, 0x0000 },
+ { 0x1a00, 0x3344, 0x0000 },
+ { 0x9a00, 0x3347, 0x2000 },
+ { 0x1a00, 0x3346, 0x0000 },
+ { 0x1a00, 0x3348, 0x0000 },
+ { 0x9a00, 0x334d, 0x3000 },
+ { 0x9a00, 0x334b, 0x2000 },
+ { 0x1a00, 0x334a, 0x0000 },
+ { 0x1a00, 0x334c, 0x0000 },
+ { 0x9a00, 0x334f, 0x2000 },
+ { 0x1a00, 0x334e, 0x0000 },
+ { 0x1a00, 0x3350, 0x0000 },
+ { 0x9a00, 0x3371, 0x6000 },
+ { 0x9a00, 0x3361, 0x5000 },
+ { 0x9a00, 0x3359, 0x4000 },
+ { 0x9a00, 0x3355, 0x3000 },
+ { 0x9a00, 0x3353, 0x2000 },
+ { 0x1a00, 0x3352, 0x0000 },
+ { 0x1a00, 0x3354, 0x0000 },
+ { 0x9a00, 0x3357, 0x2000 },
+ { 0x1a00, 0x3356, 0x0000 },
+ { 0x1a00, 0x3358, 0x0000 },
+ { 0x9a00, 0x335d, 0x3000 },
+ { 0x9a00, 0x335b, 0x2000 },
+ { 0x1a00, 0x335a, 0x0000 },
+ { 0x1a00, 0x335c, 0x0000 },
+ { 0x9a00, 0x335f, 0x2000 },
+ { 0x1a00, 0x335e, 0x0000 },
+ { 0x1a00, 0x3360, 0x0000 },
+ { 0x9a00, 0x3369, 0x4000 },
+ { 0x9a00, 0x3365, 0x3000 },
+ { 0x9a00, 0x3363, 0x2000 },
+ { 0x1a00, 0x3362, 0x0000 },
+ { 0x1a00, 0x3364, 0x0000 },
+ { 0x9a00, 0x3367, 0x2000 },
+ { 0x1a00, 0x3366, 0x0000 },
+ { 0x1a00, 0x3368, 0x0000 },
+ { 0x9a00, 0x336d, 0x3000 },
+ { 0x9a00, 0x336b, 0x2000 },
+ { 0x1a00, 0x336a, 0x0000 },
+ { 0x1a00, 0x336c, 0x0000 },
+ { 0x9a00, 0x336f, 0x2000 },
+ { 0x1a00, 0x336e, 0x0000 },
+ { 0x1a00, 0x3370, 0x0000 },
+ { 0x9a00, 0x3381, 0x5000 },
+ { 0x9a00, 0x3379, 0x4000 },
+ { 0x9a00, 0x3375, 0x3000 },
+ { 0x9a00, 0x3373, 0x2000 },
+ { 0x1a00, 0x3372, 0x0000 },
+ { 0x1a00, 0x3374, 0x0000 },
+ { 0x9a00, 0x3377, 0x2000 },
+ { 0x1a00, 0x3376, 0x0000 },
+ { 0x1a00, 0x3378, 0x0000 },
+ { 0x9a00, 0x337d, 0x3000 },
+ { 0x9a00, 0x337b, 0x2000 },
+ { 0x1a00, 0x337a, 0x0000 },
+ { 0x1a00, 0x337c, 0x0000 },
+ { 0x9a00, 0x337f, 0x2000 },
+ { 0x1a00, 0x337e, 0x0000 },
+ { 0x1a00, 0x3380, 0x0000 },
+ { 0x9a00, 0x3389, 0x4000 },
+ { 0x9a00, 0x3385, 0x3000 },
+ { 0x9a00, 0x3383, 0x2000 },
+ { 0x1a00, 0x3382, 0x0000 },
+ { 0x1a00, 0x3384, 0x0000 },
+ { 0x9a00, 0x3387, 0x2000 },
+ { 0x1a00, 0x3386, 0x0000 },
+ { 0x1a00, 0x3388, 0x0000 },
+ { 0x9a00, 0x338d, 0x3000 },
+ { 0x9a00, 0x338b, 0x2000 },
+ { 0x1a00, 0x338a, 0x0000 },
+ { 0x1a00, 0x338c, 0x0000 },
+ { 0x9a00, 0x338f, 0x2000 },
+ { 0x1a00, 0x338e, 0x0000 },
+ { 0x1a00, 0x3390, 0x0000 },
+ { 0x8700, 0xa14d, 0xa000 },
+ { 0x8700, 0xa04d, 0x9000 },
+ { 0x9a00, 0x4dcf, 0x8000 },
+ { 0x9a00, 0x33d1, 0x7000 },
+ { 0x9a00, 0x33b1, 0x6000 },
+ { 0x9a00, 0x33a1, 0x5000 },
+ { 0x9a00, 0x3399, 0x4000 },
+ { 0x9a00, 0x3395, 0x3000 },
+ { 0x9a00, 0x3393, 0x2000 },
+ { 0x1a00, 0x3392, 0x0000 },
+ { 0x1a00, 0x3394, 0x0000 },
+ { 0x9a00, 0x3397, 0x2000 },
+ { 0x1a00, 0x3396, 0x0000 },
+ { 0x1a00, 0x3398, 0x0000 },
+ { 0x9a00, 0x339d, 0x3000 },
+ { 0x9a00, 0x339b, 0x2000 },
+ { 0x1a00, 0x339a, 0x0000 },
+ { 0x1a00, 0x339c, 0x0000 },
+ { 0x9a00, 0x339f, 0x2000 },
+ { 0x1a00, 0x339e, 0x0000 },
+ { 0x1a00, 0x33a0, 0x0000 },
+ { 0x9a00, 0x33a9, 0x4000 },
+ { 0x9a00, 0x33a5, 0x3000 },
+ { 0x9a00, 0x33a3, 0x2000 },
+ { 0x1a00, 0x33a2, 0x0000 },
+ { 0x1a00, 0x33a4, 0x0000 },
+ { 0x9a00, 0x33a7, 0x2000 },
+ { 0x1a00, 0x33a6, 0x0000 },
+ { 0x1a00, 0x33a8, 0x0000 },
+ { 0x9a00, 0x33ad, 0x3000 },
+ { 0x9a00, 0x33ab, 0x2000 },
+ { 0x1a00, 0x33aa, 0x0000 },
+ { 0x1a00, 0x33ac, 0x0000 },
+ { 0x9a00, 0x33af, 0x2000 },
+ { 0x1a00, 0x33ae, 0x0000 },
+ { 0x1a00, 0x33b0, 0x0000 },
+ { 0x9a00, 0x33c1, 0x5000 },
+ { 0x9a00, 0x33b9, 0x4000 },
+ { 0x9a00, 0x33b5, 0x3000 },
+ { 0x9a00, 0x33b3, 0x2000 },
+ { 0x1a00, 0x33b2, 0x0000 },
+ { 0x1a00, 0x33b4, 0x0000 },
+ { 0x9a00, 0x33b7, 0x2000 },
+ { 0x1a00, 0x33b6, 0x0000 },
+ { 0x1a00, 0x33b8, 0x0000 },
+ { 0x9a00, 0x33bd, 0x3000 },
+ { 0x9a00, 0x33bb, 0x2000 },
+ { 0x1a00, 0x33ba, 0x0000 },
+ { 0x1a00, 0x33bc, 0x0000 },
+ { 0x9a00, 0x33bf, 0x2000 },
+ { 0x1a00, 0x33be, 0x0000 },
+ { 0x1a00, 0x33c0, 0x0000 },
+ { 0x9a00, 0x33c9, 0x4000 },
+ { 0x9a00, 0x33c5, 0x3000 },
+ { 0x9a00, 0x33c3, 0x2000 },
+ { 0x1a00, 0x33c2, 0x0000 },
+ { 0x1a00, 0x33c4, 0x0000 },
+ { 0x9a00, 0x33c7, 0x2000 },
+ { 0x1a00, 0x33c6, 0x0000 },
+ { 0x1a00, 0x33c8, 0x0000 },
+ { 0x9a00, 0x33cd, 0x3000 },
+ { 0x9a00, 0x33cb, 0x2000 },
+ { 0x1a00, 0x33ca, 0x0000 },
+ { 0x1a00, 0x33cc, 0x0000 },
+ { 0x9a00, 0x33cf, 0x2000 },
+ { 0x1a00, 0x33ce, 0x0000 },
+ { 0x1a00, 0x33d0, 0x0000 },
+ { 0x9a00, 0x33f1, 0x6000 },
+ { 0x9a00, 0x33e1, 0x5000 },
+ { 0x9a00, 0x33d9, 0x4000 },
+ { 0x9a00, 0x33d5, 0x3000 },
+ { 0x9a00, 0x33d3, 0x2000 },
+ { 0x1a00, 0x33d2, 0x0000 },
+ { 0x1a00, 0x33d4, 0x0000 },
+ { 0x9a00, 0x33d7, 0x2000 },
+ { 0x1a00, 0x33d6, 0x0000 },
+ { 0x1a00, 0x33d8, 0x0000 },
+ { 0x9a00, 0x33dd, 0x3000 },
+ { 0x9a00, 0x33db, 0x2000 },
+ { 0x1a00, 0x33da, 0x0000 },
+ { 0x1a00, 0x33dc, 0x0000 },
+ { 0x9a00, 0x33df, 0x2000 },
+ { 0x1a00, 0x33de, 0x0000 },
+ { 0x1a00, 0x33e0, 0x0000 },
+ { 0x9a00, 0x33e9, 0x4000 },
+ { 0x9a00, 0x33e5, 0x3000 },
+ { 0x9a00, 0x33e3, 0x2000 },
+ { 0x1a00, 0x33e2, 0x0000 },
+ { 0x1a00, 0x33e4, 0x0000 },
+ { 0x9a00, 0x33e7, 0x2000 },
+ { 0x1a00, 0x33e6, 0x0000 },
+ { 0x1a00, 0x33e8, 0x0000 },
+ { 0x9a00, 0x33ed, 0x3000 },
+ { 0x9a00, 0x33eb, 0x2000 },
+ { 0x1a00, 0x33ea, 0x0000 },
+ { 0x1a00, 0x33ec, 0x0000 },
+ { 0x9a00, 0x33ef, 0x2000 },
+ { 0x1a00, 0x33ee, 0x0000 },
+ { 0x1a00, 0x33f0, 0x0000 },
+ { 0x8700, 0x4db5, 0x5000 },
+ { 0x9a00, 0x33f9, 0x4000 },
+ { 0x9a00, 0x33f5, 0x3000 },
+ { 0x9a00, 0x33f3, 0x2000 },
+ { 0x1a00, 0x33f2, 0x0000 },
+ { 0x1a00, 0x33f4, 0x0000 },
+ { 0x9a00, 0x33f7, 0x2000 },
+ { 0x1a00, 0x33f6, 0x0000 },
+ { 0x1a00, 0x33f8, 0x0000 },
+ { 0x9a00, 0x33fd, 0x3000 },
+ { 0x9a00, 0x33fb, 0x2000 },
+ { 0x1a00, 0x33fa, 0x0000 },
+ { 0x1a00, 0x33fc, 0x0000 },
+ { 0x9a00, 0x33ff, 0x2000 },
+ { 0x1a00, 0x33fe, 0x0000 },
+ { 0x0700, 0x3400, 0x0000 },
+ { 0x9a00, 0x4dc7, 0x4000 },
+ { 0x9a00, 0x4dc3, 0x3000 },
+ { 0x9a00, 0x4dc1, 0x2000 },
+ { 0x1a00, 0x4dc0, 0x0000 },
+ { 0x1a00, 0x4dc2, 0x0000 },
+ { 0x9a00, 0x4dc5, 0x2000 },
+ { 0x1a00, 0x4dc4, 0x0000 },
+ { 0x1a00, 0x4dc6, 0x0000 },
+ { 0x9a00, 0x4dcb, 0x3000 },
+ { 0x9a00, 0x4dc9, 0x2000 },
+ { 0x1a00, 0x4dc8, 0x0000 },
+ { 0x1a00, 0x4dca, 0x0000 },
+ { 0x9a00, 0x4dcd, 0x2000 },
+ { 0x1a00, 0x4dcc, 0x0000 },
+ { 0x1a00, 0x4dce, 0x0000 },
+ { 0x8700, 0xa00d, 0x7000 },
+ { 0x9a00, 0x4def, 0x6000 },
+ { 0x9a00, 0x4ddf, 0x5000 },
+ { 0x9a00, 0x4dd7, 0x4000 },
+ { 0x9a00, 0x4dd3, 0x3000 },
+ { 0x9a00, 0x4dd1, 0x2000 },
+ { 0x1a00, 0x4dd0, 0x0000 },
+ { 0x1a00, 0x4dd2, 0x0000 },
+ { 0x9a00, 0x4dd5, 0x2000 },
+ { 0x1a00, 0x4dd4, 0x0000 },
+ { 0x1a00, 0x4dd6, 0x0000 },
+ { 0x9a00, 0x4ddb, 0x3000 },
+ { 0x9a00, 0x4dd9, 0x2000 },
+ { 0x1a00, 0x4dd8, 0x0000 },
+ { 0x1a00, 0x4dda, 0x0000 },
+ { 0x9a00, 0x4ddd, 0x2000 },
+ { 0x1a00, 0x4ddc, 0x0000 },
+ { 0x1a00, 0x4dde, 0x0000 },
+ { 0x9a00, 0x4de7, 0x4000 },
+ { 0x9a00, 0x4de3, 0x3000 },
+ { 0x9a00, 0x4de1, 0x2000 },
+ { 0x1a00, 0x4de0, 0x0000 },
+ { 0x1a00, 0x4de2, 0x0000 },
+ { 0x9a00, 0x4de5, 0x2000 },
+ { 0x1a00, 0x4de4, 0x0000 },
+ { 0x1a00, 0x4de6, 0x0000 },
+ { 0x9a00, 0x4deb, 0x3000 },
+ { 0x9a00, 0x4de9, 0x2000 },
+ { 0x1a00, 0x4de8, 0x0000 },
+ { 0x1a00, 0x4dea, 0x0000 },
+ { 0x9a00, 0x4ded, 0x2000 },
+ { 0x1a00, 0x4dec, 0x0000 },
+ { 0x1a00, 0x4dee, 0x0000 },
+ { 0x9a00, 0x4dff, 0x5000 },
+ { 0x9a00, 0x4df7, 0x4000 },
+ { 0x9a00, 0x4df3, 0x3000 },
+ { 0x9a00, 0x4df1, 0x2000 },
+ { 0x1a00, 0x4df0, 0x0000 },
+ { 0x1a00, 0x4df2, 0x0000 },
+ { 0x9a00, 0x4df5, 0x2000 },
+ { 0x1a00, 0x4df4, 0x0000 },
+ { 0x1a00, 0x4df6, 0x0000 },
+ { 0x9a00, 0x4dfb, 0x3000 },
+ { 0x9a00, 0x4df9, 0x2000 },
+ { 0x1a00, 0x4df8, 0x0000 },
+ { 0x1a00, 0x4dfa, 0x0000 },
+ { 0x9a00, 0x4dfd, 0x2000 },
+ { 0x1a00, 0x4dfc, 0x0000 },
+ { 0x1a00, 0x4dfe, 0x0000 },
+ { 0x8700, 0xa005, 0x4000 },
+ { 0x8700, 0xa001, 0x3000 },
+ { 0x8700, 0x9fa5, 0x2000 },
+ { 0x0700, 0x4e00, 0x0000 },
+ { 0x0700, 0xa000, 0x0000 },
+ { 0x8700, 0xa003, 0x2000 },
+ { 0x0700, 0xa002, 0x0000 },
+ { 0x0700, 0xa004, 0x0000 },
+ { 0x8700, 0xa009, 0x3000 },
+ { 0x8700, 0xa007, 0x2000 },
+ { 0x0700, 0xa006, 0x0000 },
+ { 0x0700, 0xa008, 0x0000 },
+ { 0x8700, 0xa00b, 0x2000 },
+ { 0x0700, 0xa00a, 0x0000 },
+ { 0x0700, 0xa00c, 0x0000 },
+ { 0x8700, 0xa02d, 0x6000 },
+ { 0x8700, 0xa01d, 0x5000 },
+ { 0x8700, 0xa015, 0x4000 },
+ { 0x8700, 0xa011, 0x3000 },
+ { 0x8700, 0xa00f, 0x2000 },
+ { 0x0700, 0xa00e, 0x0000 },
+ { 0x0700, 0xa010, 0x0000 },
+ { 0x8700, 0xa013, 0x2000 },
+ { 0x0700, 0xa012, 0x0000 },
+ { 0x0700, 0xa014, 0x0000 },
+ { 0x8700, 0xa019, 0x3000 },
+ { 0x8700, 0xa017, 0x2000 },
+ { 0x0700, 0xa016, 0x0000 },
+ { 0x0700, 0xa018, 0x0000 },
+ { 0x8700, 0xa01b, 0x2000 },
+ { 0x0700, 0xa01a, 0x0000 },
+ { 0x0700, 0xa01c, 0x0000 },
+ { 0x8700, 0xa025, 0x4000 },
+ { 0x8700, 0xa021, 0x3000 },
+ { 0x8700, 0xa01f, 0x2000 },
+ { 0x0700, 0xa01e, 0x0000 },
+ { 0x0700, 0xa020, 0x0000 },
+ { 0x8700, 0xa023, 0x2000 },
+ { 0x0700, 0xa022, 0x0000 },
+ { 0x0700, 0xa024, 0x0000 },
+ { 0x8700, 0xa029, 0x3000 },
+ { 0x8700, 0xa027, 0x2000 },
+ { 0x0700, 0xa026, 0x0000 },
+ { 0x0700, 0xa028, 0x0000 },
+ { 0x8700, 0xa02b, 0x2000 },
+ { 0x0700, 0xa02a, 0x0000 },
+ { 0x0700, 0xa02c, 0x0000 },
+ { 0x8700, 0xa03d, 0x5000 },
+ { 0x8700, 0xa035, 0x4000 },
+ { 0x8700, 0xa031, 0x3000 },
+ { 0x8700, 0xa02f, 0x2000 },
+ { 0x0700, 0xa02e, 0x0000 },
+ { 0x0700, 0xa030, 0x0000 },
+ { 0x8700, 0xa033, 0x2000 },
+ { 0x0700, 0xa032, 0x0000 },
+ { 0x0700, 0xa034, 0x0000 },
+ { 0x8700, 0xa039, 0x3000 },
+ { 0x8700, 0xa037, 0x2000 },
+ { 0x0700, 0xa036, 0x0000 },
+ { 0x0700, 0xa038, 0x0000 },
+ { 0x8700, 0xa03b, 0x2000 },
+ { 0x0700, 0xa03a, 0x0000 },
+ { 0x0700, 0xa03c, 0x0000 },
+ { 0x8700, 0xa045, 0x4000 },
+ { 0x8700, 0xa041, 0x3000 },
+ { 0x8700, 0xa03f, 0x2000 },
+ { 0x0700, 0xa03e, 0x0000 },
+ { 0x0700, 0xa040, 0x0000 },
+ { 0x8700, 0xa043, 0x2000 },
+ { 0x0700, 0xa042, 0x0000 },
+ { 0x0700, 0xa044, 0x0000 },
+ { 0x8700, 0xa049, 0x3000 },
+ { 0x8700, 0xa047, 0x2000 },
+ { 0x0700, 0xa046, 0x0000 },
+ { 0x0700, 0xa048, 0x0000 },
+ { 0x8700, 0xa04b, 0x2000 },
+ { 0x0700, 0xa04a, 0x0000 },
+ { 0x0700, 0xa04c, 0x0000 },
+ { 0x8700, 0xa0cd, 0x8000 },
+ { 0x8700, 0xa08d, 0x7000 },
+ { 0x8700, 0xa06d, 0x6000 },
+ { 0x8700, 0xa05d, 0x5000 },
+ { 0x8700, 0xa055, 0x4000 },
+ { 0x8700, 0xa051, 0x3000 },
+ { 0x8700, 0xa04f, 0x2000 },
+ { 0x0700, 0xa04e, 0x0000 },
+ { 0x0700, 0xa050, 0x0000 },
+ { 0x8700, 0xa053, 0x2000 },
+ { 0x0700, 0xa052, 0x0000 },
+ { 0x0700, 0xa054, 0x0000 },
+ { 0x8700, 0xa059, 0x3000 },
+ { 0x8700, 0xa057, 0x2000 },
+ { 0x0700, 0xa056, 0x0000 },
+ { 0x0700, 0xa058, 0x0000 },
+ { 0x8700, 0xa05b, 0x2000 },
+ { 0x0700, 0xa05a, 0x0000 },
+ { 0x0700, 0xa05c, 0x0000 },
+ { 0x8700, 0xa065, 0x4000 },
+ { 0x8700, 0xa061, 0x3000 },
+ { 0x8700, 0xa05f, 0x2000 },
+ { 0x0700, 0xa05e, 0x0000 },
+ { 0x0700, 0xa060, 0x0000 },
+ { 0x8700, 0xa063, 0x2000 },
+ { 0x0700, 0xa062, 0x0000 },
+ { 0x0700, 0xa064, 0x0000 },
+ { 0x8700, 0xa069, 0x3000 },
+ { 0x8700, 0xa067, 0x2000 },
+ { 0x0700, 0xa066, 0x0000 },
+ { 0x0700, 0xa068, 0x0000 },
+ { 0x8700, 0xa06b, 0x2000 },
+ { 0x0700, 0xa06a, 0x0000 },
+ { 0x0700, 0xa06c, 0x0000 },
+ { 0x8700, 0xa07d, 0x5000 },
+ { 0x8700, 0xa075, 0x4000 },
+ { 0x8700, 0xa071, 0x3000 },
+ { 0x8700, 0xa06f, 0x2000 },
+ { 0x0700, 0xa06e, 0x0000 },
+ { 0x0700, 0xa070, 0x0000 },
+ { 0x8700, 0xa073, 0x2000 },
+ { 0x0700, 0xa072, 0x0000 },
+ { 0x0700, 0xa074, 0x0000 },
+ { 0x8700, 0xa079, 0x3000 },
+ { 0x8700, 0xa077, 0x2000 },
+ { 0x0700, 0xa076, 0x0000 },
+ { 0x0700, 0xa078, 0x0000 },
+ { 0x8700, 0xa07b, 0x2000 },
+ { 0x0700, 0xa07a, 0x0000 },
+ { 0x0700, 0xa07c, 0x0000 },
+ { 0x8700, 0xa085, 0x4000 },
+ { 0x8700, 0xa081, 0x3000 },
+ { 0x8700, 0xa07f, 0x2000 },
+ { 0x0700, 0xa07e, 0x0000 },
+ { 0x0700, 0xa080, 0x0000 },
+ { 0x8700, 0xa083, 0x2000 },
+ { 0x0700, 0xa082, 0x0000 },
+ { 0x0700, 0xa084, 0x0000 },
+ { 0x8700, 0xa089, 0x3000 },
+ { 0x8700, 0xa087, 0x2000 },
+ { 0x0700, 0xa086, 0x0000 },
+ { 0x0700, 0xa088, 0x0000 },
+ { 0x8700, 0xa08b, 0x2000 },
+ { 0x0700, 0xa08a, 0x0000 },
+ { 0x0700, 0xa08c, 0x0000 },
+ { 0x8700, 0xa0ad, 0x6000 },
+ { 0x8700, 0xa09d, 0x5000 },
+ { 0x8700, 0xa095, 0x4000 },
+ { 0x8700, 0xa091, 0x3000 },
+ { 0x8700, 0xa08f, 0x2000 },
+ { 0x0700, 0xa08e, 0x0000 },
+ { 0x0700, 0xa090, 0x0000 },
+ { 0x8700, 0xa093, 0x2000 },
+ { 0x0700, 0xa092, 0x0000 },
+ { 0x0700, 0xa094, 0x0000 },
+ { 0x8700, 0xa099, 0x3000 },
+ { 0x8700, 0xa097, 0x2000 },
+ { 0x0700, 0xa096, 0x0000 },
+ { 0x0700, 0xa098, 0x0000 },
+ { 0x8700, 0xa09b, 0x2000 },
+ { 0x0700, 0xa09a, 0x0000 },
+ { 0x0700, 0xa09c, 0x0000 },
+ { 0x8700, 0xa0a5, 0x4000 },
+ { 0x8700, 0xa0a1, 0x3000 },
+ { 0x8700, 0xa09f, 0x2000 },
+ { 0x0700, 0xa09e, 0x0000 },
+ { 0x0700, 0xa0a0, 0x0000 },
+ { 0x8700, 0xa0a3, 0x2000 },
+ { 0x0700, 0xa0a2, 0x0000 },
+ { 0x0700, 0xa0a4, 0x0000 },
+ { 0x8700, 0xa0a9, 0x3000 },
+ { 0x8700, 0xa0a7, 0x2000 },
+ { 0x0700, 0xa0a6, 0x0000 },
+ { 0x0700, 0xa0a8, 0x0000 },
+ { 0x8700, 0xa0ab, 0x2000 },
+ { 0x0700, 0xa0aa, 0x0000 },
+ { 0x0700, 0xa0ac, 0x0000 },
+ { 0x8700, 0xa0bd, 0x5000 },
+ { 0x8700, 0xa0b5, 0x4000 },
+ { 0x8700, 0xa0b1, 0x3000 },
+ { 0x8700, 0xa0af, 0x2000 },
+ { 0x0700, 0xa0ae, 0x0000 },
+ { 0x0700, 0xa0b0, 0x0000 },
+ { 0x8700, 0xa0b3, 0x2000 },
+ { 0x0700, 0xa0b2, 0x0000 },
+ { 0x0700, 0xa0b4, 0x0000 },
+ { 0x8700, 0xa0b9, 0x3000 },
+ { 0x8700, 0xa0b7, 0x2000 },
+ { 0x0700, 0xa0b6, 0x0000 },
+ { 0x0700, 0xa0b8, 0x0000 },
+ { 0x8700, 0xa0bb, 0x2000 },
+ { 0x0700, 0xa0ba, 0x0000 },
+ { 0x0700, 0xa0bc, 0x0000 },
+ { 0x8700, 0xa0c5, 0x4000 },
+ { 0x8700, 0xa0c1, 0x3000 },
+ { 0x8700, 0xa0bf, 0x2000 },
+ { 0x0700, 0xa0be, 0x0000 },
+ { 0x0700, 0xa0c0, 0x0000 },
+ { 0x8700, 0xa0c3, 0x2000 },
+ { 0x0700, 0xa0c2, 0x0000 },
+ { 0x0700, 0xa0c4, 0x0000 },
+ { 0x8700, 0xa0c9, 0x3000 },
+ { 0x8700, 0xa0c7, 0x2000 },
+ { 0x0700, 0xa0c6, 0x0000 },
+ { 0x0700, 0xa0c8, 0x0000 },
+ { 0x8700, 0xa0cb, 0x2000 },
+ { 0x0700, 0xa0ca, 0x0000 },
+ { 0x0700, 0xa0cc, 0x0000 },
+ { 0x8700, 0xa10d, 0x7000 },
+ { 0x8700, 0xa0ed, 0x6000 },
+ { 0x8700, 0xa0dd, 0x5000 },
+ { 0x8700, 0xa0d5, 0x4000 },
+ { 0x8700, 0xa0d1, 0x3000 },
+ { 0x8700, 0xa0cf, 0x2000 },
+ { 0x0700, 0xa0ce, 0x0000 },
+ { 0x0700, 0xa0d0, 0x0000 },
+ { 0x8700, 0xa0d3, 0x2000 },
+ { 0x0700, 0xa0d2, 0x0000 },
+ { 0x0700, 0xa0d4, 0x0000 },
+ { 0x8700, 0xa0d9, 0x3000 },
+ { 0x8700, 0xa0d7, 0x2000 },
+ { 0x0700, 0xa0d6, 0x0000 },
+ { 0x0700, 0xa0d8, 0x0000 },
+ { 0x8700, 0xa0db, 0x2000 },
+ { 0x0700, 0xa0da, 0x0000 },
+ { 0x0700, 0xa0dc, 0x0000 },
+ { 0x8700, 0xa0e5, 0x4000 },
+ { 0x8700, 0xa0e1, 0x3000 },
+ { 0x8700, 0xa0df, 0x2000 },
+ { 0x0700, 0xa0de, 0x0000 },
+ { 0x0700, 0xa0e0, 0x0000 },
+ { 0x8700, 0xa0e3, 0x2000 },
+ { 0x0700, 0xa0e2, 0x0000 },
+ { 0x0700, 0xa0e4, 0x0000 },
+ { 0x8700, 0xa0e9, 0x3000 },
+ { 0x8700, 0xa0e7, 0x2000 },
+ { 0x0700, 0xa0e6, 0x0000 },
+ { 0x0700, 0xa0e8, 0x0000 },
+ { 0x8700, 0xa0eb, 0x2000 },
+ { 0x0700, 0xa0ea, 0x0000 },
+ { 0x0700, 0xa0ec, 0x0000 },
+ { 0x8700, 0xa0fd, 0x5000 },
+ { 0x8700, 0xa0f5, 0x4000 },
+ { 0x8700, 0xa0f1, 0x3000 },
+ { 0x8700, 0xa0ef, 0x2000 },
+ { 0x0700, 0xa0ee, 0x0000 },
+ { 0x0700, 0xa0f0, 0x0000 },
+ { 0x8700, 0xa0f3, 0x2000 },
+ { 0x0700, 0xa0f2, 0x0000 },
+ { 0x0700, 0xa0f4, 0x0000 },
+ { 0x8700, 0xa0f9, 0x3000 },
+ { 0x8700, 0xa0f7, 0x2000 },
+ { 0x0700, 0xa0f6, 0x0000 },
+ { 0x0700, 0xa0f8, 0x0000 },
+ { 0x8700, 0xa0fb, 0x2000 },
+ { 0x0700, 0xa0fa, 0x0000 },
+ { 0x0700, 0xa0fc, 0x0000 },
+ { 0x8700, 0xa105, 0x4000 },
+ { 0x8700, 0xa101, 0x3000 },
+ { 0x8700, 0xa0ff, 0x2000 },
+ { 0x0700, 0xa0fe, 0x0000 },
+ { 0x0700, 0xa100, 0x0000 },
+ { 0x8700, 0xa103, 0x2000 },
+ { 0x0700, 0xa102, 0x0000 },
+ { 0x0700, 0xa104, 0x0000 },
+ { 0x8700, 0xa109, 0x3000 },
+ { 0x8700, 0xa107, 0x2000 },
+ { 0x0700, 0xa106, 0x0000 },
+ { 0x0700, 0xa108, 0x0000 },
+ { 0x8700, 0xa10b, 0x2000 },
+ { 0x0700, 0xa10a, 0x0000 },
+ { 0x0700, 0xa10c, 0x0000 },
+ { 0x8700, 0xa12d, 0x6000 },
+ { 0x8700, 0xa11d, 0x5000 },
+ { 0x8700, 0xa115, 0x4000 },
+ { 0x8700, 0xa111, 0x3000 },
+ { 0x8700, 0xa10f, 0x2000 },
+ { 0x0700, 0xa10e, 0x0000 },
+ { 0x0700, 0xa110, 0x0000 },
+ { 0x8700, 0xa113, 0x2000 },
+ { 0x0700, 0xa112, 0x0000 },
+ { 0x0700, 0xa114, 0x0000 },
+ { 0x8700, 0xa119, 0x3000 },
+ { 0x8700, 0xa117, 0x2000 },
+ { 0x0700, 0xa116, 0x0000 },
+ { 0x0700, 0xa118, 0x0000 },
+ { 0x8700, 0xa11b, 0x2000 },
+ { 0x0700, 0xa11a, 0x0000 },
+ { 0x0700, 0xa11c, 0x0000 },
+ { 0x8700, 0xa125, 0x4000 },
+ { 0x8700, 0xa121, 0x3000 },
+ { 0x8700, 0xa11f, 0x2000 },
+ { 0x0700, 0xa11e, 0x0000 },
+ { 0x0700, 0xa120, 0x0000 },
+ { 0x8700, 0xa123, 0x2000 },
+ { 0x0700, 0xa122, 0x0000 },
+ { 0x0700, 0xa124, 0x0000 },
+ { 0x8700, 0xa129, 0x3000 },
+ { 0x8700, 0xa127, 0x2000 },
+ { 0x0700, 0xa126, 0x0000 },
+ { 0x0700, 0xa128, 0x0000 },
+ { 0x8700, 0xa12b, 0x2000 },
+ { 0x0700, 0xa12a, 0x0000 },
+ { 0x0700, 0xa12c, 0x0000 },
+ { 0x8700, 0xa13d, 0x5000 },
+ { 0x8700, 0xa135, 0x4000 },
+ { 0x8700, 0xa131, 0x3000 },
+ { 0x8700, 0xa12f, 0x2000 },
+ { 0x0700, 0xa12e, 0x0000 },
+ { 0x0700, 0xa130, 0x0000 },
+ { 0x8700, 0xa133, 0x2000 },
+ { 0x0700, 0xa132, 0x0000 },
+ { 0x0700, 0xa134, 0x0000 },
+ { 0x8700, 0xa139, 0x3000 },
+ { 0x8700, 0xa137, 0x2000 },
+ { 0x0700, 0xa136, 0x0000 },
+ { 0x0700, 0xa138, 0x0000 },
+ { 0x8700, 0xa13b, 0x2000 },
+ { 0x0700, 0xa13a, 0x0000 },
+ { 0x0700, 0xa13c, 0x0000 },
+ { 0x8700, 0xa145, 0x4000 },
+ { 0x8700, 0xa141, 0x3000 },
+ { 0x8700, 0xa13f, 0x2000 },
+ { 0x0700, 0xa13e, 0x0000 },
+ { 0x0700, 0xa140, 0x0000 },
+ { 0x8700, 0xa143, 0x2000 },
+ { 0x0700, 0xa142, 0x0000 },
+ { 0x0700, 0xa144, 0x0000 },
+ { 0x8700, 0xa149, 0x3000 },
+ { 0x8700, 0xa147, 0x2000 },
+ { 0x0700, 0xa146, 0x0000 },
+ { 0x0700, 0xa148, 0x0000 },
+ { 0x8700, 0xa14b, 0x2000 },
+ { 0x0700, 0xa14a, 0x0000 },
+ { 0x0700, 0xa14c, 0x0000 },
+ { 0x8700, 0xa24d, 0x9000 },
+ { 0x8700, 0xa1cd, 0x8000 },
+ { 0x8700, 0xa18d, 0x7000 },
+ { 0x8700, 0xa16d, 0x6000 },
+ { 0x8700, 0xa15d, 0x5000 },
+ { 0x8700, 0xa155, 0x4000 },
+ { 0x8700, 0xa151, 0x3000 },
+ { 0x8700, 0xa14f, 0x2000 },
+ { 0x0700, 0xa14e, 0x0000 },
+ { 0x0700, 0xa150, 0x0000 },
+ { 0x8700, 0xa153, 0x2000 },
+ { 0x0700, 0xa152, 0x0000 },
+ { 0x0700, 0xa154, 0x0000 },
+ { 0x8700, 0xa159, 0x3000 },
+ { 0x8700, 0xa157, 0x2000 },
+ { 0x0700, 0xa156, 0x0000 },
+ { 0x0700, 0xa158, 0x0000 },
+ { 0x8700, 0xa15b, 0x2000 },
+ { 0x0700, 0xa15a, 0x0000 },
+ { 0x0700, 0xa15c, 0x0000 },
+ { 0x8700, 0xa165, 0x4000 },
+ { 0x8700, 0xa161, 0x3000 },
+ { 0x8700, 0xa15f, 0x2000 },
+ { 0x0700, 0xa15e, 0x0000 },
+ { 0x0700, 0xa160, 0x0000 },
+ { 0x8700, 0xa163, 0x2000 },
+ { 0x0700, 0xa162, 0x0000 },
+ { 0x0700, 0xa164, 0x0000 },
+ { 0x8700, 0xa169, 0x3000 },
+ { 0x8700, 0xa167, 0x2000 },
+ { 0x0700, 0xa166, 0x0000 },
+ { 0x0700, 0xa168, 0x0000 },
+ { 0x8700, 0xa16b, 0x2000 },
+ { 0x0700, 0xa16a, 0x0000 },
+ { 0x0700, 0xa16c, 0x0000 },
+ { 0x8700, 0xa17d, 0x5000 },
+ { 0x8700, 0xa175, 0x4000 },
+ { 0x8700, 0xa171, 0x3000 },
+ { 0x8700, 0xa16f, 0x2000 },
+ { 0x0700, 0xa16e, 0x0000 },
+ { 0x0700, 0xa170, 0x0000 },
+ { 0x8700, 0xa173, 0x2000 },
+ { 0x0700, 0xa172, 0x0000 },
+ { 0x0700, 0xa174, 0x0000 },
+ { 0x8700, 0xa179, 0x3000 },
+ { 0x8700, 0xa177, 0x2000 },
+ { 0x0700, 0xa176, 0x0000 },
+ { 0x0700, 0xa178, 0x0000 },
+ { 0x8700, 0xa17b, 0x2000 },
+ { 0x0700, 0xa17a, 0x0000 },
+ { 0x0700, 0xa17c, 0x0000 },
+ { 0x8700, 0xa185, 0x4000 },
+ { 0x8700, 0xa181, 0x3000 },
+ { 0x8700, 0xa17f, 0x2000 },
+ { 0x0700, 0xa17e, 0x0000 },
+ { 0x0700, 0xa180, 0x0000 },
+ { 0x8700, 0xa183, 0x2000 },
+ { 0x0700, 0xa182, 0x0000 },
+ { 0x0700, 0xa184, 0x0000 },
+ { 0x8700, 0xa189, 0x3000 },
+ { 0x8700, 0xa187, 0x2000 },
+ { 0x0700, 0xa186, 0x0000 },
+ { 0x0700, 0xa188, 0x0000 },
+ { 0x8700, 0xa18b, 0x2000 },
+ { 0x0700, 0xa18a, 0x0000 },
+ { 0x0700, 0xa18c, 0x0000 },
+ { 0x8700, 0xa1ad, 0x6000 },
+ { 0x8700, 0xa19d, 0x5000 },
+ { 0x8700, 0xa195, 0x4000 },
+ { 0x8700, 0xa191, 0x3000 },
+ { 0x8700, 0xa18f, 0x2000 },
+ { 0x0700, 0xa18e, 0x0000 },
+ { 0x0700, 0xa190, 0x0000 },
+ { 0x8700, 0xa193, 0x2000 },
+ { 0x0700, 0xa192, 0x0000 },
+ { 0x0700, 0xa194, 0x0000 },
+ { 0x8700, 0xa199, 0x3000 },
+ { 0x8700, 0xa197, 0x2000 },
+ { 0x0700, 0xa196, 0x0000 },
+ { 0x0700, 0xa198, 0x0000 },
+ { 0x8700, 0xa19b, 0x2000 },
+ { 0x0700, 0xa19a, 0x0000 },
+ { 0x0700, 0xa19c, 0x0000 },
+ { 0x8700, 0xa1a5, 0x4000 },
+ { 0x8700, 0xa1a1, 0x3000 },
+ { 0x8700, 0xa19f, 0x2000 },
+ { 0x0700, 0xa19e, 0x0000 },
+ { 0x0700, 0xa1a0, 0x0000 },
+ { 0x8700, 0xa1a3, 0x2000 },
+ { 0x0700, 0xa1a2, 0x0000 },
+ { 0x0700, 0xa1a4, 0x0000 },
+ { 0x8700, 0xa1a9, 0x3000 },
+ { 0x8700, 0xa1a7, 0x2000 },
+ { 0x0700, 0xa1a6, 0x0000 },
+ { 0x0700, 0xa1a8, 0x0000 },
+ { 0x8700, 0xa1ab, 0x2000 },
+ { 0x0700, 0xa1aa, 0x0000 },
+ { 0x0700, 0xa1ac, 0x0000 },
+ { 0x8700, 0xa1bd, 0x5000 },
+ { 0x8700, 0xa1b5, 0x4000 },
+ { 0x8700, 0xa1b1, 0x3000 },
+ { 0x8700, 0xa1af, 0x2000 },
+ { 0x0700, 0xa1ae, 0x0000 },
+ { 0x0700, 0xa1b0, 0x0000 },
+ { 0x8700, 0xa1b3, 0x2000 },
+ { 0x0700, 0xa1b2, 0x0000 },
+ { 0x0700, 0xa1b4, 0x0000 },
+ { 0x8700, 0xa1b9, 0x3000 },
+ { 0x8700, 0xa1b7, 0x2000 },
+ { 0x0700, 0xa1b6, 0x0000 },
+ { 0x0700, 0xa1b8, 0x0000 },
+ { 0x8700, 0xa1bb, 0x2000 },
+ { 0x0700, 0xa1ba, 0x0000 },
+ { 0x0700, 0xa1bc, 0x0000 },
+ { 0x8700, 0xa1c5, 0x4000 },
+ { 0x8700, 0xa1c1, 0x3000 },
+ { 0x8700, 0xa1bf, 0x2000 },
+ { 0x0700, 0xa1be, 0x0000 },
+ { 0x0700, 0xa1c0, 0x0000 },
+ { 0x8700, 0xa1c3, 0x2000 },
+ { 0x0700, 0xa1c2, 0x0000 },
+ { 0x0700, 0xa1c4, 0x0000 },
+ { 0x8700, 0xa1c9, 0x3000 },
+ { 0x8700, 0xa1c7, 0x2000 },
+ { 0x0700, 0xa1c6, 0x0000 },
+ { 0x0700, 0xa1c8, 0x0000 },
+ { 0x8700, 0xa1cb, 0x2000 },
+ { 0x0700, 0xa1ca, 0x0000 },
+ { 0x0700, 0xa1cc, 0x0000 },
+ { 0x8700, 0xa20d, 0x7000 },
+ { 0x8700, 0xa1ed, 0x6000 },
+ { 0x8700, 0xa1dd, 0x5000 },
+ { 0x8700, 0xa1d5, 0x4000 },
+ { 0x8700, 0xa1d1, 0x3000 },
+ { 0x8700, 0xa1cf, 0x2000 },
+ { 0x0700, 0xa1ce, 0x0000 },
+ { 0x0700, 0xa1d0, 0x0000 },
+ { 0x8700, 0xa1d3, 0x2000 },
+ { 0x0700, 0xa1d2, 0x0000 },
+ { 0x0700, 0xa1d4, 0x0000 },
+ { 0x8700, 0xa1d9, 0x3000 },
+ { 0x8700, 0xa1d7, 0x2000 },
+ { 0x0700, 0xa1d6, 0x0000 },
+ { 0x0700, 0xa1d8, 0x0000 },
+ { 0x8700, 0xa1db, 0x2000 },
+ { 0x0700, 0xa1da, 0x0000 },
+ { 0x0700, 0xa1dc, 0x0000 },
+ { 0x8700, 0xa1e5, 0x4000 },
+ { 0x8700, 0xa1e1, 0x3000 },
+ { 0x8700, 0xa1df, 0x2000 },
+ { 0x0700, 0xa1de, 0x0000 },
+ { 0x0700, 0xa1e0, 0x0000 },
+ { 0x8700, 0xa1e3, 0x2000 },
+ { 0x0700, 0xa1e2, 0x0000 },
+ { 0x0700, 0xa1e4, 0x0000 },
+ { 0x8700, 0xa1e9, 0x3000 },
+ { 0x8700, 0xa1e7, 0x2000 },
+ { 0x0700, 0xa1e6, 0x0000 },
+ { 0x0700, 0xa1e8, 0x0000 },
+ { 0x8700, 0xa1eb, 0x2000 },
+ { 0x0700, 0xa1ea, 0x0000 },
+ { 0x0700, 0xa1ec, 0x0000 },
+ { 0x8700, 0xa1fd, 0x5000 },
+ { 0x8700, 0xa1f5, 0x4000 },
+ { 0x8700, 0xa1f1, 0x3000 },
+ { 0x8700, 0xa1ef, 0x2000 },
+ { 0x0700, 0xa1ee, 0x0000 },
+ { 0x0700, 0xa1f0, 0x0000 },
+ { 0x8700, 0xa1f3, 0x2000 },
+ { 0x0700, 0xa1f2, 0x0000 },
+ { 0x0700, 0xa1f4, 0x0000 },
+ { 0x8700, 0xa1f9, 0x3000 },
+ { 0x8700, 0xa1f7, 0x2000 },
+ { 0x0700, 0xa1f6, 0x0000 },
+ { 0x0700, 0xa1f8, 0x0000 },
+ { 0x8700, 0xa1fb, 0x2000 },
+ { 0x0700, 0xa1fa, 0x0000 },
+ { 0x0700, 0xa1fc, 0x0000 },
+ { 0x8700, 0xa205, 0x4000 },
+ { 0x8700, 0xa201, 0x3000 },
+ { 0x8700, 0xa1ff, 0x2000 },
+ { 0x0700, 0xa1fe, 0x0000 },
+ { 0x0700, 0xa200, 0x0000 },
+ { 0x8700, 0xa203, 0x2000 },
+ { 0x0700, 0xa202, 0x0000 },
+ { 0x0700, 0xa204, 0x0000 },
+ { 0x8700, 0xa209, 0x3000 },
+ { 0x8700, 0xa207, 0x2000 },
+ { 0x0700, 0xa206, 0x0000 },
+ { 0x0700, 0xa208, 0x0000 },
+ { 0x8700, 0xa20b, 0x2000 },
+ { 0x0700, 0xa20a, 0x0000 },
+ { 0x0700, 0xa20c, 0x0000 },
+ { 0x8700, 0xa22d, 0x6000 },
+ { 0x8700, 0xa21d, 0x5000 },
+ { 0x8700, 0xa215, 0x4000 },
+ { 0x8700, 0xa211, 0x3000 },
+ { 0x8700, 0xa20f, 0x2000 },
+ { 0x0700, 0xa20e, 0x0000 },
+ { 0x0700, 0xa210, 0x0000 },
+ { 0x8700, 0xa213, 0x2000 },
+ { 0x0700, 0xa212, 0x0000 },
+ { 0x0700, 0xa214, 0x0000 },
+ { 0x8700, 0xa219, 0x3000 },
+ { 0x8700, 0xa217, 0x2000 },
+ { 0x0700, 0xa216, 0x0000 },
+ { 0x0700, 0xa218, 0x0000 },
+ { 0x8700, 0xa21b, 0x2000 },
+ { 0x0700, 0xa21a, 0x0000 },
+ { 0x0700, 0xa21c, 0x0000 },
+ { 0x8700, 0xa225, 0x4000 },
+ { 0x8700, 0xa221, 0x3000 },
+ { 0x8700, 0xa21f, 0x2000 },
+ { 0x0700, 0xa21e, 0x0000 },
+ { 0x0700, 0xa220, 0x0000 },
+ { 0x8700, 0xa223, 0x2000 },
+ { 0x0700, 0xa222, 0x0000 },
+ { 0x0700, 0xa224, 0x0000 },
+ { 0x8700, 0xa229, 0x3000 },
+ { 0x8700, 0xa227, 0x2000 },
+ { 0x0700, 0xa226, 0x0000 },
+ { 0x0700, 0xa228, 0x0000 },
+ { 0x8700, 0xa22b, 0x2000 },
+ { 0x0700, 0xa22a, 0x0000 },
+ { 0x0700, 0xa22c, 0x0000 },
+ { 0x8700, 0xa23d, 0x5000 },
+ { 0x8700, 0xa235, 0x4000 },
+ { 0x8700, 0xa231, 0x3000 },
+ { 0x8700, 0xa22f, 0x2000 },
+ { 0x0700, 0xa22e, 0x0000 },
+ { 0x0700, 0xa230, 0x0000 },
+ { 0x8700, 0xa233, 0x2000 },
+ { 0x0700, 0xa232, 0x0000 },
+ { 0x0700, 0xa234, 0x0000 },
+ { 0x8700, 0xa239, 0x3000 },
+ { 0x8700, 0xa237, 0x2000 },
+ { 0x0700, 0xa236, 0x0000 },
+ { 0x0700, 0xa238, 0x0000 },
+ { 0x8700, 0xa23b, 0x2000 },
+ { 0x0700, 0xa23a, 0x0000 },
+ { 0x0700, 0xa23c, 0x0000 },
+ { 0x8700, 0xa245, 0x4000 },
+ { 0x8700, 0xa241, 0x3000 },
+ { 0x8700, 0xa23f, 0x2000 },
+ { 0x0700, 0xa23e, 0x0000 },
+ { 0x0700, 0xa240, 0x0000 },
+ { 0x8700, 0xa243, 0x2000 },
+ { 0x0700, 0xa242, 0x0000 },
+ { 0x0700, 0xa244, 0x0000 },
+ { 0x8700, 0xa249, 0x3000 },
+ { 0x8700, 0xa247, 0x2000 },
+ { 0x0700, 0xa246, 0x0000 },
+ { 0x0700, 0xa248, 0x0000 },
+ { 0x8700, 0xa24b, 0x2000 },
+ { 0x0700, 0xa24a, 0x0000 },
+ { 0x0700, 0xa24c, 0x0000 },
+ { 0x8700, 0xa2cd, 0x8000 },
+ { 0x8700, 0xa28d, 0x7000 },
+ { 0x8700, 0xa26d, 0x6000 },
+ { 0x8700, 0xa25d, 0x5000 },
+ { 0x8700, 0xa255, 0x4000 },
+ { 0x8700, 0xa251, 0x3000 },
+ { 0x8700, 0xa24f, 0x2000 },
+ { 0x0700, 0xa24e, 0x0000 },
+ { 0x0700, 0xa250, 0x0000 },
+ { 0x8700, 0xa253, 0x2000 },
+ { 0x0700, 0xa252, 0x0000 },
+ { 0x0700, 0xa254, 0x0000 },
+ { 0x8700, 0xa259, 0x3000 },
+ { 0x8700, 0xa257, 0x2000 },
+ { 0x0700, 0xa256, 0x0000 },
+ { 0x0700, 0xa258, 0x0000 },
+ { 0x8700, 0xa25b, 0x2000 },
+ { 0x0700, 0xa25a, 0x0000 },
+ { 0x0700, 0xa25c, 0x0000 },
+ { 0x8700, 0xa265, 0x4000 },
+ { 0x8700, 0xa261, 0x3000 },
+ { 0x8700, 0xa25f, 0x2000 },
+ { 0x0700, 0xa25e, 0x0000 },
+ { 0x0700, 0xa260, 0x0000 },
+ { 0x8700, 0xa263, 0x2000 },
+ { 0x0700, 0xa262, 0x0000 },
+ { 0x0700, 0xa264, 0x0000 },
+ { 0x8700, 0xa269, 0x3000 },
+ { 0x8700, 0xa267, 0x2000 },
+ { 0x0700, 0xa266, 0x0000 },
+ { 0x0700, 0xa268, 0x0000 },
+ { 0x8700, 0xa26b, 0x2000 },
+ { 0x0700, 0xa26a, 0x0000 },
+ { 0x0700, 0xa26c, 0x0000 },
+ { 0x8700, 0xa27d, 0x5000 },
+ { 0x8700, 0xa275, 0x4000 },
+ { 0x8700, 0xa271, 0x3000 },
+ { 0x8700, 0xa26f, 0x2000 },
+ { 0x0700, 0xa26e, 0x0000 },
+ { 0x0700, 0xa270, 0x0000 },
+ { 0x8700, 0xa273, 0x2000 },
+ { 0x0700, 0xa272, 0x0000 },
+ { 0x0700, 0xa274, 0x0000 },
+ { 0x8700, 0xa279, 0x3000 },
+ { 0x8700, 0xa277, 0x2000 },
+ { 0x0700, 0xa276, 0x0000 },
+ { 0x0700, 0xa278, 0x0000 },
+ { 0x8700, 0xa27b, 0x2000 },
+ { 0x0700, 0xa27a, 0x0000 },
+ { 0x0700, 0xa27c, 0x0000 },
+ { 0x8700, 0xa285, 0x4000 },
+ { 0x8700, 0xa281, 0x3000 },
+ { 0x8700, 0xa27f, 0x2000 },
+ { 0x0700, 0xa27e, 0x0000 },
+ { 0x0700, 0xa280, 0x0000 },
+ { 0x8700, 0xa283, 0x2000 },
+ { 0x0700, 0xa282, 0x0000 },
+ { 0x0700, 0xa284, 0x0000 },
+ { 0x8700, 0xa289, 0x3000 },
+ { 0x8700, 0xa287, 0x2000 },
+ { 0x0700, 0xa286, 0x0000 },
+ { 0x0700, 0xa288, 0x0000 },
+ { 0x8700, 0xa28b, 0x2000 },
+ { 0x0700, 0xa28a, 0x0000 },
+ { 0x0700, 0xa28c, 0x0000 },
+ { 0x8700, 0xa2ad, 0x6000 },
+ { 0x8700, 0xa29d, 0x5000 },
+ { 0x8700, 0xa295, 0x4000 },
+ { 0x8700, 0xa291, 0x3000 },
+ { 0x8700, 0xa28f, 0x2000 },
+ { 0x0700, 0xa28e, 0x0000 },
+ { 0x0700, 0xa290, 0x0000 },
+ { 0x8700, 0xa293, 0x2000 },
+ { 0x0700, 0xa292, 0x0000 },
+ { 0x0700, 0xa294, 0x0000 },
+ { 0x8700, 0xa299, 0x3000 },
+ { 0x8700, 0xa297, 0x2000 },
+ { 0x0700, 0xa296, 0x0000 },
+ { 0x0700, 0xa298, 0x0000 },
+ { 0x8700, 0xa29b, 0x2000 },
+ { 0x0700, 0xa29a, 0x0000 },
+ { 0x0700, 0xa29c, 0x0000 },
+ { 0x8700, 0xa2a5, 0x4000 },
+ { 0x8700, 0xa2a1, 0x3000 },
+ { 0x8700, 0xa29f, 0x2000 },
+ { 0x0700, 0xa29e, 0x0000 },
+ { 0x0700, 0xa2a0, 0x0000 },
+ { 0x8700, 0xa2a3, 0x2000 },
+ { 0x0700, 0xa2a2, 0x0000 },
+ { 0x0700, 0xa2a4, 0x0000 },
+ { 0x8700, 0xa2a9, 0x3000 },
+ { 0x8700, 0xa2a7, 0x2000 },
+ { 0x0700, 0xa2a6, 0x0000 },
+ { 0x0700, 0xa2a8, 0x0000 },
+ { 0x8700, 0xa2ab, 0x2000 },
+ { 0x0700, 0xa2aa, 0x0000 },
+ { 0x0700, 0xa2ac, 0x0000 },
+ { 0x8700, 0xa2bd, 0x5000 },
+ { 0x8700, 0xa2b5, 0x4000 },
+ { 0x8700, 0xa2b1, 0x3000 },
+ { 0x8700, 0xa2af, 0x2000 },
+ { 0x0700, 0xa2ae, 0x0000 },
+ { 0x0700, 0xa2b0, 0x0000 },
+ { 0x8700, 0xa2b3, 0x2000 },
+ { 0x0700, 0xa2b2, 0x0000 },
+ { 0x0700, 0xa2b4, 0x0000 },
+ { 0x8700, 0xa2b9, 0x3000 },
+ { 0x8700, 0xa2b7, 0x2000 },
+ { 0x0700, 0xa2b6, 0x0000 },
+ { 0x0700, 0xa2b8, 0x0000 },
+ { 0x8700, 0xa2bb, 0x2000 },
+ { 0x0700, 0xa2ba, 0x0000 },
+ { 0x0700, 0xa2bc, 0x0000 },
+ { 0x8700, 0xa2c5, 0x4000 },
+ { 0x8700, 0xa2c1, 0x3000 },
+ { 0x8700, 0xa2bf, 0x2000 },
+ { 0x0700, 0xa2be, 0x0000 },
+ { 0x0700, 0xa2c0, 0x0000 },
+ { 0x8700, 0xa2c3, 0x2000 },
+ { 0x0700, 0xa2c2, 0x0000 },
+ { 0x0700, 0xa2c4, 0x0000 },
+ { 0x8700, 0xa2c9, 0x3000 },
+ { 0x8700, 0xa2c7, 0x2000 },
+ { 0x0700, 0xa2c6, 0x0000 },
+ { 0x0700, 0xa2c8, 0x0000 },
+ { 0x8700, 0xa2cb, 0x2000 },
+ { 0x0700, 0xa2ca, 0x0000 },
+ { 0x0700, 0xa2cc, 0x0000 },
+ { 0x8700, 0xa30d, 0x7000 },
+ { 0x8700, 0xa2ed, 0x6000 },
+ { 0x8700, 0xa2dd, 0x5000 },
+ { 0x8700, 0xa2d5, 0x4000 },
+ { 0x8700, 0xa2d1, 0x3000 },
+ { 0x8700, 0xa2cf, 0x2000 },
+ { 0x0700, 0xa2ce, 0x0000 },
+ { 0x0700, 0xa2d0, 0x0000 },
+ { 0x8700, 0xa2d3, 0x2000 },
+ { 0x0700, 0xa2d2, 0x0000 },
+ { 0x0700, 0xa2d4, 0x0000 },
+ { 0x8700, 0xa2d9, 0x3000 },
+ { 0x8700, 0xa2d7, 0x2000 },
+ { 0x0700, 0xa2d6, 0x0000 },
+ { 0x0700, 0xa2d8, 0x0000 },
+ { 0x8700, 0xa2db, 0x2000 },
+ { 0x0700, 0xa2da, 0x0000 },
+ { 0x0700, 0xa2dc, 0x0000 },
+ { 0x8700, 0xa2e5, 0x4000 },
+ { 0x8700, 0xa2e1, 0x3000 },
+ { 0x8700, 0xa2df, 0x2000 },
+ { 0x0700, 0xa2de, 0x0000 },
+ { 0x0700, 0xa2e0, 0x0000 },
+ { 0x8700, 0xa2e3, 0x2000 },
+ { 0x0700, 0xa2e2, 0x0000 },
+ { 0x0700, 0xa2e4, 0x0000 },
+ { 0x8700, 0xa2e9, 0x3000 },
+ { 0x8700, 0xa2e7, 0x2000 },
+ { 0x0700, 0xa2e6, 0x0000 },
+ { 0x0700, 0xa2e8, 0x0000 },
+ { 0x8700, 0xa2eb, 0x2000 },
+ { 0x0700, 0xa2ea, 0x0000 },
+ { 0x0700, 0xa2ec, 0x0000 },
+ { 0x8700, 0xa2fd, 0x5000 },
+ { 0x8700, 0xa2f5, 0x4000 },
+ { 0x8700, 0xa2f1, 0x3000 },
+ { 0x8700, 0xa2ef, 0x2000 },
+ { 0x0700, 0xa2ee, 0x0000 },
+ { 0x0700, 0xa2f0, 0x0000 },
+ { 0x8700, 0xa2f3, 0x2000 },
+ { 0x0700, 0xa2f2, 0x0000 },
+ { 0x0700, 0xa2f4, 0x0000 },
+ { 0x8700, 0xa2f9, 0x3000 },
+ { 0x8700, 0xa2f7, 0x2000 },
+ { 0x0700, 0xa2f6, 0x0000 },
+ { 0x0700, 0xa2f8, 0x0000 },
+ { 0x8700, 0xa2fb, 0x2000 },
+ { 0x0700, 0xa2fa, 0x0000 },
+ { 0x0700, 0xa2fc, 0x0000 },
+ { 0x8700, 0xa305, 0x4000 },
+ { 0x8700, 0xa301, 0x3000 },
+ { 0x8700, 0xa2ff, 0x2000 },
+ { 0x0700, 0xa2fe, 0x0000 },
+ { 0x0700, 0xa300, 0x0000 },
+ { 0x8700, 0xa303, 0x2000 },
+ { 0x0700, 0xa302, 0x0000 },
+ { 0x0700, 0xa304, 0x0000 },
+ { 0x8700, 0xa309, 0x3000 },
+ { 0x8700, 0xa307, 0x2000 },
+ { 0x0700, 0xa306, 0x0000 },
+ { 0x0700, 0xa308, 0x0000 },
+ { 0x8700, 0xa30b, 0x2000 },
+ { 0x0700, 0xa30a, 0x0000 },
+ { 0x0700, 0xa30c, 0x0000 },
+ { 0x8700, 0xa32d, 0x6000 },
+ { 0x8700, 0xa31d, 0x5000 },
+ { 0x8700, 0xa315, 0x4000 },
+ { 0x8700, 0xa311, 0x3000 },
+ { 0x8700, 0xa30f, 0x2000 },
+ { 0x0700, 0xa30e, 0x0000 },
+ { 0x0700, 0xa310, 0x0000 },
+ { 0x8700, 0xa313, 0x2000 },
+ { 0x0700, 0xa312, 0x0000 },
+ { 0x0700, 0xa314, 0x0000 },
+ { 0x8700, 0xa319, 0x3000 },
+ { 0x8700, 0xa317, 0x2000 },
+ { 0x0700, 0xa316, 0x0000 },
+ { 0x0700, 0xa318, 0x0000 },
+ { 0x8700, 0xa31b, 0x2000 },
+ { 0x0700, 0xa31a, 0x0000 },
+ { 0x0700, 0xa31c, 0x0000 },
+ { 0x8700, 0xa325, 0x4000 },
+ { 0x8700, 0xa321, 0x3000 },
+ { 0x8700, 0xa31f, 0x2000 },
+ { 0x0700, 0xa31e, 0x0000 },
+ { 0x0700, 0xa320, 0x0000 },
+ { 0x8700, 0xa323, 0x2000 },
+ { 0x0700, 0xa322, 0x0000 },
+ { 0x0700, 0xa324, 0x0000 },
+ { 0x8700, 0xa329, 0x3000 },
+ { 0x8700, 0xa327, 0x2000 },
+ { 0x0700, 0xa326, 0x0000 },
+ { 0x0700, 0xa328, 0x0000 },
+ { 0x8700, 0xa32b, 0x2000 },
+ { 0x0700, 0xa32a, 0x0000 },
+ { 0x0700, 0xa32c, 0x0000 },
+ { 0x8700, 0xa33d, 0x5000 },
+ { 0x8700, 0xa335, 0x4000 },
+ { 0x8700, 0xa331, 0x3000 },
+ { 0x8700, 0xa32f, 0x2000 },
+ { 0x0700, 0xa32e, 0x0000 },
+ { 0x0700, 0xa330, 0x0000 },
+ { 0x8700, 0xa333, 0x2000 },
+ { 0x0700, 0xa332, 0x0000 },
+ { 0x0700, 0xa334, 0x0000 },
+ { 0x8700, 0xa339, 0x3000 },
+ { 0x8700, 0xa337, 0x2000 },
+ { 0x0700, 0xa336, 0x0000 },
+ { 0x0700, 0xa338, 0x0000 },
+ { 0x8700, 0xa33b, 0x2000 },
+ { 0x0700, 0xa33a, 0x0000 },
+ { 0x0700, 0xa33c, 0x0000 },
+ { 0x8700, 0xa345, 0x4000 },
+ { 0x8700, 0xa341, 0x3000 },
+ { 0x8700, 0xa33f, 0x2000 },
+ { 0x0700, 0xa33e, 0x0000 },
+ { 0x0700, 0xa340, 0x0000 },
+ { 0x8700, 0xa343, 0x2000 },
+ { 0x0700, 0xa342, 0x0000 },
+ { 0x0700, 0xa344, 0x0000 },
+ { 0x8700, 0xa349, 0x3000 },
+ { 0x8700, 0xa347, 0x2000 },
+ { 0x0700, 0xa346, 0x0000 },
+ { 0x0700, 0xa348, 0x0000 },
+ { 0x8700, 0xa34b, 0x2000 },
+ { 0x0700, 0xa34a, 0x0000 },
+ { 0x0700, 0xa34c, 0x0000 },
+ { 0x8700, 0xfc4d, 0xb000 },
+ { 0x8700, 0xf97f, 0xa000 },
+ { 0x8700, 0xa44d, 0x9000 },
+ { 0x8700, 0xa3cd, 0x8000 },
+ { 0x8700, 0xa38d, 0x7000 },
+ { 0x8700, 0xa36d, 0x6000 },
+ { 0x8700, 0xa35d, 0x5000 },
+ { 0x8700, 0xa355, 0x4000 },
+ { 0x8700, 0xa351, 0x3000 },
+ { 0x8700, 0xa34f, 0x2000 },
+ { 0x0700, 0xa34e, 0x0000 },
+ { 0x0700, 0xa350, 0x0000 },
+ { 0x8700, 0xa353, 0x2000 },
+ { 0x0700, 0xa352, 0x0000 },
+ { 0x0700, 0xa354, 0x0000 },
+ { 0x8700, 0xa359, 0x3000 },
+ { 0x8700, 0xa357, 0x2000 },
+ { 0x0700, 0xa356, 0x0000 },
+ { 0x0700, 0xa358, 0x0000 },
+ { 0x8700, 0xa35b, 0x2000 },
+ { 0x0700, 0xa35a, 0x0000 },
+ { 0x0700, 0xa35c, 0x0000 },
+ { 0x8700, 0xa365, 0x4000 },
+ { 0x8700, 0xa361, 0x3000 },
+ { 0x8700, 0xa35f, 0x2000 },
+ { 0x0700, 0xa35e, 0x0000 },
+ { 0x0700, 0xa360, 0x0000 },
+ { 0x8700, 0xa363, 0x2000 },
+ { 0x0700, 0xa362, 0x0000 },
+ { 0x0700, 0xa364, 0x0000 },
+ { 0x8700, 0xa369, 0x3000 },
+ { 0x8700, 0xa367, 0x2000 },
+ { 0x0700, 0xa366, 0x0000 },
+ { 0x0700, 0xa368, 0x0000 },
+ { 0x8700, 0xa36b, 0x2000 },
+ { 0x0700, 0xa36a, 0x0000 },
+ { 0x0700, 0xa36c, 0x0000 },
+ { 0x8700, 0xa37d, 0x5000 },
+ { 0x8700, 0xa375, 0x4000 },
+ { 0x8700, 0xa371, 0x3000 },
+ { 0x8700, 0xa36f, 0x2000 },
+ { 0x0700, 0xa36e, 0x0000 },
+ { 0x0700, 0xa370, 0x0000 },
+ { 0x8700, 0xa373, 0x2000 },
+ { 0x0700, 0xa372, 0x0000 },
+ { 0x0700, 0xa374, 0x0000 },
+ { 0x8700, 0xa379, 0x3000 },
+ { 0x8700, 0xa377, 0x2000 },
+ { 0x0700, 0xa376, 0x0000 },
+ { 0x0700, 0xa378, 0x0000 },
+ { 0x8700, 0xa37b, 0x2000 },
+ { 0x0700, 0xa37a, 0x0000 },
+ { 0x0700, 0xa37c, 0x0000 },
+ { 0x8700, 0xa385, 0x4000 },
+ { 0x8700, 0xa381, 0x3000 },
+ { 0x8700, 0xa37f, 0x2000 },
+ { 0x0700, 0xa37e, 0x0000 },
+ { 0x0700, 0xa380, 0x0000 },
+ { 0x8700, 0xa383, 0x2000 },
+ { 0x0700, 0xa382, 0x0000 },
+ { 0x0700, 0xa384, 0x0000 },
+ { 0x8700, 0xa389, 0x3000 },
+ { 0x8700, 0xa387, 0x2000 },
+ { 0x0700, 0xa386, 0x0000 },
+ { 0x0700, 0xa388, 0x0000 },
+ { 0x8700, 0xa38b, 0x2000 },
+ { 0x0700, 0xa38a, 0x0000 },
+ { 0x0700, 0xa38c, 0x0000 },
+ { 0x8700, 0xa3ad, 0x6000 },
+ { 0x8700, 0xa39d, 0x5000 },
+ { 0x8700, 0xa395, 0x4000 },
+ { 0x8700, 0xa391, 0x3000 },
+ { 0x8700, 0xa38f, 0x2000 },
+ { 0x0700, 0xa38e, 0x0000 },
+ { 0x0700, 0xa390, 0x0000 },
+ { 0x8700, 0xa393, 0x2000 },
+ { 0x0700, 0xa392, 0x0000 },
+ { 0x0700, 0xa394, 0x0000 },
+ { 0x8700, 0xa399, 0x3000 },
+ { 0x8700, 0xa397, 0x2000 },
+ { 0x0700, 0xa396, 0x0000 },
+ { 0x0700, 0xa398, 0x0000 },
+ { 0x8700, 0xa39b, 0x2000 },
+ { 0x0700, 0xa39a, 0x0000 },
+ { 0x0700, 0xa39c, 0x0000 },
+ { 0x8700, 0xa3a5, 0x4000 },
+ { 0x8700, 0xa3a1, 0x3000 },
+ { 0x8700, 0xa39f, 0x2000 },
+ { 0x0700, 0xa39e, 0x0000 },
+ { 0x0700, 0xa3a0, 0x0000 },
+ { 0x8700, 0xa3a3, 0x2000 },
+ { 0x0700, 0xa3a2, 0x0000 },
+ { 0x0700, 0xa3a4, 0x0000 },
+ { 0x8700, 0xa3a9, 0x3000 },
+ { 0x8700, 0xa3a7, 0x2000 },
+ { 0x0700, 0xa3a6, 0x0000 },
+ { 0x0700, 0xa3a8, 0x0000 },
+ { 0x8700, 0xa3ab, 0x2000 },
+ { 0x0700, 0xa3aa, 0x0000 },
+ { 0x0700, 0xa3ac, 0x0000 },
+ { 0x8700, 0xa3bd, 0x5000 },
+ { 0x8700, 0xa3b5, 0x4000 },
+ { 0x8700, 0xa3b1, 0x3000 },
+ { 0x8700, 0xa3af, 0x2000 },
+ { 0x0700, 0xa3ae, 0x0000 },
+ { 0x0700, 0xa3b0, 0x0000 },
+ { 0x8700, 0xa3b3, 0x2000 },
+ { 0x0700, 0xa3b2, 0x0000 },
+ { 0x0700, 0xa3b4, 0x0000 },
+ { 0x8700, 0xa3b9, 0x3000 },
+ { 0x8700, 0xa3b7, 0x2000 },
+ { 0x0700, 0xa3b6, 0x0000 },
+ { 0x0700, 0xa3b8, 0x0000 },
+ { 0x8700, 0xa3bb, 0x2000 },
+ { 0x0700, 0xa3ba, 0x0000 },
+ { 0x0700, 0xa3bc, 0x0000 },
+ { 0x8700, 0xa3c5, 0x4000 },
+ { 0x8700, 0xa3c1, 0x3000 },
+ { 0x8700, 0xa3bf, 0x2000 },
+ { 0x0700, 0xa3be, 0x0000 },
+ { 0x0700, 0xa3c0, 0x0000 },
+ { 0x8700, 0xa3c3, 0x2000 },
+ { 0x0700, 0xa3c2, 0x0000 },
+ { 0x0700, 0xa3c4, 0x0000 },
+ { 0x8700, 0xa3c9, 0x3000 },
+ { 0x8700, 0xa3c7, 0x2000 },
+ { 0x0700, 0xa3c6, 0x0000 },
+ { 0x0700, 0xa3c8, 0x0000 },
+ { 0x8700, 0xa3cb, 0x2000 },
+ { 0x0700, 0xa3ca, 0x0000 },
+ { 0x0700, 0xa3cc, 0x0000 },
+ { 0x8700, 0xa40d, 0x7000 },
+ { 0x8700, 0xa3ed, 0x6000 },
+ { 0x8700, 0xa3dd, 0x5000 },
+ { 0x8700, 0xa3d5, 0x4000 },
+ { 0x8700, 0xa3d1, 0x3000 },
+ { 0x8700, 0xa3cf, 0x2000 },
+ { 0x0700, 0xa3ce, 0x0000 },
+ { 0x0700, 0xa3d0, 0x0000 },
+ { 0x8700, 0xa3d3, 0x2000 },
+ { 0x0700, 0xa3d2, 0x0000 },
+ { 0x0700, 0xa3d4, 0x0000 },
+ { 0x8700, 0xa3d9, 0x3000 },
+ { 0x8700, 0xa3d7, 0x2000 },
+ { 0x0700, 0xa3d6, 0x0000 },
+ { 0x0700, 0xa3d8, 0x0000 },
+ { 0x8700, 0xa3db, 0x2000 },
+ { 0x0700, 0xa3da, 0x0000 },
+ { 0x0700, 0xa3dc, 0x0000 },
+ { 0x8700, 0xa3e5, 0x4000 },
+ { 0x8700, 0xa3e1, 0x3000 },
+ { 0x8700, 0xa3df, 0x2000 },
+ { 0x0700, 0xa3de, 0x0000 },
+ { 0x0700, 0xa3e0, 0x0000 },
+ { 0x8700, 0xa3e3, 0x2000 },
+ { 0x0700, 0xa3e2, 0x0000 },
+ { 0x0700, 0xa3e4, 0x0000 },
+ { 0x8700, 0xa3e9, 0x3000 },
+ { 0x8700, 0xa3e7, 0x2000 },
+ { 0x0700, 0xa3e6, 0x0000 },
+ { 0x0700, 0xa3e8, 0x0000 },
+ { 0x8700, 0xa3eb, 0x2000 },
+ { 0x0700, 0xa3ea, 0x0000 },
+ { 0x0700, 0xa3ec, 0x0000 },
+ { 0x8700, 0xa3fd, 0x5000 },
+ { 0x8700, 0xa3f5, 0x4000 },
+ { 0x8700, 0xa3f1, 0x3000 },
+ { 0x8700, 0xa3ef, 0x2000 },
+ { 0x0700, 0xa3ee, 0x0000 },
+ { 0x0700, 0xa3f0, 0x0000 },
+ { 0x8700, 0xa3f3, 0x2000 },
+ { 0x0700, 0xa3f2, 0x0000 },
+ { 0x0700, 0xa3f4, 0x0000 },
+ { 0x8700, 0xa3f9, 0x3000 },
+ { 0x8700, 0xa3f7, 0x2000 },
+ { 0x0700, 0xa3f6, 0x0000 },
+ { 0x0700, 0xa3f8, 0x0000 },
+ { 0x8700, 0xa3fb, 0x2000 },
+ { 0x0700, 0xa3fa, 0x0000 },
+ { 0x0700, 0xa3fc, 0x0000 },
+ { 0x8700, 0xa405, 0x4000 },
+ { 0x8700, 0xa401, 0x3000 },
+ { 0x8700, 0xa3ff, 0x2000 },
+ { 0x0700, 0xa3fe, 0x0000 },
+ { 0x0700, 0xa400, 0x0000 },
+ { 0x8700, 0xa403, 0x2000 },
+ { 0x0700, 0xa402, 0x0000 },
+ { 0x0700, 0xa404, 0x0000 },
+ { 0x8700, 0xa409, 0x3000 },
+ { 0x8700, 0xa407, 0x2000 },
+ { 0x0700, 0xa406, 0x0000 },
+ { 0x0700, 0xa408, 0x0000 },
+ { 0x8700, 0xa40b, 0x2000 },
+ { 0x0700, 0xa40a, 0x0000 },
+ { 0x0700, 0xa40c, 0x0000 },
+ { 0x8700, 0xa42d, 0x6000 },
+ { 0x8700, 0xa41d, 0x5000 },
+ { 0x8700, 0xa415, 0x4000 },
+ { 0x8700, 0xa411, 0x3000 },
+ { 0x8700, 0xa40f, 0x2000 },
+ { 0x0700, 0xa40e, 0x0000 },
+ { 0x0700, 0xa410, 0x0000 },
+ { 0x8700, 0xa413, 0x2000 },
+ { 0x0700, 0xa412, 0x0000 },
+ { 0x0700, 0xa414, 0x0000 },
+ { 0x8700, 0xa419, 0x3000 },
+ { 0x8700, 0xa417, 0x2000 },
+ { 0x0700, 0xa416, 0x0000 },
+ { 0x0700, 0xa418, 0x0000 },
+ { 0x8700, 0xa41b, 0x2000 },
+ { 0x0700, 0xa41a, 0x0000 },
+ { 0x0700, 0xa41c, 0x0000 },
+ { 0x8700, 0xa425, 0x4000 },
+ { 0x8700, 0xa421, 0x3000 },
+ { 0x8700, 0xa41f, 0x2000 },
+ { 0x0700, 0xa41e, 0x0000 },
+ { 0x0700, 0xa420, 0x0000 },
+ { 0x8700, 0xa423, 0x2000 },
+ { 0x0700, 0xa422, 0x0000 },
+ { 0x0700, 0xa424, 0x0000 },
+ { 0x8700, 0xa429, 0x3000 },
+ { 0x8700, 0xa427, 0x2000 },
+ { 0x0700, 0xa426, 0x0000 },
+ { 0x0700, 0xa428, 0x0000 },
+ { 0x8700, 0xa42b, 0x2000 },
+ { 0x0700, 0xa42a, 0x0000 },
+ { 0x0700, 0xa42c, 0x0000 },
+ { 0x8700, 0xa43d, 0x5000 },
+ { 0x8700, 0xa435, 0x4000 },
+ { 0x8700, 0xa431, 0x3000 },
+ { 0x8700, 0xa42f, 0x2000 },
+ { 0x0700, 0xa42e, 0x0000 },
+ { 0x0700, 0xa430, 0x0000 },
+ { 0x8700, 0xa433, 0x2000 },
+ { 0x0700, 0xa432, 0x0000 },
+ { 0x0700, 0xa434, 0x0000 },
+ { 0x8700, 0xa439, 0x3000 },
+ { 0x8700, 0xa437, 0x2000 },
+ { 0x0700, 0xa436, 0x0000 },
+ { 0x0700, 0xa438, 0x0000 },
+ { 0x8700, 0xa43b, 0x2000 },
+ { 0x0700, 0xa43a, 0x0000 },
+ { 0x0700, 0xa43c, 0x0000 },
+ { 0x8700, 0xa445, 0x4000 },
+ { 0x8700, 0xa441, 0x3000 },
+ { 0x8700, 0xa43f, 0x2000 },
+ { 0x0700, 0xa43e, 0x0000 },
+ { 0x0700, 0xa440, 0x0000 },
+ { 0x8700, 0xa443, 0x2000 },
+ { 0x0700, 0xa442, 0x0000 },
+ { 0x0700, 0xa444, 0x0000 },
+ { 0x8700, 0xa449, 0x3000 },
+ { 0x8700, 0xa447, 0x2000 },
+ { 0x0700, 0xa446, 0x0000 },
+ { 0x0700, 0xa448, 0x0000 },
+ { 0x8700, 0xa44b, 0x2000 },
+ { 0x0700, 0xa44a, 0x0000 },
+ { 0x0700, 0xa44c, 0x0000 },
+ { 0x8300, 0xf8ff, 0x8000 },
+ { 0x9a00, 0xa490, 0x7000 },
+ { 0x8700, 0xa46d, 0x6000 },
+ { 0x8700, 0xa45d, 0x5000 },
+ { 0x8700, 0xa455, 0x4000 },
+ { 0x8700, 0xa451, 0x3000 },
+ { 0x8700, 0xa44f, 0x2000 },
+ { 0x0700, 0xa44e, 0x0000 },
+ { 0x0700, 0xa450, 0x0000 },
+ { 0x8700, 0xa453, 0x2000 },
+ { 0x0700, 0xa452, 0x0000 },
+ { 0x0700, 0xa454, 0x0000 },
+ { 0x8700, 0xa459, 0x3000 },
+ { 0x8700, 0xa457, 0x2000 },
+ { 0x0700, 0xa456, 0x0000 },
+ { 0x0700, 0xa458, 0x0000 },
+ { 0x8700, 0xa45b, 0x2000 },
+ { 0x0700, 0xa45a, 0x0000 },
+ { 0x0700, 0xa45c, 0x0000 },
+ { 0x8700, 0xa465, 0x4000 },
+ { 0x8700, 0xa461, 0x3000 },
+ { 0x8700, 0xa45f, 0x2000 },
+ { 0x0700, 0xa45e, 0x0000 },
+ { 0x0700, 0xa460, 0x0000 },
+ { 0x8700, 0xa463, 0x2000 },
+ { 0x0700, 0xa462, 0x0000 },
+ { 0x0700, 0xa464, 0x0000 },
+ { 0x8700, 0xa469, 0x3000 },
+ { 0x8700, 0xa467, 0x2000 },
+ { 0x0700, 0xa466, 0x0000 },
+ { 0x0700, 0xa468, 0x0000 },
+ { 0x8700, 0xa46b, 0x2000 },
+ { 0x0700, 0xa46a, 0x0000 },
+ { 0x0700, 0xa46c, 0x0000 },
+ { 0x8700, 0xa47d, 0x5000 },
+ { 0x8700, 0xa475, 0x4000 },
+ { 0x8700, 0xa471, 0x3000 },
+ { 0x8700, 0xa46f, 0x2000 },
+ { 0x0700, 0xa46e, 0x0000 },
+ { 0x0700, 0xa470, 0x0000 },
+ { 0x8700, 0xa473, 0x2000 },
+ { 0x0700, 0xa472, 0x0000 },
+ { 0x0700, 0xa474, 0x0000 },
+ { 0x8700, 0xa479, 0x3000 },
+ { 0x8700, 0xa477, 0x2000 },
+ { 0x0700, 0xa476, 0x0000 },
+ { 0x0700, 0xa478, 0x0000 },
+ { 0x8700, 0xa47b, 0x2000 },
+ { 0x0700, 0xa47a, 0x0000 },
+ { 0x0700, 0xa47c, 0x0000 },
+ { 0x8700, 0xa485, 0x4000 },
+ { 0x8700, 0xa481, 0x3000 },
+ { 0x8700, 0xa47f, 0x2000 },
+ { 0x0700, 0xa47e, 0x0000 },
+ { 0x0700, 0xa480, 0x0000 },
+ { 0x8700, 0xa483, 0x2000 },
+ { 0x0700, 0xa482, 0x0000 },
+ { 0x0700, 0xa484, 0x0000 },
+ { 0x8700, 0xa489, 0x3000 },
+ { 0x8700, 0xa487, 0x2000 },
+ { 0x0700, 0xa486, 0x0000 },
+ { 0x0700, 0xa488, 0x0000 },
+ { 0x8700, 0xa48b, 0x2000 },
+ { 0x0700, 0xa48a, 0x0000 },
+ { 0x0700, 0xa48c, 0x0000 },
+ { 0x9a00, 0xa4b0, 0x6000 },
+ { 0x9a00, 0xa4a0, 0x5000 },
+ { 0x9a00, 0xa498, 0x4000 },
+ { 0x9a00, 0xa494, 0x3000 },
+ { 0x9a00, 0xa492, 0x2000 },
+ { 0x1a00, 0xa491, 0x0000 },
+ { 0x1a00, 0xa493, 0x0000 },
+ { 0x9a00, 0xa496, 0x2000 },
+ { 0x1a00, 0xa495, 0x0000 },
+ { 0x1a00, 0xa497, 0x0000 },
+ { 0x9a00, 0xa49c, 0x3000 },
+ { 0x9a00, 0xa49a, 0x2000 },
+ { 0x1a00, 0xa499, 0x0000 },
+ { 0x1a00, 0xa49b, 0x0000 },
+ { 0x9a00, 0xa49e, 0x2000 },
+ { 0x1a00, 0xa49d, 0x0000 },
+ { 0x1a00, 0xa49f, 0x0000 },
+ { 0x9a00, 0xa4a8, 0x4000 },
+ { 0x9a00, 0xa4a4, 0x3000 },
+ { 0x9a00, 0xa4a2, 0x2000 },
+ { 0x1a00, 0xa4a1, 0x0000 },
+ { 0x1a00, 0xa4a3, 0x0000 },
+ { 0x9a00, 0xa4a6, 0x2000 },
+ { 0x1a00, 0xa4a5, 0x0000 },
+ { 0x1a00, 0xa4a7, 0x0000 },
+ { 0x9a00, 0xa4ac, 0x3000 },
+ { 0x9a00, 0xa4aa, 0x2000 },
+ { 0x1a00, 0xa4a9, 0x0000 },
+ { 0x1a00, 0xa4ab, 0x0000 },
+ { 0x9a00, 0xa4ae, 0x2000 },
+ { 0x1a00, 0xa4ad, 0x0000 },
+ { 0x1a00, 0xa4af, 0x0000 },
+ { 0x9a00, 0xa4c0, 0x5000 },
+ { 0x9a00, 0xa4b8, 0x4000 },
+ { 0x9a00, 0xa4b4, 0x3000 },
+ { 0x9a00, 0xa4b2, 0x2000 },
+ { 0x1a00, 0xa4b1, 0x0000 },
+ { 0x1a00, 0xa4b3, 0x0000 },
+ { 0x9a00, 0xa4b6, 0x2000 },
+ { 0x1a00, 0xa4b5, 0x0000 },
+ { 0x1a00, 0xa4b7, 0x0000 },
+ { 0x9a00, 0xa4bc, 0x3000 },
+ { 0x9a00, 0xa4ba, 0x2000 },
+ { 0x1a00, 0xa4b9, 0x0000 },
+ { 0x1a00, 0xa4bb, 0x0000 },
+ { 0x9a00, 0xa4be, 0x2000 },
+ { 0x1a00, 0xa4bd, 0x0000 },
+ { 0x1a00, 0xa4bf, 0x0000 },
+ { 0x8700, 0xd7a3, 0x4000 },
+ { 0x9a00, 0xa4c4, 0x3000 },
+ { 0x9a00, 0xa4c2, 0x2000 },
+ { 0x1a00, 0xa4c1, 0x0000 },
+ { 0x1a00, 0xa4c3, 0x0000 },
+ { 0x9a00, 0xa4c6, 0x2000 },
+ { 0x1a00, 0xa4c5, 0x0000 },
+ { 0x0700, 0xac00, 0x0000 },
+ { 0x8400, 0xdbff, 0x3000 },
+ { 0x8400, 0xdb7f, 0x2000 },
+ { 0x0400, 0xd800, 0x0000 },
+ { 0x0400, 0xdb80, 0x0000 },
+ { 0x8400, 0xdfff, 0x2000 },
+ { 0x0400, 0xdc00, 0x0000 },
+ { 0x0300, 0xe000, 0x0000 },
+ { 0x8700, 0xf93f, 0x7000 },
+ { 0x8700, 0xf91f, 0x6000 },
+ { 0x8700, 0xf90f, 0x5000 },
+ { 0x8700, 0xf907, 0x4000 },
+ { 0x8700, 0xf903, 0x3000 },
+ { 0x8700, 0xf901, 0x2000 },
+ { 0x0700, 0xf900, 0x0000 },
+ { 0x0700, 0xf902, 0x0000 },
+ { 0x8700, 0xf905, 0x2000 },
+ { 0x0700, 0xf904, 0x0000 },
+ { 0x0700, 0xf906, 0x0000 },
+ { 0x8700, 0xf90b, 0x3000 },
+ { 0x8700, 0xf909, 0x2000 },
+ { 0x0700, 0xf908, 0x0000 },
+ { 0x0700, 0xf90a, 0x0000 },
+ { 0x8700, 0xf90d, 0x2000 },
+ { 0x0700, 0xf90c, 0x0000 },
+ { 0x0700, 0xf90e, 0x0000 },
+ { 0x8700, 0xf917, 0x4000 },
+ { 0x8700, 0xf913, 0x3000 },
+ { 0x8700, 0xf911, 0x2000 },
+ { 0x0700, 0xf910, 0x0000 },
+ { 0x0700, 0xf912, 0x0000 },
+ { 0x8700, 0xf915, 0x2000 },
+ { 0x0700, 0xf914, 0x0000 },
+ { 0x0700, 0xf916, 0x0000 },
+ { 0x8700, 0xf91b, 0x3000 },
+ { 0x8700, 0xf919, 0x2000 },
+ { 0x0700, 0xf918, 0x0000 },
+ { 0x0700, 0xf91a, 0x0000 },
+ { 0x8700, 0xf91d, 0x2000 },
+ { 0x0700, 0xf91c, 0x0000 },
+ { 0x0700, 0xf91e, 0x0000 },
+ { 0x8700, 0xf92f, 0x5000 },
+ { 0x8700, 0xf927, 0x4000 },
+ { 0x8700, 0xf923, 0x3000 },
+ { 0x8700, 0xf921, 0x2000 },
+ { 0x0700, 0xf920, 0x0000 },
+ { 0x0700, 0xf922, 0x0000 },
+ { 0x8700, 0xf925, 0x2000 },
+ { 0x0700, 0xf924, 0x0000 },
+ { 0x0700, 0xf926, 0x0000 },
+ { 0x8700, 0xf92b, 0x3000 },
+ { 0x8700, 0xf929, 0x2000 },
+ { 0x0700, 0xf928, 0x0000 },
+ { 0x0700, 0xf92a, 0x0000 },
+ { 0x8700, 0xf92d, 0x2000 },
+ { 0x0700, 0xf92c, 0x0000 },
+ { 0x0700, 0xf92e, 0x0000 },
+ { 0x8700, 0xf937, 0x4000 },
+ { 0x8700, 0xf933, 0x3000 },
+ { 0x8700, 0xf931, 0x2000 },
+ { 0x0700, 0xf930, 0x0000 },
+ { 0x0700, 0xf932, 0x0000 },
+ { 0x8700, 0xf935, 0x2000 },
+ { 0x0700, 0xf934, 0x0000 },
+ { 0x0700, 0xf936, 0x0000 },
+ { 0x8700, 0xf93b, 0x3000 },
+ { 0x8700, 0xf939, 0x2000 },
+ { 0x0700, 0xf938, 0x0000 },
+ { 0x0700, 0xf93a, 0x0000 },
+ { 0x8700, 0xf93d, 0x2000 },
+ { 0x0700, 0xf93c, 0x0000 },
+ { 0x0700, 0xf93e, 0x0000 },
+ { 0x8700, 0xf95f, 0x6000 },
+ { 0x8700, 0xf94f, 0x5000 },
+ { 0x8700, 0xf947, 0x4000 },
+ { 0x8700, 0xf943, 0x3000 },
+ { 0x8700, 0xf941, 0x2000 },
+ { 0x0700, 0xf940, 0x0000 },
+ { 0x0700, 0xf942, 0x0000 },
+ { 0x8700, 0xf945, 0x2000 },
+ { 0x0700, 0xf944, 0x0000 },
+ { 0x0700, 0xf946, 0x0000 },
+ { 0x8700, 0xf94b, 0x3000 },
+ { 0x8700, 0xf949, 0x2000 },
+ { 0x0700, 0xf948, 0x0000 },
+ { 0x0700, 0xf94a, 0x0000 },
+ { 0x8700, 0xf94d, 0x2000 },
+ { 0x0700, 0xf94c, 0x0000 },
+ { 0x0700, 0xf94e, 0x0000 },
+ { 0x8700, 0xf957, 0x4000 },
+ { 0x8700, 0xf953, 0x3000 },
+ { 0x8700, 0xf951, 0x2000 },
+ { 0x0700, 0xf950, 0x0000 },
+ { 0x0700, 0xf952, 0x0000 },
+ { 0x8700, 0xf955, 0x2000 },
+ { 0x0700, 0xf954, 0x0000 },
+ { 0x0700, 0xf956, 0x0000 },
+ { 0x8700, 0xf95b, 0x3000 },
+ { 0x8700, 0xf959, 0x2000 },
+ { 0x0700, 0xf958, 0x0000 },
+ { 0x0700, 0xf95a, 0x0000 },
+ { 0x8700, 0xf95d, 0x2000 },
+ { 0x0700, 0xf95c, 0x0000 },
+ { 0x0700, 0xf95e, 0x0000 },
+ { 0x8700, 0xf96f, 0x5000 },
+ { 0x8700, 0xf967, 0x4000 },
+ { 0x8700, 0xf963, 0x3000 },
+ { 0x8700, 0xf961, 0x2000 },
+ { 0x0700, 0xf960, 0x0000 },
+ { 0x0700, 0xf962, 0x0000 },
+ { 0x8700, 0xf965, 0x2000 },
+ { 0x0700, 0xf964, 0x0000 },
+ { 0x0700, 0xf966, 0x0000 },
+ { 0x8700, 0xf96b, 0x3000 },
+ { 0x8700, 0xf969, 0x2000 },
+ { 0x0700, 0xf968, 0x0000 },
+ { 0x0700, 0xf96a, 0x0000 },
+ { 0x8700, 0xf96d, 0x2000 },
+ { 0x0700, 0xf96c, 0x0000 },
+ { 0x0700, 0xf96e, 0x0000 },
+ { 0x8700, 0xf977, 0x4000 },
+ { 0x8700, 0xf973, 0x3000 },
+ { 0x8700, 0xf971, 0x2000 },
+ { 0x0700, 0xf970, 0x0000 },
+ { 0x0700, 0xf972, 0x0000 },
+ { 0x8700, 0xf975, 0x2000 },
+ { 0x0700, 0xf974, 0x0000 },
+ { 0x0700, 0xf976, 0x0000 },
+ { 0x8700, 0xf97b, 0x3000 },
+ { 0x8700, 0xf979, 0x2000 },
+ { 0x0700, 0xf978, 0x0000 },
+ { 0x0700, 0xf97a, 0x0000 },
+ { 0x8700, 0xf97d, 0x2000 },
+ { 0x0700, 0xf97c, 0x0000 },
+ { 0x0700, 0xf97e, 0x0000 },
+ { 0x8700, 0xfb27, 0x9000 },
+ { 0x8700, 0xf9ff, 0x8000 },
+ { 0x8700, 0xf9bf, 0x7000 },
+ { 0x8700, 0xf99f, 0x6000 },
+ { 0x8700, 0xf98f, 0x5000 },
+ { 0x8700, 0xf987, 0x4000 },
+ { 0x8700, 0xf983, 0x3000 },
+ { 0x8700, 0xf981, 0x2000 },
+ { 0x0700, 0xf980, 0x0000 },
+ { 0x0700, 0xf982, 0x0000 },
+ { 0x8700, 0xf985, 0x2000 },
+ { 0x0700, 0xf984, 0x0000 },
+ { 0x0700, 0xf986, 0x0000 },
+ { 0x8700, 0xf98b, 0x3000 },
+ { 0x8700, 0xf989, 0x2000 },
+ { 0x0700, 0xf988, 0x0000 },
+ { 0x0700, 0xf98a, 0x0000 },
+ { 0x8700, 0xf98d, 0x2000 },
+ { 0x0700, 0xf98c, 0x0000 },
+ { 0x0700, 0xf98e, 0x0000 },
+ { 0x8700, 0xf997, 0x4000 },
+ { 0x8700, 0xf993, 0x3000 },
+ { 0x8700, 0xf991, 0x2000 },
+ { 0x0700, 0xf990, 0x0000 },
+ { 0x0700, 0xf992, 0x0000 },
+ { 0x8700, 0xf995, 0x2000 },
+ { 0x0700, 0xf994, 0x0000 },
+ { 0x0700, 0xf996, 0x0000 },
+ { 0x8700, 0xf99b, 0x3000 },
+ { 0x8700, 0xf999, 0x2000 },
+ { 0x0700, 0xf998, 0x0000 },
+ { 0x0700, 0xf99a, 0x0000 },
+ { 0x8700, 0xf99d, 0x2000 },
+ { 0x0700, 0xf99c, 0x0000 },
+ { 0x0700, 0xf99e, 0x0000 },
+ { 0x8700, 0xf9af, 0x5000 },
+ { 0x8700, 0xf9a7, 0x4000 },
+ { 0x8700, 0xf9a3, 0x3000 },
+ { 0x8700, 0xf9a1, 0x2000 },
+ { 0x0700, 0xf9a0, 0x0000 },
+ { 0x0700, 0xf9a2, 0x0000 },
+ { 0x8700, 0xf9a5, 0x2000 },
+ { 0x0700, 0xf9a4, 0x0000 },
+ { 0x0700, 0xf9a6, 0x0000 },
+ { 0x8700, 0xf9ab, 0x3000 },
+ { 0x8700, 0xf9a9, 0x2000 },
+ { 0x0700, 0xf9a8, 0x0000 },
+ { 0x0700, 0xf9aa, 0x0000 },
+ { 0x8700, 0xf9ad, 0x2000 },
+ { 0x0700, 0xf9ac, 0x0000 },
+ { 0x0700, 0xf9ae, 0x0000 },
+ { 0x8700, 0xf9b7, 0x4000 },
+ { 0x8700, 0xf9b3, 0x3000 },
+ { 0x8700, 0xf9b1, 0x2000 },
+ { 0x0700, 0xf9b0, 0x0000 },
+ { 0x0700, 0xf9b2, 0x0000 },
+ { 0x8700, 0xf9b5, 0x2000 },
+ { 0x0700, 0xf9b4, 0x0000 },
+ { 0x0700, 0xf9b6, 0x0000 },
+ { 0x8700, 0xf9bb, 0x3000 },
+ { 0x8700, 0xf9b9, 0x2000 },
+ { 0x0700, 0xf9b8, 0x0000 },
+ { 0x0700, 0xf9ba, 0x0000 },
+ { 0x8700, 0xf9bd, 0x2000 },
+ { 0x0700, 0xf9bc, 0x0000 },
+ { 0x0700, 0xf9be, 0x0000 },
+ { 0x8700, 0xf9df, 0x6000 },
+ { 0x8700, 0xf9cf, 0x5000 },
+ { 0x8700, 0xf9c7, 0x4000 },
+ { 0x8700, 0xf9c3, 0x3000 },
+ { 0x8700, 0xf9c1, 0x2000 },
+ { 0x0700, 0xf9c0, 0x0000 },
+ { 0x0700, 0xf9c2, 0x0000 },
+ { 0x8700, 0xf9c5, 0x2000 },
+ { 0x0700, 0xf9c4, 0x0000 },
+ { 0x0700, 0xf9c6, 0x0000 },
+ { 0x8700, 0xf9cb, 0x3000 },
+ { 0x8700, 0xf9c9, 0x2000 },
+ { 0x0700, 0xf9c8, 0x0000 },
+ { 0x0700, 0xf9ca, 0x0000 },
+ { 0x8700, 0xf9cd, 0x2000 },
+ { 0x0700, 0xf9cc, 0x0000 },
+ { 0x0700, 0xf9ce, 0x0000 },
+ { 0x8700, 0xf9d7, 0x4000 },
+ { 0x8700, 0xf9d3, 0x3000 },
+ { 0x8700, 0xf9d1, 0x2000 },
+ { 0x0700, 0xf9d0, 0x0000 },
+ { 0x0700, 0xf9d2, 0x0000 },
+ { 0x8700, 0xf9d5, 0x2000 },
+ { 0x0700, 0xf9d4, 0x0000 },
+ { 0x0700, 0xf9d6, 0x0000 },
+ { 0x8700, 0xf9db, 0x3000 },
+ { 0x8700, 0xf9d9, 0x2000 },
+ { 0x0700, 0xf9d8, 0x0000 },
+ { 0x0700, 0xf9da, 0x0000 },
+ { 0x8700, 0xf9dd, 0x2000 },
+ { 0x0700, 0xf9dc, 0x0000 },
+ { 0x0700, 0xf9de, 0x0000 },
+ { 0x8700, 0xf9ef, 0x5000 },
+ { 0x8700, 0xf9e7, 0x4000 },
+ { 0x8700, 0xf9e3, 0x3000 },
+ { 0x8700, 0xf9e1, 0x2000 },
+ { 0x0700, 0xf9e0, 0x0000 },
+ { 0x0700, 0xf9e2, 0x0000 },
+ { 0x8700, 0xf9e5, 0x2000 },
+ { 0x0700, 0xf9e4, 0x0000 },
+ { 0x0700, 0xf9e6, 0x0000 },
+ { 0x8700, 0xf9eb, 0x3000 },
+ { 0x8700, 0xf9e9, 0x2000 },
+ { 0x0700, 0xf9e8, 0x0000 },
+ { 0x0700, 0xf9ea, 0x0000 },
+ { 0x8700, 0xf9ed, 0x2000 },
+ { 0x0700, 0xf9ec, 0x0000 },
+ { 0x0700, 0xf9ee, 0x0000 },
+ { 0x8700, 0xf9f7, 0x4000 },
+ { 0x8700, 0xf9f3, 0x3000 },
+ { 0x8700, 0xf9f1, 0x2000 },
+ { 0x0700, 0xf9f0, 0x0000 },
+ { 0x0700, 0xf9f2, 0x0000 },
+ { 0x8700, 0xf9f5, 0x2000 },
+ { 0x0700, 0xf9f4, 0x0000 },
+ { 0x0700, 0xf9f6, 0x0000 },
+ { 0x8700, 0xf9fb, 0x3000 },
+ { 0x8700, 0xf9f9, 0x2000 },
+ { 0x0700, 0xf9f8, 0x0000 },
+ { 0x0700, 0xf9fa, 0x0000 },
+ { 0x8700, 0xf9fd, 0x2000 },
+ { 0x0700, 0xf9fc, 0x0000 },
+ { 0x0700, 0xf9fe, 0x0000 },
+ { 0x8700, 0xfa41, 0x7000 },
+ { 0x8700, 0xfa1f, 0x6000 },
+ { 0x8700, 0xfa0f, 0x5000 },
+ { 0x8700, 0xfa07, 0x4000 },
+ { 0x8700, 0xfa03, 0x3000 },
+ { 0x8700, 0xfa01, 0x2000 },
+ { 0x0700, 0xfa00, 0x0000 },
+ { 0x0700, 0xfa02, 0x0000 },
+ { 0x8700, 0xfa05, 0x2000 },
+ { 0x0700, 0xfa04, 0x0000 },
+ { 0x0700, 0xfa06, 0x0000 },
+ { 0x8700, 0xfa0b, 0x3000 },
+ { 0x8700, 0xfa09, 0x2000 },
+ { 0x0700, 0xfa08, 0x0000 },
+ { 0x0700, 0xfa0a, 0x0000 },
+ { 0x8700, 0xfa0d, 0x2000 },
+ { 0x0700, 0xfa0c, 0x0000 },
+ { 0x0700, 0xfa0e, 0x0000 },
+ { 0x8700, 0xfa17, 0x4000 },
+ { 0x8700, 0xfa13, 0x3000 },
+ { 0x8700, 0xfa11, 0x2000 },
+ { 0x0700, 0xfa10, 0x0000 },
+ { 0x0700, 0xfa12, 0x0000 },
+ { 0x8700, 0xfa15, 0x2000 },
+ { 0x0700, 0xfa14, 0x0000 },
+ { 0x0700, 0xfa16, 0x0000 },
+ { 0x8700, 0xfa1b, 0x3000 },
+ { 0x8700, 0xfa19, 0x2000 },
+ { 0x0700, 0xfa18, 0x0000 },
+ { 0x0700, 0xfa1a, 0x0000 },
+ { 0x8700, 0xfa1d, 0x2000 },
+ { 0x0700, 0xfa1c, 0x0000 },
+ { 0x0700, 0xfa1e, 0x0000 },
+ { 0x8700, 0xfa31, 0x5000 },
+ { 0x8700, 0xfa27, 0x4000 },
+ { 0x8700, 0xfa23, 0x3000 },
+ { 0x8700, 0xfa21, 0x2000 },
+ { 0x0700, 0xfa20, 0x0000 },
+ { 0x0700, 0xfa22, 0x0000 },
+ { 0x8700, 0xfa25, 0x2000 },
+ { 0x0700, 0xfa24, 0x0000 },
+ { 0x0700, 0xfa26, 0x0000 },
+ { 0x8700, 0xfa2b, 0x3000 },
+ { 0x8700, 0xfa29, 0x2000 },
+ { 0x0700, 0xfa28, 0x0000 },
+ { 0x0700, 0xfa2a, 0x0000 },
+ { 0x8700, 0xfa2d, 0x2000 },
+ { 0x0700, 0xfa2c, 0x0000 },
+ { 0x0700, 0xfa30, 0x0000 },
+ { 0x8700, 0xfa39, 0x4000 },
+ { 0x8700, 0xfa35, 0x3000 },
+ { 0x8700, 0xfa33, 0x2000 },
+ { 0x0700, 0xfa32, 0x0000 },
+ { 0x0700, 0xfa34, 0x0000 },
+ { 0x8700, 0xfa37, 0x2000 },
+ { 0x0700, 0xfa36, 0x0000 },
+ { 0x0700, 0xfa38, 0x0000 },
+ { 0x8700, 0xfa3d, 0x3000 },
+ { 0x8700, 0xfa3b, 0x2000 },
+ { 0x0700, 0xfa3a, 0x0000 },
+ { 0x0700, 0xfa3c, 0x0000 },
+ { 0x8700, 0xfa3f, 0x2000 },
+ { 0x0700, 0xfa3e, 0x0000 },
+ { 0x0700, 0xfa40, 0x0000 },
+ { 0x8700, 0xfa61, 0x6000 },
+ { 0x8700, 0xfa51, 0x5000 },
+ { 0x8700, 0xfa49, 0x4000 },
+ { 0x8700, 0xfa45, 0x3000 },
+ { 0x8700, 0xfa43, 0x2000 },
+ { 0x0700, 0xfa42, 0x0000 },
+ { 0x0700, 0xfa44, 0x0000 },
+ { 0x8700, 0xfa47, 0x2000 },
+ { 0x0700, 0xfa46, 0x0000 },
+ { 0x0700, 0xfa48, 0x0000 },
+ { 0x8700, 0xfa4d, 0x3000 },
+ { 0x8700, 0xfa4b, 0x2000 },
+ { 0x0700, 0xfa4a, 0x0000 },
+ { 0x0700, 0xfa4c, 0x0000 },
+ { 0x8700, 0xfa4f, 0x2000 },
+ { 0x0700, 0xfa4e, 0x0000 },
+ { 0x0700, 0xfa50, 0x0000 },
+ { 0x8700, 0xfa59, 0x4000 },
+ { 0x8700, 0xfa55, 0x3000 },
+ { 0x8700, 0xfa53, 0x2000 },
+ { 0x0700, 0xfa52, 0x0000 },
+ { 0x0700, 0xfa54, 0x0000 },
+ { 0x8700, 0xfa57, 0x2000 },
+ { 0x0700, 0xfa56, 0x0000 },
+ { 0x0700, 0xfa58, 0x0000 },
+ { 0x8700, 0xfa5d, 0x3000 },
+ { 0x8700, 0xfa5b, 0x2000 },
+ { 0x0700, 0xfa5a, 0x0000 },
+ { 0x0700, 0xfa5c, 0x0000 },
+ { 0x8700, 0xfa5f, 0x2000 },
+ { 0x0700, 0xfa5e, 0x0000 },
+ { 0x0700, 0xfa60, 0x0000 },
+ { 0x8500, 0xfb06, 0x5000 },
+ { 0x8700, 0xfa69, 0x4000 },
+ { 0x8700, 0xfa65, 0x3000 },
+ { 0x8700, 0xfa63, 0x2000 },
+ { 0x0700, 0xfa62, 0x0000 },
+ { 0x0700, 0xfa64, 0x0000 },
+ { 0x8700, 0xfa67, 0x2000 },
+ { 0x0700, 0xfa66, 0x0000 },
+ { 0x0700, 0xfa68, 0x0000 },
+ { 0x8500, 0xfb02, 0x3000 },
+ { 0x8500, 0xfb00, 0x2000 },
+ { 0x0700, 0xfa6a, 0x0000 },
+ { 0x0500, 0xfb01, 0x0000 },
+ { 0x8500, 0xfb04, 0x2000 },
+ { 0x0500, 0xfb03, 0x0000 },
+ { 0x0500, 0xfb05, 0x0000 },
+ { 0x8700, 0xfb1f, 0x4000 },
+ { 0x8500, 0xfb16, 0x3000 },
+ { 0x8500, 0xfb14, 0x2000 },
+ { 0x0500, 0xfb13, 0x0000 },
+ { 0x0500, 0xfb15, 0x0000 },
+ { 0x8700, 0xfb1d, 0x2000 },
+ { 0x0500, 0xfb17, 0x0000 },
+ { 0x0c00, 0xfb1e, 0x0000 },
+ { 0x8700, 0xfb23, 0x3000 },
+ { 0x8700, 0xfb21, 0x2000 },
+ { 0x0700, 0xfb20, 0x0000 },
+ { 0x0700, 0xfb22, 0x0000 },
+ { 0x8700, 0xfb25, 0x2000 },
+ { 0x0700, 0xfb24, 0x0000 },
+ { 0x0700, 0xfb26, 0x0000 },
+ { 0x8700, 0xfbac, 0x8000 },
+ { 0x8700, 0xfb6c, 0x7000 },
+ { 0x8700, 0xfb4c, 0x6000 },
+ { 0x8700, 0xfb38, 0x5000 },
+ { 0x8700, 0xfb2f, 0x4000 },
+ { 0x8700, 0xfb2b, 0x3000 },
+ { 0x9900, 0xfb29, 0x2000 },
+ { 0x0700, 0xfb28, 0x0000 },
+ { 0x0700, 0xfb2a, 0x0000 },
+ { 0x8700, 0xfb2d, 0x2000 },
+ { 0x0700, 0xfb2c, 0x0000 },
+ { 0x0700, 0xfb2e, 0x0000 },
+ { 0x8700, 0xfb33, 0x3000 },
+ { 0x8700, 0xfb31, 0x2000 },
+ { 0x0700, 0xfb30, 0x0000 },
+ { 0x0700, 0xfb32, 0x0000 },
+ { 0x8700, 0xfb35, 0x2000 },
+ { 0x0700, 0xfb34, 0x0000 },
+ { 0x0700, 0xfb36, 0x0000 },
+ { 0x8700, 0xfb43, 0x4000 },
+ { 0x8700, 0xfb3c, 0x3000 },
+ { 0x8700, 0xfb3a, 0x2000 },
+ { 0x0700, 0xfb39, 0x0000 },
+ { 0x0700, 0xfb3b, 0x0000 },
+ { 0x8700, 0xfb40, 0x2000 },
+ { 0x0700, 0xfb3e, 0x0000 },
+ { 0x0700, 0xfb41, 0x0000 },
+ { 0x8700, 0xfb48, 0x3000 },
+ { 0x8700, 0xfb46, 0x2000 },
+ { 0x0700, 0xfb44, 0x0000 },
+ { 0x0700, 0xfb47, 0x0000 },
+ { 0x8700, 0xfb4a, 0x2000 },
+ { 0x0700, 0xfb49, 0x0000 },
+ { 0x0700, 0xfb4b, 0x0000 },
+ { 0x8700, 0xfb5c, 0x5000 },
+ { 0x8700, 0xfb54, 0x4000 },
+ { 0x8700, 0xfb50, 0x3000 },
+ { 0x8700, 0xfb4e, 0x2000 },
+ { 0x0700, 0xfb4d, 0x0000 },
+ { 0x0700, 0xfb4f, 0x0000 },
+ { 0x8700, 0xfb52, 0x2000 },
+ { 0x0700, 0xfb51, 0x0000 },
+ { 0x0700, 0xfb53, 0x0000 },
+ { 0x8700, 0xfb58, 0x3000 },
+ { 0x8700, 0xfb56, 0x2000 },
+ { 0x0700, 0xfb55, 0x0000 },
+ { 0x0700, 0xfb57, 0x0000 },
+ { 0x8700, 0xfb5a, 0x2000 },
+ { 0x0700, 0xfb59, 0x0000 },
+ { 0x0700, 0xfb5b, 0x0000 },
+ { 0x8700, 0xfb64, 0x4000 },
+ { 0x8700, 0xfb60, 0x3000 },
+ { 0x8700, 0xfb5e, 0x2000 },
+ { 0x0700, 0xfb5d, 0x0000 },
+ { 0x0700, 0xfb5f, 0x0000 },
+ { 0x8700, 0xfb62, 0x2000 },
+ { 0x0700, 0xfb61, 0x0000 },
+ { 0x0700, 0xfb63, 0x0000 },
+ { 0x8700, 0xfb68, 0x3000 },
+ { 0x8700, 0xfb66, 0x2000 },
+ { 0x0700, 0xfb65, 0x0000 },
+ { 0x0700, 0xfb67, 0x0000 },
+ { 0x8700, 0xfb6a, 0x2000 },
+ { 0x0700, 0xfb69, 0x0000 },
+ { 0x0700, 0xfb6b, 0x0000 },
+ { 0x8700, 0xfb8c, 0x6000 },
+ { 0x8700, 0xfb7c, 0x5000 },
+ { 0x8700, 0xfb74, 0x4000 },
+ { 0x8700, 0xfb70, 0x3000 },
+ { 0x8700, 0xfb6e, 0x2000 },
+ { 0x0700, 0xfb6d, 0x0000 },
+ { 0x0700, 0xfb6f, 0x0000 },
+ { 0x8700, 0xfb72, 0x2000 },
+ { 0x0700, 0xfb71, 0x0000 },
+ { 0x0700, 0xfb73, 0x0000 },
+ { 0x8700, 0xfb78, 0x3000 },
+ { 0x8700, 0xfb76, 0x2000 },
+ { 0x0700, 0xfb75, 0x0000 },
+ { 0x0700, 0xfb77, 0x0000 },
+ { 0x8700, 0xfb7a, 0x2000 },
+ { 0x0700, 0xfb79, 0x0000 },
+ { 0x0700, 0xfb7b, 0x0000 },
+ { 0x8700, 0xfb84, 0x4000 },
+ { 0x8700, 0xfb80, 0x3000 },
+ { 0x8700, 0xfb7e, 0x2000 },
+ { 0x0700, 0xfb7d, 0x0000 },
+ { 0x0700, 0xfb7f, 0x0000 },
+ { 0x8700, 0xfb82, 0x2000 },
+ { 0x0700, 0xfb81, 0x0000 },
+ { 0x0700, 0xfb83, 0x0000 },
+ { 0x8700, 0xfb88, 0x3000 },
+ { 0x8700, 0xfb86, 0x2000 },
+ { 0x0700, 0xfb85, 0x0000 },
+ { 0x0700, 0xfb87, 0x0000 },
+ { 0x8700, 0xfb8a, 0x2000 },
+ { 0x0700, 0xfb89, 0x0000 },
+ { 0x0700, 0xfb8b, 0x0000 },
+ { 0x8700, 0xfb9c, 0x5000 },
+ { 0x8700, 0xfb94, 0x4000 },
+ { 0x8700, 0xfb90, 0x3000 },
+ { 0x8700, 0xfb8e, 0x2000 },
+ { 0x0700, 0xfb8d, 0x0000 },
+ { 0x0700, 0xfb8f, 0x0000 },
+ { 0x8700, 0xfb92, 0x2000 },
+ { 0x0700, 0xfb91, 0x0000 },
+ { 0x0700, 0xfb93, 0x0000 },
+ { 0x8700, 0xfb98, 0x3000 },
+ { 0x8700, 0xfb96, 0x2000 },
+ { 0x0700, 0xfb95, 0x0000 },
+ { 0x0700, 0xfb97, 0x0000 },
+ { 0x8700, 0xfb9a, 0x2000 },
+ { 0x0700, 0xfb99, 0x0000 },
+ { 0x0700, 0xfb9b, 0x0000 },
+ { 0x8700, 0xfba4, 0x4000 },
+ { 0x8700, 0xfba0, 0x3000 },
+ { 0x8700, 0xfb9e, 0x2000 },
+ { 0x0700, 0xfb9d, 0x0000 },
+ { 0x0700, 0xfb9f, 0x0000 },
+ { 0x8700, 0xfba2, 0x2000 },
+ { 0x0700, 0xfba1, 0x0000 },
+ { 0x0700, 0xfba3, 0x0000 },
+ { 0x8700, 0xfba8, 0x3000 },
+ { 0x8700, 0xfba6, 0x2000 },
+ { 0x0700, 0xfba5, 0x0000 },
+ { 0x0700, 0xfba7, 0x0000 },
+ { 0x8700, 0xfbaa, 0x2000 },
+ { 0x0700, 0xfba9, 0x0000 },
+ { 0x0700, 0xfbab, 0x0000 },
+ { 0x8700, 0xfc0d, 0x7000 },
+ { 0x8700, 0xfbed, 0x6000 },
+ { 0x8700, 0xfbdd, 0x5000 },
+ { 0x8700, 0xfbd5, 0x4000 },
+ { 0x8700, 0xfbb0, 0x3000 },
+ { 0x8700, 0xfbae, 0x2000 },
+ { 0x0700, 0xfbad, 0x0000 },
+ { 0x0700, 0xfbaf, 0x0000 },
+ { 0x8700, 0xfbd3, 0x2000 },
+ { 0x0700, 0xfbb1, 0x0000 },
+ { 0x0700, 0xfbd4, 0x0000 },
+ { 0x8700, 0xfbd9, 0x3000 },
+ { 0x8700, 0xfbd7, 0x2000 },
+ { 0x0700, 0xfbd6, 0x0000 },
+ { 0x0700, 0xfbd8, 0x0000 },
+ { 0x8700, 0xfbdb, 0x2000 },
+ { 0x0700, 0xfbda, 0x0000 },
+ { 0x0700, 0xfbdc, 0x0000 },
+ { 0x8700, 0xfbe5, 0x4000 },
+ { 0x8700, 0xfbe1, 0x3000 },
+ { 0x8700, 0xfbdf, 0x2000 },
+ { 0x0700, 0xfbde, 0x0000 },
+ { 0x0700, 0xfbe0, 0x0000 },
+ { 0x8700, 0xfbe3, 0x2000 },
+ { 0x0700, 0xfbe2, 0x0000 },
+ { 0x0700, 0xfbe4, 0x0000 },
+ { 0x8700, 0xfbe9, 0x3000 },
+ { 0x8700, 0xfbe7, 0x2000 },
+ { 0x0700, 0xfbe6, 0x0000 },
+ { 0x0700, 0xfbe8, 0x0000 },
+ { 0x8700, 0xfbeb, 0x2000 },
+ { 0x0700, 0xfbea, 0x0000 },
+ { 0x0700, 0xfbec, 0x0000 },
+ { 0x8700, 0xfbfd, 0x5000 },
+ { 0x8700, 0xfbf5, 0x4000 },
+ { 0x8700, 0xfbf1, 0x3000 },
+ { 0x8700, 0xfbef, 0x2000 },
+ { 0x0700, 0xfbee, 0x0000 },
+ { 0x0700, 0xfbf0, 0x0000 },
+ { 0x8700, 0xfbf3, 0x2000 },
+ { 0x0700, 0xfbf2, 0x0000 },
+ { 0x0700, 0xfbf4, 0x0000 },
+ { 0x8700, 0xfbf9, 0x3000 },
+ { 0x8700, 0xfbf7, 0x2000 },
+ { 0x0700, 0xfbf6, 0x0000 },
+ { 0x0700, 0xfbf8, 0x0000 },
+ { 0x8700, 0xfbfb, 0x2000 },
+ { 0x0700, 0xfbfa, 0x0000 },
+ { 0x0700, 0xfbfc, 0x0000 },
+ { 0x8700, 0xfc05, 0x4000 },
+ { 0x8700, 0xfc01, 0x3000 },
+ { 0x8700, 0xfbff, 0x2000 },
+ { 0x0700, 0xfbfe, 0x0000 },
+ { 0x0700, 0xfc00, 0x0000 },
+ { 0x8700, 0xfc03, 0x2000 },
+ { 0x0700, 0xfc02, 0x0000 },
+ { 0x0700, 0xfc04, 0x0000 },
+ { 0x8700, 0xfc09, 0x3000 },
+ { 0x8700, 0xfc07, 0x2000 },
+ { 0x0700, 0xfc06, 0x0000 },
+ { 0x0700, 0xfc08, 0x0000 },
+ { 0x8700, 0xfc0b, 0x2000 },
+ { 0x0700, 0xfc0a, 0x0000 },
+ { 0x0700, 0xfc0c, 0x0000 },
+ { 0x8700, 0xfc2d, 0x6000 },
+ { 0x8700, 0xfc1d, 0x5000 },
+ { 0x8700, 0xfc15, 0x4000 },
+ { 0x8700, 0xfc11, 0x3000 },
+ { 0x8700, 0xfc0f, 0x2000 },
+ { 0x0700, 0xfc0e, 0x0000 },
+ { 0x0700, 0xfc10, 0x0000 },
+ { 0x8700, 0xfc13, 0x2000 },
+ { 0x0700, 0xfc12, 0x0000 },
+ { 0x0700, 0xfc14, 0x0000 },
+ { 0x8700, 0xfc19, 0x3000 },
+ { 0x8700, 0xfc17, 0x2000 },
+ { 0x0700, 0xfc16, 0x0000 },
+ { 0x0700, 0xfc18, 0x0000 },
+ { 0x8700, 0xfc1b, 0x2000 },
+ { 0x0700, 0xfc1a, 0x0000 },
+ { 0x0700, 0xfc1c, 0x0000 },
+ { 0x8700, 0xfc25, 0x4000 },
+ { 0x8700, 0xfc21, 0x3000 },
+ { 0x8700, 0xfc1f, 0x2000 },
+ { 0x0700, 0xfc1e, 0x0000 },
+ { 0x0700, 0xfc20, 0x0000 },
+ { 0x8700, 0xfc23, 0x2000 },
+ { 0x0700, 0xfc22, 0x0000 },
+ { 0x0700, 0xfc24, 0x0000 },
+ { 0x8700, 0xfc29, 0x3000 },
+ { 0x8700, 0xfc27, 0x2000 },
+ { 0x0700, 0xfc26, 0x0000 },
+ { 0x0700, 0xfc28, 0x0000 },
+ { 0x8700, 0xfc2b, 0x2000 },
+ { 0x0700, 0xfc2a, 0x0000 },
+ { 0x0700, 0xfc2c, 0x0000 },
+ { 0x8700, 0xfc3d, 0x5000 },
+ { 0x8700, 0xfc35, 0x4000 },
+ { 0x8700, 0xfc31, 0x3000 },
+ { 0x8700, 0xfc2f, 0x2000 },
+ { 0x0700, 0xfc2e, 0x0000 },
+ { 0x0700, 0xfc30, 0x0000 },
+ { 0x8700, 0xfc33, 0x2000 },
+ { 0x0700, 0xfc32, 0x0000 },
+ { 0x0700, 0xfc34, 0x0000 },
+ { 0x8700, 0xfc39, 0x3000 },
+ { 0x8700, 0xfc37, 0x2000 },
+ { 0x0700, 0xfc36, 0x0000 },
+ { 0x0700, 0xfc38, 0x0000 },
+ { 0x8700, 0xfc3b, 0x2000 },
+ { 0x0700, 0xfc3a, 0x0000 },
+ { 0x0700, 0xfc3c, 0x0000 },
+ { 0x8700, 0xfc45, 0x4000 },
+ { 0x8700, 0xfc41, 0x3000 },
+ { 0x8700, 0xfc3f, 0x2000 },
+ { 0x0700, 0xfc3e, 0x0000 },
+ { 0x0700, 0xfc40, 0x0000 },
+ { 0x8700, 0xfc43, 0x2000 },
+ { 0x0700, 0xfc42, 0x0000 },
+ { 0x0700, 0xfc44, 0x0000 },
+ { 0x8700, 0xfc49, 0x3000 },
+ { 0x8700, 0xfc47, 0x2000 },
+ { 0x0700, 0xfc46, 0x0000 },
+ { 0x0700, 0xfc48, 0x0000 },
+ { 0x8700, 0xfc4b, 0x2000 },
+ { 0x0700, 0xfc4a, 0x0000 },
+ { 0x0700, 0xfc4c, 0x0000 },
+ { 0x8700, 0xfeac, 0xa000 },
+ { 0x8700, 0xfd5d, 0x9000 },
+ { 0x8700, 0xfccd, 0x8000 },
+ { 0x8700, 0xfc8d, 0x7000 },
+ { 0x8700, 0xfc6d, 0x6000 },
+ { 0x8700, 0xfc5d, 0x5000 },
+ { 0x8700, 0xfc55, 0x4000 },
+ { 0x8700, 0xfc51, 0x3000 },
+ { 0x8700, 0xfc4f, 0x2000 },
+ { 0x0700, 0xfc4e, 0x0000 },
+ { 0x0700, 0xfc50, 0x0000 },
+ { 0x8700, 0xfc53, 0x2000 },
+ { 0x0700, 0xfc52, 0x0000 },
+ { 0x0700, 0xfc54, 0x0000 },
+ { 0x8700, 0xfc59, 0x3000 },
+ { 0x8700, 0xfc57, 0x2000 },
+ { 0x0700, 0xfc56, 0x0000 },
+ { 0x0700, 0xfc58, 0x0000 },
+ { 0x8700, 0xfc5b, 0x2000 },
+ { 0x0700, 0xfc5a, 0x0000 },
+ { 0x0700, 0xfc5c, 0x0000 },
+ { 0x8700, 0xfc65, 0x4000 },
+ { 0x8700, 0xfc61, 0x3000 },
+ { 0x8700, 0xfc5f, 0x2000 },
+ { 0x0700, 0xfc5e, 0x0000 },
+ { 0x0700, 0xfc60, 0x0000 },
+ { 0x8700, 0xfc63, 0x2000 },
+ { 0x0700, 0xfc62, 0x0000 },
+ { 0x0700, 0xfc64, 0x0000 },
+ { 0x8700, 0xfc69, 0x3000 },
+ { 0x8700, 0xfc67, 0x2000 },
+ { 0x0700, 0xfc66, 0x0000 },
+ { 0x0700, 0xfc68, 0x0000 },
+ { 0x8700, 0xfc6b, 0x2000 },
+ { 0x0700, 0xfc6a, 0x0000 },
+ { 0x0700, 0xfc6c, 0x0000 },
+ { 0x8700, 0xfc7d, 0x5000 },
+ { 0x8700, 0xfc75, 0x4000 },
+ { 0x8700, 0xfc71, 0x3000 },
+ { 0x8700, 0xfc6f, 0x2000 },
+ { 0x0700, 0xfc6e, 0x0000 },
+ { 0x0700, 0xfc70, 0x0000 },
+ { 0x8700, 0xfc73, 0x2000 },
+ { 0x0700, 0xfc72, 0x0000 },
+ { 0x0700, 0xfc74, 0x0000 },
+ { 0x8700, 0xfc79, 0x3000 },
+ { 0x8700, 0xfc77, 0x2000 },
+ { 0x0700, 0xfc76, 0x0000 },
+ { 0x0700, 0xfc78, 0x0000 },
+ { 0x8700, 0xfc7b, 0x2000 },
+ { 0x0700, 0xfc7a, 0x0000 },
+ { 0x0700, 0xfc7c, 0x0000 },
+ { 0x8700, 0xfc85, 0x4000 },
+ { 0x8700, 0xfc81, 0x3000 },
+ { 0x8700, 0xfc7f, 0x2000 },
+ { 0x0700, 0xfc7e, 0x0000 },
+ { 0x0700, 0xfc80, 0x0000 },
+ { 0x8700, 0xfc83, 0x2000 },
+ { 0x0700, 0xfc82, 0x0000 },
+ { 0x0700, 0xfc84, 0x0000 },
+ { 0x8700, 0xfc89, 0x3000 },
+ { 0x8700, 0xfc87, 0x2000 },
+ { 0x0700, 0xfc86, 0x0000 },
+ { 0x0700, 0xfc88, 0x0000 },
+ { 0x8700, 0xfc8b, 0x2000 },
+ { 0x0700, 0xfc8a, 0x0000 },
+ { 0x0700, 0xfc8c, 0x0000 },
+ { 0x8700, 0xfcad, 0x6000 },
+ { 0x8700, 0xfc9d, 0x5000 },
+ { 0x8700, 0xfc95, 0x4000 },
+ { 0x8700, 0xfc91, 0x3000 },
+ { 0x8700, 0xfc8f, 0x2000 },
+ { 0x0700, 0xfc8e, 0x0000 },
+ { 0x0700, 0xfc90, 0x0000 },
+ { 0x8700, 0xfc93, 0x2000 },
+ { 0x0700, 0xfc92, 0x0000 },
+ { 0x0700, 0xfc94, 0x0000 },
+ { 0x8700, 0xfc99, 0x3000 },
+ { 0x8700, 0xfc97, 0x2000 },
+ { 0x0700, 0xfc96, 0x0000 },
+ { 0x0700, 0xfc98, 0x0000 },
+ { 0x8700, 0xfc9b, 0x2000 },
+ { 0x0700, 0xfc9a, 0x0000 },
+ { 0x0700, 0xfc9c, 0x0000 },
+ { 0x8700, 0xfca5, 0x4000 },
+ { 0x8700, 0xfca1, 0x3000 },
+ { 0x8700, 0xfc9f, 0x2000 },
+ { 0x0700, 0xfc9e, 0x0000 },
+ { 0x0700, 0xfca0, 0x0000 },
+ { 0x8700, 0xfca3, 0x2000 },
+ { 0x0700, 0xfca2, 0x0000 },
+ { 0x0700, 0xfca4, 0x0000 },
+ { 0x8700, 0xfca9, 0x3000 },
+ { 0x8700, 0xfca7, 0x2000 },
+ { 0x0700, 0xfca6, 0x0000 },
+ { 0x0700, 0xfca8, 0x0000 },
+ { 0x8700, 0xfcab, 0x2000 },
+ { 0x0700, 0xfcaa, 0x0000 },
+ { 0x0700, 0xfcac, 0x0000 },
+ { 0x8700, 0xfcbd, 0x5000 },
+ { 0x8700, 0xfcb5, 0x4000 },
+ { 0x8700, 0xfcb1, 0x3000 },
+ { 0x8700, 0xfcaf, 0x2000 },
+ { 0x0700, 0xfcae, 0x0000 },
+ { 0x0700, 0xfcb0, 0x0000 },
+ { 0x8700, 0xfcb3, 0x2000 },
+ { 0x0700, 0xfcb2, 0x0000 },
+ { 0x0700, 0xfcb4, 0x0000 },
+ { 0x8700, 0xfcb9, 0x3000 },
+ { 0x8700, 0xfcb7, 0x2000 },
+ { 0x0700, 0xfcb6, 0x0000 },
+ { 0x0700, 0xfcb8, 0x0000 },
+ { 0x8700, 0xfcbb, 0x2000 },
+ { 0x0700, 0xfcba, 0x0000 },
+ { 0x0700, 0xfcbc, 0x0000 },
+ { 0x8700, 0xfcc5, 0x4000 },
+ { 0x8700, 0xfcc1, 0x3000 },
+ { 0x8700, 0xfcbf, 0x2000 },
+ { 0x0700, 0xfcbe, 0x0000 },
+ { 0x0700, 0xfcc0, 0x0000 },
+ { 0x8700, 0xfcc3, 0x2000 },
+ { 0x0700, 0xfcc2, 0x0000 },
+ { 0x0700, 0xfcc4, 0x0000 },
+ { 0x8700, 0xfcc9, 0x3000 },
+ { 0x8700, 0xfcc7, 0x2000 },
+ { 0x0700, 0xfcc6, 0x0000 },
+ { 0x0700, 0xfcc8, 0x0000 },
+ { 0x8700, 0xfccb, 0x2000 },
+ { 0x0700, 0xfcca, 0x0000 },
+ { 0x0700, 0xfccc, 0x0000 },
+ { 0x8700, 0xfd0d, 0x7000 },
+ { 0x8700, 0xfced, 0x6000 },
+ { 0x8700, 0xfcdd, 0x5000 },
+ { 0x8700, 0xfcd5, 0x4000 },
+ { 0x8700, 0xfcd1, 0x3000 },
+ { 0x8700, 0xfccf, 0x2000 },
+ { 0x0700, 0xfcce, 0x0000 },
+ { 0x0700, 0xfcd0, 0x0000 },
+ { 0x8700, 0xfcd3, 0x2000 },
+ { 0x0700, 0xfcd2, 0x0000 },
+ { 0x0700, 0xfcd4, 0x0000 },
+ { 0x8700, 0xfcd9, 0x3000 },
+ { 0x8700, 0xfcd7, 0x2000 },
+ { 0x0700, 0xfcd6, 0x0000 },
+ { 0x0700, 0xfcd8, 0x0000 },
+ { 0x8700, 0xfcdb, 0x2000 },
+ { 0x0700, 0xfcda, 0x0000 },
+ { 0x0700, 0xfcdc, 0x0000 },
+ { 0x8700, 0xfce5, 0x4000 },
+ { 0x8700, 0xfce1, 0x3000 },
+ { 0x8700, 0xfcdf, 0x2000 },
+ { 0x0700, 0xfcde, 0x0000 },
+ { 0x0700, 0xfce0, 0x0000 },
+ { 0x8700, 0xfce3, 0x2000 },
+ { 0x0700, 0xfce2, 0x0000 },
+ { 0x0700, 0xfce4, 0x0000 },
+ { 0x8700, 0xfce9, 0x3000 },
+ { 0x8700, 0xfce7, 0x2000 },
+ { 0x0700, 0xfce6, 0x0000 },
+ { 0x0700, 0xfce8, 0x0000 },
+ { 0x8700, 0xfceb, 0x2000 },
+ { 0x0700, 0xfcea, 0x0000 },
+ { 0x0700, 0xfcec, 0x0000 },
+ { 0x8700, 0xfcfd, 0x5000 },
+ { 0x8700, 0xfcf5, 0x4000 },
+ { 0x8700, 0xfcf1, 0x3000 },
+ { 0x8700, 0xfcef, 0x2000 },
+ { 0x0700, 0xfcee, 0x0000 },
+ { 0x0700, 0xfcf0, 0x0000 },
+ { 0x8700, 0xfcf3, 0x2000 },
+ { 0x0700, 0xfcf2, 0x0000 },
+ { 0x0700, 0xfcf4, 0x0000 },
+ { 0x8700, 0xfcf9, 0x3000 },
+ { 0x8700, 0xfcf7, 0x2000 },
+ { 0x0700, 0xfcf6, 0x0000 },
+ { 0x0700, 0xfcf8, 0x0000 },
+ { 0x8700, 0xfcfb, 0x2000 },
+ { 0x0700, 0xfcfa, 0x0000 },
+ { 0x0700, 0xfcfc, 0x0000 },
+ { 0x8700, 0xfd05, 0x4000 },
+ { 0x8700, 0xfd01, 0x3000 },
+ { 0x8700, 0xfcff, 0x2000 },
+ { 0x0700, 0xfcfe, 0x0000 },
+ { 0x0700, 0xfd00, 0x0000 },
+ { 0x8700, 0xfd03, 0x2000 },
+ { 0x0700, 0xfd02, 0x0000 },
+ { 0x0700, 0xfd04, 0x0000 },
+ { 0x8700, 0xfd09, 0x3000 },
+ { 0x8700, 0xfd07, 0x2000 },
+ { 0x0700, 0xfd06, 0x0000 },
+ { 0x0700, 0xfd08, 0x0000 },
+ { 0x8700, 0xfd0b, 0x2000 },
+ { 0x0700, 0xfd0a, 0x0000 },
+ { 0x0700, 0xfd0c, 0x0000 },
+ { 0x8700, 0xfd2d, 0x6000 },
+ { 0x8700, 0xfd1d, 0x5000 },
+ { 0x8700, 0xfd15, 0x4000 },
+ { 0x8700, 0xfd11, 0x3000 },
+ { 0x8700, 0xfd0f, 0x2000 },
+ { 0x0700, 0xfd0e, 0x0000 },
+ { 0x0700, 0xfd10, 0x0000 },
+ { 0x8700, 0xfd13, 0x2000 },
+ { 0x0700, 0xfd12, 0x0000 },
+ { 0x0700, 0xfd14, 0x0000 },
+ { 0x8700, 0xfd19, 0x3000 },
+ { 0x8700, 0xfd17, 0x2000 },
+ { 0x0700, 0xfd16, 0x0000 },
+ { 0x0700, 0xfd18, 0x0000 },
+ { 0x8700, 0xfd1b, 0x2000 },
+ { 0x0700, 0xfd1a, 0x0000 },
+ { 0x0700, 0xfd1c, 0x0000 },
+ { 0x8700, 0xfd25, 0x4000 },
+ { 0x8700, 0xfd21, 0x3000 },
+ { 0x8700, 0xfd1f, 0x2000 },
+ { 0x0700, 0xfd1e, 0x0000 },
+ { 0x0700, 0xfd20, 0x0000 },
+ { 0x8700, 0xfd23, 0x2000 },
+ { 0x0700, 0xfd22, 0x0000 },
+ { 0x0700, 0xfd24, 0x0000 },
+ { 0x8700, 0xfd29, 0x3000 },
+ { 0x8700, 0xfd27, 0x2000 },
+ { 0x0700, 0xfd26, 0x0000 },
+ { 0x0700, 0xfd28, 0x0000 },
+ { 0x8700, 0xfd2b, 0x2000 },
+ { 0x0700, 0xfd2a, 0x0000 },
+ { 0x0700, 0xfd2c, 0x0000 },
+ { 0x8700, 0xfd3d, 0x5000 },
+ { 0x8700, 0xfd35, 0x4000 },
+ { 0x8700, 0xfd31, 0x3000 },
+ { 0x8700, 0xfd2f, 0x2000 },
+ { 0x0700, 0xfd2e, 0x0000 },
+ { 0x0700, 0xfd30, 0x0000 },
+ { 0x8700, 0xfd33, 0x2000 },
+ { 0x0700, 0xfd32, 0x0000 },
+ { 0x0700, 0xfd34, 0x0000 },
+ { 0x8700, 0xfd39, 0x3000 },
+ { 0x8700, 0xfd37, 0x2000 },
+ { 0x0700, 0xfd36, 0x0000 },
+ { 0x0700, 0xfd38, 0x0000 },
+ { 0x8700, 0xfd3b, 0x2000 },
+ { 0x0700, 0xfd3a, 0x0000 },
+ { 0x0700, 0xfd3c, 0x0000 },
+ { 0x8700, 0xfd55, 0x4000 },
+ { 0x8700, 0xfd51, 0x3000 },
+ { 0x9200, 0xfd3f, 0x2000 },
+ { 0x1600, 0xfd3e, 0x0000 },
+ { 0x0700, 0xfd50, 0x0000 },
+ { 0x8700, 0xfd53, 0x2000 },
+ { 0x0700, 0xfd52, 0x0000 },
+ { 0x0700, 0xfd54, 0x0000 },
+ { 0x8700, 0xfd59, 0x3000 },
+ { 0x8700, 0xfd57, 0x2000 },
+ { 0x0700, 0xfd56, 0x0000 },
+ { 0x0700, 0xfd58, 0x0000 },
+ { 0x8700, 0xfd5b, 0x2000 },
+ { 0x0700, 0xfd5a, 0x0000 },
+ { 0x0700, 0xfd5c, 0x0000 },
+ { 0x8c00, 0xfe09, 0x8000 },
+ { 0x8700, 0xfd9f, 0x7000 },
+ { 0x8700, 0xfd7d, 0x6000 },
+ { 0x8700, 0xfd6d, 0x5000 },
+ { 0x8700, 0xfd65, 0x4000 },
+ { 0x8700, 0xfd61, 0x3000 },
+ { 0x8700, 0xfd5f, 0x2000 },
+ { 0x0700, 0xfd5e, 0x0000 },
+ { 0x0700, 0xfd60, 0x0000 },
+ { 0x8700, 0xfd63, 0x2000 },
+ { 0x0700, 0xfd62, 0x0000 },
+ { 0x0700, 0xfd64, 0x0000 },
+ { 0x8700, 0xfd69, 0x3000 },
+ { 0x8700, 0xfd67, 0x2000 },
+ { 0x0700, 0xfd66, 0x0000 },
+ { 0x0700, 0xfd68, 0x0000 },
+ { 0x8700, 0xfd6b, 0x2000 },
+ { 0x0700, 0xfd6a, 0x0000 },
+ { 0x0700, 0xfd6c, 0x0000 },
+ { 0x8700, 0xfd75, 0x4000 },
+ { 0x8700, 0xfd71, 0x3000 },
+ { 0x8700, 0xfd6f, 0x2000 },
+ { 0x0700, 0xfd6e, 0x0000 },
+ { 0x0700, 0xfd70, 0x0000 },
+ { 0x8700, 0xfd73, 0x2000 },
+ { 0x0700, 0xfd72, 0x0000 },
+ { 0x0700, 0xfd74, 0x0000 },
+ { 0x8700, 0xfd79, 0x3000 },
+ { 0x8700, 0xfd77, 0x2000 },
+ { 0x0700, 0xfd76, 0x0000 },
+ { 0x0700, 0xfd78, 0x0000 },
+ { 0x8700, 0xfd7b, 0x2000 },
+ { 0x0700, 0xfd7a, 0x0000 },
+ { 0x0700, 0xfd7c, 0x0000 },
+ { 0x8700, 0xfd8d, 0x5000 },
+ { 0x8700, 0xfd85, 0x4000 },
+ { 0x8700, 0xfd81, 0x3000 },
+ { 0x8700, 0xfd7f, 0x2000 },
+ { 0x0700, 0xfd7e, 0x0000 },
+ { 0x0700, 0xfd80, 0x0000 },
+ { 0x8700, 0xfd83, 0x2000 },
+ { 0x0700, 0xfd82, 0x0000 },
+ { 0x0700, 0xfd84, 0x0000 },
+ { 0x8700, 0xfd89, 0x3000 },
+ { 0x8700, 0xfd87, 0x2000 },
+ { 0x0700, 0xfd86, 0x0000 },
+ { 0x0700, 0xfd88, 0x0000 },
+ { 0x8700, 0xfd8b, 0x2000 },
+ { 0x0700, 0xfd8a, 0x0000 },
+ { 0x0700, 0xfd8c, 0x0000 },
+ { 0x8700, 0xfd97, 0x4000 },
+ { 0x8700, 0xfd93, 0x3000 },
+ { 0x8700, 0xfd8f, 0x2000 },
+ { 0x0700, 0xfd8e, 0x0000 },
+ { 0x0700, 0xfd92, 0x0000 },
+ { 0x8700, 0xfd95, 0x2000 },
+ { 0x0700, 0xfd94, 0x0000 },
+ { 0x0700, 0xfd96, 0x0000 },
+ { 0x8700, 0xfd9b, 0x3000 },
+ { 0x8700, 0xfd99, 0x2000 },
+ { 0x0700, 0xfd98, 0x0000 },
+ { 0x0700, 0xfd9a, 0x0000 },
+ { 0x8700, 0xfd9d, 0x2000 },
+ { 0x0700, 0xfd9c, 0x0000 },
+ { 0x0700, 0xfd9e, 0x0000 },
+ { 0x8700, 0xfdbf, 0x6000 },
+ { 0x8700, 0xfdaf, 0x5000 },
+ { 0x8700, 0xfda7, 0x4000 },
+ { 0x8700, 0xfda3, 0x3000 },
+ { 0x8700, 0xfda1, 0x2000 },
+ { 0x0700, 0xfda0, 0x0000 },
+ { 0x0700, 0xfda2, 0x0000 },
+ { 0x8700, 0xfda5, 0x2000 },
+ { 0x0700, 0xfda4, 0x0000 },
+ { 0x0700, 0xfda6, 0x0000 },
+ { 0x8700, 0xfdab, 0x3000 },
+ { 0x8700, 0xfda9, 0x2000 },
+ { 0x0700, 0xfda8, 0x0000 },
+ { 0x0700, 0xfdaa, 0x0000 },
+ { 0x8700, 0xfdad, 0x2000 },
+ { 0x0700, 0xfdac, 0x0000 },
+ { 0x0700, 0xfdae, 0x0000 },
+ { 0x8700, 0xfdb7, 0x4000 },
+ { 0x8700, 0xfdb3, 0x3000 },
+ { 0x8700, 0xfdb1, 0x2000 },
+ { 0x0700, 0xfdb0, 0x0000 },
+ { 0x0700, 0xfdb2, 0x0000 },
+ { 0x8700, 0xfdb5, 0x2000 },
+ { 0x0700, 0xfdb4, 0x0000 },
+ { 0x0700, 0xfdb6, 0x0000 },
+ { 0x8700, 0xfdbb, 0x3000 },
+ { 0x8700, 0xfdb9, 0x2000 },
+ { 0x0700, 0xfdb8, 0x0000 },
+ { 0x0700, 0xfdba, 0x0000 },
+ { 0x8700, 0xfdbd, 0x2000 },
+ { 0x0700, 0xfdbc, 0x0000 },
+ { 0x0700, 0xfdbe, 0x0000 },
+ { 0x8700, 0xfdf7, 0x5000 },
+ { 0x8700, 0xfdc7, 0x4000 },
+ { 0x8700, 0xfdc3, 0x3000 },
+ { 0x8700, 0xfdc1, 0x2000 },
+ { 0x0700, 0xfdc0, 0x0000 },
+ { 0x0700, 0xfdc2, 0x0000 },
+ { 0x8700, 0xfdc5, 0x2000 },
+ { 0x0700, 0xfdc4, 0x0000 },
+ { 0x0700, 0xfdc6, 0x0000 },
+ { 0x8700, 0xfdf3, 0x3000 },
+ { 0x8700, 0xfdf1, 0x2000 },
+ { 0x0700, 0xfdf0, 0x0000 },
+ { 0x0700, 0xfdf2, 0x0000 },
+ { 0x8700, 0xfdf5, 0x2000 },
+ { 0x0700, 0xfdf4, 0x0000 },
+ { 0x0700, 0xfdf6, 0x0000 },
+ { 0x8c00, 0xfe01, 0x4000 },
+ { 0x8700, 0xfdfb, 0x3000 },
+ { 0x8700, 0xfdf9, 0x2000 },
+ { 0x0700, 0xfdf8, 0x0000 },
+ { 0x0700, 0xfdfa, 0x0000 },
+ { 0x9a00, 0xfdfd, 0x2000 },
+ { 0x1700, 0xfdfc, 0x0000 },
+ { 0x0c00, 0xfe00, 0x0000 },
+ { 0x8c00, 0xfe05, 0x3000 },
+ { 0x8c00, 0xfe03, 0x2000 },
+ { 0x0c00, 0xfe02, 0x0000 },
+ { 0x0c00, 0xfe04, 0x0000 },
+ { 0x8c00, 0xfe07, 0x2000 },
+ { 0x0c00, 0xfe06, 0x0000 },
+ { 0x0c00, 0xfe08, 0x0000 },
+ { 0x9900, 0xfe66, 0x7000 },
+ { 0x9500, 0xfe45, 0x6000 },
+ { 0x9600, 0xfe35, 0x5000 },
+ { 0x8c00, 0xfe21, 0x4000 },
+ { 0x8c00, 0xfe0d, 0x3000 },
+ { 0x8c00, 0xfe0b, 0x2000 },
+ { 0x0c00, 0xfe0a, 0x0000 },
+ { 0x0c00, 0xfe0c, 0x0000 },
+ { 0x8c00, 0xfe0f, 0x2000 },
+ { 0x0c00, 0xfe0e, 0x0000 },
+ { 0x0c00, 0xfe20, 0x0000 },
+ { 0x9100, 0xfe31, 0x3000 },
+ { 0x8c00, 0xfe23, 0x2000 },
+ { 0x0c00, 0xfe22, 0x0000 },
+ { 0x1500, 0xfe30, 0x0000 },
+ { 0x9000, 0xfe33, 0x2000 },
+ { 0x1100, 0xfe32, 0x0000 },
+ { 0x1000, 0xfe34, 0x0000 },
+ { 0x9600, 0xfe3d, 0x4000 },
+ { 0x9600, 0xfe39, 0x3000 },
+ { 0x9600, 0xfe37, 0x2000 },
+ { 0x1200, 0xfe36, 0x0000 },
+ { 0x1200, 0xfe38, 0x0000 },
+ { 0x9600, 0xfe3b, 0x2000 },
+ { 0x1200, 0xfe3a, 0x0000 },
+ { 0x1200, 0xfe3c, 0x0000 },
+ { 0x9600, 0xfe41, 0x3000 },
+ { 0x9600, 0xfe3f, 0x2000 },
+ { 0x1200, 0xfe3e, 0x0000 },
+ { 0x1200, 0xfe40, 0x0000 },
+ { 0x9600, 0xfe43, 0x2000 },
+ { 0x1200, 0xfe42, 0x0000 },
+ { 0x1200, 0xfe44, 0x0000 },
+ { 0x9500, 0xfe56, 0x5000 },
+ { 0x9000, 0xfe4d, 0x4000 },
+ { 0x9500, 0xfe49, 0x3000 },
+ { 0x9600, 0xfe47, 0x2000 },
+ { 0x1500, 0xfe46, 0x0000 },
+ { 0x1200, 0xfe48, 0x0000 },
+ { 0x9500, 0xfe4b, 0x2000 },
+ { 0x1500, 0xfe4a, 0x0000 },
+ { 0x1500, 0xfe4c, 0x0000 },
+ { 0x9500, 0xfe51, 0x3000 },
+ { 0x9000, 0xfe4f, 0x2000 },
+ { 0x1000, 0xfe4e, 0x0000 },
+ { 0x1500, 0xfe50, 0x0000 },
+ { 0x9500, 0xfe54, 0x2000 },
+ { 0x1500, 0xfe52, 0x0000 },
+ { 0x1500, 0xfe55, 0x0000 },
+ { 0x9200, 0xfe5e, 0x4000 },
+ { 0x9200, 0xfe5a, 0x3000 },
+ { 0x9100, 0xfe58, 0x2000 },
+ { 0x1500, 0xfe57, 0x0000 },
+ { 0x1600, 0xfe59, 0x0000 },
+ { 0x9200, 0xfe5c, 0x2000 },
+ { 0x1600, 0xfe5b, 0x0000 },
+ { 0x1600, 0xfe5d, 0x0000 },
+ { 0x9900, 0xfe62, 0x3000 },
+ { 0x9500, 0xfe60, 0x2000 },
+ { 0x1500, 0xfe5f, 0x0000 },
+ { 0x1500, 0xfe61, 0x0000 },
+ { 0x9900, 0xfe64, 0x2000 },
+ { 0x1100, 0xfe63, 0x0000 },
+ { 0x1900, 0xfe65, 0x0000 },
+ { 0x8700, 0xfe8c, 0x6000 },
+ { 0x8700, 0xfe7c, 0x5000 },
+ { 0x8700, 0xfe73, 0x4000 },
+ { 0x9500, 0xfe6b, 0x3000 },
+ { 0x9700, 0xfe69, 0x2000 },
+ { 0x1500, 0xfe68, 0x0000 },
+ { 0x1500, 0xfe6a, 0x0000 },
+ { 0x8700, 0xfe71, 0x2000 },
+ { 0x0700, 0xfe70, 0x0000 },
+ { 0x0700, 0xfe72, 0x0000 },
+ { 0x8700, 0xfe78, 0x3000 },
+ { 0x8700, 0xfe76, 0x2000 },
+ { 0x0700, 0xfe74, 0x0000 },
+ { 0x0700, 0xfe77, 0x0000 },
+ { 0x8700, 0xfe7a, 0x2000 },
+ { 0x0700, 0xfe79, 0x0000 },
+ { 0x0700, 0xfe7b, 0x0000 },
+ { 0x8700, 0xfe84, 0x4000 },
+ { 0x8700, 0xfe80, 0x3000 },
+ { 0x8700, 0xfe7e, 0x2000 },
+ { 0x0700, 0xfe7d, 0x0000 },
+ { 0x0700, 0xfe7f, 0x0000 },
+ { 0x8700, 0xfe82, 0x2000 },
+ { 0x0700, 0xfe81, 0x0000 },
+ { 0x0700, 0xfe83, 0x0000 },
+ { 0x8700, 0xfe88, 0x3000 },
+ { 0x8700, 0xfe86, 0x2000 },
+ { 0x0700, 0xfe85, 0x0000 },
+ { 0x0700, 0xfe87, 0x0000 },
+ { 0x8700, 0xfe8a, 0x2000 },
+ { 0x0700, 0xfe89, 0x0000 },
+ { 0x0700, 0xfe8b, 0x0000 },
+ { 0x8700, 0xfe9c, 0x5000 },
+ { 0x8700, 0xfe94, 0x4000 },
+ { 0x8700, 0xfe90, 0x3000 },
+ { 0x8700, 0xfe8e, 0x2000 },
+ { 0x0700, 0xfe8d, 0x0000 },
+ { 0x0700, 0xfe8f, 0x0000 },
+ { 0x8700, 0xfe92, 0x2000 },
+ { 0x0700, 0xfe91, 0x0000 },
+ { 0x0700, 0xfe93, 0x0000 },
+ { 0x8700, 0xfe98, 0x3000 },
+ { 0x8700, 0xfe96, 0x2000 },
+ { 0x0700, 0xfe95, 0x0000 },
+ { 0x0700, 0xfe97, 0x0000 },
+ { 0x8700, 0xfe9a, 0x2000 },
+ { 0x0700, 0xfe99, 0x0000 },
+ { 0x0700, 0xfe9b, 0x0000 },
+ { 0x8700, 0xfea4, 0x4000 },
+ { 0x8700, 0xfea0, 0x3000 },
+ { 0x8700, 0xfe9e, 0x2000 },
+ { 0x0700, 0xfe9d, 0x0000 },
+ { 0x0700, 0xfe9f, 0x0000 },
+ { 0x8700, 0xfea2, 0x2000 },
+ { 0x0700, 0xfea1, 0x0000 },
+ { 0x0700, 0xfea3, 0x0000 },
+ { 0x8700, 0xfea8, 0x3000 },
+ { 0x8700, 0xfea6, 0x2000 },
+ { 0x0700, 0xfea5, 0x0000 },
+ { 0x0700, 0xfea7, 0x0000 },
+ { 0x8700, 0xfeaa, 0x2000 },
+ { 0x0700, 0xfea9, 0x0000 },
+ { 0x0700, 0xfeab, 0x0000 },
+ { 0x8700, 0xffaf, 0x9000 },
+ { 0x8900, 0xff2f, 0x8020 },
+ { 0x8700, 0xfeec, 0x7000 },
+ { 0x8700, 0xfecc, 0x6000 },
+ { 0x8700, 0xfebc, 0x5000 },
+ { 0x8700, 0xfeb4, 0x4000 },
+ { 0x8700, 0xfeb0, 0x3000 },
+ { 0x8700, 0xfeae, 0x2000 },
+ { 0x0700, 0xfead, 0x0000 },
+ { 0x0700, 0xfeaf, 0x0000 },
+ { 0x8700, 0xfeb2, 0x2000 },
+ { 0x0700, 0xfeb1, 0x0000 },
+ { 0x0700, 0xfeb3, 0x0000 },
+ { 0x8700, 0xfeb8, 0x3000 },
+ { 0x8700, 0xfeb6, 0x2000 },
+ { 0x0700, 0xfeb5, 0x0000 },
+ { 0x0700, 0xfeb7, 0x0000 },
+ { 0x8700, 0xfeba, 0x2000 },
+ { 0x0700, 0xfeb9, 0x0000 },
+ { 0x0700, 0xfebb, 0x0000 },
+ { 0x8700, 0xfec4, 0x4000 },
+ { 0x8700, 0xfec0, 0x3000 },
+ { 0x8700, 0xfebe, 0x2000 },
+ { 0x0700, 0xfebd, 0x0000 },
+ { 0x0700, 0xfebf, 0x0000 },
+ { 0x8700, 0xfec2, 0x2000 },
+ { 0x0700, 0xfec1, 0x0000 },
+ { 0x0700, 0xfec3, 0x0000 },
+ { 0x8700, 0xfec8, 0x3000 },
+ { 0x8700, 0xfec6, 0x2000 },
+ { 0x0700, 0xfec5, 0x0000 },
+ { 0x0700, 0xfec7, 0x0000 },
+ { 0x8700, 0xfeca, 0x2000 },
+ { 0x0700, 0xfec9, 0x0000 },
+ { 0x0700, 0xfecb, 0x0000 },
+ { 0x8700, 0xfedc, 0x5000 },
+ { 0x8700, 0xfed4, 0x4000 },
+ { 0x8700, 0xfed0, 0x3000 },
+ { 0x8700, 0xfece, 0x2000 },
+ { 0x0700, 0xfecd, 0x0000 },
+ { 0x0700, 0xfecf, 0x0000 },
+ { 0x8700, 0xfed2, 0x2000 },
+ { 0x0700, 0xfed1, 0x0000 },
+ { 0x0700, 0xfed3, 0x0000 },
+ { 0x8700, 0xfed8, 0x3000 },
+ { 0x8700, 0xfed6, 0x2000 },
+ { 0x0700, 0xfed5, 0x0000 },
+ { 0x0700, 0xfed7, 0x0000 },
+ { 0x8700, 0xfeda, 0x2000 },
+ { 0x0700, 0xfed9, 0x0000 },
+ { 0x0700, 0xfedb, 0x0000 },
+ { 0x8700, 0xfee4, 0x4000 },
+ { 0x8700, 0xfee0, 0x3000 },
+ { 0x8700, 0xfede, 0x2000 },
+ { 0x0700, 0xfedd, 0x0000 },
+ { 0x0700, 0xfedf, 0x0000 },
+ { 0x8700, 0xfee2, 0x2000 },
+ { 0x0700, 0xfee1, 0x0000 },
+ { 0x0700, 0xfee3, 0x0000 },
+ { 0x8700, 0xfee8, 0x3000 },
+ { 0x8700, 0xfee6, 0x2000 },
+ { 0x0700, 0xfee5, 0x0000 },
+ { 0x0700, 0xfee7, 0x0000 },
+ { 0x8700, 0xfeea, 0x2000 },
+ { 0x0700, 0xfee9, 0x0000 },
+ { 0x0700, 0xfeeb, 0x0000 },
+ { 0x9500, 0xff0f, 0x6000 },
+ { 0x8700, 0xfefc, 0x5000 },
+ { 0x8700, 0xfef4, 0x4000 },
+ { 0x8700, 0xfef0, 0x3000 },
+ { 0x8700, 0xfeee, 0x2000 },
+ { 0x0700, 0xfeed, 0x0000 },
+ { 0x0700, 0xfeef, 0x0000 },
+ { 0x8700, 0xfef2, 0x2000 },
+ { 0x0700, 0xfef1, 0x0000 },
+ { 0x0700, 0xfef3, 0x0000 },
+ { 0x8700, 0xfef8, 0x3000 },
+ { 0x8700, 0xfef6, 0x2000 },
+ { 0x0700, 0xfef5, 0x0000 },
+ { 0x0700, 0xfef7, 0x0000 },
+ { 0x8700, 0xfefa, 0x2000 },
+ { 0x0700, 0xfef9, 0x0000 },
+ { 0x0700, 0xfefb, 0x0000 },
+ { 0x9500, 0xff07, 0x4000 },
+ { 0x9500, 0xff03, 0x3000 },
+ { 0x9500, 0xff01, 0x2000 },
+ { 0x0100, 0xfeff, 0x0000 },
+ { 0x1500, 0xff02, 0x0000 },
+ { 0x9500, 0xff05, 0x2000 },
+ { 0x1700, 0xff04, 0x0000 },
+ { 0x1500, 0xff06, 0x0000 },
+ { 0x9900, 0xff0b, 0x3000 },
+ { 0x9200, 0xff09, 0x2000 },
+ { 0x1600, 0xff08, 0x0000 },
+ { 0x1500, 0xff0a, 0x0000 },
+ { 0x9100, 0xff0d, 0x2000 },
+ { 0x1500, 0xff0c, 0x0000 },
+ { 0x1500, 0xff0e, 0x0000 },
+ { 0x9500, 0xff1f, 0x5000 },
+ { 0x8d00, 0xff17, 0x4000 },
+ { 0x8d00, 0xff13, 0x3000 },
+ { 0x8d00, 0xff11, 0x2000 },
+ { 0x0d00, 0xff10, 0x0000 },
+ { 0x0d00, 0xff12, 0x0000 },
+ { 0x8d00, 0xff15, 0x2000 },
+ { 0x0d00, 0xff14, 0x0000 },
+ { 0x0d00, 0xff16, 0x0000 },
+ { 0x9500, 0xff1b, 0x3000 },
+ { 0x8d00, 0xff19, 0x2000 },
+ { 0x0d00, 0xff18, 0x0000 },
+ { 0x1500, 0xff1a, 0x0000 },
+ { 0x9900, 0xff1d, 0x2000 },
+ { 0x1900, 0xff1c, 0x0000 },
+ { 0x1900, 0xff1e, 0x0000 },
+ { 0x8900, 0xff27, 0x4020 },
+ { 0x8900, 0xff23, 0x3020 },
+ { 0x8900, 0xff21, 0x2020 },
+ { 0x1500, 0xff20, 0x0000 },
+ { 0x0900, 0xff22, 0x0020 },
+ { 0x8900, 0xff25, 0x2020 },
+ { 0x0900, 0xff24, 0x0020 },
+ { 0x0900, 0xff26, 0x0020 },
+ { 0x8900, 0xff2b, 0x3020 },
+ { 0x8900, 0xff29, 0x2020 },
+ { 0x0900, 0xff28, 0x0020 },
+ { 0x0900, 0xff2a, 0x0020 },
+ { 0x8900, 0xff2d, 0x2020 },
+ { 0x0900, 0xff2c, 0x0020 },
+ { 0x0900, 0xff2e, 0x0020 },
+ { 0x8700, 0xff6f, 0x7000 },
+ { 0x8500, 0xff4f, 0x6fe0 },
+ { 0x9000, 0xff3f, 0x5000 },
+ { 0x8900, 0xff37, 0x4020 },
+ { 0x8900, 0xff33, 0x3020 },
+ { 0x8900, 0xff31, 0x2020 },
+ { 0x0900, 0xff30, 0x0020 },
+ { 0x0900, 0xff32, 0x0020 },
+ { 0x8900, 0xff35, 0x2020 },
+ { 0x0900, 0xff34, 0x0020 },
+ { 0x0900, 0xff36, 0x0020 },
+ { 0x9600, 0xff3b, 0x3000 },
+ { 0x8900, 0xff39, 0x2020 },
+ { 0x0900, 0xff38, 0x0020 },
+ { 0x0900, 0xff3a, 0x0020 },
+ { 0x9200, 0xff3d, 0x2000 },
+ { 0x1500, 0xff3c, 0x0000 },
+ { 0x1800, 0xff3e, 0x0000 },
+ { 0x8500, 0xff47, 0x4fe0 },
+ { 0x8500, 0xff43, 0x3fe0 },
+ { 0x8500, 0xff41, 0x2fe0 },
+ { 0x1800, 0xff40, 0x0000 },
+ { 0x0500, 0xff42, 0x0fe0 },
+ { 0x8500, 0xff45, 0x2fe0 },
+ { 0x0500, 0xff44, 0x0fe0 },
+ { 0x0500, 0xff46, 0x0fe0 },
+ { 0x8500, 0xff4b, 0x3fe0 },
+ { 0x8500, 0xff49, 0x2fe0 },
+ { 0x0500, 0xff48, 0x0fe0 },
+ { 0x0500, 0xff4a, 0x0fe0 },
+ { 0x8500, 0xff4d, 0x2fe0 },
+ { 0x0500, 0xff4c, 0x0fe0 },
+ { 0x0500, 0xff4e, 0x0fe0 },
+ { 0x9600, 0xff5f, 0x5000 },
+ { 0x8500, 0xff57, 0x4fe0 },
+ { 0x8500, 0xff53, 0x3fe0 },
+ { 0x8500, 0xff51, 0x2fe0 },
+ { 0x0500, 0xff50, 0x0fe0 },
+ { 0x0500, 0xff52, 0x0fe0 },
+ { 0x8500, 0xff55, 0x2fe0 },
+ { 0x0500, 0xff54, 0x0fe0 },
+ { 0x0500, 0xff56, 0x0fe0 },
+ { 0x9600, 0xff5b, 0x3000 },
+ { 0x8500, 0xff59, 0x2fe0 },
+ { 0x0500, 0xff58, 0x0fe0 },
+ { 0x0500, 0xff5a, 0x0fe0 },
+ { 0x9200, 0xff5d, 0x2000 },
+ { 0x1900, 0xff5c, 0x0000 },
+ { 0x1900, 0xff5e, 0x0000 },
+ { 0x8700, 0xff67, 0x4000 },
+ { 0x9200, 0xff63, 0x3000 },
+ { 0x9500, 0xff61, 0x2000 },
+ { 0x1200, 0xff60, 0x0000 },
+ { 0x1600, 0xff62, 0x0000 },
+ { 0x9000, 0xff65, 0x2000 },
+ { 0x1500, 0xff64, 0x0000 },
+ { 0x0700, 0xff66, 0x0000 },
+ { 0x8700, 0xff6b, 0x3000 },
+ { 0x8700, 0xff69, 0x2000 },
+ { 0x0700, 0xff68, 0x0000 },
+ { 0x0700, 0xff6a, 0x0000 },
+ { 0x8700, 0xff6d, 0x2000 },
+ { 0x0700, 0xff6c, 0x0000 },
+ { 0x0700, 0xff6e, 0x0000 },
+ { 0x8700, 0xff8f, 0x6000 },
+ { 0x8700, 0xff7f, 0x5000 },
+ { 0x8700, 0xff77, 0x4000 },
+ { 0x8700, 0xff73, 0x3000 },
+ { 0x8700, 0xff71, 0x2000 },
+ { 0x0600, 0xff70, 0x0000 },
+ { 0x0700, 0xff72, 0x0000 },
+ { 0x8700, 0xff75, 0x2000 },
+ { 0x0700, 0xff74, 0x0000 },
+ { 0x0700, 0xff76, 0x0000 },
+ { 0x8700, 0xff7b, 0x3000 },
+ { 0x8700, 0xff79, 0x2000 },
+ { 0x0700, 0xff78, 0x0000 },
+ { 0x0700, 0xff7a, 0x0000 },
+ { 0x8700, 0xff7d, 0x2000 },
+ { 0x0700, 0xff7c, 0x0000 },
+ { 0x0700, 0xff7e, 0x0000 },
+ { 0x8700, 0xff87, 0x4000 },
+ { 0x8700, 0xff83, 0x3000 },
+ { 0x8700, 0xff81, 0x2000 },
+ { 0x0700, 0xff80, 0x0000 },
+ { 0x0700, 0xff82, 0x0000 },
+ { 0x8700, 0xff85, 0x2000 },
+ { 0x0700, 0xff84, 0x0000 },
+ { 0x0700, 0xff86, 0x0000 },
+ { 0x8700, 0xff8b, 0x3000 },
+ { 0x8700, 0xff89, 0x2000 },
+ { 0x0700, 0xff88, 0x0000 },
+ { 0x0700, 0xff8a, 0x0000 },
+ { 0x8700, 0xff8d, 0x2000 },
+ { 0x0700, 0xff8c, 0x0000 },
+ { 0x0700, 0xff8e, 0x0000 },
+ { 0x8600, 0xff9f, 0x5000 },
+ { 0x8700, 0xff97, 0x4000 },
+ { 0x8700, 0xff93, 0x3000 },
+ { 0x8700, 0xff91, 0x2000 },
+ { 0x0700, 0xff90, 0x0000 },
+ { 0x0700, 0xff92, 0x0000 },
+ { 0x8700, 0xff95, 0x2000 },
+ { 0x0700, 0xff94, 0x0000 },
+ { 0x0700, 0xff96, 0x0000 },
+ { 0x8700, 0xff9b, 0x3000 },
+ { 0x8700, 0xff99, 0x2000 },
+ { 0x0700, 0xff98, 0x0000 },
+ { 0x0700, 0xff9a, 0x0000 },
+ { 0x8700, 0xff9d, 0x2000 },
+ { 0x0700, 0xff9c, 0x0000 },
+ { 0x0600, 0xff9e, 0x0000 },
+ { 0x8700, 0xffa7, 0x4000 },
+ { 0x8700, 0xffa3, 0x3000 },
+ { 0x8700, 0xffa1, 0x2000 },
+ { 0x0700, 0xffa0, 0x0000 },
+ { 0x0700, 0xffa2, 0x0000 },
+ { 0x8700, 0xffa5, 0x2000 },
+ { 0x0700, 0xffa4, 0x0000 },
+ { 0x0700, 0xffa6, 0x0000 },
+ { 0x8700, 0xffab, 0x3000 },
+ { 0x8700, 0xffa9, 0x2000 },
+ { 0x0700, 0xffa8, 0x0000 },
+ { 0x0700, 0xffaa, 0x0000 },
+ { 0x8700, 0xffad, 0x2000 },
+ { 0x0700, 0xffac, 0x0000 },
+ { 0x0700, 0xffae, 0x0000 },
+ { 0x8701, 0x004c, 0x8000 },
+ { 0x8701, 0x0008, 0x7000 },
+ { 0x8700, 0xffd6, 0x6000 },
+ { 0x8700, 0xffc2, 0x5000 },
+ { 0x8700, 0xffb7, 0x4000 },
+ { 0x8700, 0xffb3, 0x3000 },
+ { 0x8700, 0xffb1, 0x2000 },
+ { 0x0700, 0xffb0, 0x0000 },
+ { 0x0700, 0xffb2, 0x0000 },
+ { 0x8700, 0xffb5, 0x2000 },
+ { 0x0700, 0xffb4, 0x0000 },
+ { 0x0700, 0xffb6, 0x0000 },
+ { 0x8700, 0xffbb, 0x3000 },
+ { 0x8700, 0xffb9, 0x2000 },
+ { 0x0700, 0xffb8, 0x0000 },
+ { 0x0700, 0xffba, 0x0000 },
+ { 0x8700, 0xffbd, 0x2000 },
+ { 0x0700, 0xffbc, 0x0000 },
+ { 0x0700, 0xffbe, 0x0000 },
+ { 0x8700, 0xffcc, 0x4000 },
+ { 0x8700, 0xffc6, 0x3000 },
+ { 0x8700, 0xffc4, 0x2000 },
+ { 0x0700, 0xffc3, 0x0000 },
+ { 0x0700, 0xffc5, 0x0000 },
+ { 0x8700, 0xffca, 0x2000 },
+ { 0x0700, 0xffc7, 0x0000 },
+ { 0x0700, 0xffcb, 0x0000 },
+ { 0x8700, 0xffd2, 0x3000 },
+ { 0x8700, 0xffce, 0x2000 },
+ { 0x0700, 0xffcd, 0x0000 },
+ { 0x0700, 0xffcf, 0x0000 },
+ { 0x8700, 0xffd4, 0x2000 },
+ { 0x0700, 0xffd3, 0x0000 },
+ { 0x0700, 0xffd5, 0x0000 },
+ { 0x9900, 0xffec, 0x5000 },
+ { 0x9800, 0xffe3, 0x4000 },
+ { 0x8700, 0xffdc, 0x3000 },
+ { 0x8700, 0xffda, 0x2000 },
+ { 0x0700, 0xffd7, 0x0000 },
+ { 0x0700, 0xffdb, 0x0000 },
+ { 0x9700, 0xffe1, 0x2000 },
+ { 0x1700, 0xffe0, 0x0000 },
+ { 0x1900, 0xffe2, 0x0000 },
+ { 0x9a00, 0xffe8, 0x3000 },
+ { 0x9700, 0xffe5, 0x2000 },
+ { 0x1a00, 0xffe4, 0x0000 },
+ { 0x1700, 0xffe6, 0x0000 },
+ { 0x9900, 0xffea, 0x2000 },
+ { 0x1900, 0xffe9, 0x0000 },
+ { 0x1900, 0xffeb, 0x0000 },
+ { 0x8701, 0x0000, 0x4000 },
+ { 0x8100, 0xfffa, 0x3000 },
+ { 0x9a00, 0xffee, 0x2000 },
+ { 0x1a00, 0xffed, 0x0000 },
+ { 0x0100, 0xfff9, 0x0000 },
+ { 0x9a00, 0xfffc, 0x2000 },
+ { 0x0100, 0xfffb, 0x0000 },
+ { 0x1a00, 0xfffd, 0x0000 },
+ { 0x8701, 0x0004, 0x3000 },
+ { 0x8701, 0x0002, 0x2000 },
+ { 0x0701, 0x0001, 0x0000 },
+ { 0x0701, 0x0003, 0x0000 },
+ { 0x8701, 0x0006, 0x2000 },
+ { 0x0701, 0x0005, 0x0000 },
+ { 0x0701, 0x0007, 0x0000 },
+ { 0x8701, 0x002a, 0x6000 },
+ { 0x8701, 0x0019, 0x5000 },
+ { 0x8701, 0x0011, 0x4000 },
+ { 0x8701, 0x000d, 0x3000 },
+ { 0x8701, 0x000a, 0x2000 },
+ { 0x0701, 0x0009, 0x0000 },
+ { 0x0701, 0x000b, 0x0000 },
+ { 0x8701, 0x000f, 0x2000 },
+ { 0x0701, 0x000e, 0x0000 },
+ { 0x0701, 0x0010, 0x0000 },
+ { 0x8701, 0x0015, 0x3000 },
+ { 0x8701, 0x0013, 0x2000 },
+ { 0x0701, 0x0012, 0x0000 },
+ { 0x0701, 0x0014, 0x0000 },
+ { 0x8701, 0x0017, 0x2000 },
+ { 0x0701, 0x0016, 0x0000 },
+ { 0x0701, 0x0018, 0x0000 },
+ { 0x8701, 0x0021, 0x4000 },
+ { 0x8701, 0x001d, 0x3000 },
+ { 0x8701, 0x001b, 0x2000 },
+ { 0x0701, 0x001a, 0x0000 },
+ { 0x0701, 0x001c, 0x0000 },
+ { 0x8701, 0x001f, 0x2000 },
+ { 0x0701, 0x001e, 0x0000 },
+ { 0x0701, 0x0020, 0x0000 },
+ { 0x8701, 0x0025, 0x3000 },
+ { 0x8701, 0x0023, 0x2000 },
+ { 0x0701, 0x0022, 0x0000 },
+ { 0x0701, 0x0024, 0x0000 },
+ { 0x8701, 0x0028, 0x2000 },
+ { 0x0701, 0x0026, 0x0000 },
+ { 0x0701, 0x0029, 0x0000 },
+ { 0x8701, 0x003a, 0x5000 },
+ { 0x8701, 0x0032, 0x4000 },
+ { 0x8701, 0x002e, 0x3000 },
+ { 0x8701, 0x002c, 0x2000 },
+ { 0x0701, 0x002b, 0x0000 },
+ { 0x0701, 0x002d, 0x0000 },
+ { 0x8701, 0x0030, 0x2000 },
+ { 0x0701, 0x002f, 0x0000 },
+ { 0x0701, 0x0031, 0x0000 },
+ { 0x8701, 0x0036, 0x3000 },
+ { 0x8701, 0x0034, 0x2000 },
+ { 0x0701, 0x0033, 0x0000 },
+ { 0x0701, 0x0035, 0x0000 },
+ { 0x8701, 0x0038, 0x2000 },
+ { 0x0701, 0x0037, 0x0000 },
+ { 0x0701, 0x0039, 0x0000 },
+ { 0x8701, 0x0044, 0x4000 },
+ { 0x8701, 0x0040, 0x3000 },
+ { 0x8701, 0x003d, 0x2000 },
+ { 0x0701, 0x003c, 0x0000 },
+ { 0x0701, 0x003f, 0x0000 },
+ { 0x8701, 0x0042, 0x2000 },
+ { 0x0701, 0x0041, 0x0000 },
+ { 0x0701, 0x0043, 0x0000 },
+ { 0x8701, 0x0048, 0x3000 },
+ { 0x8701, 0x0046, 0x2000 },
+ { 0x0701, 0x0045, 0x0000 },
+ { 0x0701, 0x0047, 0x0000 },
+ { 0x8701, 0x004a, 0x2000 },
+ { 0x0701, 0x0049, 0x0000 },
+ { 0x0701, 0x004b, 0x0000 },
+ { 0x8701, 0x00b0, 0x7000 },
+ { 0x8701, 0x0090, 0x6000 },
+ { 0x8701, 0x0080, 0x5000 },
+ { 0x8701, 0x0056, 0x4000 },
+ { 0x8701, 0x0052, 0x3000 },
+ { 0x8701, 0x0050, 0x2000 },
+ { 0x0701, 0x004d, 0x0000 },
+ { 0x0701, 0x0051, 0x0000 },
+ { 0x8701, 0x0054, 0x2000 },
+ { 0x0701, 0x0053, 0x0000 },
+ { 0x0701, 0x0055, 0x0000 },
+ { 0x8701, 0x005a, 0x3000 },
+ { 0x8701, 0x0058, 0x2000 },
+ { 0x0701, 0x0057, 0x0000 },
+ { 0x0701, 0x0059, 0x0000 },
+ { 0x8701, 0x005c, 0x2000 },
+ { 0x0701, 0x005b, 0x0000 },
+ { 0x0701, 0x005d, 0x0000 },
+ { 0x8701, 0x0088, 0x4000 },
+ { 0x8701, 0x0084, 0x3000 },
+ { 0x8701, 0x0082, 0x2000 },
+ { 0x0701, 0x0081, 0x0000 },
+ { 0x0701, 0x0083, 0x0000 },
+ { 0x8701, 0x0086, 0x2000 },
+ { 0x0701, 0x0085, 0x0000 },
+ { 0x0701, 0x0087, 0x0000 },
+ { 0x8701, 0x008c, 0x3000 },
+ { 0x8701, 0x008a, 0x2000 },
+ { 0x0701, 0x0089, 0x0000 },
+ { 0x0701, 0x008b, 0x0000 },
+ { 0x8701, 0x008e, 0x2000 },
+ { 0x0701, 0x008d, 0x0000 },
+ { 0x0701, 0x008f, 0x0000 },
+ { 0x8701, 0x00a0, 0x5000 },
+ { 0x8701, 0x0098, 0x4000 },
+ { 0x8701, 0x0094, 0x3000 },
+ { 0x8701, 0x0092, 0x2000 },
+ { 0x0701, 0x0091, 0x0000 },
+ { 0x0701, 0x0093, 0x0000 },
+ { 0x8701, 0x0096, 0x2000 },
+ { 0x0701, 0x0095, 0x0000 },
+ { 0x0701, 0x0097, 0x0000 },
+ { 0x8701, 0x009c, 0x3000 },
+ { 0x8701, 0x009a, 0x2000 },
+ { 0x0701, 0x0099, 0x0000 },
+ { 0x0701, 0x009b, 0x0000 },
+ { 0x8701, 0x009e, 0x2000 },
+ { 0x0701, 0x009d, 0x0000 },
+ { 0x0701, 0x009f, 0x0000 },
+ { 0x8701, 0x00a8, 0x4000 },
+ { 0x8701, 0x00a4, 0x3000 },
+ { 0x8701, 0x00a2, 0x2000 },
+ { 0x0701, 0x00a1, 0x0000 },
+ { 0x0701, 0x00a3, 0x0000 },
+ { 0x8701, 0x00a6, 0x2000 },
+ { 0x0701, 0x00a5, 0x0000 },
+ { 0x0701, 0x00a7, 0x0000 },
+ { 0x8701, 0x00ac, 0x3000 },
+ { 0x8701, 0x00aa, 0x2000 },
+ { 0x0701, 0x00a9, 0x0000 },
+ { 0x0701, 0x00ab, 0x0000 },
+ { 0x8701, 0x00ae, 0x2000 },
+ { 0x0701, 0x00ad, 0x0000 },
+ { 0x0701, 0x00af, 0x0000 },
+ { 0x8701, 0x00d0, 0x6000 },
+ { 0x8701, 0x00c0, 0x5000 },
+ { 0x8701, 0x00b8, 0x4000 },
+ { 0x8701, 0x00b4, 0x3000 },
+ { 0x8701, 0x00b2, 0x2000 },
+ { 0x0701, 0x00b1, 0x0000 },
+ { 0x0701, 0x00b3, 0x0000 },
+ { 0x8701, 0x00b6, 0x2000 },
+ { 0x0701, 0x00b5, 0x0000 },
+ { 0x0701, 0x00b7, 0x0000 },
+ { 0x8701, 0x00bc, 0x3000 },
+ { 0x8701, 0x00ba, 0x2000 },
+ { 0x0701, 0x00b9, 0x0000 },
+ { 0x0701, 0x00bb, 0x0000 },
+ { 0x8701, 0x00be, 0x2000 },
+ { 0x0701, 0x00bd, 0x0000 },
+ { 0x0701, 0x00bf, 0x0000 },
+ { 0x8701, 0x00c8, 0x4000 },
+ { 0x8701, 0x00c4, 0x3000 },
+ { 0x8701, 0x00c2, 0x2000 },
+ { 0x0701, 0x00c1, 0x0000 },
+ { 0x0701, 0x00c3, 0x0000 },
+ { 0x8701, 0x00c6, 0x2000 },
+ { 0x0701, 0x00c5, 0x0000 },
+ { 0x0701, 0x00c7, 0x0000 },
+ { 0x8701, 0x00cc, 0x3000 },
+ { 0x8701, 0x00ca, 0x2000 },
+ { 0x0701, 0x00c9, 0x0000 },
+ { 0x0701, 0x00cb, 0x0000 },
+ { 0x8701, 0x00ce, 0x2000 },
+ { 0x0701, 0x00cd, 0x0000 },
+ { 0x0701, 0x00cf, 0x0000 },
+ { 0x8701, 0x00e0, 0x5000 },
+ { 0x8701, 0x00d8, 0x4000 },
+ { 0x8701, 0x00d4, 0x3000 },
+ { 0x8701, 0x00d2, 0x2000 },
+ { 0x0701, 0x00d1, 0x0000 },
+ { 0x0701, 0x00d3, 0x0000 },
+ { 0x8701, 0x00d6, 0x2000 },
+ { 0x0701, 0x00d5, 0x0000 },
+ { 0x0701, 0x00d7, 0x0000 },
+ { 0x8701, 0x00dc, 0x3000 },
+ { 0x8701, 0x00da, 0x2000 },
+ { 0x0701, 0x00d9, 0x0000 },
+ { 0x0701, 0x00db, 0x0000 },
+ { 0x8701, 0x00de, 0x2000 },
+ { 0x0701, 0x00dd, 0x0000 },
+ { 0x0701, 0x00df, 0x0000 },
+ { 0x8701, 0x00e8, 0x4000 },
+ { 0x8701, 0x00e4, 0x3000 },
+ { 0x8701, 0x00e2, 0x2000 },
+ { 0x0701, 0x00e1, 0x0000 },
+ { 0x0701, 0x00e3, 0x0000 },
+ { 0x8701, 0x00e6, 0x2000 },
+ { 0x0701, 0x00e5, 0x0000 },
+ { 0x0701, 0x00e7, 0x0000 },
+ { 0x8701, 0x00ec, 0x3000 },
+ { 0x8701, 0x00ea, 0x2000 },
+ { 0x0701, 0x00e9, 0x0000 },
+ { 0x0701, 0x00eb, 0x0000 },
+ { 0x8701, 0x00ee, 0x2000 },
+ { 0x0701, 0x00ed, 0x0000 },
+ { 0x0701, 0x00ef, 0x0000 },
+ { 0x8501, 0xd459, 0xb000 },
+ { 0x9a01, 0xd080, 0xa000 },
+ { 0x8701, 0x045f, 0x9000 },
+ { 0x8701, 0x0349, 0x8000 },
+ { 0x9a01, 0x013c, 0x7000 },
+ { 0x8f01, 0x0119, 0x6000 },
+ { 0x8f01, 0x0109, 0x5000 },
+ { 0x8701, 0x00f8, 0x4000 },
+ { 0x8701, 0x00f4, 0x3000 },
+ { 0x8701, 0x00f2, 0x2000 },
+ { 0x0701, 0x00f1, 0x0000 },
+ { 0x0701, 0x00f3, 0x0000 },
+ { 0x8701, 0x00f6, 0x2000 },
+ { 0x0701, 0x00f5, 0x0000 },
+ { 0x0701, 0x00f7, 0x0000 },
+ { 0x9501, 0x0101, 0x3000 },
+ { 0x8701, 0x00fa, 0x2000 },
+ { 0x0701, 0x00f9, 0x0000 },
+ { 0x1501, 0x0100, 0x0000 },
+ { 0x8f01, 0x0107, 0x2000 },
+ { 0x1a01, 0x0102, 0x0000 },
+ { 0x0f01, 0x0108, 0x0000 },
+ { 0x8f01, 0x0111, 0x4000 },
+ { 0x8f01, 0x010d, 0x3000 },
+ { 0x8f01, 0x010b, 0x2000 },
+ { 0x0f01, 0x010a, 0x0000 },
+ { 0x0f01, 0x010c, 0x0000 },
+ { 0x8f01, 0x010f, 0x2000 },
+ { 0x0f01, 0x010e, 0x0000 },
+ { 0x0f01, 0x0110, 0x0000 },
+ { 0x8f01, 0x0115, 0x3000 },
+ { 0x8f01, 0x0113, 0x2000 },
+ { 0x0f01, 0x0112, 0x0000 },
+ { 0x0f01, 0x0114, 0x0000 },
+ { 0x8f01, 0x0117, 0x2000 },
+ { 0x0f01, 0x0116, 0x0000 },
+ { 0x0f01, 0x0118, 0x0000 },
+ { 0x8f01, 0x0129, 0x5000 },
+ { 0x8f01, 0x0121, 0x4000 },
+ { 0x8f01, 0x011d, 0x3000 },
+ { 0x8f01, 0x011b, 0x2000 },
+ { 0x0f01, 0x011a, 0x0000 },
+ { 0x0f01, 0x011c, 0x0000 },
+ { 0x8f01, 0x011f, 0x2000 },
+ { 0x0f01, 0x011e, 0x0000 },
+ { 0x0f01, 0x0120, 0x0000 },
+ { 0x8f01, 0x0125, 0x3000 },
+ { 0x8f01, 0x0123, 0x2000 },
+ { 0x0f01, 0x0122, 0x0000 },
+ { 0x0f01, 0x0124, 0x0000 },
+ { 0x8f01, 0x0127, 0x2000 },
+ { 0x0f01, 0x0126, 0x0000 },
+ { 0x0f01, 0x0128, 0x0000 },
+ { 0x8f01, 0x0131, 0x4000 },
+ { 0x8f01, 0x012d, 0x3000 },
+ { 0x8f01, 0x012b, 0x2000 },
+ { 0x0f01, 0x012a, 0x0000 },
+ { 0x0f01, 0x012c, 0x0000 },
+ { 0x8f01, 0x012f, 0x2000 },
+ { 0x0f01, 0x012e, 0x0000 },
+ { 0x0f01, 0x0130, 0x0000 },
+ { 0x9a01, 0x0138, 0x3000 },
+ { 0x8f01, 0x0133, 0x2000 },
+ { 0x0f01, 0x0132, 0x0000 },
+ { 0x1a01, 0x0137, 0x0000 },
+ { 0x9a01, 0x013a, 0x2000 },
+ { 0x1a01, 0x0139, 0x0000 },
+ { 0x1a01, 0x013b, 0x0000 },
+ { 0x8701, 0x031c, 0x6000 },
+ { 0x8701, 0x030c, 0x5000 },
+ { 0x8701, 0x0304, 0x4000 },
+ { 0x8701, 0x0300, 0x3000 },
+ { 0x9a01, 0x013e, 0x2000 },
+ { 0x1a01, 0x013d, 0x0000 },
+ { 0x1a01, 0x013f, 0x0000 },
+ { 0x8701, 0x0302, 0x2000 },
+ { 0x0701, 0x0301, 0x0000 },
+ { 0x0701, 0x0303, 0x0000 },
+ { 0x8701, 0x0308, 0x3000 },
+ { 0x8701, 0x0306, 0x2000 },
+ { 0x0701, 0x0305, 0x0000 },
+ { 0x0701, 0x0307, 0x0000 },
+ { 0x8701, 0x030a, 0x2000 },
+ { 0x0701, 0x0309, 0x0000 },
+ { 0x0701, 0x030b, 0x0000 },
+ { 0x8701, 0x0314, 0x4000 },
+ { 0x8701, 0x0310, 0x3000 },
+ { 0x8701, 0x030e, 0x2000 },
+ { 0x0701, 0x030d, 0x0000 },
+ { 0x0701, 0x030f, 0x0000 },
+ { 0x8701, 0x0312, 0x2000 },
+ { 0x0701, 0x0311, 0x0000 },
+ { 0x0701, 0x0313, 0x0000 },
+ { 0x8701, 0x0318, 0x3000 },
+ { 0x8701, 0x0316, 0x2000 },
+ { 0x0701, 0x0315, 0x0000 },
+ { 0x0701, 0x0317, 0x0000 },
+ { 0x8701, 0x031a, 0x2000 },
+ { 0x0701, 0x0319, 0x0000 },
+ { 0x0701, 0x031b, 0x0000 },
+ { 0x8701, 0x0339, 0x5000 },
+ { 0x8701, 0x0331, 0x4000 },
+ { 0x8f01, 0x0321, 0x3000 },
+ { 0x8701, 0x031e, 0x2000 },
+ { 0x0701, 0x031d, 0x0000 },
+ { 0x0f01, 0x0320, 0x0000 },
+ { 0x8f01, 0x0323, 0x2000 },
+ { 0x0f01, 0x0322, 0x0000 },
+ { 0x0701, 0x0330, 0x0000 },
+ { 0x8701, 0x0335, 0x3000 },
+ { 0x8701, 0x0333, 0x2000 },
+ { 0x0701, 0x0332, 0x0000 },
+ { 0x0701, 0x0334, 0x0000 },
+ { 0x8701, 0x0337, 0x2000 },
+ { 0x0701, 0x0336, 0x0000 },
+ { 0x0701, 0x0338, 0x0000 },
+ { 0x8701, 0x0341, 0x4000 },
+ { 0x8701, 0x033d, 0x3000 },
+ { 0x8701, 0x033b, 0x2000 },
+ { 0x0701, 0x033a, 0x0000 },
+ { 0x0701, 0x033c, 0x0000 },
+ { 0x8701, 0x033f, 0x2000 },
+ { 0x0701, 0x033e, 0x0000 },
+ { 0x0701, 0x0340, 0x0000 },
+ { 0x8701, 0x0345, 0x3000 },
+ { 0x8701, 0x0343, 0x2000 },
+ { 0x0701, 0x0342, 0x0000 },
+ { 0x0701, 0x0344, 0x0000 },
+ { 0x8701, 0x0347, 0x2000 },
+ { 0x0701, 0x0346, 0x0000 },
+ { 0x0701, 0x0348, 0x0000 },
+ { 0x8901, 0x041f, 0x7028 },
+ { 0x9501, 0x039f, 0x6000 },
+ { 0x8701, 0x038e, 0x5000 },
+ { 0x8701, 0x0386, 0x4000 },
+ { 0x8701, 0x0382, 0x3000 },
+ { 0x8701, 0x0380, 0x2000 },
+ { 0x0e01, 0x034a, 0x0000 },
+ { 0x0701, 0x0381, 0x0000 },
+ { 0x8701, 0x0384, 0x2000 },
+ { 0x0701, 0x0383, 0x0000 },
+ { 0x0701, 0x0385, 0x0000 },
+ { 0x8701, 0x038a, 0x3000 },
+ { 0x8701, 0x0388, 0x2000 },
+ { 0x0701, 0x0387, 0x0000 },
+ { 0x0701, 0x0389, 0x0000 },
+ { 0x8701, 0x038c, 0x2000 },
+ { 0x0701, 0x038b, 0x0000 },
+ { 0x0701, 0x038d, 0x0000 },
+ { 0x8701, 0x0396, 0x4000 },
+ { 0x8701, 0x0392, 0x3000 },
+ { 0x8701, 0x0390, 0x2000 },
+ { 0x0701, 0x038f, 0x0000 },
+ { 0x0701, 0x0391, 0x0000 },
+ { 0x8701, 0x0394, 0x2000 },
+ { 0x0701, 0x0393, 0x0000 },
+ { 0x0701, 0x0395, 0x0000 },
+ { 0x8701, 0x039a, 0x3000 },
+ { 0x8701, 0x0398, 0x2000 },
+ { 0x0701, 0x0397, 0x0000 },
+ { 0x0701, 0x0399, 0x0000 },
+ { 0x8701, 0x039c, 0x2000 },
+ { 0x0701, 0x039b, 0x0000 },
+ { 0x0701, 0x039d, 0x0000 },
+ { 0x8901, 0x040f, 0x5028 },
+ { 0x8901, 0x0407, 0x4028 },
+ { 0x8901, 0x0403, 0x3028 },
+ { 0x8901, 0x0401, 0x2028 },
+ { 0x0901, 0x0400, 0x0028 },
+ { 0x0901, 0x0402, 0x0028 },
+ { 0x8901, 0x0405, 0x2028 },
+ { 0x0901, 0x0404, 0x0028 },
+ { 0x0901, 0x0406, 0x0028 },
+ { 0x8901, 0x040b, 0x3028 },
+ { 0x8901, 0x0409, 0x2028 },
+ { 0x0901, 0x0408, 0x0028 },
+ { 0x0901, 0x040a, 0x0028 },
+ { 0x8901, 0x040d, 0x2028 },
+ { 0x0901, 0x040c, 0x0028 },
+ { 0x0901, 0x040e, 0x0028 },
+ { 0x8901, 0x0417, 0x4028 },
+ { 0x8901, 0x0413, 0x3028 },
+ { 0x8901, 0x0411, 0x2028 },
+ { 0x0901, 0x0410, 0x0028 },
+ { 0x0901, 0x0412, 0x0028 },
+ { 0x8901, 0x0415, 0x2028 },
+ { 0x0901, 0x0414, 0x0028 },
+ { 0x0901, 0x0416, 0x0028 },
+ { 0x8901, 0x041b, 0x3028 },
+ { 0x8901, 0x0419, 0x2028 },
+ { 0x0901, 0x0418, 0x0028 },
+ { 0x0901, 0x041a, 0x0028 },
+ { 0x8901, 0x041d, 0x2028 },
+ { 0x0901, 0x041c, 0x0028 },
+ { 0x0901, 0x041e, 0x0028 },
+ { 0x8501, 0x043f, 0x6fd8 },
+ { 0x8501, 0x042f, 0x5fd8 },
+ { 0x8901, 0x0427, 0x4028 },
+ { 0x8901, 0x0423, 0x3028 },
+ { 0x8901, 0x0421, 0x2028 },
+ { 0x0901, 0x0420, 0x0028 },
+ { 0x0901, 0x0422, 0x0028 },
+ { 0x8901, 0x0425, 0x2028 },
+ { 0x0901, 0x0424, 0x0028 },
+ { 0x0901, 0x0426, 0x0028 },
+ { 0x8501, 0x042b, 0x3fd8 },
+ { 0x8501, 0x0429, 0x2fd8 },
+ { 0x0501, 0x0428, 0x0fd8 },
+ { 0x0501, 0x042a, 0x0fd8 },
+ { 0x8501, 0x042d, 0x2fd8 },
+ { 0x0501, 0x042c, 0x0fd8 },
+ { 0x0501, 0x042e, 0x0fd8 },
+ { 0x8501, 0x0437, 0x4fd8 },
+ { 0x8501, 0x0433, 0x3fd8 },
+ { 0x8501, 0x0431, 0x2fd8 },
+ { 0x0501, 0x0430, 0x0fd8 },
+ { 0x0501, 0x0432, 0x0fd8 },
+ { 0x8501, 0x0435, 0x2fd8 },
+ { 0x0501, 0x0434, 0x0fd8 },
+ { 0x0501, 0x0436, 0x0fd8 },
+ { 0x8501, 0x043b, 0x3fd8 },
+ { 0x8501, 0x0439, 0x2fd8 },
+ { 0x0501, 0x0438, 0x0fd8 },
+ { 0x0501, 0x043a, 0x0fd8 },
+ { 0x8501, 0x043d, 0x2fd8 },
+ { 0x0501, 0x043c, 0x0fd8 },
+ { 0x0501, 0x043e, 0x0fd8 },
+ { 0x8501, 0x044f, 0x5fd8 },
+ { 0x8501, 0x0447, 0x4fd8 },
+ { 0x8501, 0x0443, 0x3fd8 },
+ { 0x8501, 0x0441, 0x2fd8 },
+ { 0x0501, 0x0440, 0x0fd8 },
+ { 0x0501, 0x0442, 0x0fd8 },
+ { 0x8501, 0x0445, 0x2fd8 },
+ { 0x0501, 0x0444, 0x0fd8 },
+ { 0x0501, 0x0446, 0x0fd8 },
+ { 0x8501, 0x044b, 0x3fd8 },
+ { 0x8501, 0x0449, 0x2fd8 },
+ { 0x0501, 0x0448, 0x0fd8 },
+ { 0x0501, 0x044a, 0x0fd8 },
+ { 0x8501, 0x044d, 0x2fd8 },
+ { 0x0501, 0x044c, 0x0fd8 },
+ { 0x0501, 0x044e, 0x0fd8 },
+ { 0x8701, 0x0457, 0x4000 },
+ { 0x8701, 0x0453, 0x3000 },
+ { 0x8701, 0x0451, 0x2000 },
+ { 0x0701, 0x0450, 0x0000 },
+ { 0x0701, 0x0452, 0x0000 },
+ { 0x8701, 0x0455, 0x2000 },
+ { 0x0701, 0x0454, 0x0000 },
+ { 0x0701, 0x0456, 0x0000 },
+ { 0x8701, 0x045b, 0x3000 },
+ { 0x8701, 0x0459, 0x2000 },
+ { 0x0701, 0x0458, 0x0000 },
+ { 0x0701, 0x045a, 0x0000 },
+ { 0x8701, 0x045d, 0x2000 },
+ { 0x0701, 0x045c, 0x0000 },
+ { 0x0701, 0x045e, 0x0000 },
+ { 0x9a01, 0xd000, 0x8000 },
+ { 0x8d01, 0x04a1, 0x7000 },
+ { 0x8701, 0x047f, 0x6000 },
+ { 0x8701, 0x046f, 0x5000 },
+ { 0x8701, 0x0467, 0x4000 },
+ { 0x8701, 0x0463, 0x3000 },
+ { 0x8701, 0x0461, 0x2000 },
+ { 0x0701, 0x0460, 0x0000 },
+ { 0x0701, 0x0462, 0x0000 },
+ { 0x8701, 0x0465, 0x2000 },
+ { 0x0701, 0x0464, 0x0000 },
+ { 0x0701, 0x0466, 0x0000 },
+ { 0x8701, 0x046b, 0x3000 },
+ { 0x8701, 0x0469, 0x2000 },
+ { 0x0701, 0x0468, 0x0000 },
+ { 0x0701, 0x046a, 0x0000 },
+ { 0x8701, 0x046d, 0x2000 },
+ { 0x0701, 0x046c, 0x0000 },
+ { 0x0701, 0x046e, 0x0000 },
+ { 0x8701, 0x0477, 0x4000 },
+ { 0x8701, 0x0473, 0x3000 },
+ { 0x8701, 0x0471, 0x2000 },
+ { 0x0701, 0x0470, 0x0000 },
+ { 0x0701, 0x0472, 0x0000 },
+ { 0x8701, 0x0475, 0x2000 },
+ { 0x0701, 0x0474, 0x0000 },
+ { 0x0701, 0x0476, 0x0000 },
+ { 0x8701, 0x047b, 0x3000 },
+ { 0x8701, 0x0479, 0x2000 },
+ { 0x0701, 0x0478, 0x0000 },
+ { 0x0701, 0x047a, 0x0000 },
+ { 0x8701, 0x047d, 0x2000 },
+ { 0x0701, 0x047c, 0x0000 },
+ { 0x0701, 0x047e, 0x0000 },
+ { 0x8701, 0x048f, 0x5000 },
+ { 0x8701, 0x0487, 0x4000 },
+ { 0x8701, 0x0483, 0x3000 },
+ { 0x8701, 0x0481, 0x2000 },
+ { 0x0701, 0x0480, 0x0000 },
+ { 0x0701, 0x0482, 0x0000 },
+ { 0x8701, 0x0485, 0x2000 },
+ { 0x0701, 0x0484, 0x0000 },
+ { 0x0701, 0x0486, 0x0000 },
+ { 0x8701, 0x048b, 0x3000 },
+ { 0x8701, 0x0489, 0x2000 },
+ { 0x0701, 0x0488, 0x0000 },
+ { 0x0701, 0x048a, 0x0000 },
+ { 0x8701, 0x048d, 0x2000 },
+ { 0x0701, 0x048c, 0x0000 },
+ { 0x0701, 0x048e, 0x0000 },
+ { 0x8701, 0x0497, 0x4000 },
+ { 0x8701, 0x0493, 0x3000 },
+ { 0x8701, 0x0491, 0x2000 },
+ { 0x0701, 0x0490, 0x0000 },
+ { 0x0701, 0x0492, 0x0000 },
+ { 0x8701, 0x0495, 0x2000 },
+ { 0x0701, 0x0494, 0x0000 },
+ { 0x0701, 0x0496, 0x0000 },
+ { 0x8701, 0x049b, 0x3000 },
+ { 0x8701, 0x0499, 0x2000 },
+ { 0x0701, 0x0498, 0x0000 },
+ { 0x0701, 0x049a, 0x0000 },
+ { 0x8701, 0x049d, 0x2000 },
+ { 0x0701, 0x049c, 0x0000 },
+ { 0x0d01, 0x04a0, 0x0000 },
+ { 0x8701, 0x081a, 0x6000 },
+ { 0x8701, 0x080a, 0x5000 },
+ { 0x8d01, 0x04a9, 0x4000 },
+ { 0x8d01, 0x04a5, 0x3000 },
+ { 0x8d01, 0x04a3, 0x2000 },
+ { 0x0d01, 0x04a2, 0x0000 },
+ { 0x0d01, 0x04a4, 0x0000 },
+ { 0x8d01, 0x04a7, 0x2000 },
+ { 0x0d01, 0x04a6, 0x0000 },
+ { 0x0d01, 0x04a8, 0x0000 },
+ { 0x8701, 0x0803, 0x3000 },
+ { 0x8701, 0x0801, 0x2000 },
+ { 0x0701, 0x0800, 0x0000 },
+ { 0x0701, 0x0802, 0x0000 },
+ { 0x8701, 0x0805, 0x2000 },
+ { 0x0701, 0x0804, 0x0000 },
+ { 0x0701, 0x0808, 0x0000 },
+ { 0x8701, 0x0812, 0x4000 },
+ { 0x8701, 0x080e, 0x3000 },
+ { 0x8701, 0x080c, 0x2000 },
+ { 0x0701, 0x080b, 0x0000 },
+ { 0x0701, 0x080d, 0x0000 },
+ { 0x8701, 0x0810, 0x2000 },
+ { 0x0701, 0x080f, 0x0000 },
+ { 0x0701, 0x0811, 0x0000 },
+ { 0x8701, 0x0816, 0x3000 },
+ { 0x8701, 0x0814, 0x2000 },
+ { 0x0701, 0x0813, 0x0000 },
+ { 0x0701, 0x0815, 0x0000 },
+ { 0x8701, 0x0818, 0x2000 },
+ { 0x0701, 0x0817, 0x0000 },
+ { 0x0701, 0x0819, 0x0000 },
+ { 0x8701, 0x082a, 0x5000 },
+ { 0x8701, 0x0822, 0x4000 },
+ { 0x8701, 0x081e, 0x3000 },
+ { 0x8701, 0x081c, 0x2000 },
+ { 0x0701, 0x081b, 0x0000 },
+ { 0x0701, 0x081d, 0x0000 },
+ { 0x8701, 0x0820, 0x2000 },
+ { 0x0701, 0x081f, 0x0000 },
+ { 0x0701, 0x0821, 0x0000 },
+ { 0x8701, 0x0826, 0x3000 },
+ { 0x8701, 0x0824, 0x2000 },
+ { 0x0701, 0x0823, 0x0000 },
+ { 0x0701, 0x0825, 0x0000 },
+ { 0x8701, 0x0828, 0x2000 },
+ { 0x0701, 0x0827, 0x0000 },
+ { 0x0701, 0x0829, 0x0000 },
+ { 0x8701, 0x0832, 0x4000 },
+ { 0x8701, 0x082e, 0x3000 },
+ { 0x8701, 0x082c, 0x2000 },
+ { 0x0701, 0x082b, 0x0000 },
+ { 0x0701, 0x082d, 0x0000 },
+ { 0x8701, 0x0830, 0x2000 },
+ { 0x0701, 0x082f, 0x0000 },
+ { 0x0701, 0x0831, 0x0000 },
+ { 0x8701, 0x0837, 0x3000 },
+ { 0x8701, 0x0834, 0x2000 },
+ { 0x0701, 0x0833, 0x0000 },
+ { 0x0701, 0x0835, 0x0000 },
+ { 0x8701, 0x083c, 0x2000 },
+ { 0x0701, 0x0838, 0x0000 },
+ { 0x0701, 0x083f, 0x0000 },
+ { 0x9a01, 0xd040, 0x7000 },
+ { 0x9a01, 0xd020, 0x6000 },
+ { 0x9a01, 0xd010, 0x5000 },
+ { 0x9a01, 0xd008, 0x4000 },
+ { 0x9a01, 0xd004, 0x3000 },
+ { 0x9a01, 0xd002, 0x2000 },
+ { 0x1a01, 0xd001, 0x0000 },
+ { 0x1a01, 0xd003, 0x0000 },
+ { 0x9a01, 0xd006, 0x2000 },
+ { 0x1a01, 0xd005, 0x0000 },
+ { 0x1a01, 0xd007, 0x0000 },
+ { 0x9a01, 0xd00c, 0x3000 },
+ { 0x9a01, 0xd00a, 0x2000 },
+ { 0x1a01, 0xd009, 0x0000 },
+ { 0x1a01, 0xd00b, 0x0000 },
+ { 0x9a01, 0xd00e, 0x2000 },
+ { 0x1a01, 0xd00d, 0x0000 },
+ { 0x1a01, 0xd00f, 0x0000 },
+ { 0x9a01, 0xd018, 0x4000 },
+ { 0x9a01, 0xd014, 0x3000 },
+ { 0x9a01, 0xd012, 0x2000 },
+ { 0x1a01, 0xd011, 0x0000 },
+ { 0x1a01, 0xd013, 0x0000 },
+ { 0x9a01, 0xd016, 0x2000 },
+ { 0x1a01, 0xd015, 0x0000 },
+ { 0x1a01, 0xd017, 0x0000 },
+ { 0x9a01, 0xd01c, 0x3000 },
+ { 0x9a01, 0xd01a, 0x2000 },
+ { 0x1a01, 0xd019, 0x0000 },
+ { 0x1a01, 0xd01b, 0x0000 },
+ { 0x9a01, 0xd01e, 0x2000 },
+ { 0x1a01, 0xd01d, 0x0000 },
+ { 0x1a01, 0xd01f, 0x0000 },
+ { 0x9a01, 0xd030, 0x5000 },
+ { 0x9a01, 0xd028, 0x4000 },
+ { 0x9a01, 0xd024, 0x3000 },
+ { 0x9a01, 0xd022, 0x2000 },
+ { 0x1a01, 0xd021, 0x0000 },
+ { 0x1a01, 0xd023, 0x0000 },
+ { 0x9a01, 0xd026, 0x2000 },
+ { 0x1a01, 0xd025, 0x0000 },
+ { 0x1a01, 0xd027, 0x0000 },
+ { 0x9a01, 0xd02c, 0x3000 },
+ { 0x9a01, 0xd02a, 0x2000 },
+ { 0x1a01, 0xd029, 0x0000 },
+ { 0x1a01, 0xd02b, 0x0000 },
+ { 0x9a01, 0xd02e, 0x2000 },
+ { 0x1a01, 0xd02d, 0x0000 },
+ { 0x1a01, 0xd02f, 0x0000 },
+ { 0x9a01, 0xd038, 0x4000 },
+ { 0x9a01, 0xd034, 0x3000 },
+ { 0x9a01, 0xd032, 0x2000 },
+ { 0x1a01, 0xd031, 0x0000 },
+ { 0x1a01, 0xd033, 0x0000 },
+ { 0x9a01, 0xd036, 0x2000 },
+ { 0x1a01, 0xd035, 0x0000 },
+ { 0x1a01, 0xd037, 0x0000 },
+ { 0x9a01, 0xd03c, 0x3000 },
+ { 0x9a01, 0xd03a, 0x2000 },
+ { 0x1a01, 0xd039, 0x0000 },
+ { 0x1a01, 0xd03b, 0x0000 },
+ { 0x9a01, 0xd03e, 0x2000 },
+ { 0x1a01, 0xd03d, 0x0000 },
+ { 0x1a01, 0xd03f, 0x0000 },
+ { 0x9a01, 0xd060, 0x6000 },
+ { 0x9a01, 0xd050, 0x5000 },
+ { 0x9a01, 0xd048, 0x4000 },
+ { 0x9a01, 0xd044, 0x3000 },
+ { 0x9a01, 0xd042, 0x2000 },
+ { 0x1a01, 0xd041, 0x0000 },
+ { 0x1a01, 0xd043, 0x0000 },
+ { 0x9a01, 0xd046, 0x2000 },
+ { 0x1a01, 0xd045, 0x0000 },
+ { 0x1a01, 0xd047, 0x0000 },
+ { 0x9a01, 0xd04c, 0x3000 },
+ { 0x9a01, 0xd04a, 0x2000 },
+ { 0x1a01, 0xd049, 0x0000 },
+ { 0x1a01, 0xd04b, 0x0000 },
+ { 0x9a01, 0xd04e, 0x2000 },
+ { 0x1a01, 0xd04d, 0x0000 },
+ { 0x1a01, 0xd04f, 0x0000 },
+ { 0x9a01, 0xd058, 0x4000 },
+ { 0x9a01, 0xd054, 0x3000 },
+ { 0x9a01, 0xd052, 0x2000 },
+ { 0x1a01, 0xd051, 0x0000 },
+ { 0x1a01, 0xd053, 0x0000 },
+ { 0x9a01, 0xd056, 0x2000 },
+ { 0x1a01, 0xd055, 0x0000 },
+ { 0x1a01, 0xd057, 0x0000 },
+ { 0x9a01, 0xd05c, 0x3000 },
+ { 0x9a01, 0xd05a, 0x2000 },
+ { 0x1a01, 0xd059, 0x0000 },
+ { 0x1a01, 0xd05b, 0x0000 },
+ { 0x9a01, 0xd05e, 0x2000 },
+ { 0x1a01, 0xd05d, 0x0000 },
+ { 0x1a01, 0xd05f, 0x0000 },
+ { 0x9a01, 0xd070, 0x5000 },
+ { 0x9a01, 0xd068, 0x4000 },
+ { 0x9a01, 0xd064, 0x3000 },
+ { 0x9a01, 0xd062, 0x2000 },
+ { 0x1a01, 0xd061, 0x0000 },
+ { 0x1a01, 0xd063, 0x0000 },
+ { 0x9a01, 0xd066, 0x2000 },
+ { 0x1a01, 0xd065, 0x0000 },
+ { 0x1a01, 0xd067, 0x0000 },
+ { 0x9a01, 0xd06c, 0x3000 },
+ { 0x9a01, 0xd06a, 0x2000 },
+ { 0x1a01, 0xd069, 0x0000 },
+ { 0x1a01, 0xd06b, 0x0000 },
+ { 0x9a01, 0xd06e, 0x2000 },
+ { 0x1a01, 0xd06d, 0x0000 },
+ { 0x1a01, 0xd06f, 0x0000 },
+ { 0x9a01, 0xd078, 0x4000 },
+ { 0x9a01, 0xd074, 0x3000 },
+ { 0x9a01, 0xd072, 0x2000 },
+ { 0x1a01, 0xd071, 0x0000 },
+ { 0x1a01, 0xd073, 0x0000 },
+ { 0x9a01, 0xd076, 0x2000 },
+ { 0x1a01, 0xd075, 0x0000 },
+ { 0x1a01, 0xd077, 0x0000 },
+ { 0x9a01, 0xd07c, 0x3000 },
+ { 0x9a01, 0xd07a, 0x2000 },
+ { 0x1a01, 0xd079, 0x0000 },
+ { 0x1a01, 0xd07b, 0x0000 },
+ { 0x9a01, 0xd07e, 0x2000 },
+ { 0x1a01, 0xd07d, 0x0000 },
+ { 0x1a01, 0xd07f, 0x0000 },
+ { 0x9a01, 0xd18d, 0x9000 },
+ { 0x9a01, 0xd10a, 0x8000 },
+ { 0x9a01, 0xd0c0, 0x7000 },
+ { 0x9a01, 0xd0a0, 0x6000 },
+ { 0x9a01, 0xd090, 0x5000 },
+ { 0x9a01, 0xd088, 0x4000 },
+ { 0x9a01, 0xd084, 0x3000 },
+ { 0x9a01, 0xd082, 0x2000 },
+ { 0x1a01, 0xd081, 0x0000 },
+ { 0x1a01, 0xd083, 0x0000 },
+ { 0x9a01, 0xd086, 0x2000 },
+ { 0x1a01, 0xd085, 0x0000 },
+ { 0x1a01, 0xd087, 0x0000 },
+ { 0x9a01, 0xd08c, 0x3000 },
+ { 0x9a01, 0xd08a, 0x2000 },
+ { 0x1a01, 0xd089, 0x0000 },
+ { 0x1a01, 0xd08b, 0x0000 },
+ { 0x9a01, 0xd08e, 0x2000 },
+ { 0x1a01, 0xd08d, 0x0000 },
+ { 0x1a01, 0xd08f, 0x0000 },
+ { 0x9a01, 0xd098, 0x4000 },
+ { 0x9a01, 0xd094, 0x3000 },
+ { 0x9a01, 0xd092, 0x2000 },
+ { 0x1a01, 0xd091, 0x0000 },
+ { 0x1a01, 0xd093, 0x0000 },
+ { 0x9a01, 0xd096, 0x2000 },
+ { 0x1a01, 0xd095, 0x0000 },
+ { 0x1a01, 0xd097, 0x0000 },
+ { 0x9a01, 0xd09c, 0x3000 },
+ { 0x9a01, 0xd09a, 0x2000 },
+ { 0x1a01, 0xd099, 0x0000 },
+ { 0x1a01, 0xd09b, 0x0000 },
+ { 0x9a01, 0xd09e, 0x2000 },
+ { 0x1a01, 0xd09d, 0x0000 },
+ { 0x1a01, 0xd09f, 0x0000 },
+ { 0x9a01, 0xd0b0, 0x5000 },
+ { 0x9a01, 0xd0a8, 0x4000 },
+ { 0x9a01, 0xd0a4, 0x3000 },
+ { 0x9a01, 0xd0a2, 0x2000 },
+ { 0x1a01, 0xd0a1, 0x0000 },
+ { 0x1a01, 0xd0a3, 0x0000 },
+ { 0x9a01, 0xd0a6, 0x2000 },
+ { 0x1a01, 0xd0a5, 0x0000 },
+ { 0x1a01, 0xd0a7, 0x0000 },
+ { 0x9a01, 0xd0ac, 0x3000 },
+ { 0x9a01, 0xd0aa, 0x2000 },
+ { 0x1a01, 0xd0a9, 0x0000 },
+ { 0x1a01, 0xd0ab, 0x0000 },
+ { 0x9a01, 0xd0ae, 0x2000 },
+ { 0x1a01, 0xd0ad, 0x0000 },
+ { 0x1a01, 0xd0af, 0x0000 },
+ { 0x9a01, 0xd0b8, 0x4000 },
+ { 0x9a01, 0xd0b4, 0x3000 },
+ { 0x9a01, 0xd0b2, 0x2000 },
+ { 0x1a01, 0xd0b1, 0x0000 },
+ { 0x1a01, 0xd0b3, 0x0000 },
+ { 0x9a01, 0xd0b6, 0x2000 },
+ { 0x1a01, 0xd0b5, 0x0000 },
+ { 0x1a01, 0xd0b7, 0x0000 },
+ { 0x9a01, 0xd0bc, 0x3000 },
+ { 0x9a01, 0xd0ba, 0x2000 },
+ { 0x1a01, 0xd0b9, 0x0000 },
+ { 0x1a01, 0xd0bb, 0x0000 },
+ { 0x9a01, 0xd0be, 0x2000 },
+ { 0x1a01, 0xd0bd, 0x0000 },
+ { 0x1a01, 0xd0bf, 0x0000 },
+ { 0x9a01, 0xd0e0, 0x6000 },
+ { 0x9a01, 0xd0d0, 0x5000 },
+ { 0x9a01, 0xd0c8, 0x4000 },
+ { 0x9a01, 0xd0c4, 0x3000 },
+ { 0x9a01, 0xd0c2, 0x2000 },
+ { 0x1a01, 0xd0c1, 0x0000 },
+ { 0x1a01, 0xd0c3, 0x0000 },
+ { 0x9a01, 0xd0c6, 0x2000 },
+ { 0x1a01, 0xd0c5, 0x0000 },
+ { 0x1a01, 0xd0c7, 0x0000 },
+ { 0x9a01, 0xd0cc, 0x3000 },
+ { 0x9a01, 0xd0ca, 0x2000 },
+ { 0x1a01, 0xd0c9, 0x0000 },
+ { 0x1a01, 0xd0cb, 0x0000 },
+ { 0x9a01, 0xd0ce, 0x2000 },
+ { 0x1a01, 0xd0cd, 0x0000 },
+ { 0x1a01, 0xd0cf, 0x0000 },
+ { 0x9a01, 0xd0d8, 0x4000 },
+ { 0x9a01, 0xd0d4, 0x3000 },
+ { 0x9a01, 0xd0d2, 0x2000 },
+ { 0x1a01, 0xd0d1, 0x0000 },
+ { 0x1a01, 0xd0d3, 0x0000 },
+ { 0x9a01, 0xd0d6, 0x2000 },
+ { 0x1a01, 0xd0d5, 0x0000 },
+ { 0x1a01, 0xd0d7, 0x0000 },
+ { 0x9a01, 0xd0dc, 0x3000 },
+ { 0x9a01, 0xd0da, 0x2000 },
+ { 0x1a01, 0xd0d9, 0x0000 },
+ { 0x1a01, 0xd0db, 0x0000 },
+ { 0x9a01, 0xd0de, 0x2000 },
+ { 0x1a01, 0xd0dd, 0x0000 },
+ { 0x1a01, 0xd0df, 0x0000 },
+ { 0x9a01, 0xd0f0, 0x5000 },
+ { 0x9a01, 0xd0e8, 0x4000 },
+ { 0x9a01, 0xd0e4, 0x3000 },
+ { 0x9a01, 0xd0e2, 0x2000 },
+ { 0x1a01, 0xd0e1, 0x0000 },
+ { 0x1a01, 0xd0e3, 0x0000 },
+ { 0x9a01, 0xd0e6, 0x2000 },
+ { 0x1a01, 0xd0e5, 0x0000 },
+ { 0x1a01, 0xd0e7, 0x0000 },
+ { 0x9a01, 0xd0ec, 0x3000 },
+ { 0x9a01, 0xd0ea, 0x2000 },
+ { 0x1a01, 0xd0e9, 0x0000 },
+ { 0x1a01, 0xd0eb, 0x0000 },
+ { 0x9a01, 0xd0ee, 0x2000 },
+ { 0x1a01, 0xd0ed, 0x0000 },
+ { 0x1a01, 0xd0ef, 0x0000 },
+ { 0x9a01, 0xd102, 0x4000 },
+ { 0x9a01, 0xd0f4, 0x3000 },
+ { 0x9a01, 0xd0f2, 0x2000 },
+ { 0x1a01, 0xd0f1, 0x0000 },
+ { 0x1a01, 0xd0f3, 0x0000 },
+ { 0x9a01, 0xd100, 0x2000 },
+ { 0x1a01, 0xd0f5, 0x0000 },
+ { 0x1a01, 0xd101, 0x0000 },
+ { 0x9a01, 0xd106, 0x3000 },
+ { 0x9a01, 0xd104, 0x2000 },
+ { 0x1a01, 0xd103, 0x0000 },
+ { 0x1a01, 0xd105, 0x0000 },
+ { 0x9a01, 0xd108, 0x2000 },
+ { 0x1a01, 0xd107, 0x0000 },
+ { 0x1a01, 0xd109, 0x0000 },
+ { 0x9a01, 0xd14d, 0x7000 },
+ { 0x9a01, 0xd12d, 0x6000 },
+ { 0x9a01, 0xd11a, 0x5000 },
+ { 0x9a01, 0xd112, 0x4000 },
+ { 0x9a01, 0xd10e, 0x3000 },
+ { 0x9a01, 0xd10c, 0x2000 },
+ { 0x1a01, 0xd10b, 0x0000 },
+ { 0x1a01, 0xd10d, 0x0000 },
+ { 0x9a01, 0xd110, 0x2000 },
+ { 0x1a01, 0xd10f, 0x0000 },
+ { 0x1a01, 0xd111, 0x0000 },
+ { 0x9a01, 0xd116, 0x3000 },
+ { 0x9a01, 0xd114, 0x2000 },
+ { 0x1a01, 0xd113, 0x0000 },
+ { 0x1a01, 0xd115, 0x0000 },
+ { 0x9a01, 0xd118, 0x2000 },
+ { 0x1a01, 0xd117, 0x0000 },
+ { 0x1a01, 0xd119, 0x0000 },
+ { 0x9a01, 0xd122, 0x4000 },
+ { 0x9a01, 0xd11e, 0x3000 },
+ { 0x9a01, 0xd11c, 0x2000 },
+ { 0x1a01, 0xd11b, 0x0000 },
+ { 0x1a01, 0xd11d, 0x0000 },
+ { 0x9a01, 0xd120, 0x2000 },
+ { 0x1a01, 0xd11f, 0x0000 },
+ { 0x1a01, 0xd121, 0x0000 },
+ { 0x9a01, 0xd126, 0x3000 },
+ { 0x9a01, 0xd124, 0x2000 },
+ { 0x1a01, 0xd123, 0x0000 },
+ { 0x1a01, 0xd125, 0x0000 },
+ { 0x9a01, 0xd12b, 0x2000 },
+ { 0x1a01, 0xd12a, 0x0000 },
+ { 0x1a01, 0xd12c, 0x0000 },
+ { 0x9a01, 0xd13d, 0x5000 },
+ { 0x9a01, 0xd135, 0x4000 },
+ { 0x9a01, 0xd131, 0x3000 },
+ { 0x9a01, 0xd12f, 0x2000 },
+ { 0x1a01, 0xd12e, 0x0000 },
+ { 0x1a01, 0xd130, 0x0000 },
+ { 0x9a01, 0xd133, 0x2000 },
+ { 0x1a01, 0xd132, 0x0000 },
+ { 0x1a01, 0xd134, 0x0000 },
+ { 0x9a01, 0xd139, 0x3000 },
+ { 0x9a01, 0xd137, 0x2000 },
+ { 0x1a01, 0xd136, 0x0000 },
+ { 0x1a01, 0xd138, 0x0000 },
+ { 0x9a01, 0xd13b, 0x2000 },
+ { 0x1a01, 0xd13a, 0x0000 },
+ { 0x1a01, 0xd13c, 0x0000 },
+ { 0x9a01, 0xd145, 0x4000 },
+ { 0x9a01, 0xd141, 0x3000 },
+ { 0x9a01, 0xd13f, 0x2000 },
+ { 0x1a01, 0xd13e, 0x0000 },
+ { 0x1a01, 0xd140, 0x0000 },
+ { 0x9a01, 0xd143, 0x2000 },
+ { 0x1a01, 0xd142, 0x0000 },
+ { 0x1a01, 0xd144, 0x0000 },
+ { 0x9a01, 0xd149, 0x3000 },
+ { 0x9a01, 0xd147, 0x2000 },
+ { 0x1a01, 0xd146, 0x0000 },
+ { 0x1a01, 0xd148, 0x0000 },
+ { 0x9a01, 0xd14b, 0x2000 },
+ { 0x1a01, 0xd14a, 0x0000 },
+ { 0x1a01, 0xd14c, 0x0000 },
+ { 0x8a01, 0xd16d, 0x6000 },
+ { 0x9a01, 0xd15d, 0x5000 },
+ { 0x9a01, 0xd155, 0x4000 },
+ { 0x9a01, 0xd151, 0x3000 },
+ { 0x9a01, 0xd14f, 0x2000 },
+ { 0x1a01, 0xd14e, 0x0000 },
+ { 0x1a01, 0xd150, 0x0000 },
+ { 0x9a01, 0xd153, 0x2000 },
+ { 0x1a01, 0xd152, 0x0000 },
+ { 0x1a01, 0xd154, 0x0000 },
+ { 0x9a01, 0xd159, 0x3000 },
+ { 0x9a01, 0xd157, 0x2000 },
+ { 0x1a01, 0xd156, 0x0000 },
+ { 0x1a01, 0xd158, 0x0000 },
+ { 0x9a01, 0xd15b, 0x2000 },
+ { 0x1a01, 0xd15a, 0x0000 },
+ { 0x1a01, 0xd15c, 0x0000 },
+ { 0x8a01, 0xd165, 0x4000 },
+ { 0x9a01, 0xd161, 0x3000 },
+ { 0x9a01, 0xd15f, 0x2000 },
+ { 0x1a01, 0xd15e, 0x0000 },
+ { 0x1a01, 0xd160, 0x0000 },
+ { 0x9a01, 0xd163, 0x2000 },
+ { 0x1a01, 0xd162, 0x0000 },
+ { 0x1a01, 0xd164, 0x0000 },
+ { 0x8c01, 0xd169, 0x3000 },
+ { 0x8c01, 0xd167, 0x2000 },
+ { 0x0a01, 0xd166, 0x0000 },
+ { 0x0c01, 0xd168, 0x0000 },
+ { 0x9a01, 0xd16b, 0x2000 },
+ { 0x1a01, 0xd16a, 0x0000 },
+ { 0x1a01, 0xd16c, 0x0000 },
+ { 0x8c01, 0xd17d, 0x5000 },
+ { 0x8101, 0xd175, 0x4000 },
+ { 0x8a01, 0xd171, 0x3000 },
+ { 0x8a01, 0xd16f, 0x2000 },
+ { 0x0a01, 0xd16e, 0x0000 },
+ { 0x0a01, 0xd170, 0x0000 },
+ { 0x8101, 0xd173, 0x2000 },
+ { 0x0a01, 0xd172, 0x0000 },
+ { 0x0101, 0xd174, 0x0000 },
+ { 0x8101, 0xd179, 0x3000 },
+ { 0x8101, 0xd177, 0x2000 },
+ { 0x0101, 0xd176, 0x0000 },
+ { 0x0101, 0xd178, 0x0000 },
+ { 0x8c01, 0xd17b, 0x2000 },
+ { 0x0101, 0xd17a, 0x0000 },
+ { 0x0c01, 0xd17c, 0x0000 },
+ { 0x8c01, 0xd185, 0x4000 },
+ { 0x8c01, 0xd181, 0x3000 },
+ { 0x8c01, 0xd17f, 0x2000 },
+ { 0x0c01, 0xd17e, 0x0000 },
+ { 0x0c01, 0xd180, 0x0000 },
+ { 0x9a01, 0xd183, 0x2000 },
+ { 0x0c01, 0xd182, 0x0000 },
+ { 0x1a01, 0xd184, 0x0000 },
+ { 0x8c01, 0xd189, 0x3000 },
+ { 0x8c01, 0xd187, 0x2000 },
+ { 0x0c01, 0xd186, 0x0000 },
+ { 0x0c01, 0xd188, 0x0000 },
+ { 0x8c01, 0xd18b, 0x2000 },
+ { 0x0c01, 0xd18a, 0x0000 },
+ { 0x1a01, 0xd18c, 0x0000 },
+ { 0x9a01, 0xd32f, 0x8000 },
+ { 0x9a01, 0xd1cd, 0x7000 },
+ { 0x8c01, 0xd1ad, 0x6000 },
+ { 0x9a01, 0xd19d, 0x5000 },
+ { 0x9a01, 0xd195, 0x4000 },
+ { 0x9a01, 0xd191, 0x3000 },
+ { 0x9a01, 0xd18f, 0x2000 },
+ { 0x1a01, 0xd18e, 0x0000 },
+ { 0x1a01, 0xd190, 0x0000 },
+ { 0x9a01, 0xd193, 0x2000 },
+ { 0x1a01, 0xd192, 0x0000 },
+ { 0x1a01, 0xd194, 0x0000 },
+ { 0x9a01, 0xd199, 0x3000 },
+ { 0x9a01, 0xd197, 0x2000 },
+ { 0x1a01, 0xd196, 0x0000 },
+ { 0x1a01, 0xd198, 0x0000 },
+ { 0x9a01, 0xd19b, 0x2000 },
+ { 0x1a01, 0xd19a, 0x0000 },
+ { 0x1a01, 0xd19c, 0x0000 },
+ { 0x9a01, 0xd1a5, 0x4000 },
+ { 0x9a01, 0xd1a1, 0x3000 },
+ { 0x9a01, 0xd19f, 0x2000 },
+ { 0x1a01, 0xd19e, 0x0000 },
+ { 0x1a01, 0xd1a0, 0x0000 },
+ { 0x9a01, 0xd1a3, 0x2000 },
+ { 0x1a01, 0xd1a2, 0x0000 },
+ { 0x1a01, 0xd1a4, 0x0000 },
+ { 0x9a01, 0xd1a9, 0x3000 },
+ { 0x9a01, 0xd1a7, 0x2000 },
+ { 0x1a01, 0xd1a6, 0x0000 },
+ { 0x1a01, 0xd1a8, 0x0000 },
+ { 0x8c01, 0xd1ab, 0x2000 },
+ { 0x0c01, 0xd1aa, 0x0000 },
+ { 0x0c01, 0xd1ac, 0x0000 },
+ { 0x9a01, 0xd1bd, 0x5000 },
+ { 0x9a01, 0xd1b5, 0x4000 },
+ { 0x9a01, 0xd1b1, 0x3000 },
+ { 0x9a01, 0xd1af, 0x2000 },
+ { 0x1a01, 0xd1ae, 0x0000 },
+ { 0x1a01, 0xd1b0, 0x0000 },
+ { 0x9a01, 0xd1b3, 0x2000 },
+ { 0x1a01, 0xd1b2, 0x0000 },
+ { 0x1a01, 0xd1b4, 0x0000 },
+ { 0x9a01, 0xd1b9, 0x3000 },
+ { 0x9a01, 0xd1b7, 0x2000 },
+ { 0x1a01, 0xd1b6, 0x0000 },
+ { 0x1a01, 0xd1b8, 0x0000 },
+ { 0x9a01, 0xd1bb, 0x2000 },
+ { 0x1a01, 0xd1ba, 0x0000 },
+ { 0x1a01, 0xd1bc, 0x0000 },
+ { 0x9a01, 0xd1c5, 0x4000 },
+ { 0x9a01, 0xd1c1, 0x3000 },
+ { 0x9a01, 0xd1bf, 0x2000 },
+ { 0x1a01, 0xd1be, 0x0000 },
+ { 0x1a01, 0xd1c0, 0x0000 },
+ { 0x9a01, 0xd1c3, 0x2000 },
+ { 0x1a01, 0xd1c2, 0x0000 },
+ { 0x1a01, 0xd1c4, 0x0000 },
+ { 0x9a01, 0xd1c9, 0x3000 },
+ { 0x9a01, 0xd1c7, 0x2000 },
+ { 0x1a01, 0xd1c6, 0x0000 },
+ { 0x1a01, 0xd1c8, 0x0000 },
+ { 0x9a01, 0xd1cb, 0x2000 },
+ { 0x1a01, 0xd1ca, 0x0000 },
+ { 0x1a01, 0xd1cc, 0x0000 },
+ { 0x9a01, 0xd30f, 0x6000 },
+ { 0x9a01, 0xd1dd, 0x5000 },
+ { 0x9a01, 0xd1d5, 0x4000 },
+ { 0x9a01, 0xd1d1, 0x3000 },
+ { 0x9a01, 0xd1cf, 0x2000 },
+ { 0x1a01, 0xd1ce, 0x0000 },
+ { 0x1a01, 0xd1d0, 0x0000 },
+ { 0x9a01, 0xd1d3, 0x2000 },
+ { 0x1a01, 0xd1d2, 0x0000 },
+ { 0x1a01, 0xd1d4, 0x0000 },
+ { 0x9a01, 0xd1d9, 0x3000 },
+ { 0x9a01, 0xd1d7, 0x2000 },
+ { 0x1a01, 0xd1d6, 0x0000 },
+ { 0x1a01, 0xd1d8, 0x0000 },
+ { 0x9a01, 0xd1db, 0x2000 },
+ { 0x1a01, 0xd1da, 0x0000 },
+ { 0x1a01, 0xd1dc, 0x0000 },
+ { 0x9a01, 0xd307, 0x4000 },
+ { 0x9a01, 0xd303, 0x3000 },
+ { 0x9a01, 0xd301, 0x2000 },
+ { 0x1a01, 0xd300, 0x0000 },
+ { 0x1a01, 0xd302, 0x0000 },
+ { 0x9a01, 0xd305, 0x2000 },
+ { 0x1a01, 0xd304, 0x0000 },
+ { 0x1a01, 0xd306, 0x0000 },
+ { 0x9a01, 0xd30b, 0x3000 },
+ { 0x9a01, 0xd309, 0x2000 },
+ { 0x1a01, 0xd308, 0x0000 },
+ { 0x1a01, 0xd30a, 0x0000 },
+ { 0x9a01, 0xd30d, 0x2000 },
+ { 0x1a01, 0xd30c, 0x0000 },
+ { 0x1a01, 0xd30e, 0x0000 },
+ { 0x9a01, 0xd31f, 0x5000 },
+ { 0x9a01, 0xd317, 0x4000 },
+ { 0x9a01, 0xd313, 0x3000 },
+ { 0x9a01, 0xd311, 0x2000 },
+ { 0x1a01, 0xd310, 0x0000 },
+ { 0x1a01, 0xd312, 0x0000 },
+ { 0x9a01, 0xd315, 0x2000 },
+ { 0x1a01, 0xd314, 0x0000 },
+ { 0x1a01, 0xd316, 0x0000 },
+ { 0x9a01, 0xd31b, 0x3000 },
+ { 0x9a01, 0xd319, 0x2000 },
+ { 0x1a01, 0xd318, 0x0000 },
+ { 0x1a01, 0xd31a, 0x0000 },
+ { 0x9a01, 0xd31d, 0x2000 },
+ { 0x1a01, 0xd31c, 0x0000 },
+ { 0x1a01, 0xd31e, 0x0000 },
+ { 0x9a01, 0xd327, 0x4000 },
+ { 0x9a01, 0xd323, 0x3000 },
+ { 0x9a01, 0xd321, 0x2000 },
+ { 0x1a01, 0xd320, 0x0000 },
+ { 0x1a01, 0xd322, 0x0000 },
+ { 0x9a01, 0xd325, 0x2000 },
+ { 0x1a01, 0xd324, 0x0000 },
+ { 0x1a01, 0xd326, 0x0000 },
+ { 0x9a01, 0xd32b, 0x3000 },
+ { 0x9a01, 0xd329, 0x2000 },
+ { 0x1a01, 0xd328, 0x0000 },
+ { 0x1a01, 0xd32a, 0x0000 },
+ { 0x9a01, 0xd32d, 0x2000 },
+ { 0x1a01, 0xd32c, 0x0000 },
+ { 0x1a01, 0xd32e, 0x0000 },
+ { 0x8901, 0xd418, 0x7000 },
+ { 0x9a01, 0xd34f, 0x6000 },
+ { 0x9a01, 0xd33f, 0x5000 },
+ { 0x9a01, 0xd337, 0x4000 },
+ { 0x9a01, 0xd333, 0x3000 },
+ { 0x9a01, 0xd331, 0x2000 },
+ { 0x1a01, 0xd330, 0x0000 },
+ { 0x1a01, 0xd332, 0x0000 },
+ { 0x9a01, 0xd335, 0x2000 },
+ { 0x1a01, 0xd334, 0x0000 },
+ { 0x1a01, 0xd336, 0x0000 },
+ { 0x9a01, 0xd33b, 0x3000 },
+ { 0x9a01, 0xd339, 0x2000 },
+ { 0x1a01, 0xd338, 0x0000 },
+ { 0x1a01, 0xd33a, 0x0000 },
+ { 0x9a01, 0xd33d, 0x2000 },
+ { 0x1a01, 0xd33c, 0x0000 },
+ { 0x1a01, 0xd33e, 0x0000 },
+ { 0x9a01, 0xd347, 0x4000 },
+ { 0x9a01, 0xd343, 0x3000 },
+ { 0x9a01, 0xd341, 0x2000 },
+ { 0x1a01, 0xd340, 0x0000 },
+ { 0x1a01, 0xd342, 0x0000 },
+ { 0x9a01, 0xd345, 0x2000 },
+ { 0x1a01, 0xd344, 0x0000 },
+ { 0x1a01, 0xd346, 0x0000 },
+ { 0x9a01, 0xd34b, 0x3000 },
+ { 0x9a01, 0xd349, 0x2000 },
+ { 0x1a01, 0xd348, 0x0000 },
+ { 0x1a01, 0xd34a, 0x0000 },
+ { 0x9a01, 0xd34d, 0x2000 },
+ { 0x1a01, 0xd34c, 0x0000 },
+ { 0x1a01, 0xd34e, 0x0000 },
+ { 0x8901, 0xd408, 0x5000 },
+ { 0x8901, 0xd400, 0x4000 },
+ { 0x9a01, 0xd353, 0x3000 },
+ { 0x9a01, 0xd351, 0x2000 },
+ { 0x1a01, 0xd350, 0x0000 },
+ { 0x1a01, 0xd352, 0x0000 },
+ { 0x9a01, 0xd355, 0x2000 },
+ { 0x1a01, 0xd354, 0x0000 },
+ { 0x1a01, 0xd356, 0x0000 },
+ { 0x8901, 0xd404, 0x3000 },
+ { 0x8901, 0xd402, 0x2000 },
+ { 0x0901, 0xd401, 0x0000 },
+ { 0x0901, 0xd403, 0x0000 },
+ { 0x8901, 0xd406, 0x2000 },
+ { 0x0901, 0xd405, 0x0000 },
+ { 0x0901, 0xd407, 0x0000 },
+ { 0x8901, 0xd410, 0x4000 },
+ { 0x8901, 0xd40c, 0x3000 },
+ { 0x8901, 0xd40a, 0x2000 },
+ { 0x0901, 0xd409, 0x0000 },
+ { 0x0901, 0xd40b, 0x0000 },
+ { 0x8901, 0xd40e, 0x2000 },
+ { 0x0901, 0xd40d, 0x0000 },
+ { 0x0901, 0xd40f, 0x0000 },
+ { 0x8901, 0xd414, 0x3000 },
+ { 0x8901, 0xd412, 0x2000 },
+ { 0x0901, 0xd411, 0x0000 },
+ { 0x0901, 0xd413, 0x0000 },
+ { 0x8901, 0xd416, 0x2000 },
+ { 0x0901, 0xd415, 0x0000 },
+ { 0x0901, 0xd417, 0x0000 },
+ { 0x8901, 0xd438, 0x6000 },
+ { 0x8501, 0xd428, 0x5000 },
+ { 0x8501, 0xd420, 0x4000 },
+ { 0x8501, 0xd41c, 0x3000 },
+ { 0x8501, 0xd41a, 0x2000 },
+ { 0x0901, 0xd419, 0x0000 },
+ { 0x0501, 0xd41b, 0x0000 },
+ { 0x8501, 0xd41e, 0x2000 },
+ { 0x0501, 0xd41d, 0x0000 },
+ { 0x0501, 0xd41f, 0x0000 },
+ { 0x8501, 0xd424, 0x3000 },
+ { 0x8501, 0xd422, 0x2000 },
+ { 0x0501, 0xd421, 0x0000 },
+ { 0x0501, 0xd423, 0x0000 },
+ { 0x8501, 0xd426, 0x2000 },
+ { 0x0501, 0xd425, 0x0000 },
+ { 0x0501, 0xd427, 0x0000 },
+ { 0x8501, 0xd430, 0x4000 },
+ { 0x8501, 0xd42c, 0x3000 },
+ { 0x8501, 0xd42a, 0x2000 },
+ { 0x0501, 0xd429, 0x0000 },
+ { 0x0501, 0xd42b, 0x0000 },
+ { 0x8501, 0xd42e, 0x2000 },
+ { 0x0501, 0xd42d, 0x0000 },
+ { 0x0501, 0xd42f, 0x0000 },
+ { 0x8901, 0xd434, 0x3000 },
+ { 0x8501, 0xd432, 0x2000 },
+ { 0x0501, 0xd431, 0x0000 },
+ { 0x0501, 0xd433, 0x0000 },
+ { 0x8901, 0xd436, 0x2000 },
+ { 0x0901, 0xd435, 0x0000 },
+ { 0x0901, 0xd437, 0x0000 },
+ { 0x8901, 0xd448, 0x5000 },
+ { 0x8901, 0xd440, 0x4000 },
+ { 0x8901, 0xd43c, 0x3000 },
+ { 0x8901, 0xd43a, 0x2000 },
+ { 0x0901, 0xd439, 0x0000 },
+ { 0x0901, 0xd43b, 0x0000 },
+ { 0x8901, 0xd43e, 0x2000 },
+ { 0x0901, 0xd43d, 0x0000 },
+ { 0x0901, 0xd43f, 0x0000 },
+ { 0x8901, 0xd444, 0x3000 },
+ { 0x8901, 0xd442, 0x2000 },
+ { 0x0901, 0xd441, 0x0000 },
+ { 0x0901, 0xd443, 0x0000 },
+ { 0x8901, 0xd446, 0x2000 },
+ { 0x0901, 0xd445, 0x0000 },
+ { 0x0901, 0xd447, 0x0000 },
+ { 0x8501, 0xd450, 0x4000 },
+ { 0x8901, 0xd44c, 0x3000 },
+ { 0x8901, 0xd44a, 0x2000 },
+ { 0x0901, 0xd449, 0x0000 },
+ { 0x0901, 0xd44b, 0x0000 },
+ { 0x8501, 0xd44e, 0x2000 },
+ { 0x0901, 0xd44d, 0x0000 },
+ { 0x0501, 0xd44f, 0x0000 },
+ { 0x8501, 0xd454, 0x3000 },
+ { 0x8501, 0xd452, 0x2000 },
+ { 0x0501, 0xd451, 0x0000 },
+ { 0x0501, 0xd453, 0x0000 },
+ { 0x8501, 0xd457, 0x2000 },
+ { 0x0501, 0xd456, 0x0000 },
+ { 0x0501, 0xd458, 0x0000 },
+ { 0x8702, 0xf876, 0xb000 },
+ { 0x8901, 0xd670, 0xa000 },
+ { 0x8901, 0xd570, 0x9000 },
+ { 0x8901, 0xd4e4, 0x8000 },
+ { 0x8501, 0xd499, 0x7000 },
+ { 0x8901, 0xd479, 0x6000 },
+ { 0x8901, 0xd469, 0x5000 },
+ { 0x8501, 0xd461, 0x4000 },
+ { 0x8501, 0xd45d, 0x3000 },
+ { 0x8501, 0xd45b, 0x2000 },
+ { 0x0501, 0xd45a, 0x0000 },
+ { 0x0501, 0xd45c, 0x0000 },
+ { 0x8501, 0xd45f, 0x2000 },
+ { 0x0501, 0xd45e, 0x0000 },
+ { 0x0501, 0xd460, 0x0000 },
+ { 0x8501, 0xd465, 0x3000 },
+ { 0x8501, 0xd463, 0x2000 },
+ { 0x0501, 0xd462, 0x0000 },
+ { 0x0501, 0xd464, 0x0000 },
+ { 0x8501, 0xd467, 0x2000 },
+ { 0x0501, 0xd466, 0x0000 },
+ { 0x0901, 0xd468, 0x0000 },
+ { 0x8901, 0xd471, 0x4000 },
+ { 0x8901, 0xd46d, 0x3000 },
+ { 0x8901, 0xd46b, 0x2000 },
+ { 0x0901, 0xd46a, 0x0000 },
+ { 0x0901, 0xd46c, 0x0000 },
+ { 0x8901, 0xd46f, 0x2000 },
+ { 0x0901, 0xd46e, 0x0000 },
+ { 0x0901, 0xd470, 0x0000 },
+ { 0x8901, 0xd475, 0x3000 },
+ { 0x8901, 0xd473, 0x2000 },
+ { 0x0901, 0xd472, 0x0000 },
+ { 0x0901, 0xd474, 0x0000 },
+ { 0x8901, 0xd477, 0x2000 },
+ { 0x0901, 0xd476, 0x0000 },
+ { 0x0901, 0xd478, 0x0000 },
+ { 0x8501, 0xd489, 0x5000 },
+ { 0x8901, 0xd481, 0x4000 },
+ { 0x8901, 0xd47d, 0x3000 },
+ { 0x8901, 0xd47b, 0x2000 },
+ { 0x0901, 0xd47a, 0x0000 },
+ { 0x0901, 0xd47c, 0x0000 },
+ { 0x8901, 0xd47f, 0x2000 },
+ { 0x0901, 0xd47e, 0x0000 },
+ { 0x0901, 0xd480, 0x0000 },
+ { 0x8501, 0xd485, 0x3000 },
+ { 0x8501, 0xd483, 0x2000 },
+ { 0x0501, 0xd482, 0x0000 },
+ { 0x0501, 0xd484, 0x0000 },
+ { 0x8501, 0xd487, 0x2000 },
+ { 0x0501, 0xd486, 0x0000 },
+ { 0x0501, 0xd488, 0x0000 },
+ { 0x8501, 0xd491, 0x4000 },
+ { 0x8501, 0xd48d, 0x3000 },
+ { 0x8501, 0xd48b, 0x2000 },
+ { 0x0501, 0xd48a, 0x0000 },
+ { 0x0501, 0xd48c, 0x0000 },
+ { 0x8501, 0xd48f, 0x2000 },
+ { 0x0501, 0xd48e, 0x0000 },
+ { 0x0501, 0xd490, 0x0000 },
+ { 0x8501, 0xd495, 0x3000 },
+ { 0x8501, 0xd493, 0x2000 },
+ { 0x0501, 0xd492, 0x0000 },
+ { 0x0501, 0xd494, 0x0000 },
+ { 0x8501, 0xd497, 0x2000 },
+ { 0x0501, 0xd496, 0x0000 },
+ { 0x0501, 0xd498, 0x0000 },
+ { 0x8501, 0xd4c3, 0x6000 },
+ { 0x8901, 0xd4b1, 0x5000 },
+ { 0x8901, 0xd4a6, 0x4000 },
+ { 0x8901, 0xd49e, 0x3000 },
+ { 0x8501, 0xd49b, 0x2000 },
+ { 0x0501, 0xd49a, 0x0000 },
+ { 0x0901, 0xd49c, 0x0000 },
+ { 0x8901, 0xd4a2, 0x2000 },
+ { 0x0901, 0xd49f, 0x0000 },
+ { 0x0901, 0xd4a5, 0x0000 },
+ { 0x8901, 0xd4ac, 0x3000 },
+ { 0x8901, 0xd4aa, 0x2000 },
+ { 0x0901, 0xd4a9, 0x0000 },
+ { 0x0901, 0xd4ab, 0x0000 },
+ { 0x8901, 0xd4af, 0x2000 },
+ { 0x0901, 0xd4ae, 0x0000 },
+ { 0x0901, 0xd4b0, 0x0000 },
+ { 0x8501, 0xd4b9, 0x4000 },
+ { 0x8901, 0xd4b5, 0x3000 },
+ { 0x8901, 0xd4b3, 0x2000 },
+ { 0x0901, 0xd4b2, 0x0000 },
+ { 0x0901, 0xd4b4, 0x0000 },
+ { 0x8501, 0xd4b7, 0x2000 },
+ { 0x0501, 0xd4b6, 0x0000 },
+ { 0x0501, 0xd4b8, 0x0000 },
+ { 0x8501, 0xd4bf, 0x3000 },
+ { 0x8501, 0xd4bd, 0x2000 },
+ { 0x0501, 0xd4bb, 0x0000 },
+ { 0x0501, 0xd4be, 0x0000 },
+ { 0x8501, 0xd4c1, 0x2000 },
+ { 0x0501, 0xd4c0, 0x0000 },
+ { 0x0501, 0xd4c2, 0x0000 },
+ { 0x8901, 0xd4d4, 0x5000 },
+ { 0x8501, 0xd4cc, 0x4000 },
+ { 0x8501, 0xd4c8, 0x3000 },
+ { 0x8501, 0xd4c6, 0x2000 },
+ { 0x0501, 0xd4c5, 0x0000 },
+ { 0x0501, 0xd4c7, 0x0000 },
+ { 0x8501, 0xd4ca, 0x2000 },
+ { 0x0501, 0xd4c9, 0x0000 },
+ { 0x0501, 0xd4cb, 0x0000 },
+ { 0x8901, 0xd4d0, 0x3000 },
+ { 0x8501, 0xd4ce, 0x2000 },
+ { 0x0501, 0xd4cd, 0x0000 },
+ { 0x0501, 0xd4cf, 0x0000 },
+ { 0x8901, 0xd4d2, 0x2000 },
+ { 0x0901, 0xd4d1, 0x0000 },
+ { 0x0901, 0xd4d3, 0x0000 },
+ { 0x8901, 0xd4dc, 0x4000 },
+ { 0x8901, 0xd4d8, 0x3000 },
+ { 0x8901, 0xd4d6, 0x2000 },
+ { 0x0901, 0xd4d5, 0x0000 },
+ { 0x0901, 0xd4d7, 0x0000 },
+ { 0x8901, 0xd4da, 0x2000 },
+ { 0x0901, 0xd4d9, 0x0000 },
+ { 0x0901, 0xd4db, 0x0000 },
+ { 0x8901, 0xd4e0, 0x3000 },
+ { 0x8901, 0xd4de, 0x2000 },
+ { 0x0901, 0xd4dd, 0x0000 },
+ { 0x0901, 0xd4df, 0x0000 },
+ { 0x8901, 0xd4e2, 0x2000 },
+ { 0x0901, 0xd4e1, 0x0000 },
+ { 0x0901, 0xd4e3, 0x0000 },
+ { 0x8501, 0xd529, 0x7000 },
+ { 0x8901, 0xd504, 0x6000 },
+ { 0x8501, 0xd4f4, 0x5000 },
+ { 0x8501, 0xd4ec, 0x4000 },
+ { 0x8901, 0xd4e8, 0x3000 },
+ { 0x8901, 0xd4e6, 0x2000 },
+ { 0x0901, 0xd4e5, 0x0000 },
+ { 0x0901, 0xd4e7, 0x0000 },
+ { 0x8501, 0xd4ea, 0x2000 },
+ { 0x0901, 0xd4e9, 0x0000 },
+ { 0x0501, 0xd4eb, 0x0000 },
+ { 0x8501, 0xd4f0, 0x3000 },
+ { 0x8501, 0xd4ee, 0x2000 },
+ { 0x0501, 0xd4ed, 0x0000 },
+ { 0x0501, 0xd4ef, 0x0000 },
+ { 0x8501, 0xd4f2, 0x2000 },
+ { 0x0501, 0xd4f1, 0x0000 },
+ { 0x0501, 0xd4f3, 0x0000 },
+ { 0x8501, 0xd4fc, 0x4000 },
+ { 0x8501, 0xd4f8, 0x3000 },
+ { 0x8501, 0xd4f6, 0x2000 },
+ { 0x0501, 0xd4f5, 0x0000 },
+ { 0x0501, 0xd4f7, 0x0000 },
+ { 0x8501, 0xd4fa, 0x2000 },
+ { 0x0501, 0xd4f9, 0x0000 },
+ { 0x0501, 0xd4fb, 0x0000 },
+ { 0x8501, 0xd500, 0x3000 },
+ { 0x8501, 0xd4fe, 0x2000 },
+ { 0x0501, 0xd4fd, 0x0000 },
+ { 0x0501, 0xd4ff, 0x0000 },
+ { 0x8501, 0xd502, 0x2000 },
+ { 0x0501, 0xd501, 0x0000 },
+ { 0x0501, 0xd503, 0x0000 },
+ { 0x8901, 0xd518, 0x5000 },
+ { 0x8901, 0xd50f, 0x4000 },
+ { 0x8901, 0xd509, 0x3000 },
+ { 0x8901, 0xd507, 0x2000 },
+ { 0x0901, 0xd505, 0x0000 },
+ { 0x0901, 0xd508, 0x0000 },
+ { 0x8901, 0xd50d, 0x2000 },
+ { 0x0901, 0xd50a, 0x0000 },
+ { 0x0901, 0xd50e, 0x0000 },
+ { 0x8901, 0xd513, 0x3000 },
+ { 0x8901, 0xd511, 0x2000 },
+ { 0x0901, 0xd510, 0x0000 },
+ { 0x0901, 0xd512, 0x0000 },
+ { 0x8901, 0xd516, 0x2000 },
+ { 0x0901, 0xd514, 0x0000 },
+ { 0x0901, 0xd517, 0x0000 },
+ { 0x8501, 0xd521, 0x4000 },
+ { 0x8901, 0xd51c, 0x3000 },
+ { 0x8901, 0xd51a, 0x2000 },
+ { 0x0901, 0xd519, 0x0000 },
+ { 0x0901, 0xd51b, 0x0000 },
+ { 0x8501, 0xd51f, 0x2000 },
+ { 0x0501, 0xd51e, 0x0000 },
+ { 0x0501, 0xd520, 0x0000 },
+ { 0x8501, 0xd525, 0x3000 },
+ { 0x8501, 0xd523, 0x2000 },
+ { 0x0501, 0xd522, 0x0000 },
+ { 0x0501, 0xd524, 0x0000 },
+ { 0x8501, 0xd527, 0x2000 },
+ { 0x0501, 0xd526, 0x0000 },
+ { 0x0501, 0xd528, 0x0000 },
+ { 0x8901, 0xd54f, 0x6000 },
+ { 0x8901, 0xd539, 0x5000 },
+ { 0x8501, 0xd531, 0x4000 },
+ { 0x8501, 0xd52d, 0x3000 },
+ { 0x8501, 0xd52b, 0x2000 },
+ { 0x0501, 0xd52a, 0x0000 },
+ { 0x0501, 0xd52c, 0x0000 },
+ { 0x8501, 0xd52f, 0x2000 },
+ { 0x0501, 0xd52e, 0x0000 },
+ { 0x0501, 0xd530, 0x0000 },
+ { 0x8501, 0xd535, 0x3000 },
+ { 0x8501, 0xd533, 0x2000 },
+ { 0x0501, 0xd532, 0x0000 },
+ { 0x0501, 0xd534, 0x0000 },
+ { 0x8501, 0xd537, 0x2000 },
+ { 0x0501, 0xd536, 0x0000 },
+ { 0x0901, 0xd538, 0x0000 },
+ { 0x8901, 0xd543, 0x4000 },
+ { 0x8901, 0xd53e, 0x3000 },
+ { 0x8901, 0xd53c, 0x2000 },
+ { 0x0901, 0xd53b, 0x0000 },
+ { 0x0901, 0xd53d, 0x0000 },
+ { 0x8901, 0xd541, 0x2000 },
+ { 0x0901, 0xd540, 0x0000 },
+ { 0x0901, 0xd542, 0x0000 },
+ { 0x8901, 0xd54b, 0x3000 },
+ { 0x8901, 0xd546, 0x2000 },
+ { 0x0901, 0xd544, 0x0000 },
+ { 0x0901, 0xd54a, 0x0000 },
+ { 0x8901, 0xd54d, 0x2000 },
+ { 0x0901, 0xd54c, 0x0000 },
+ { 0x0901, 0xd54e, 0x0000 },
+ { 0x8501, 0xd560, 0x5000 },
+ { 0x8501, 0xd558, 0x4000 },
+ { 0x8501, 0xd554, 0x3000 },
+ { 0x8501, 0xd552, 0x2000 },
+ { 0x0901, 0xd550, 0x0000 },
+ { 0x0501, 0xd553, 0x0000 },
+ { 0x8501, 0xd556, 0x2000 },
+ { 0x0501, 0xd555, 0x0000 },
+ { 0x0501, 0xd557, 0x0000 },
+ { 0x8501, 0xd55c, 0x3000 },
+ { 0x8501, 0xd55a, 0x2000 },
+ { 0x0501, 0xd559, 0x0000 },
+ { 0x0501, 0xd55b, 0x0000 },
+ { 0x8501, 0xd55e, 0x2000 },
+ { 0x0501, 0xd55d, 0x0000 },
+ { 0x0501, 0xd55f, 0x0000 },
+ { 0x8501, 0xd568, 0x4000 },
+ { 0x8501, 0xd564, 0x3000 },
+ { 0x8501, 0xd562, 0x2000 },
+ { 0x0501, 0xd561, 0x0000 },
+ { 0x0501, 0xd563, 0x0000 },
+ { 0x8501, 0xd566, 0x2000 },
+ { 0x0501, 0xd565, 0x0000 },
+ { 0x0501, 0xd567, 0x0000 },
+ { 0x8901, 0xd56c, 0x3000 },
+ { 0x8501, 0xd56a, 0x2000 },
+ { 0x0501, 0xd569, 0x0000 },
+ { 0x0501, 0xd56b, 0x0000 },
+ { 0x8901, 0xd56e, 0x2000 },
+ { 0x0901, 0xd56d, 0x0000 },
+ { 0x0901, 0xd56f, 0x0000 },
+ { 0x8501, 0xd5f0, 0x8000 },
+ { 0x8901, 0xd5b0, 0x7000 },
+ { 0x8501, 0xd590, 0x6000 },
+ { 0x8901, 0xd580, 0x5000 },
+ { 0x8901, 0xd578, 0x4000 },
+ { 0x8901, 0xd574, 0x3000 },
+ { 0x8901, 0xd572, 0x2000 },
+ { 0x0901, 0xd571, 0x0000 },
+ { 0x0901, 0xd573, 0x0000 },
+ { 0x8901, 0xd576, 0x2000 },
+ { 0x0901, 0xd575, 0x0000 },
+ { 0x0901, 0xd577, 0x0000 },
+ { 0x8901, 0xd57c, 0x3000 },
+ { 0x8901, 0xd57a, 0x2000 },
+ { 0x0901, 0xd579, 0x0000 },
+ { 0x0901, 0xd57b, 0x0000 },
+ { 0x8901, 0xd57e, 0x2000 },
+ { 0x0901, 0xd57d, 0x0000 },
+ { 0x0901, 0xd57f, 0x0000 },
+ { 0x8501, 0xd588, 0x4000 },
+ { 0x8901, 0xd584, 0x3000 },
+ { 0x8901, 0xd582, 0x2000 },
+ { 0x0901, 0xd581, 0x0000 },
+ { 0x0901, 0xd583, 0x0000 },
+ { 0x8501, 0xd586, 0x2000 },
+ { 0x0901, 0xd585, 0x0000 },
+ { 0x0501, 0xd587, 0x0000 },
+ { 0x8501, 0xd58c, 0x3000 },
+ { 0x8501, 0xd58a, 0x2000 },
+ { 0x0501, 0xd589, 0x0000 },
+ { 0x0501, 0xd58b, 0x0000 },
+ { 0x8501, 0xd58e, 0x2000 },
+ { 0x0501, 0xd58d, 0x0000 },
+ { 0x0501, 0xd58f, 0x0000 },
+ { 0x8901, 0xd5a0, 0x5000 },
+ { 0x8501, 0xd598, 0x4000 },
+ { 0x8501, 0xd594, 0x3000 },
+ { 0x8501, 0xd592, 0x2000 },
+ { 0x0501, 0xd591, 0x0000 },
+ { 0x0501, 0xd593, 0x0000 },
+ { 0x8501, 0xd596, 0x2000 },
+ { 0x0501, 0xd595, 0x0000 },
+ { 0x0501, 0xd597, 0x0000 },
+ { 0x8501, 0xd59c, 0x3000 },
+ { 0x8501, 0xd59a, 0x2000 },
+ { 0x0501, 0xd599, 0x0000 },
+ { 0x0501, 0xd59b, 0x0000 },
+ { 0x8501, 0xd59e, 0x2000 },
+ { 0x0501, 0xd59d, 0x0000 },
+ { 0x0501, 0xd59f, 0x0000 },
+ { 0x8901, 0xd5a8, 0x4000 },
+ { 0x8901, 0xd5a4, 0x3000 },
+ { 0x8901, 0xd5a2, 0x2000 },
+ { 0x0901, 0xd5a1, 0x0000 },
+ { 0x0901, 0xd5a3, 0x0000 },
+ { 0x8901, 0xd5a6, 0x2000 },
+ { 0x0901, 0xd5a5, 0x0000 },
+ { 0x0901, 0xd5a7, 0x0000 },
+ { 0x8901, 0xd5ac, 0x3000 },
+ { 0x8901, 0xd5aa, 0x2000 },
+ { 0x0901, 0xd5a9, 0x0000 },
+ { 0x0901, 0xd5ab, 0x0000 },
+ { 0x8901, 0xd5ae, 0x2000 },
+ { 0x0901, 0xd5ad, 0x0000 },
+ { 0x0901, 0xd5af, 0x0000 },
+ { 0x8501, 0xd5d0, 0x6000 },
+ { 0x8501, 0xd5c0, 0x5000 },
+ { 0x8901, 0xd5b8, 0x4000 },
+ { 0x8901, 0xd5b4, 0x3000 },
+ { 0x8901, 0xd5b2, 0x2000 },
+ { 0x0901, 0xd5b1, 0x0000 },
+ { 0x0901, 0xd5b3, 0x0000 },
+ { 0x8901, 0xd5b6, 0x2000 },
+ { 0x0901, 0xd5b5, 0x0000 },
+ { 0x0901, 0xd5b7, 0x0000 },
+ { 0x8501, 0xd5bc, 0x3000 },
+ { 0x8501, 0xd5ba, 0x2000 },
+ { 0x0901, 0xd5b9, 0x0000 },
+ { 0x0501, 0xd5bb, 0x0000 },
+ { 0x8501, 0xd5be, 0x2000 },
+ { 0x0501, 0xd5bd, 0x0000 },
+ { 0x0501, 0xd5bf, 0x0000 },
+ { 0x8501, 0xd5c8, 0x4000 },
+ { 0x8501, 0xd5c4, 0x3000 },
+ { 0x8501, 0xd5c2, 0x2000 },
+ { 0x0501, 0xd5c1, 0x0000 },
+ { 0x0501, 0xd5c3, 0x0000 },
+ { 0x8501, 0xd5c6, 0x2000 },
+ { 0x0501, 0xd5c5, 0x0000 },
+ { 0x0501, 0xd5c7, 0x0000 },
+ { 0x8501, 0xd5cc, 0x3000 },
+ { 0x8501, 0xd5ca, 0x2000 },
+ { 0x0501, 0xd5c9, 0x0000 },
+ { 0x0501, 0xd5cb, 0x0000 },
+ { 0x8501, 0xd5ce, 0x2000 },
+ { 0x0501, 0xd5cd, 0x0000 },
+ { 0x0501, 0xd5cf, 0x0000 },
+ { 0x8901, 0xd5e0, 0x5000 },
+ { 0x8901, 0xd5d8, 0x4000 },
+ { 0x8901, 0xd5d4, 0x3000 },
+ { 0x8501, 0xd5d2, 0x2000 },
+ { 0x0501, 0xd5d1, 0x0000 },
+ { 0x0501, 0xd5d3, 0x0000 },
+ { 0x8901, 0xd5d6, 0x2000 },
+ { 0x0901, 0xd5d5, 0x0000 },
+ { 0x0901, 0xd5d7, 0x0000 },
+ { 0x8901, 0xd5dc, 0x3000 },
+ { 0x8901, 0xd5da, 0x2000 },
+ { 0x0901, 0xd5d9, 0x0000 },
+ { 0x0901, 0xd5db, 0x0000 },
+ { 0x8901, 0xd5de, 0x2000 },
+ { 0x0901, 0xd5dd, 0x0000 },
+ { 0x0901, 0xd5df, 0x0000 },
+ { 0x8901, 0xd5e8, 0x4000 },
+ { 0x8901, 0xd5e4, 0x3000 },
+ { 0x8901, 0xd5e2, 0x2000 },
+ { 0x0901, 0xd5e1, 0x0000 },
+ { 0x0901, 0xd5e3, 0x0000 },
+ { 0x8901, 0xd5e6, 0x2000 },
+ { 0x0901, 0xd5e5, 0x0000 },
+ { 0x0901, 0xd5e7, 0x0000 },
+ { 0x8901, 0xd5ec, 0x3000 },
+ { 0x8901, 0xd5ea, 0x2000 },
+ { 0x0901, 0xd5e9, 0x0000 },
+ { 0x0901, 0xd5eb, 0x0000 },
+ { 0x8501, 0xd5ee, 0x2000 },
+ { 0x0901, 0xd5ed, 0x0000 },
+ { 0x0501, 0xd5ef, 0x0000 },
+ { 0x8501, 0xd630, 0x7000 },
+ { 0x8901, 0xd610, 0x6000 },
+ { 0x8501, 0xd600, 0x5000 },
+ { 0x8501, 0xd5f8, 0x4000 },
+ { 0x8501, 0xd5f4, 0x3000 },
+ { 0x8501, 0xd5f2, 0x2000 },
+ { 0x0501, 0xd5f1, 0x0000 },
+ { 0x0501, 0xd5f3, 0x0000 },
+ { 0x8501, 0xd5f6, 0x2000 },
+ { 0x0501, 0xd5f5, 0x0000 },
+ { 0x0501, 0xd5f7, 0x0000 },
+ { 0x8501, 0xd5fc, 0x3000 },
+ { 0x8501, 0xd5fa, 0x2000 },
+ { 0x0501, 0xd5f9, 0x0000 },
+ { 0x0501, 0xd5fb, 0x0000 },
+ { 0x8501, 0xd5fe, 0x2000 },
+ { 0x0501, 0xd5fd, 0x0000 },
+ { 0x0501, 0xd5ff, 0x0000 },
+ { 0x8901, 0xd608, 0x4000 },
+ { 0x8501, 0xd604, 0x3000 },
+ { 0x8501, 0xd602, 0x2000 },
+ { 0x0501, 0xd601, 0x0000 },
+ { 0x0501, 0xd603, 0x0000 },
+ { 0x8501, 0xd606, 0x2000 },
+ { 0x0501, 0xd605, 0x0000 },
+ { 0x0501, 0xd607, 0x0000 },
+ { 0x8901, 0xd60c, 0x3000 },
+ { 0x8901, 0xd60a, 0x2000 },
+ { 0x0901, 0xd609, 0x0000 },
+ { 0x0901, 0xd60b, 0x0000 },
+ { 0x8901, 0xd60e, 0x2000 },
+ { 0x0901, 0xd60d, 0x0000 },
+ { 0x0901, 0xd60f, 0x0000 },
+ { 0x8901, 0xd620, 0x5000 },
+ { 0x8901, 0xd618, 0x4000 },
+ { 0x8901, 0xd614, 0x3000 },
+ { 0x8901, 0xd612, 0x2000 },
+ { 0x0901, 0xd611, 0x0000 },
+ { 0x0901, 0xd613, 0x0000 },
+ { 0x8901, 0xd616, 0x2000 },
+ { 0x0901, 0xd615, 0x0000 },
+ { 0x0901, 0xd617, 0x0000 },
+ { 0x8901, 0xd61c, 0x3000 },
+ { 0x8901, 0xd61a, 0x2000 },
+ { 0x0901, 0xd619, 0x0000 },
+ { 0x0901, 0xd61b, 0x0000 },
+ { 0x8901, 0xd61e, 0x2000 },
+ { 0x0901, 0xd61d, 0x0000 },
+ { 0x0901, 0xd61f, 0x0000 },
+ { 0x8501, 0xd628, 0x4000 },
+ { 0x8501, 0xd624, 0x3000 },
+ { 0x8501, 0xd622, 0x2000 },
+ { 0x0901, 0xd621, 0x0000 },
+ { 0x0501, 0xd623, 0x0000 },
+ { 0x8501, 0xd626, 0x2000 },
+ { 0x0501, 0xd625, 0x0000 },
+ { 0x0501, 0xd627, 0x0000 },
+ { 0x8501, 0xd62c, 0x3000 },
+ { 0x8501, 0xd62a, 0x2000 },
+ { 0x0501, 0xd629, 0x0000 },
+ { 0x0501, 0xd62b, 0x0000 },
+ { 0x8501, 0xd62e, 0x2000 },
+ { 0x0501, 0xd62d, 0x0000 },
+ { 0x0501, 0xd62f, 0x0000 },
+ { 0x8901, 0xd650, 0x6000 },
+ { 0x8901, 0xd640, 0x5000 },
+ { 0x8501, 0xd638, 0x4000 },
+ { 0x8501, 0xd634, 0x3000 },
+ { 0x8501, 0xd632, 0x2000 },
+ { 0x0501, 0xd631, 0x0000 },
+ { 0x0501, 0xd633, 0x0000 },
+ { 0x8501, 0xd636, 0x2000 },
+ { 0x0501, 0xd635, 0x0000 },
+ { 0x0501, 0xd637, 0x0000 },
+ { 0x8901, 0xd63c, 0x3000 },
+ { 0x8501, 0xd63a, 0x2000 },
+ { 0x0501, 0xd639, 0x0000 },
+ { 0x0501, 0xd63b, 0x0000 },
+ { 0x8901, 0xd63e, 0x2000 },
+ { 0x0901, 0xd63d, 0x0000 },
+ { 0x0901, 0xd63f, 0x0000 },
+ { 0x8901, 0xd648, 0x4000 },
+ { 0x8901, 0xd644, 0x3000 },
+ { 0x8901, 0xd642, 0x2000 },
+ { 0x0901, 0xd641, 0x0000 },
+ { 0x0901, 0xd643, 0x0000 },
+ { 0x8901, 0xd646, 0x2000 },
+ { 0x0901, 0xd645, 0x0000 },
+ { 0x0901, 0xd647, 0x0000 },
+ { 0x8901, 0xd64c, 0x3000 },
+ { 0x8901, 0xd64a, 0x2000 },
+ { 0x0901, 0xd649, 0x0000 },
+ { 0x0901, 0xd64b, 0x0000 },
+ { 0x8901, 0xd64e, 0x2000 },
+ { 0x0901, 0xd64d, 0x0000 },
+ { 0x0901, 0xd64f, 0x0000 },
+ { 0x8501, 0xd660, 0x5000 },
+ { 0x8501, 0xd658, 0x4000 },
+ { 0x8901, 0xd654, 0x3000 },
+ { 0x8901, 0xd652, 0x2000 },
+ { 0x0901, 0xd651, 0x0000 },
+ { 0x0901, 0xd653, 0x0000 },
+ { 0x8501, 0xd656, 0x2000 },
+ { 0x0901, 0xd655, 0x0000 },
+ { 0x0501, 0xd657, 0x0000 },
+ { 0x8501, 0xd65c, 0x3000 },
+ { 0x8501, 0xd65a, 0x2000 },
+ { 0x0501, 0xd659, 0x0000 },
+ { 0x0501, 0xd65b, 0x0000 },
+ { 0x8501, 0xd65e, 0x2000 },
+ { 0x0501, 0xd65d, 0x0000 },
+ { 0x0501, 0xd65f, 0x0000 },
+ { 0x8501, 0xd668, 0x4000 },
+ { 0x8501, 0xd664, 0x3000 },
+ { 0x8501, 0xd662, 0x2000 },
+ { 0x0501, 0xd661, 0x0000 },
+ { 0x0501, 0xd663, 0x0000 },
+ { 0x8501, 0xd666, 0x2000 },
+ { 0x0501, 0xd665, 0x0000 },
+ { 0x0501, 0xd667, 0x0000 },
+ { 0x8501, 0xd66c, 0x3000 },
+ { 0x8501, 0xd66a, 0x2000 },
+ { 0x0501, 0xd669, 0x0000 },
+ { 0x0501, 0xd66b, 0x0000 },
+ { 0x8501, 0xd66e, 0x2000 },
+ { 0x0501, 0xd66d, 0x0000 },
+ { 0x0501, 0xd66f, 0x0000 },
+ { 0x8501, 0xd774, 0x9000 },
+ { 0x8901, 0xd6f4, 0x8000 },
+ { 0x8901, 0xd6b4, 0x7000 },
+ { 0x8501, 0xd690, 0x6000 },
+ { 0x8901, 0xd680, 0x5000 },
+ { 0x8901, 0xd678, 0x4000 },
+ { 0x8901, 0xd674, 0x3000 },
+ { 0x8901, 0xd672, 0x2000 },
+ { 0x0901, 0xd671, 0x0000 },
+ { 0x0901, 0xd673, 0x0000 },
+ { 0x8901, 0xd676, 0x2000 },
+ { 0x0901, 0xd675, 0x0000 },
+ { 0x0901, 0xd677, 0x0000 },
+ { 0x8901, 0xd67c, 0x3000 },
+ { 0x8901, 0xd67a, 0x2000 },
+ { 0x0901, 0xd679, 0x0000 },
+ { 0x0901, 0xd67b, 0x0000 },
+ { 0x8901, 0xd67e, 0x2000 },
+ { 0x0901, 0xd67d, 0x0000 },
+ { 0x0901, 0xd67f, 0x0000 },
+ { 0x8901, 0xd688, 0x4000 },
+ { 0x8901, 0xd684, 0x3000 },
+ { 0x8901, 0xd682, 0x2000 },
+ { 0x0901, 0xd681, 0x0000 },
+ { 0x0901, 0xd683, 0x0000 },
+ { 0x8901, 0xd686, 0x2000 },
+ { 0x0901, 0xd685, 0x0000 },
+ { 0x0901, 0xd687, 0x0000 },
+ { 0x8501, 0xd68c, 0x3000 },
+ { 0x8501, 0xd68a, 0x2000 },
+ { 0x0901, 0xd689, 0x0000 },
+ { 0x0501, 0xd68b, 0x0000 },
+ { 0x8501, 0xd68e, 0x2000 },
+ { 0x0501, 0xd68d, 0x0000 },
+ { 0x0501, 0xd68f, 0x0000 },
+ { 0x8501, 0xd6a0, 0x5000 },
+ { 0x8501, 0xd698, 0x4000 },
+ { 0x8501, 0xd694, 0x3000 },
+ { 0x8501, 0xd692, 0x2000 },
+ { 0x0501, 0xd691, 0x0000 },
+ { 0x0501, 0xd693, 0x0000 },
+ { 0x8501, 0xd696, 0x2000 },
+ { 0x0501, 0xd695, 0x0000 },
+ { 0x0501, 0xd697, 0x0000 },
+ { 0x8501, 0xd69c, 0x3000 },
+ { 0x8501, 0xd69a, 0x2000 },
+ { 0x0501, 0xd699, 0x0000 },
+ { 0x0501, 0xd69b, 0x0000 },
+ { 0x8501, 0xd69e, 0x2000 },
+ { 0x0501, 0xd69d, 0x0000 },
+ { 0x0501, 0xd69f, 0x0000 },
+ { 0x8901, 0xd6ac, 0x4000 },
+ { 0x8901, 0xd6a8, 0x3000 },
+ { 0x8501, 0xd6a2, 0x2000 },
+ { 0x0501, 0xd6a1, 0x0000 },
+ { 0x0501, 0xd6a3, 0x0000 },
+ { 0x8901, 0xd6aa, 0x2000 },
+ { 0x0901, 0xd6a9, 0x0000 },
+ { 0x0901, 0xd6ab, 0x0000 },
+ { 0x8901, 0xd6b0, 0x3000 },
+ { 0x8901, 0xd6ae, 0x2000 },
+ { 0x0901, 0xd6ad, 0x0000 },
+ { 0x0901, 0xd6af, 0x0000 },
+ { 0x8901, 0xd6b2, 0x2000 },
+ { 0x0901, 0xd6b1, 0x0000 },
+ { 0x0901, 0xd6b3, 0x0000 },
+ { 0x8501, 0xd6d4, 0x6000 },
+ { 0x8501, 0xd6c4, 0x5000 },
+ { 0x8901, 0xd6bc, 0x4000 },
+ { 0x8901, 0xd6b8, 0x3000 },
+ { 0x8901, 0xd6b6, 0x2000 },
+ { 0x0901, 0xd6b5, 0x0000 },
+ { 0x0901, 0xd6b7, 0x0000 },
+ { 0x8901, 0xd6ba, 0x2000 },
+ { 0x0901, 0xd6b9, 0x0000 },
+ { 0x0901, 0xd6bb, 0x0000 },
+ { 0x8901, 0xd6c0, 0x3000 },
+ { 0x8901, 0xd6be, 0x2000 },
+ { 0x0901, 0xd6bd, 0x0000 },
+ { 0x0901, 0xd6bf, 0x0000 },
+ { 0x8501, 0xd6c2, 0x2000 },
+ { 0x1901, 0xd6c1, 0x0000 },
+ { 0x0501, 0xd6c3, 0x0000 },
+ { 0x8501, 0xd6cc, 0x4000 },
+ { 0x8501, 0xd6c8, 0x3000 },
+ { 0x8501, 0xd6c6, 0x2000 },
+ { 0x0501, 0xd6c5, 0x0000 },
+ { 0x0501, 0xd6c7, 0x0000 },
+ { 0x8501, 0xd6ca, 0x2000 },
+ { 0x0501, 0xd6c9, 0x0000 },
+ { 0x0501, 0xd6cb, 0x0000 },
+ { 0x8501, 0xd6d0, 0x3000 },
+ { 0x8501, 0xd6ce, 0x2000 },
+ { 0x0501, 0xd6cd, 0x0000 },
+ { 0x0501, 0xd6cf, 0x0000 },
+ { 0x8501, 0xd6d2, 0x2000 },
+ { 0x0501, 0xd6d1, 0x0000 },
+ { 0x0501, 0xd6d3, 0x0000 },
+ { 0x8901, 0xd6e4, 0x5000 },
+ { 0x8501, 0xd6dc, 0x4000 },
+ { 0x8501, 0xd6d8, 0x3000 },
+ { 0x8501, 0xd6d6, 0x2000 },
+ { 0x0501, 0xd6d5, 0x0000 },
+ { 0x0501, 0xd6d7, 0x0000 },
+ { 0x8501, 0xd6da, 0x2000 },
+ { 0x0501, 0xd6d9, 0x0000 },
+ { 0x1901, 0xd6db, 0x0000 },
+ { 0x8501, 0xd6e0, 0x3000 },
+ { 0x8501, 0xd6de, 0x2000 },
+ { 0x0501, 0xd6dd, 0x0000 },
+ { 0x0501, 0xd6df, 0x0000 },
+ { 0x8901, 0xd6e2, 0x2000 },
+ { 0x0501, 0xd6e1, 0x0000 },
+ { 0x0901, 0xd6e3, 0x0000 },
+ { 0x8901, 0xd6ec, 0x4000 },
+ { 0x8901, 0xd6e8, 0x3000 },
+ { 0x8901, 0xd6e6, 0x2000 },
+ { 0x0901, 0xd6e5, 0x0000 },
+ { 0x0901, 0xd6e7, 0x0000 },
+ { 0x8901, 0xd6ea, 0x2000 },
+ { 0x0901, 0xd6e9, 0x0000 },
+ { 0x0901, 0xd6eb, 0x0000 },
+ { 0x8901, 0xd6f0, 0x3000 },
+ { 0x8901, 0xd6ee, 0x2000 },
+ { 0x0901, 0xd6ed, 0x0000 },
+ { 0x0901, 0xd6ef, 0x0000 },
+ { 0x8901, 0xd6f2, 0x2000 },
+ { 0x0901, 0xd6f1, 0x0000 },
+ { 0x0901, 0xd6f3, 0x0000 },
+ { 0x8901, 0xd734, 0x7000 },
+ { 0x8501, 0xd714, 0x6000 },
+ { 0x8501, 0xd704, 0x5000 },
+ { 0x8501, 0xd6fc, 0x4000 },
+ { 0x8901, 0xd6f8, 0x3000 },
+ { 0x8901, 0xd6f6, 0x2000 },
+ { 0x0901, 0xd6f5, 0x0000 },
+ { 0x0901, 0xd6f7, 0x0000 },
+ { 0x8901, 0xd6fa, 0x2000 },
+ { 0x0901, 0xd6f9, 0x0000 },
+ { 0x1901, 0xd6fb, 0x0000 },
+ { 0x8501, 0xd700, 0x3000 },
+ { 0x8501, 0xd6fe, 0x2000 },
+ { 0x0501, 0xd6fd, 0x0000 },
+ { 0x0501, 0xd6ff, 0x0000 },
+ { 0x8501, 0xd702, 0x2000 },
+ { 0x0501, 0xd701, 0x0000 },
+ { 0x0501, 0xd703, 0x0000 },
+ { 0x8501, 0xd70c, 0x4000 },
+ { 0x8501, 0xd708, 0x3000 },
+ { 0x8501, 0xd706, 0x2000 },
+ { 0x0501, 0xd705, 0x0000 },
+ { 0x0501, 0xd707, 0x0000 },
+ { 0x8501, 0xd70a, 0x2000 },
+ { 0x0501, 0xd709, 0x0000 },
+ { 0x0501, 0xd70b, 0x0000 },
+ { 0x8501, 0xd710, 0x3000 },
+ { 0x8501, 0xd70e, 0x2000 },
+ { 0x0501, 0xd70d, 0x0000 },
+ { 0x0501, 0xd70f, 0x0000 },
+ { 0x8501, 0xd712, 0x2000 },
+ { 0x0501, 0xd711, 0x0000 },
+ { 0x0501, 0xd713, 0x0000 },
+ { 0x8901, 0xd724, 0x5000 },
+ { 0x8901, 0xd71c, 0x4000 },
+ { 0x8501, 0xd718, 0x3000 },
+ { 0x8501, 0xd716, 0x2000 },
+ { 0x1901, 0xd715, 0x0000 },
+ { 0x0501, 0xd717, 0x0000 },
+ { 0x8501, 0xd71a, 0x2000 },
+ { 0x0501, 0xd719, 0x0000 },
+ { 0x0501, 0xd71b, 0x0000 },
+ { 0x8901, 0xd720, 0x3000 },
+ { 0x8901, 0xd71e, 0x2000 },
+ { 0x0901, 0xd71d, 0x0000 },
+ { 0x0901, 0xd71f, 0x0000 },
+ { 0x8901, 0xd722, 0x2000 },
+ { 0x0901, 0xd721, 0x0000 },
+ { 0x0901, 0xd723, 0x0000 },
+ { 0x8901, 0xd72c, 0x4000 },
+ { 0x8901, 0xd728, 0x3000 },
+ { 0x8901, 0xd726, 0x2000 },
+ { 0x0901, 0xd725, 0x0000 },
+ { 0x0901, 0xd727, 0x0000 },
+ { 0x8901, 0xd72a, 0x2000 },
+ { 0x0901, 0xd729, 0x0000 },
+ { 0x0901, 0xd72b, 0x0000 },
+ { 0x8901, 0xd730, 0x3000 },
+ { 0x8901, 0xd72e, 0x2000 },
+ { 0x0901, 0xd72d, 0x0000 },
+ { 0x0901, 0xd72f, 0x0000 },
+ { 0x8901, 0xd732, 0x2000 },
+ { 0x0901, 0xd731, 0x0000 },
+ { 0x0901, 0xd733, 0x0000 },
+ { 0x8501, 0xd754, 0x6000 },
+ { 0x8501, 0xd744, 0x5000 },
+ { 0x8501, 0xd73c, 0x4000 },
+ { 0x8501, 0xd738, 0x3000 },
+ { 0x8501, 0xd736, 0x2000 },
+ { 0x1901, 0xd735, 0x0000 },
+ { 0x0501, 0xd737, 0x0000 },
+ { 0x8501, 0xd73a, 0x2000 },
+ { 0x0501, 0xd739, 0x0000 },
+ { 0x0501, 0xd73b, 0x0000 },
+ { 0x8501, 0xd740, 0x3000 },
+ { 0x8501, 0xd73e, 0x2000 },
+ { 0x0501, 0xd73d, 0x0000 },
+ { 0x0501, 0xd73f, 0x0000 },
+ { 0x8501, 0xd742, 0x2000 },
+ { 0x0501, 0xd741, 0x0000 },
+ { 0x0501, 0xd743, 0x0000 },
+ { 0x8501, 0xd74c, 0x4000 },
+ { 0x8501, 0xd748, 0x3000 },
+ { 0x8501, 0xd746, 0x2000 },
+ { 0x0501, 0xd745, 0x0000 },
+ { 0x0501, 0xd747, 0x0000 },
+ { 0x8501, 0xd74a, 0x2000 },
+ { 0x0501, 0xd749, 0x0000 },
+ { 0x0501, 0xd74b, 0x0000 },
+ { 0x8501, 0xd750, 0x3000 },
+ { 0x8501, 0xd74e, 0x2000 },
+ { 0x0501, 0xd74d, 0x0000 },
+ { 0x1901, 0xd74f, 0x0000 },
+ { 0x8501, 0xd752, 0x2000 },
+ { 0x0501, 0xd751, 0x0000 },
+ { 0x0501, 0xd753, 0x0000 },
+ { 0x8901, 0xd764, 0x5000 },
+ { 0x8901, 0xd75c, 0x4000 },
+ { 0x8901, 0xd758, 0x3000 },
+ { 0x8901, 0xd756, 0x2000 },
+ { 0x0501, 0xd755, 0x0000 },
+ { 0x0901, 0xd757, 0x0000 },
+ { 0x8901, 0xd75a, 0x2000 },
+ { 0x0901, 0xd759, 0x0000 },
+ { 0x0901, 0xd75b, 0x0000 },
+ { 0x8901, 0xd760, 0x3000 },
+ { 0x8901, 0xd75e, 0x2000 },
+ { 0x0901, 0xd75d, 0x0000 },
+ { 0x0901, 0xd75f, 0x0000 },
+ { 0x8901, 0xd762, 0x2000 },
+ { 0x0901, 0xd761, 0x0000 },
+ { 0x0901, 0xd763, 0x0000 },
+ { 0x8901, 0xd76c, 0x4000 },
+ { 0x8901, 0xd768, 0x3000 },
+ { 0x8901, 0xd766, 0x2000 },
+ { 0x0901, 0xd765, 0x0000 },
+ { 0x0901, 0xd767, 0x0000 },
+ { 0x8901, 0xd76a, 0x2000 },
+ { 0x0901, 0xd769, 0x0000 },
+ { 0x0901, 0xd76b, 0x0000 },
+ { 0x8501, 0xd770, 0x3000 },
+ { 0x8901, 0xd76e, 0x2000 },
+ { 0x0901, 0xd76d, 0x0000 },
+ { 0x1901, 0xd76f, 0x0000 },
+ { 0x8501, 0xd772, 0x2000 },
+ { 0x0501, 0xd771, 0x0000 },
+ { 0x0501, 0xd773, 0x0000 },
+ { 0x8d01, 0xd7f8, 0x8000 },
+ { 0x8501, 0xd7b4, 0x7000 },
+ { 0x8901, 0xd794, 0x6000 },
+ { 0x8501, 0xd784, 0x5000 },
+ { 0x8501, 0xd77c, 0x4000 },
+ { 0x8501, 0xd778, 0x3000 },
+ { 0x8501, 0xd776, 0x2000 },
+ { 0x0501, 0xd775, 0x0000 },
+ { 0x0501, 0xd777, 0x0000 },
+ { 0x8501, 0xd77a, 0x2000 },
+ { 0x0501, 0xd779, 0x0000 },
+ { 0x0501, 0xd77b, 0x0000 },
+ { 0x8501, 0xd780, 0x3000 },
+ { 0x8501, 0xd77e, 0x2000 },
+ { 0x0501, 0xd77d, 0x0000 },
+ { 0x0501, 0xd77f, 0x0000 },
+ { 0x8501, 0xd782, 0x2000 },
+ { 0x0501, 0xd781, 0x0000 },
+ { 0x0501, 0xd783, 0x0000 },
+ { 0x8501, 0xd78c, 0x4000 },
+ { 0x8501, 0xd788, 0x3000 },
+ { 0x8501, 0xd786, 0x2000 },
+ { 0x0501, 0xd785, 0x0000 },
+ { 0x0501, 0xd787, 0x0000 },
+ { 0x8501, 0xd78a, 0x2000 },
+ { 0x1901, 0xd789, 0x0000 },
+ { 0x0501, 0xd78b, 0x0000 },
+ { 0x8901, 0xd790, 0x3000 },
+ { 0x8501, 0xd78e, 0x2000 },
+ { 0x0501, 0xd78d, 0x0000 },
+ { 0x0501, 0xd78f, 0x0000 },
+ { 0x8901, 0xd792, 0x2000 },
+ { 0x0901, 0xd791, 0x0000 },
+ { 0x0901, 0xd793, 0x0000 },
+ { 0x8901, 0xd7a4, 0x5000 },
+ { 0x8901, 0xd79c, 0x4000 },
+ { 0x8901, 0xd798, 0x3000 },
+ { 0x8901, 0xd796, 0x2000 },
+ { 0x0901, 0xd795, 0x0000 },
+ { 0x0901, 0xd797, 0x0000 },
+ { 0x8901, 0xd79a, 0x2000 },
+ { 0x0901, 0xd799, 0x0000 },
+ { 0x0901, 0xd79b, 0x0000 },
+ { 0x8901, 0xd7a0, 0x3000 },
+ { 0x8901, 0xd79e, 0x2000 },
+ { 0x0901, 0xd79d, 0x0000 },
+ { 0x0901, 0xd79f, 0x0000 },
+ { 0x8901, 0xd7a2, 0x2000 },
+ { 0x0901, 0xd7a1, 0x0000 },
+ { 0x0901, 0xd7a3, 0x0000 },
+ { 0x8501, 0xd7ac, 0x4000 },
+ { 0x8901, 0xd7a8, 0x3000 },
+ { 0x8901, 0xd7a6, 0x2000 },
+ { 0x0901, 0xd7a5, 0x0000 },
+ { 0x0901, 0xd7a7, 0x0000 },
+ { 0x8501, 0xd7aa, 0x2000 },
+ { 0x1901, 0xd7a9, 0x0000 },
+ { 0x0501, 0xd7ab, 0x0000 },
+ { 0x8501, 0xd7b0, 0x3000 },
+ { 0x8501, 0xd7ae, 0x2000 },
+ { 0x0501, 0xd7ad, 0x0000 },
+ { 0x0501, 0xd7af, 0x0000 },
+ { 0x8501, 0xd7b2, 0x2000 },
+ { 0x0501, 0xd7b1, 0x0000 },
+ { 0x0501, 0xd7b3, 0x0000 },
+ { 0x8d01, 0xd7d8, 0x6000 },
+ { 0x8501, 0xd7c4, 0x5000 },
+ { 0x8501, 0xd7bc, 0x4000 },
+ { 0x8501, 0xd7b8, 0x3000 },
+ { 0x8501, 0xd7b6, 0x2000 },
+ { 0x0501, 0xd7b5, 0x0000 },
+ { 0x0501, 0xd7b7, 0x0000 },
+ { 0x8501, 0xd7ba, 0x2000 },
+ { 0x0501, 0xd7b9, 0x0000 },
+ { 0x0501, 0xd7bb, 0x0000 },
+ { 0x8501, 0xd7c0, 0x3000 },
+ { 0x8501, 0xd7be, 0x2000 },
+ { 0x0501, 0xd7bd, 0x0000 },
+ { 0x0501, 0xd7bf, 0x0000 },
+ { 0x8501, 0xd7c2, 0x2000 },
+ { 0x0501, 0xd7c1, 0x0000 },
+ { 0x1901, 0xd7c3, 0x0000 },
+ { 0x8d01, 0xd7d0, 0x4000 },
+ { 0x8501, 0xd7c8, 0x3000 },
+ { 0x8501, 0xd7c6, 0x2000 },
+ { 0x0501, 0xd7c5, 0x0000 },
+ { 0x0501, 0xd7c7, 0x0000 },
+ { 0x8d01, 0xd7ce, 0x2000 },
+ { 0x0501, 0xd7c9, 0x0000 },
+ { 0x0d01, 0xd7cf, 0x0000 },
+ { 0x8d01, 0xd7d4, 0x3000 },
+ { 0x8d01, 0xd7d2, 0x2000 },
+ { 0x0d01, 0xd7d1, 0x0000 },
+ { 0x0d01, 0xd7d3, 0x0000 },
+ { 0x8d01, 0xd7d6, 0x2000 },
+ { 0x0d01, 0xd7d5, 0x0000 },
+ { 0x0d01, 0xd7d7, 0x0000 },
+ { 0x8d01, 0xd7e8, 0x5000 },
+ { 0x8d01, 0xd7e0, 0x4000 },
+ { 0x8d01, 0xd7dc, 0x3000 },
+ { 0x8d01, 0xd7da, 0x2000 },
+ { 0x0d01, 0xd7d9, 0x0000 },
+ { 0x0d01, 0xd7db, 0x0000 },
+ { 0x8d01, 0xd7de, 0x2000 },
+ { 0x0d01, 0xd7dd, 0x0000 },
+ { 0x0d01, 0xd7df, 0x0000 },
+ { 0x8d01, 0xd7e4, 0x3000 },
+ { 0x8d01, 0xd7e2, 0x2000 },
+ { 0x0d01, 0xd7e1, 0x0000 },
+ { 0x0d01, 0xd7e3, 0x0000 },
+ { 0x8d01, 0xd7e6, 0x2000 },
+ { 0x0d01, 0xd7e5, 0x0000 },
+ { 0x0d01, 0xd7e7, 0x0000 },
+ { 0x8d01, 0xd7f0, 0x4000 },
+ { 0x8d01, 0xd7ec, 0x3000 },
+ { 0x8d01, 0xd7ea, 0x2000 },
+ { 0x0d01, 0xd7e9, 0x0000 },
+ { 0x0d01, 0xd7eb, 0x0000 },
+ { 0x8d01, 0xd7ee, 0x2000 },
+ { 0x0d01, 0xd7ed, 0x0000 },
+ { 0x0d01, 0xd7ef, 0x0000 },
+ { 0x8d01, 0xd7f4, 0x3000 },
+ { 0x8d01, 0xd7f2, 0x2000 },
+ { 0x0d01, 0xd7f1, 0x0000 },
+ { 0x0d01, 0xd7f3, 0x0000 },
+ { 0x8d01, 0xd7f6, 0x2000 },
+ { 0x0d01, 0xd7f5, 0x0000 },
+ { 0x0d01, 0xd7f7, 0x0000 },
+ { 0x8702, 0xf836, 0x7000 },
+ { 0x8702, 0xf816, 0x6000 },
+ { 0x8702, 0xf806, 0x5000 },
+ { 0x8702, 0x0000, 0x4000 },
+ { 0x8d01, 0xd7fc, 0x3000 },
+ { 0x8d01, 0xd7fa, 0x2000 },
+ { 0x0d01, 0xd7f9, 0x0000 },
+ { 0x0d01, 0xd7fb, 0x0000 },
+ { 0x8d01, 0xd7fe, 0x2000 },
+ { 0x0d01, 0xd7fd, 0x0000 },
+ { 0x0d01, 0xd7ff, 0x0000 },
+ { 0x8702, 0xf802, 0x3000 },
+ { 0x8702, 0xf800, 0x2000 },
+ { 0x0702, 0xa6d6, 0x0000 },
+ { 0x0702, 0xf801, 0x0000 },
+ { 0x8702, 0xf804, 0x2000 },
+ { 0x0702, 0xf803, 0x0000 },
+ { 0x0702, 0xf805, 0x0000 },
+ { 0x8702, 0xf80e, 0x4000 },
+ { 0x8702, 0xf80a, 0x3000 },
+ { 0x8702, 0xf808, 0x2000 },
+ { 0x0702, 0xf807, 0x0000 },
+ { 0x0702, 0xf809, 0x0000 },
+ { 0x8702, 0xf80c, 0x2000 },
+ { 0x0702, 0xf80b, 0x0000 },
+ { 0x0702, 0xf80d, 0x0000 },
+ { 0x8702, 0xf812, 0x3000 },
+ { 0x8702, 0xf810, 0x2000 },
+ { 0x0702, 0xf80f, 0x0000 },
+ { 0x0702, 0xf811, 0x0000 },
+ { 0x8702, 0xf814, 0x2000 },
+ { 0x0702, 0xf813, 0x0000 },
+ { 0x0702, 0xf815, 0x0000 },
+ { 0x8702, 0xf826, 0x5000 },
+ { 0x8702, 0xf81e, 0x4000 },
+ { 0x8702, 0xf81a, 0x3000 },
+ { 0x8702, 0xf818, 0x2000 },
+ { 0x0702, 0xf817, 0x0000 },
+ { 0x0702, 0xf819, 0x0000 },
+ { 0x8702, 0xf81c, 0x2000 },
+ { 0x0702, 0xf81b, 0x0000 },
+ { 0x0702, 0xf81d, 0x0000 },
+ { 0x8702, 0xf822, 0x3000 },
+ { 0x8702, 0xf820, 0x2000 },
+ { 0x0702, 0xf81f, 0x0000 },
+ { 0x0702, 0xf821, 0x0000 },
+ { 0x8702, 0xf824, 0x2000 },
+ { 0x0702, 0xf823, 0x0000 },
+ { 0x0702, 0xf825, 0x0000 },
+ { 0x8702, 0xf82e, 0x4000 },
+ { 0x8702, 0xf82a, 0x3000 },
+ { 0x8702, 0xf828, 0x2000 },
+ { 0x0702, 0xf827, 0x0000 },
+ { 0x0702, 0xf829, 0x0000 },
+ { 0x8702, 0xf82c, 0x2000 },
+ { 0x0702, 0xf82b, 0x0000 },
+ { 0x0702, 0xf82d, 0x0000 },
+ { 0x8702, 0xf832, 0x3000 },
+ { 0x8702, 0xf830, 0x2000 },
+ { 0x0702, 0xf82f, 0x0000 },
+ { 0x0702, 0xf831, 0x0000 },
+ { 0x8702, 0xf834, 0x2000 },
+ { 0x0702, 0xf833, 0x0000 },
+ { 0x0702, 0xf835, 0x0000 },
+ { 0x8702, 0xf856, 0x6000 },
+ { 0x8702, 0xf846, 0x5000 },
+ { 0x8702, 0xf83e, 0x4000 },
+ { 0x8702, 0xf83a, 0x3000 },
+ { 0x8702, 0xf838, 0x2000 },
+ { 0x0702, 0xf837, 0x0000 },
+ { 0x0702, 0xf839, 0x0000 },
+ { 0x8702, 0xf83c, 0x2000 },
+ { 0x0702, 0xf83b, 0x0000 },
+ { 0x0702, 0xf83d, 0x0000 },
+ { 0x8702, 0xf842, 0x3000 },
+ { 0x8702, 0xf840, 0x2000 },
+ { 0x0702, 0xf83f, 0x0000 },
+ { 0x0702, 0xf841, 0x0000 },
+ { 0x8702, 0xf844, 0x2000 },
+ { 0x0702, 0xf843, 0x0000 },
+ { 0x0702, 0xf845, 0x0000 },
+ { 0x8702, 0xf84e, 0x4000 },
+ { 0x8702, 0xf84a, 0x3000 },
+ { 0x8702, 0xf848, 0x2000 },
+ { 0x0702, 0xf847, 0x0000 },
+ { 0x0702, 0xf849, 0x0000 },
+ { 0x8702, 0xf84c, 0x2000 },
+ { 0x0702, 0xf84b, 0x0000 },
+ { 0x0702, 0xf84d, 0x0000 },
+ { 0x8702, 0xf852, 0x3000 },
+ { 0x8702, 0xf850, 0x2000 },
+ { 0x0702, 0xf84f, 0x0000 },
+ { 0x0702, 0xf851, 0x0000 },
+ { 0x8702, 0xf854, 0x2000 },
+ { 0x0702, 0xf853, 0x0000 },
+ { 0x0702, 0xf855, 0x0000 },
+ { 0x8702, 0xf866, 0x5000 },
+ { 0x8702, 0xf85e, 0x4000 },
+ { 0x8702, 0xf85a, 0x3000 },
+ { 0x8702, 0xf858, 0x2000 },
+ { 0x0702, 0xf857, 0x0000 },
+ { 0x0702, 0xf859, 0x0000 },
+ { 0x8702, 0xf85c, 0x2000 },
+ { 0x0702, 0xf85b, 0x0000 },
+ { 0x0702, 0xf85d, 0x0000 },
+ { 0x8702, 0xf862, 0x3000 },
+ { 0x8702, 0xf860, 0x2000 },
+ { 0x0702, 0xf85f, 0x0000 },
+ { 0x0702, 0xf861, 0x0000 },
+ { 0x8702, 0xf864, 0x2000 },
+ { 0x0702, 0xf863, 0x0000 },
+ { 0x0702, 0xf865, 0x0000 },
+ { 0x8702, 0xf86e, 0x4000 },
+ { 0x8702, 0xf86a, 0x3000 },
+ { 0x8702, 0xf868, 0x2000 },
+ { 0x0702, 0xf867, 0x0000 },
+ { 0x0702, 0xf869, 0x0000 },
+ { 0x8702, 0xf86c, 0x2000 },
+ { 0x0702, 0xf86b, 0x0000 },
+ { 0x0702, 0xf86d, 0x0000 },
+ { 0x8702, 0xf872, 0x3000 },
+ { 0x8702, 0xf870, 0x2000 },
+ { 0x0702, 0xf86f, 0x0000 },
+ { 0x0702, 0xf871, 0x0000 },
+ { 0x8702, 0xf874, 0x2000 },
+ { 0x0702, 0xf873, 0x0000 },
+ { 0x0702, 0xf875, 0x0000 },
+ { 0x8702, 0xf976, 0x9000 },
+ { 0x8702, 0xf8f6, 0x8000 },
+ { 0x8702, 0xf8b6, 0x7000 },
+ { 0x8702, 0xf896, 0x6000 },
+ { 0x8702, 0xf886, 0x5000 },
+ { 0x8702, 0xf87e, 0x4000 },
+ { 0x8702, 0xf87a, 0x3000 },
+ { 0x8702, 0xf878, 0x2000 },
+ { 0x0702, 0xf877, 0x0000 },
+ { 0x0702, 0xf879, 0x0000 },
+ { 0x8702, 0xf87c, 0x2000 },
+ { 0x0702, 0xf87b, 0x0000 },
+ { 0x0702, 0xf87d, 0x0000 },
+ { 0x8702, 0xf882, 0x3000 },
+ { 0x8702, 0xf880, 0x2000 },
+ { 0x0702, 0xf87f, 0x0000 },
+ { 0x0702, 0xf881, 0x0000 },
+ { 0x8702, 0xf884, 0x2000 },
+ { 0x0702, 0xf883, 0x0000 },
+ { 0x0702, 0xf885, 0x0000 },
+ { 0x8702, 0xf88e, 0x4000 },
+ { 0x8702, 0xf88a, 0x3000 },
+ { 0x8702, 0xf888, 0x2000 },
+ { 0x0702, 0xf887, 0x0000 },
+ { 0x0702, 0xf889, 0x0000 },
+ { 0x8702, 0xf88c, 0x2000 },
+ { 0x0702, 0xf88b, 0x0000 },
+ { 0x0702, 0xf88d, 0x0000 },
+ { 0x8702, 0xf892, 0x3000 },
+ { 0x8702, 0xf890, 0x2000 },
+ { 0x0702, 0xf88f, 0x0000 },
+ { 0x0702, 0xf891, 0x0000 },
+ { 0x8702, 0xf894, 0x2000 },
+ { 0x0702, 0xf893, 0x0000 },
+ { 0x0702, 0xf895, 0x0000 },
+ { 0x8702, 0xf8a6, 0x5000 },
+ { 0x8702, 0xf89e, 0x4000 },
+ { 0x8702, 0xf89a, 0x3000 },
+ { 0x8702, 0xf898, 0x2000 },
+ { 0x0702, 0xf897, 0x0000 },
+ { 0x0702, 0xf899, 0x0000 },
+ { 0x8702, 0xf89c, 0x2000 },
+ { 0x0702, 0xf89b, 0x0000 },
+ { 0x0702, 0xf89d, 0x0000 },
+ { 0x8702, 0xf8a2, 0x3000 },
+ { 0x8702, 0xf8a0, 0x2000 },
+ { 0x0702, 0xf89f, 0x0000 },
+ { 0x0702, 0xf8a1, 0x0000 },
+ { 0x8702, 0xf8a4, 0x2000 },
+ { 0x0702, 0xf8a3, 0x0000 },
+ { 0x0702, 0xf8a5, 0x0000 },
+ { 0x8702, 0xf8ae, 0x4000 },
+ { 0x8702, 0xf8aa, 0x3000 },
+ { 0x8702, 0xf8a8, 0x2000 },
+ { 0x0702, 0xf8a7, 0x0000 },
+ { 0x0702, 0xf8a9, 0x0000 },
+ { 0x8702, 0xf8ac, 0x2000 },
+ { 0x0702, 0xf8ab, 0x0000 },
+ { 0x0702, 0xf8ad, 0x0000 },
+ { 0x8702, 0xf8b2, 0x3000 },
+ { 0x8702, 0xf8b0, 0x2000 },
+ { 0x0702, 0xf8af, 0x0000 },
+ { 0x0702, 0xf8b1, 0x0000 },
+ { 0x8702, 0xf8b4, 0x2000 },
+ { 0x0702, 0xf8b3, 0x0000 },
+ { 0x0702, 0xf8b5, 0x0000 },
+ { 0x8702, 0xf8d6, 0x6000 },
+ { 0x8702, 0xf8c6, 0x5000 },
+ { 0x8702, 0xf8be, 0x4000 },
+ { 0x8702, 0xf8ba, 0x3000 },
+ { 0x8702, 0xf8b8, 0x2000 },
+ { 0x0702, 0xf8b7, 0x0000 },
+ { 0x0702, 0xf8b9, 0x0000 },
+ { 0x8702, 0xf8bc, 0x2000 },
+ { 0x0702, 0xf8bb, 0x0000 },
+ { 0x0702, 0xf8bd, 0x0000 },
+ { 0x8702, 0xf8c2, 0x3000 },
+ { 0x8702, 0xf8c0, 0x2000 },
+ { 0x0702, 0xf8bf, 0x0000 },
+ { 0x0702, 0xf8c1, 0x0000 },
+ { 0x8702, 0xf8c4, 0x2000 },
+ { 0x0702, 0xf8c3, 0x0000 },
+ { 0x0702, 0xf8c5, 0x0000 },
+ { 0x8702, 0xf8ce, 0x4000 },
+ { 0x8702, 0xf8ca, 0x3000 },
+ { 0x8702, 0xf8c8, 0x2000 },
+ { 0x0702, 0xf8c7, 0x0000 },
+ { 0x0702, 0xf8c9, 0x0000 },
+ { 0x8702, 0xf8cc, 0x2000 },
+ { 0x0702, 0xf8cb, 0x0000 },
+ { 0x0702, 0xf8cd, 0x0000 },
+ { 0x8702, 0xf8d2, 0x3000 },
+ { 0x8702, 0xf8d0, 0x2000 },
+ { 0x0702, 0xf8cf, 0x0000 },
+ { 0x0702, 0xf8d1, 0x0000 },
+ { 0x8702, 0xf8d4, 0x2000 },
+ { 0x0702, 0xf8d3, 0x0000 },
+ { 0x0702, 0xf8d5, 0x0000 },
+ { 0x8702, 0xf8e6, 0x5000 },
+ { 0x8702, 0xf8de, 0x4000 },
+ { 0x8702, 0xf8da, 0x3000 },
+ { 0x8702, 0xf8d8, 0x2000 },
+ { 0x0702, 0xf8d7, 0x0000 },
+ { 0x0702, 0xf8d9, 0x0000 },
+ { 0x8702, 0xf8dc, 0x2000 },
+ { 0x0702, 0xf8db, 0x0000 },
+ { 0x0702, 0xf8dd, 0x0000 },
+ { 0x8702, 0xf8e2, 0x3000 },
+ { 0x8702, 0xf8e0, 0x2000 },
+ { 0x0702, 0xf8df, 0x0000 },
+ { 0x0702, 0xf8e1, 0x0000 },
+ { 0x8702, 0xf8e4, 0x2000 },
+ { 0x0702, 0xf8e3, 0x0000 },
+ { 0x0702, 0xf8e5, 0x0000 },
+ { 0x8702, 0xf8ee, 0x4000 },
+ { 0x8702, 0xf8ea, 0x3000 },
+ { 0x8702, 0xf8e8, 0x2000 },
+ { 0x0702, 0xf8e7, 0x0000 },
+ { 0x0702, 0xf8e9, 0x0000 },
+ { 0x8702, 0xf8ec, 0x2000 },
+ { 0x0702, 0xf8eb, 0x0000 },
+ { 0x0702, 0xf8ed, 0x0000 },
+ { 0x8702, 0xf8f2, 0x3000 },
+ { 0x8702, 0xf8f0, 0x2000 },
+ { 0x0702, 0xf8ef, 0x0000 },
+ { 0x0702, 0xf8f1, 0x0000 },
+ { 0x8702, 0xf8f4, 0x2000 },
+ { 0x0702, 0xf8f3, 0x0000 },
+ { 0x0702, 0xf8f5, 0x0000 },
+ { 0x8702, 0xf936, 0x7000 },
+ { 0x8702, 0xf916, 0x6000 },
+ { 0x8702, 0xf906, 0x5000 },
+ { 0x8702, 0xf8fe, 0x4000 },
+ { 0x8702, 0xf8fa, 0x3000 },
+ { 0x8702, 0xf8f8, 0x2000 },
+ { 0x0702, 0xf8f7, 0x0000 },
+ { 0x0702, 0xf8f9, 0x0000 },
+ { 0x8702, 0xf8fc, 0x2000 },
+ { 0x0702, 0xf8fb, 0x0000 },
+ { 0x0702, 0xf8fd, 0x0000 },
+ { 0x8702, 0xf902, 0x3000 },
+ { 0x8702, 0xf900, 0x2000 },
+ { 0x0702, 0xf8ff, 0x0000 },
+ { 0x0702, 0xf901, 0x0000 },
+ { 0x8702, 0xf904, 0x2000 },
+ { 0x0702, 0xf903, 0x0000 },
+ { 0x0702, 0xf905, 0x0000 },
+ { 0x8702, 0xf90e, 0x4000 },
+ { 0x8702, 0xf90a, 0x3000 },
+ { 0x8702, 0xf908, 0x2000 },
+ { 0x0702, 0xf907, 0x0000 },
+ { 0x0702, 0xf909, 0x0000 },
+ { 0x8702, 0xf90c, 0x2000 },
+ { 0x0702, 0xf90b, 0x0000 },
+ { 0x0702, 0xf90d, 0x0000 },
+ { 0x8702, 0xf912, 0x3000 },
+ { 0x8702, 0xf910, 0x2000 },
+ { 0x0702, 0xf90f, 0x0000 },
+ { 0x0702, 0xf911, 0x0000 },
+ { 0x8702, 0xf914, 0x2000 },
+ { 0x0702, 0xf913, 0x0000 },
+ { 0x0702, 0xf915, 0x0000 },
+ { 0x8702, 0xf926, 0x5000 },
+ { 0x8702, 0xf91e, 0x4000 },
+ { 0x8702, 0xf91a, 0x3000 },
+ { 0x8702, 0xf918, 0x2000 },
+ { 0x0702, 0xf917, 0x0000 },
+ { 0x0702, 0xf919, 0x0000 },
+ { 0x8702, 0xf91c, 0x2000 },
+ { 0x0702, 0xf91b, 0x0000 },
+ { 0x0702, 0xf91d, 0x0000 },
+ { 0x8702, 0xf922, 0x3000 },
+ { 0x8702, 0xf920, 0x2000 },
+ { 0x0702, 0xf91f, 0x0000 },
+ { 0x0702, 0xf921, 0x0000 },
+ { 0x8702, 0xf924, 0x2000 },
+ { 0x0702, 0xf923, 0x0000 },
+ { 0x0702, 0xf925, 0x0000 },
+ { 0x8702, 0xf92e, 0x4000 },
+ { 0x8702, 0xf92a, 0x3000 },
+ { 0x8702, 0xf928, 0x2000 },
+ { 0x0702, 0xf927, 0x0000 },
+ { 0x0702, 0xf929, 0x0000 },
+ { 0x8702, 0xf92c, 0x2000 },
+ { 0x0702, 0xf92b, 0x0000 },
+ { 0x0702, 0xf92d, 0x0000 },
+ { 0x8702, 0xf932, 0x3000 },
+ { 0x8702, 0xf930, 0x2000 },
+ { 0x0702, 0xf92f, 0x0000 },
+ { 0x0702, 0xf931, 0x0000 },
+ { 0x8702, 0xf934, 0x2000 },
+ { 0x0702, 0xf933, 0x0000 },
+ { 0x0702, 0xf935, 0x0000 },
+ { 0x8702, 0xf956, 0x6000 },
+ { 0x8702, 0xf946, 0x5000 },
+ { 0x8702, 0xf93e, 0x4000 },
+ { 0x8702, 0xf93a, 0x3000 },
+ { 0x8702, 0xf938, 0x2000 },
+ { 0x0702, 0xf937, 0x0000 },
+ { 0x0702, 0xf939, 0x0000 },
+ { 0x8702, 0xf93c, 0x2000 },
+ { 0x0702, 0xf93b, 0x0000 },
+ { 0x0702, 0xf93d, 0x0000 },
+ { 0x8702, 0xf942, 0x3000 },
+ { 0x8702, 0xf940, 0x2000 },
+ { 0x0702, 0xf93f, 0x0000 },
+ { 0x0702, 0xf941, 0x0000 },
+ { 0x8702, 0xf944, 0x2000 },
+ { 0x0702, 0xf943, 0x0000 },
+ { 0x0702, 0xf945, 0x0000 },
+ { 0x8702, 0xf94e, 0x4000 },
+ { 0x8702, 0xf94a, 0x3000 },
+ { 0x8702, 0xf948, 0x2000 },
+ { 0x0702, 0xf947, 0x0000 },
+ { 0x0702, 0xf949, 0x0000 },
+ { 0x8702, 0xf94c, 0x2000 },
+ { 0x0702, 0xf94b, 0x0000 },
+ { 0x0702, 0xf94d, 0x0000 },
+ { 0x8702, 0xf952, 0x3000 },
+ { 0x8702, 0xf950, 0x2000 },
+ { 0x0702, 0xf94f, 0x0000 },
+ { 0x0702, 0xf951, 0x0000 },
+ { 0x8702, 0xf954, 0x2000 },
+ { 0x0702, 0xf953, 0x0000 },
+ { 0x0702, 0xf955, 0x0000 },
+ { 0x8702, 0xf966, 0x5000 },
+ { 0x8702, 0xf95e, 0x4000 },
+ { 0x8702, 0xf95a, 0x3000 },
+ { 0x8702, 0xf958, 0x2000 },
+ { 0x0702, 0xf957, 0x0000 },
+ { 0x0702, 0xf959, 0x0000 },
+ { 0x8702, 0xf95c, 0x2000 },
+ { 0x0702, 0xf95b, 0x0000 },
+ { 0x0702, 0xf95d, 0x0000 },
+ { 0x8702, 0xf962, 0x3000 },
+ { 0x8702, 0xf960, 0x2000 },
+ { 0x0702, 0xf95f, 0x0000 },
+ { 0x0702, 0xf961, 0x0000 },
+ { 0x8702, 0xf964, 0x2000 },
+ { 0x0702, 0xf963, 0x0000 },
+ { 0x0702, 0xf965, 0x0000 },
+ { 0x8702, 0xf96e, 0x4000 },
+ { 0x8702, 0xf96a, 0x3000 },
+ { 0x8702, 0xf968, 0x2000 },
+ { 0x0702, 0xf967, 0x0000 },
+ { 0x0702, 0xf969, 0x0000 },
+ { 0x8702, 0xf96c, 0x2000 },
+ { 0x0702, 0xf96b, 0x0000 },
+ { 0x0702, 0xf96d, 0x0000 },
+ { 0x8702, 0xf972, 0x3000 },
+ { 0x8702, 0xf970, 0x2000 },
+ { 0x0702, 0xf96f, 0x0000 },
+ { 0x0702, 0xf971, 0x0000 },
+ { 0x8702, 0xf974, 0x2000 },
+ { 0x0702, 0xf973, 0x0000 },
+ { 0x0702, 0xf975, 0x0000 },
+ { 0x810e, 0x0077, 0x9000 },
+ { 0x8702, 0xf9f6, 0x8000 },
+ { 0x8702, 0xf9b6, 0x7000 },
+ { 0x8702, 0xf996, 0x6000 },
+ { 0x8702, 0xf986, 0x5000 },
+ { 0x8702, 0xf97e, 0x4000 },
+ { 0x8702, 0xf97a, 0x3000 },
+ { 0x8702, 0xf978, 0x2000 },
+ { 0x0702, 0xf977, 0x0000 },
+ { 0x0702, 0xf979, 0x0000 },
+ { 0x8702, 0xf97c, 0x2000 },
+ { 0x0702, 0xf97b, 0x0000 },
+ { 0x0702, 0xf97d, 0x0000 },
+ { 0x8702, 0xf982, 0x3000 },
+ { 0x8702, 0xf980, 0x2000 },
+ { 0x0702, 0xf97f, 0x0000 },
+ { 0x0702, 0xf981, 0x0000 },
+ { 0x8702, 0xf984, 0x2000 },
+ { 0x0702, 0xf983, 0x0000 },
+ { 0x0702, 0xf985, 0x0000 },
+ { 0x8702, 0xf98e, 0x4000 },
+ { 0x8702, 0xf98a, 0x3000 },
+ { 0x8702, 0xf988, 0x2000 },
+ { 0x0702, 0xf987, 0x0000 },
+ { 0x0702, 0xf989, 0x0000 },
+ { 0x8702, 0xf98c, 0x2000 },
+ { 0x0702, 0xf98b, 0x0000 },
+ { 0x0702, 0xf98d, 0x0000 },
+ { 0x8702, 0xf992, 0x3000 },
+ { 0x8702, 0xf990, 0x2000 },
+ { 0x0702, 0xf98f, 0x0000 },
+ { 0x0702, 0xf991, 0x0000 },
+ { 0x8702, 0xf994, 0x2000 },
+ { 0x0702, 0xf993, 0x0000 },
+ { 0x0702, 0xf995, 0x0000 },
+ { 0x8702, 0xf9a6, 0x5000 },
+ { 0x8702, 0xf99e, 0x4000 },
+ { 0x8702, 0xf99a, 0x3000 },
+ { 0x8702, 0xf998, 0x2000 },
+ { 0x0702, 0xf997, 0x0000 },
+ { 0x0702, 0xf999, 0x0000 },
+ { 0x8702, 0xf99c, 0x2000 },
+ { 0x0702, 0xf99b, 0x0000 },
+ { 0x0702, 0xf99d, 0x0000 },
+ { 0x8702, 0xf9a2, 0x3000 },
+ { 0x8702, 0xf9a0, 0x2000 },
+ { 0x0702, 0xf99f, 0x0000 },
+ { 0x0702, 0xf9a1, 0x0000 },
+ { 0x8702, 0xf9a4, 0x2000 },
+ { 0x0702, 0xf9a3, 0x0000 },
+ { 0x0702, 0xf9a5, 0x0000 },
+ { 0x8702, 0xf9ae, 0x4000 },
+ { 0x8702, 0xf9aa, 0x3000 },
+ { 0x8702, 0xf9a8, 0x2000 },
+ { 0x0702, 0xf9a7, 0x0000 },
+ { 0x0702, 0xf9a9, 0x0000 },
+ { 0x8702, 0xf9ac, 0x2000 },
+ { 0x0702, 0xf9ab, 0x0000 },
+ { 0x0702, 0xf9ad, 0x0000 },
+ { 0x8702, 0xf9b2, 0x3000 },
+ { 0x8702, 0xf9b0, 0x2000 },
+ { 0x0702, 0xf9af, 0x0000 },
+ { 0x0702, 0xf9b1, 0x0000 },
+ { 0x8702, 0xf9b4, 0x2000 },
+ { 0x0702, 0xf9b3, 0x0000 },
+ { 0x0702, 0xf9b5, 0x0000 },
+ { 0x8702, 0xf9d6, 0x6000 },
+ { 0x8702, 0xf9c6, 0x5000 },
+ { 0x8702, 0xf9be, 0x4000 },
+ { 0x8702, 0xf9ba, 0x3000 },
+ { 0x8702, 0xf9b8, 0x2000 },
+ { 0x0702, 0xf9b7, 0x0000 },
+ { 0x0702, 0xf9b9, 0x0000 },
+ { 0x8702, 0xf9bc, 0x2000 },
+ { 0x0702, 0xf9bb, 0x0000 },
+ { 0x0702, 0xf9bd, 0x0000 },
+ { 0x8702, 0xf9c2, 0x3000 },
+ { 0x8702, 0xf9c0, 0x2000 },
+ { 0x0702, 0xf9bf, 0x0000 },
+ { 0x0702, 0xf9c1, 0x0000 },
+ { 0x8702, 0xf9c4, 0x2000 },
+ { 0x0702, 0xf9c3, 0x0000 },
+ { 0x0702, 0xf9c5, 0x0000 },
+ { 0x8702, 0xf9ce, 0x4000 },
+ { 0x8702, 0xf9ca, 0x3000 },
+ { 0x8702, 0xf9c8, 0x2000 },
+ { 0x0702, 0xf9c7, 0x0000 },
+ { 0x0702, 0xf9c9, 0x0000 },
+ { 0x8702, 0xf9cc, 0x2000 },
+ { 0x0702, 0xf9cb, 0x0000 },
+ { 0x0702, 0xf9cd, 0x0000 },
+ { 0x8702, 0xf9d2, 0x3000 },
+ { 0x8702, 0xf9d0, 0x2000 },
+ { 0x0702, 0xf9cf, 0x0000 },
+ { 0x0702, 0xf9d1, 0x0000 },
+ { 0x8702, 0xf9d4, 0x2000 },
+ { 0x0702, 0xf9d3, 0x0000 },
+ { 0x0702, 0xf9d5, 0x0000 },
+ { 0x8702, 0xf9e6, 0x5000 },
+ { 0x8702, 0xf9de, 0x4000 },
+ { 0x8702, 0xf9da, 0x3000 },
+ { 0x8702, 0xf9d8, 0x2000 },
+ { 0x0702, 0xf9d7, 0x0000 },
+ { 0x0702, 0xf9d9, 0x0000 },
+ { 0x8702, 0xf9dc, 0x2000 },
+ { 0x0702, 0xf9db, 0x0000 },
+ { 0x0702, 0xf9dd, 0x0000 },
+ { 0x8702, 0xf9e2, 0x3000 },
+ { 0x8702, 0xf9e0, 0x2000 },
+ { 0x0702, 0xf9df, 0x0000 },
+ { 0x0702, 0xf9e1, 0x0000 },
+ { 0x8702, 0xf9e4, 0x2000 },
+ { 0x0702, 0xf9e3, 0x0000 },
+ { 0x0702, 0xf9e5, 0x0000 },
+ { 0x8702, 0xf9ee, 0x4000 },
+ { 0x8702, 0xf9ea, 0x3000 },
+ { 0x8702, 0xf9e8, 0x2000 },
+ { 0x0702, 0xf9e7, 0x0000 },
+ { 0x0702, 0xf9e9, 0x0000 },
+ { 0x8702, 0xf9ec, 0x2000 },
+ { 0x0702, 0xf9eb, 0x0000 },
+ { 0x0702, 0xf9ed, 0x0000 },
+ { 0x8702, 0xf9f2, 0x3000 },
+ { 0x8702, 0xf9f0, 0x2000 },
+ { 0x0702, 0xf9ef, 0x0000 },
+ { 0x0702, 0xf9f1, 0x0000 },
+ { 0x8702, 0xf9f4, 0x2000 },
+ { 0x0702, 0xf9f3, 0x0000 },
+ { 0x0702, 0xf9f5, 0x0000 },
+ { 0x810e, 0x0037, 0x7000 },
+ { 0x8702, 0xfa16, 0x6000 },
+ { 0x8702, 0xfa06, 0x5000 },
+ { 0x8702, 0xf9fe, 0x4000 },
+ { 0x8702, 0xf9fa, 0x3000 },
+ { 0x8702, 0xf9f8, 0x2000 },
+ { 0x0702, 0xf9f7, 0x0000 },
+ { 0x0702, 0xf9f9, 0x0000 },
+ { 0x8702, 0xf9fc, 0x2000 },
+ { 0x0702, 0xf9fb, 0x0000 },
+ { 0x0702, 0xf9fd, 0x0000 },
+ { 0x8702, 0xfa02, 0x3000 },
+ { 0x8702, 0xfa00, 0x2000 },
+ { 0x0702, 0xf9ff, 0x0000 },
+ { 0x0702, 0xfa01, 0x0000 },
+ { 0x8702, 0xfa04, 0x2000 },
+ { 0x0702, 0xfa03, 0x0000 },
+ { 0x0702, 0xfa05, 0x0000 },
+ { 0x8702, 0xfa0e, 0x4000 },
+ { 0x8702, 0xfa0a, 0x3000 },
+ { 0x8702, 0xfa08, 0x2000 },
+ { 0x0702, 0xfa07, 0x0000 },
+ { 0x0702, 0xfa09, 0x0000 },
+ { 0x8702, 0xfa0c, 0x2000 },
+ { 0x0702, 0xfa0b, 0x0000 },
+ { 0x0702, 0xfa0d, 0x0000 },
+ { 0x8702, 0xfa12, 0x3000 },
+ { 0x8702, 0xfa10, 0x2000 },
+ { 0x0702, 0xfa0f, 0x0000 },
+ { 0x0702, 0xfa11, 0x0000 },
+ { 0x8702, 0xfa14, 0x2000 },
+ { 0x0702, 0xfa13, 0x0000 },
+ { 0x0702, 0xfa15, 0x0000 },
+ { 0x810e, 0x0027, 0x5000 },
+ { 0x810e, 0x0001, 0x4000 },
+ { 0x8702, 0xfa1a, 0x3000 },
+ { 0x8702, 0xfa18, 0x2000 },
+ { 0x0702, 0xfa17, 0x0000 },
+ { 0x0702, 0xfa19, 0x0000 },
+ { 0x8702, 0xfa1c, 0x2000 },
+ { 0x0702, 0xfa1b, 0x0000 },
+ { 0x0702, 0xfa1d, 0x0000 },
+ { 0x810e, 0x0023, 0x3000 },
+ { 0x810e, 0x0021, 0x2000 },
+ { 0x010e, 0x0020, 0x0000 },
+ { 0x010e, 0x0022, 0x0000 },
+ { 0x810e, 0x0025, 0x2000 },
+ { 0x010e, 0x0024, 0x0000 },
+ { 0x010e, 0x0026, 0x0000 },
+ { 0x810e, 0x002f, 0x4000 },
+ { 0x810e, 0x002b, 0x3000 },
+ { 0x810e, 0x0029, 0x2000 },
+ { 0x010e, 0x0028, 0x0000 },
+ { 0x010e, 0x002a, 0x0000 },
+ { 0x810e, 0x002d, 0x2000 },
+ { 0x010e, 0x002c, 0x0000 },
+ { 0x010e, 0x002e, 0x0000 },
+ { 0x810e, 0x0033, 0x3000 },
+ { 0x810e, 0x0031, 0x2000 },
+ { 0x010e, 0x0030, 0x0000 },
+ { 0x010e, 0x0032, 0x0000 },
+ { 0x810e, 0x0035, 0x2000 },
+ { 0x010e, 0x0034, 0x0000 },
+ { 0x010e, 0x0036, 0x0000 },
+ { 0x810e, 0x0057, 0x6000 },
+ { 0x810e, 0x0047, 0x5000 },
+ { 0x810e, 0x003f, 0x4000 },
+ { 0x810e, 0x003b, 0x3000 },
+ { 0x810e, 0x0039, 0x2000 },
+ { 0x010e, 0x0038, 0x0000 },
+ { 0x010e, 0x003a, 0x0000 },
+ { 0x810e, 0x003d, 0x2000 },
+ { 0x010e, 0x003c, 0x0000 },
+ { 0x010e, 0x003e, 0x0000 },
+ { 0x810e, 0x0043, 0x3000 },
+ { 0x810e, 0x0041, 0x2000 },
+ { 0x010e, 0x0040, 0x0000 },
+ { 0x010e, 0x0042, 0x0000 },
+ { 0x810e, 0x0045, 0x2000 },
+ { 0x010e, 0x0044, 0x0000 },
+ { 0x010e, 0x0046, 0x0000 },
+ { 0x810e, 0x004f, 0x4000 },
+ { 0x810e, 0x004b, 0x3000 },
+ { 0x810e, 0x0049, 0x2000 },
+ { 0x010e, 0x0048, 0x0000 },
+ { 0x010e, 0x004a, 0x0000 },
+ { 0x810e, 0x004d, 0x2000 },
+ { 0x010e, 0x004c, 0x0000 },
+ { 0x010e, 0x004e, 0x0000 },
+ { 0x810e, 0x0053, 0x3000 },
+ { 0x810e, 0x0051, 0x2000 },
+ { 0x010e, 0x0050, 0x0000 },
+ { 0x010e, 0x0052, 0x0000 },
+ { 0x810e, 0x0055, 0x2000 },
+ { 0x010e, 0x0054, 0x0000 },
+ { 0x010e, 0x0056, 0x0000 },
+ { 0x810e, 0x0067, 0x5000 },
+ { 0x810e, 0x005f, 0x4000 },
+ { 0x810e, 0x005b, 0x3000 },
+ { 0x810e, 0x0059, 0x2000 },
+ { 0x010e, 0x0058, 0x0000 },
+ { 0x010e, 0x005a, 0x0000 },
+ { 0x810e, 0x005d, 0x2000 },
+ { 0x010e, 0x005c, 0x0000 },
+ { 0x010e, 0x005e, 0x0000 },
+ { 0x810e, 0x0063, 0x3000 },
+ { 0x810e, 0x0061, 0x2000 },
+ { 0x010e, 0x0060, 0x0000 },
+ { 0x010e, 0x0062, 0x0000 },
+ { 0x810e, 0x0065, 0x2000 },
+ { 0x010e, 0x0064, 0x0000 },
+ { 0x010e, 0x0066, 0x0000 },
+ { 0x810e, 0x006f, 0x4000 },
+ { 0x810e, 0x006b, 0x3000 },
+ { 0x810e, 0x0069, 0x2000 },
+ { 0x010e, 0x0068, 0x0000 },
+ { 0x010e, 0x006a, 0x0000 },
+ { 0x810e, 0x006d, 0x2000 },
+ { 0x010e, 0x006c, 0x0000 },
+ { 0x010e, 0x006e, 0x0000 },
+ { 0x810e, 0x0073, 0x3000 },
+ { 0x810e, 0x0071, 0x2000 },
+ { 0x010e, 0x0070, 0x0000 },
+ { 0x010e, 0x0072, 0x0000 },
+ { 0x810e, 0x0075, 0x2000 },
+ { 0x010e, 0x0074, 0x0000 },
+ { 0x010e, 0x0076, 0x0000 },
+ { 0x8c0e, 0x0177, 0x8000 },
+ { 0x8c0e, 0x0137, 0x7000 },
+ { 0x8c0e, 0x0117, 0x6000 },
+ { 0x8c0e, 0x0107, 0x5000 },
+ { 0x810e, 0x007f, 0x4000 },
+ { 0x810e, 0x007b, 0x3000 },
+ { 0x810e, 0x0079, 0x2000 },
+ { 0x010e, 0x0078, 0x0000 },
+ { 0x010e, 0x007a, 0x0000 },
+ { 0x810e, 0x007d, 0x2000 },
+ { 0x010e, 0x007c, 0x0000 },
+ { 0x010e, 0x007e, 0x0000 },
+ { 0x8c0e, 0x0103, 0x3000 },
+ { 0x8c0e, 0x0101, 0x2000 },
+ { 0x0c0e, 0x0100, 0x0000 },
+ { 0x0c0e, 0x0102, 0x0000 },
+ { 0x8c0e, 0x0105, 0x2000 },
+ { 0x0c0e, 0x0104, 0x0000 },
+ { 0x0c0e, 0x0106, 0x0000 },
+ { 0x8c0e, 0x010f, 0x4000 },
+ { 0x8c0e, 0x010b, 0x3000 },
+ { 0x8c0e, 0x0109, 0x2000 },
+ { 0x0c0e, 0x0108, 0x0000 },
+ { 0x0c0e, 0x010a, 0x0000 },
+ { 0x8c0e, 0x010d, 0x2000 },
+ { 0x0c0e, 0x010c, 0x0000 },
+ { 0x0c0e, 0x010e, 0x0000 },
+ { 0x8c0e, 0x0113, 0x3000 },
+ { 0x8c0e, 0x0111, 0x2000 },
+ { 0x0c0e, 0x0110, 0x0000 },
+ { 0x0c0e, 0x0112, 0x0000 },
+ { 0x8c0e, 0x0115, 0x2000 },
+ { 0x0c0e, 0x0114, 0x0000 },
+ { 0x0c0e, 0x0116, 0x0000 },
+ { 0x8c0e, 0x0127, 0x5000 },
+ { 0x8c0e, 0x011f, 0x4000 },
+ { 0x8c0e, 0x011b, 0x3000 },
+ { 0x8c0e, 0x0119, 0x2000 },
+ { 0x0c0e, 0x0118, 0x0000 },
+ { 0x0c0e, 0x011a, 0x0000 },
+ { 0x8c0e, 0x011d, 0x2000 },
+ { 0x0c0e, 0x011c, 0x0000 },
+ { 0x0c0e, 0x011e, 0x0000 },
+ { 0x8c0e, 0x0123, 0x3000 },
+ { 0x8c0e, 0x0121, 0x2000 },
+ { 0x0c0e, 0x0120, 0x0000 },
+ { 0x0c0e, 0x0122, 0x0000 },
+ { 0x8c0e, 0x0125, 0x2000 },
+ { 0x0c0e, 0x0124, 0x0000 },
+ { 0x0c0e, 0x0126, 0x0000 },
+ { 0x8c0e, 0x012f, 0x4000 },
+ { 0x8c0e, 0x012b, 0x3000 },
+ { 0x8c0e, 0x0129, 0x2000 },
+ { 0x0c0e, 0x0128, 0x0000 },
+ { 0x0c0e, 0x012a, 0x0000 },
+ { 0x8c0e, 0x012d, 0x2000 },
+ { 0x0c0e, 0x012c, 0x0000 },
+ { 0x0c0e, 0x012e, 0x0000 },
+ { 0x8c0e, 0x0133, 0x3000 },
+ { 0x8c0e, 0x0131, 0x2000 },
+ { 0x0c0e, 0x0130, 0x0000 },
+ { 0x0c0e, 0x0132, 0x0000 },
+ { 0x8c0e, 0x0135, 0x2000 },
+ { 0x0c0e, 0x0134, 0x0000 },
+ { 0x0c0e, 0x0136, 0x0000 },
+ { 0x8c0e, 0x0157, 0x6000 },
+ { 0x8c0e, 0x0147, 0x5000 },
+ { 0x8c0e, 0x013f, 0x4000 },
+ { 0x8c0e, 0x013b, 0x3000 },
+ { 0x8c0e, 0x0139, 0x2000 },
+ { 0x0c0e, 0x0138, 0x0000 },
+ { 0x0c0e, 0x013a, 0x0000 },
+ { 0x8c0e, 0x013d, 0x2000 },
+ { 0x0c0e, 0x013c, 0x0000 },
+ { 0x0c0e, 0x013e, 0x0000 },
+ { 0x8c0e, 0x0143, 0x3000 },
+ { 0x8c0e, 0x0141, 0x2000 },
+ { 0x0c0e, 0x0140, 0x0000 },
+ { 0x0c0e, 0x0142, 0x0000 },
+ { 0x8c0e, 0x0145, 0x2000 },
+ { 0x0c0e, 0x0144, 0x0000 },
+ { 0x0c0e, 0x0146, 0x0000 },
+ { 0x8c0e, 0x014f, 0x4000 },
+ { 0x8c0e, 0x014b, 0x3000 },
+ { 0x8c0e, 0x0149, 0x2000 },
+ { 0x0c0e, 0x0148, 0x0000 },
+ { 0x0c0e, 0x014a, 0x0000 },
+ { 0x8c0e, 0x014d, 0x2000 },
+ { 0x0c0e, 0x014c, 0x0000 },
+ { 0x0c0e, 0x014e, 0x0000 },
+ { 0x8c0e, 0x0153, 0x3000 },
+ { 0x8c0e, 0x0151, 0x2000 },
+ { 0x0c0e, 0x0150, 0x0000 },
+ { 0x0c0e, 0x0152, 0x0000 },
+ { 0x8c0e, 0x0155, 0x2000 },
+ { 0x0c0e, 0x0154, 0x0000 },
+ { 0x0c0e, 0x0156, 0x0000 },
+ { 0x8c0e, 0x0167, 0x5000 },
+ { 0x8c0e, 0x015f, 0x4000 },
+ { 0x8c0e, 0x015b, 0x3000 },
+ { 0x8c0e, 0x0159, 0x2000 },
+ { 0x0c0e, 0x0158, 0x0000 },
+ { 0x0c0e, 0x015a, 0x0000 },
+ { 0x8c0e, 0x015d, 0x2000 },
+ { 0x0c0e, 0x015c, 0x0000 },
+ { 0x0c0e, 0x015e, 0x0000 },
+ { 0x8c0e, 0x0163, 0x3000 },
+ { 0x8c0e, 0x0161, 0x2000 },
+ { 0x0c0e, 0x0160, 0x0000 },
+ { 0x0c0e, 0x0162, 0x0000 },
+ { 0x8c0e, 0x0165, 0x2000 },
+ { 0x0c0e, 0x0164, 0x0000 },
+ { 0x0c0e, 0x0166, 0x0000 },
+ { 0x8c0e, 0x016f, 0x4000 },
+ { 0x8c0e, 0x016b, 0x3000 },
+ { 0x8c0e, 0x0169, 0x2000 },
+ { 0x0c0e, 0x0168, 0x0000 },
+ { 0x0c0e, 0x016a, 0x0000 },
+ { 0x8c0e, 0x016d, 0x2000 },
+ { 0x0c0e, 0x016c, 0x0000 },
+ { 0x0c0e, 0x016e, 0x0000 },
+ { 0x8c0e, 0x0173, 0x3000 },
+ { 0x8c0e, 0x0171, 0x2000 },
+ { 0x0c0e, 0x0170, 0x0000 },
+ { 0x0c0e, 0x0172, 0x0000 },
+ { 0x8c0e, 0x0175, 0x2000 },
+ { 0x0c0e, 0x0174, 0x0000 },
+ { 0x0c0e, 0x0176, 0x0000 },
+ { 0x8c0e, 0x01b7, 0x7000 },
+ { 0x8c0e, 0x0197, 0x6000 },
+ { 0x8c0e, 0x0187, 0x5000 },
+ { 0x8c0e, 0x017f, 0x4000 },
+ { 0x8c0e, 0x017b, 0x3000 },
+ { 0x8c0e, 0x0179, 0x2000 },
+ { 0x0c0e, 0x0178, 0x0000 },
+ { 0x0c0e, 0x017a, 0x0000 },
+ { 0x8c0e, 0x017d, 0x2000 },
+ { 0x0c0e, 0x017c, 0x0000 },
+ { 0x0c0e, 0x017e, 0x0000 },
+ { 0x8c0e, 0x0183, 0x3000 },
+ { 0x8c0e, 0x0181, 0x2000 },
+ { 0x0c0e, 0x0180, 0x0000 },
+ { 0x0c0e, 0x0182, 0x0000 },
+ { 0x8c0e, 0x0185, 0x2000 },
+ { 0x0c0e, 0x0184, 0x0000 },
+ { 0x0c0e, 0x0186, 0x0000 },
+ { 0x8c0e, 0x018f, 0x4000 },
+ { 0x8c0e, 0x018b, 0x3000 },
+ { 0x8c0e, 0x0189, 0x2000 },
+ { 0x0c0e, 0x0188, 0x0000 },
+ { 0x0c0e, 0x018a, 0x0000 },
+ { 0x8c0e, 0x018d, 0x2000 },
+ { 0x0c0e, 0x018c, 0x0000 },
+ { 0x0c0e, 0x018e, 0x0000 },
+ { 0x8c0e, 0x0193, 0x3000 },
+ { 0x8c0e, 0x0191, 0x2000 },
+ { 0x0c0e, 0x0190, 0x0000 },
+ { 0x0c0e, 0x0192, 0x0000 },
+ { 0x8c0e, 0x0195, 0x2000 },
+ { 0x0c0e, 0x0194, 0x0000 },
+ { 0x0c0e, 0x0196, 0x0000 },
+ { 0x8c0e, 0x01a7, 0x5000 },
+ { 0x8c0e, 0x019f, 0x4000 },
+ { 0x8c0e, 0x019b, 0x3000 },
+ { 0x8c0e, 0x0199, 0x2000 },
+ { 0x0c0e, 0x0198, 0x0000 },
+ { 0x0c0e, 0x019a, 0x0000 },
+ { 0x8c0e, 0x019d, 0x2000 },
+ { 0x0c0e, 0x019c, 0x0000 },
+ { 0x0c0e, 0x019e, 0x0000 },
+ { 0x8c0e, 0x01a3, 0x3000 },
+ { 0x8c0e, 0x01a1, 0x2000 },
+ { 0x0c0e, 0x01a0, 0x0000 },
+ { 0x0c0e, 0x01a2, 0x0000 },
+ { 0x8c0e, 0x01a5, 0x2000 },
+ { 0x0c0e, 0x01a4, 0x0000 },
+ { 0x0c0e, 0x01a6, 0x0000 },
+ { 0x8c0e, 0x01af, 0x4000 },
+ { 0x8c0e, 0x01ab, 0x3000 },
+ { 0x8c0e, 0x01a9, 0x2000 },
+ { 0x0c0e, 0x01a8, 0x0000 },
+ { 0x0c0e, 0x01aa, 0x0000 },
+ { 0x8c0e, 0x01ad, 0x2000 },
+ { 0x0c0e, 0x01ac, 0x0000 },
+ { 0x0c0e, 0x01ae, 0x0000 },
+ { 0x8c0e, 0x01b3, 0x3000 },
+ { 0x8c0e, 0x01b1, 0x2000 },
+ { 0x0c0e, 0x01b0, 0x0000 },
+ { 0x0c0e, 0x01b2, 0x0000 },
+ { 0x8c0e, 0x01b5, 0x2000 },
+ { 0x0c0e, 0x01b4, 0x0000 },
+ { 0x0c0e, 0x01b6, 0x0000 },
+ { 0x8c0e, 0x01d7, 0x6000 },
+ { 0x8c0e, 0x01c7, 0x5000 },
+ { 0x8c0e, 0x01bf, 0x4000 },
+ { 0x8c0e, 0x01bb, 0x3000 },
+ { 0x8c0e, 0x01b9, 0x2000 },
+ { 0x0c0e, 0x01b8, 0x0000 },
+ { 0x0c0e, 0x01ba, 0x0000 },
+ { 0x8c0e, 0x01bd, 0x2000 },
+ { 0x0c0e, 0x01bc, 0x0000 },
+ { 0x0c0e, 0x01be, 0x0000 },
+ { 0x8c0e, 0x01c3, 0x3000 },
+ { 0x8c0e, 0x01c1, 0x2000 },
+ { 0x0c0e, 0x01c0, 0x0000 },
+ { 0x0c0e, 0x01c2, 0x0000 },
+ { 0x8c0e, 0x01c5, 0x2000 },
+ { 0x0c0e, 0x01c4, 0x0000 },
+ { 0x0c0e, 0x01c6, 0x0000 },
+ { 0x8c0e, 0x01cf, 0x4000 },
+ { 0x8c0e, 0x01cb, 0x3000 },
+ { 0x8c0e, 0x01c9, 0x2000 },
+ { 0x0c0e, 0x01c8, 0x0000 },
+ { 0x0c0e, 0x01ca, 0x0000 },
+ { 0x8c0e, 0x01cd, 0x2000 },
+ { 0x0c0e, 0x01cc, 0x0000 },
+ { 0x0c0e, 0x01ce, 0x0000 },
+ { 0x8c0e, 0x01d3, 0x3000 },
+ { 0x8c0e, 0x01d1, 0x2000 },
+ { 0x0c0e, 0x01d0, 0x0000 },
+ { 0x0c0e, 0x01d2, 0x0000 },
+ { 0x8c0e, 0x01d5, 0x2000 },
+ { 0x0c0e, 0x01d4, 0x0000 },
+ { 0x0c0e, 0x01d6, 0x0000 },
+ { 0x8c0e, 0x01e7, 0x5000 },
+ { 0x8c0e, 0x01df, 0x4000 },
+ { 0x8c0e, 0x01db, 0x3000 },
+ { 0x8c0e, 0x01d9, 0x2000 },
+ { 0x0c0e, 0x01d8, 0x0000 },
+ { 0x0c0e, 0x01da, 0x0000 },
+ { 0x8c0e, 0x01dd, 0x2000 },
+ { 0x0c0e, 0x01dc, 0x0000 },
+ { 0x0c0e, 0x01de, 0x0000 },
+ { 0x8c0e, 0x01e3, 0x3000 },
+ { 0x8c0e, 0x01e1, 0x2000 },
+ { 0x0c0e, 0x01e0, 0x0000 },
+ { 0x0c0e, 0x01e2, 0x0000 },
+ { 0x8c0e, 0x01e5, 0x2000 },
+ { 0x0c0e, 0x01e4, 0x0000 },
+ { 0x0c0e, 0x01e6, 0x0000 },
+ { 0x8c0e, 0x01ef, 0x4000 },
+ { 0x8c0e, 0x01eb, 0x3000 },
+ { 0x8c0e, 0x01e9, 0x2000 },
+ { 0x0c0e, 0x01e8, 0x0000 },
+ { 0x0c0e, 0x01ea, 0x0000 },
+ { 0x8c0e, 0x01ed, 0x2000 },
+ { 0x0c0e, 0x01ec, 0x0000 },
+ { 0x0c0e, 0x01ee, 0x0000 },
+ { 0x830f, 0xfffd, 0x2000 },
+ { 0x030f, 0x0000, 0x0000 },
+ { 0x0310, 0x0000, 0x1000 },
+ { 0x0310, 0xfffd, 0x0000 },
+};
diff --git a/srclib/pcre/ucptypetable.c b/srclib/pcre/ucptypetable.c
new file mode 100644
index 0000000000..129529b5d6
--- /dev/null
+++ b/srclib/pcre/ucptypetable.c
@@ -0,0 +1,93 @@
+/*************************************************
+* Perl-Compatible Regular Expressions *
+*************************************************/
+
+/*
+This is a library of functions to support regular expressions whose syntax
+and semantics are as close as possible to those of the Perl 5 language. See
+the file Tech.Notes for some information on the internals.
+
+Written by: Philip Hazel <ph10@cam.ac.uk>
+
+ Copyright (c) 1997-2004 University of Cambridge
+
+-----------------------------------------------------------------------------
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------------
+*/
+
+/* This module contains a table for translating Unicode property names into
+code values for the ucp_findchar function. It is in a separate module so that
+it can be included both in the main pcre library, and into pcretest (for
+printing out internals). */
+
+typedef struct {
+ const char *name;
+ int value;
+} ucp_type_table;
+
+static ucp_type_table utt[] = {
+ { "C", 128 + ucp_C },
+ { "Cc", ucp_Cc },
+ { "Cf", ucp_Cf },
+ { "Cn", ucp_Cn },
+ { "Co", ucp_Co },
+ { "Cs", ucp_Cs },
+ { "L", 128 + ucp_L },
+ { "Ll", ucp_Ll },
+ { "Lm", ucp_Lm },
+ { "Lo", ucp_Lo },
+ { "Lt", ucp_Lt },
+ { "Lu", ucp_Lu },
+ { "M", 128 + ucp_M },
+ { "Mc", ucp_Mc },
+ { "Me", ucp_Me },
+ { "Mn", ucp_Mn },
+ { "N", 128 + ucp_N },
+ { "Nd", ucp_Nd },
+ { "Nl", ucp_Nl },
+ { "No", ucp_No },
+ { "P", 128 + ucp_P },
+ { "Pc", ucp_Pc },
+ { "Pd", ucp_Pd },
+ { "Pe", ucp_Pe },
+ { "Pf", ucp_Pf },
+ { "Pi", ucp_Pi },
+ { "Po", ucp_Po },
+ { "Ps", ucp_Ps },
+ { "S", 128 + ucp_S },
+ { "Sc", ucp_Sc },
+ { "Sk", ucp_Sk },
+ { "Sm", ucp_Sm },
+ { "So", ucp_So },
+ { "Z", 128 + ucp_Z },
+ { "Zl", ucp_Zl },
+ { "Zp", ucp_Zp },
+ { "Zs", ucp_Zs }
+};
+
+/* End of ucptypetable.c */