9
9
ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-xxx.zip
10
10
11
11
There is a mailing list for discussion about the development of PCRE at
12
+ pcre-dev@exim.org. You can access the archives and subscribe or manage your
13
+ subscription here:
12
14
13
- pcre-dev@ exim.org
15
+ https://lists. exim.org/mailman/listinfo/pcre-dev
14
16
15
17
Please read the NEWS file if you are upgrading from a previous release.
16
18
The contents of this README file are:
@@ -25,6 +27,8 @@ The contents of this README file are:
25
27
Shared libraries
26
28
Cross-compiling using autotools
27
29
Using HP's ANSI C++ compiler (aCC)
30
+ Compiling in Tru64 using native compilers
31
+ Using Sun's compilers for Solaris
28
32
Using PCRE from MySQL
29
33
Making new tarballs
30
34
Testing PCRE
@@ -35,10 +39,10 @@ The contents of this README file are:
35
39
The PCRE APIs
36
40
-------------
37
41
38
- PCRE is written in C, and it has its own API. There are three sets of functions,
39
- one for the 8-bit library, which processes strings of bytes, one for the
40
- 16-bit library, which processes strings of 16-bit values, and one for the 32-bit
41
- library, which processes strings of 32-bit values. The distribution also
42
+ PCRE is written in C, and it has its own API. There are three sets of
43
+ functions, one for the 8-bit library, which processes strings of bytes, one for
44
+ the 16-bit library, which processes strings of 16-bit values, and one for the
45
+ 32-bit library, which processes strings of 32-bit values. The distribution also
42
46
includes a set of C++ wrapper functions (see the pcrecpp man page for details),
43
47
courtesy of Google Inc., which can be used to call the 8-bit PCRE library from
44
48
C++.
@@ -110,6 +114,11 @@ contributions provided support for compiling PCRE on various flavours of
110
114
Windows (I myself do not use Windows). Nowadays there is more Windows support
111
115
in the standard distribution, so these contibutions have been archived.
112
116
117
+ A PCRE user maintains downloadable Windows binaries of the pcregrep and
118
+ pcretest programs here:
119
+
120
+ http://www.rexegg.com/pcregrep-pcretest.html
121
+
113
122
114
123
Building PCRE on non-Unix-like systems
115
124
--------------------------------------
@@ -260,9 +269,17 @@ library. They are also documented in the pcrebuild man page.
260
269
261
270
on the "configure" command.
262
271
263
- . PCRE has a counter that can be set to limit the amount of resources it uses.
264
- If the limit is exceeded during a match, the match fails. The default is ten
265
- million. You can change the default by setting, for example,
272
+ . PCRE has a counter that limits the depth of nesting of parentheses in a
273
+ pattern. This limits the amount of system stack that a pattern uses when it
274
+ is compiled. The default is 250, but you can change it by setting, for
275
+ example,
276
+
277
+ --with-parens-nest-limit=500
278
+
279
+ . PCRE has a counter that can be set to limit the amount of resources it uses
280
+ when matching a pattern. If the limit is exceeded during a match, the match
281
+ fails. The default is ten million. You can change the default by setting, for
282
+ example,
266
283
267
284
--with-match-limit=500000
268
285
@@ -342,7 +359,8 @@ library. They are also documented in the pcrebuild man page.
342
359
report is generated by running "make coverage". If ccache is installed on
343
360
your system, it must be disabled when building PCRE for coverage reporting.
344
361
You can do this by setting the environment variable CCACHE_DISABLE=1 before
345
- running "make" to build PCRE.
362
+ running "make" to build PCRE. There is more information about coverage
363
+ reporting in the "pcrebuild" documentation.
346
364
347
365
. The pcregrep program currently supports only 8-bit data files, and so
348
366
requires the 8-bit PCRE library. It is possible to compile pcregrep to use
@@ -575,6 +593,27 @@ running the "configure" script:
575
593
CXXLDFLAGS="-lstd_v2 -lCsup_v2"
576
594
577
595
596
+ Compiling in Tru64 using native compilers
597
+ -----------------------------------------
598
+
599
+ The following error may occur when compiling with native compilers in the Tru64
600
+ operating system:
601
+
602
+ CXX libpcrecpp_la-pcrecpp.lo
603
+ cxx: Error: /usr/lib/cmplrs/cxx/V7.1-006/include/cxx/iosfwd, line 58: #error
604
+ directive: "cannot include iosfwd -- define __USE_STD_IOSTREAM to
605
+ override default - see section 7.1.2 of the C++ Using Guide"
606
+ #error "cannot include iosfwd -- define __USE_STD_IOSTREAM to override default
607
+ - see section 7.1.2 of the C++ Using Guide"
608
+
609
+ This may be followed by other errors, complaining that 'namespace "std" has no
610
+ member'. The solution to this is to add the line
611
+
612
+ #define __USE_STD_IOSTREAM 1
613
+
614
+ to the config.h file.
615
+
616
+
578
617
Using Sun's compilers for Solaris
579
618
---------------------------------
580
619
@@ -624,27 +663,40 @@ NON-AUTOTOOLS-BUILD.
624
663
The RunTest script runs the pcretest test program (which is documented in its
625
664
own man page) on each of the relevant testinput files in the testdata
626
665
directory, and compares the output with the contents of the corresponding
627
- testoutput files. Some tests are relevant only when certain build-time options
628
- were selected. For example, the tests for UTF-8/16/32 support are run only if
629
- --enable-utf was used. RunTest outputs a comment when it skips a test.
666
+ testoutput files. RunTest uses a file called testtry to hold the main output
667
+ from pcretest. Other files whose names begin with "test" are used as working
668
+ files in some tests.
669
+
670
+ Some tests are relevant only when certain build-time options were selected. For
671
+ example, the tests for UTF-8/16/32 support are run only if --enable-utf was
672
+ used. RunTest outputs a comment when it skips a test.
630
673
631
674
Many of the tests that are not skipped are run up to three times. The second
632
675
run forces pcre_study() to be called for all patterns except for a few in some
633
676
tests that are marked "never study" (see the pcretest program for how this is
634
677
done). If JIT support is available, the non-DFA tests are run a third time,
635
678
this time with a forced pcre_study() with the PCRE_STUDY_JIT_COMPILE option.
679
+ This testing can be suppressed by putting "nojit" on the RunTest command line.
636
680
637
681
The entire set of tests is run once for each of the 8-bit, 16-bit and 32-bit
638
682
libraries that are enabled. If you want to run just one set of tests, call
639
683
RunTest with either the -8, -16 or -32 option.
640
684
641
- RunTest uses a file called testtry to hold the main output from pcretest.
642
- Other files whose names begin with "test" are used as working files in some
643
- tests. To run pcretest on just one or more specific test files, give their
644
- numbers as arguments to RunTest, for example:
685
+ If valgrind is installed, you can run the tests under it by putting "valgrind"
686
+ on the RunTest command line. To run pcretest on just one or more specific test
687
+ files, give their numbers as arguments to RunTest, for example:
645
688
646
689
RunTest 2 7 11
647
690
691
+ You can also specify ranges of tests such as 3-6 or 3- (meaning 3 to the
692
+ end), or a number preceded by ~ to exclude a test. For example:
693
+
694
+ Runtest 3-15 ~10
695
+
696
+ This runs tests 3 to 15, excluding test 10, and just ~13 runs all the tests
697
+ except test 13. Whatever order the arguments are in, the tests are always run
698
+ in numerical order.
699
+
648
700
You can also call RunTest with the single argument "list" to cause it to output
649
701
a list of tests.
650
702
@@ -704,21 +756,24 @@ test is run only when JIT support is not available. They test some JIT-specific
704
756
features such as information output from pcretest about JIT compilation.
705
757
706
758
The fourteenth, fifteenth, and sixteenth tests are run only in 8-bit mode, and
707
- the seventeenth, eighteenth, and nineteenth tests are run only in 16/32-bit mode.
708
- These are tests that generate different output in the two modes. They are for
709
- general cases, UTF-8/16/32 support, and Unicode property support, respectively.
759
+ the seventeenth, eighteenth, and nineteenth tests are run only in 16/32-bit
760
+ mode. These are tests that generate different output in the two modes. They are
761
+ for general cases, UTF-8/16/32 support, and Unicode property support,
762
+ respectively.
710
763
711
764
The twentieth test is run only in 16/32-bit mode. It tests some specific
712
765
16/32-bit features of the DFA matching engine.
713
766
714
- The twenty-first and twenty-second tests are run only in 16/32-bit mode, when the
715
- link size is set to 2 for the 16-bit library. They test reloading pre-compiled patterns.
767
+ The twenty-first and twenty-second tests are run only in 16/32-bit mode, when
768
+ the link size is set to 2 for the 16-bit library. They test reloading
769
+ pre-compiled patterns.
770
+
771
+ The twenty-third and twenty-fourth tests are run only in 16-bit mode. They are
772
+ for general cases, and UTF-16 support, respectively.
716
773
717
- The twenty-third and twenty-fourth tests are run only in 16 -bit mode. They are for
718
- general cases, and UTF-16 support, respectively.
774
+ The twenty-fifth and twenty-sixth tests are run only in 32 -bit mode. They are
775
+ for general cases, and UTF-32 support, respectively.
719
776
720
- The twenty-fifth and twenty-sixth tests are run only in 32-bit mode. They are for
721
- general cases, and UTF-32 support, respectively.
722
777
723
778
Character tables
724
779
----------------
@@ -784,11 +839,11 @@ pcre_xxx, one with the name pcre16_xx, and a third with the name pcre32_xxx.
784
839
(A) Source files of the PCRE library functions and their headers:
785
840
786
841
dftables.c auxiliary program for building pcre_chartables.c
787
- when --enable-rebuild-chartables is specified
842
+ when --enable-rebuild-chartables is specified
788
843
789
844
pcre_chartables.c.dist a default set of character tables that assume ASCII
790
- coding; used, unless --enable-rebuild-chartables is
791
- specified, by copying to pcre[16]_chartables.c
845
+ coding; used, unless --enable-rebuild-chartables is
846
+ specified, by copying to pcre[16]_chartables.c
792
847
793
848
pcreposix.c )
794
849
pcre[16|32]_byte_order.c )
@@ -932,4 +987,4 @@ pcre_xxx, one with the name pcre16_xx, and a third with the name pcre32_xxx.
932
987
Philip Hazel
933
988
Email local part: ph10
934
989
Email domain: cam.ac.uk
935
- Last updated: 27 October 2012
990
+ Last updated: 05 November 2013
0 commit comments