Minor upgrade to pcre2test and comment in ucptest.

This commit is contained in:
Philip.Hazel 2019-07-30 17:59:42 +00:00
parent b69460ece3
commit c0ed5a3ab3
6 changed files with 583 additions and 545 deletions

View File

@ -119,6 +119,11 @@ char * instead of const uint8_t *, as generated by pcre2_maketables().
24. Upgraded to Unicode 12.1.0.
25. Add -jitfast command line option to pcre2test (to make all the jit options
available directly).
26. Make pcre2test -C show if libreadline or libedit is supported.
Version 10.33 16-April-2019
---------------------------

View File

@ -242,10 +242,17 @@ Behave as if each pattern line has the <b>jit</b> modifier; after successful
compilation, each pattern is passed to the just-in-time compiler, if available.
</P>
<P>
<b>-jitfast</b>
Behave as if each pattern line has the <b>jitfast</b> modifier; after
successful compilation, each pattern is passed to the just-in-time compiler, if
available, and each subject line is passed directly to the JIT matcher via its
"fast path".
</P>
<P>
<b>-jitverify</b>
Behave as if each pattern line has the <b>jitverify</b> modifier; after
successful compilation, each pattern is passed to the just-in-time compiler, if
available, and the use of JIT is verified.
available, and the use of JIT for matching is verified.
</P>
<P>
<b>-LM</b>
@ -2086,7 +2093,7 @@ Cambridge, England.
</P>
<br><a name="SEC21" href="#TOC1">REVISION</a><br>
<P>
Last updated: 26 June 2019
Last updated: 30 July 2019
<br>
Copyright &copy; 1997-2019 University of Cambridge.
<br>

View File

@ -1,4 +1,4 @@
.TH PCRE2TEST 1 "26 June 2019" "PCRE 10.34"
.TH PCRE2TEST 1 "30 July 2019" "PCRE 10.34"
.SH NAME
pcre2test - a program for testing Perl-compatible regular expressions.
.SH SYNOPSIS
@ -202,10 +202,16 @@ compiled pattern is given after compilation.
Behave as if each pattern line has the \fBjit\fP modifier; after successful
compilation, each pattern is passed to the just-in-time compiler, if available.
.TP 10
\fB-jitfast\fP
Behave as if each pattern line has the \fBjitfast\fP modifier; after
successful compilation, each pattern is passed to the just-in-time compiler, if
available, and each subject line is passed directly to the JIT matcher via its
"fast path".
.TP 10
\fB-jitverify\fP
Behave as if each pattern line has the \fBjitverify\fP modifier; after
successful compilation, each pattern is passed to the just-in-time compiler, if
available, and the use of JIT is verified.
available, and the use of JIT for matching is verified.
.TP 10
\fB-LM\fP
List modifiers: write a list of available pattern and subject modifiers to the
@ -2067,6 +2073,6 @@ Cambridge, England.
.rs
.sp
.nf
Last updated: 26 June 2019
Last updated: 30 July 2019
Copyright (c) 1997-2019 University of Cambridge.
.fi

File diff suppressed because it is too large Load Diff

View File

@ -2,12 +2,15 @@
* A program for testing the Unicode property table *
***************************************************/
/* Copyright (c) University of Cambridge 2008 - 2018 */
/* Copyright (c) University of Cambridge 2008-2019 */
/* Compile thus:
gcc -DHAVE_CONFIG_H -DPCRE2_CODE_UNIT_WIDTH=8 -o ucptest \
ucptest.c ../src/pcre2_ucd.c ../src/pcre2_tables.c
Add -lreadline or -ledit if required.
Add -lreadline or -ledit if PCRE2 was configured with readline or libedit
support in pcre2test.
*/
/* This is a hacked-up program for testing the Unicode properties tables of

View File

@ -8078,7 +8078,7 @@ Returns: nothing
static void
print_newline_config(uint32_t optval, BOOL isc)
{
if (!isc) printf(" Newline sequence is ");
if (!isc) printf(" Default newline sequence is ");
if (optval < sizeof(newlines)/sizeof(char *))
printf("%s\n", newlines[optval]);
else
@ -8134,6 +8134,7 @@ printf(" -error <n,m,..> show messages for error numbers, then exit\n");
printf(" -help show usage information\n");
printf(" -i set default pattern modifier 'info'\n");
printf(" -jit set default pattern modifier 'jit'\n");
printf(" -jitfast set default pattern modifier 'jitfast'\n");
printf(" -jitverify set default pattern modifier 'jitverify'\n");
printf(" -LM list pattern and subject modifiers, then exit\n");
printf(" -q quiet: do not output PCRE2 version number at start\n");
@ -8303,6 +8304,15 @@ printf(" Default heap limit = %d kibibytes\n", optval);
printf(" Default match limit = %d\n", optval);
(void)PCRE2_CONFIG(PCRE2_CONFIG_DEPTHLIMIT, &optval);
printf(" Default depth limit = %d\n", optval);
#if defined SUPPORT_LIBREADLINE
printf(" pcre2test has libreadline support\n");
#elif defined SUPPORT_LIBEDIT
printf(" pcre2test has libedit support\n");
#else
printf(" pcre2test has neither libreadline nor libedit support\n");
#endif
return 0;
}
@ -8639,13 +8649,15 @@ while (argc > 1 && argv[op][0] == '-' && argv[op][1] != 0)
else if (strcmp(arg, "-d") == 0) def_patctl.control |= CTL_DEBUG;
else if (strcmp(arg, "-dfa") == 0) def_datctl.control |= CTL_DFA;
else if (strcmp(arg, "-i") == 0) def_patctl.control |= CTL_INFO;
else if (strcmp(arg, "-jit") == 0 || strcmp(arg, "-jitverify") == 0)
else if (strcmp(arg, "-jit") == 0 || strcmp(arg, "-jitverify") == 0 ||
strcmp(arg, "-jitfast") == 0)
{
if (arg[4] != 0) def_patctl.control |= CTL_JITVERIFY;
if (arg[4] == 'v') def_patctl.control |= CTL_JITVERIFY;
else if (arg[4] == 'f') def_patctl.control |= CTL_JITFAST;
def_patctl.jit = JIT_DEFAULT; /* full & partial */
#ifndef SUPPORT_JIT
fprintf(stderr, "** Warning: JIT support is not available: "
"-jit[verify] calls functions that do nothing.\n");
"-jit[fast|verify] calls functions that do nothing.\n");
#endif
}