Add -dfa command line option to pcre2test.

This commit is contained in:
Philip.Hazel 2014-07-05 16:02:10 +00:00
parent cfea40d7b5
commit 3d0229c097
2 changed files with 11 additions and 4 deletions

View File

@ -1,4 +1,4 @@
.TH PCRE2TEST 1 "30 June 2014" "PCRE 10.00"
.TH PCRE2TEST 1 "05 July 2014" "PCRE 10.00"
.SH NAME
pcre2test - a program for testing Perl-compatible regular expressions.
.SH SYNOPSIS
@ -125,10 +125,15 @@ to the same value:
If an unknown option is given, an error message is output; the exit code is 0.
.TP 10
\fB-d\fP
Behave as if each pattern has the \fB/debug\fP modifier; the internal
Behave as if each pattern has the \fBdebug\fP modifier; the internal
form and information about the compiled pattern is output after compilation;
\fB-d\fP is equivalent to \fB-b -i\fP.
.TP 10
\fB-dfa\fP
Behave as if each subject line has the \fBdfa\fP modifier; matching is done
using the \fBpcre2_dfa_match()\fP function instead of the default
\fBpcre2_match()\fP.
.TP 10
\fB-help\fP
Output a brief summary these options and then exit.
.TP 10
@ -1205,6 +1210,6 @@ Cambridge CB2 3QH, England.
.rs
.sp
.nf
Last updated: 30 June 2014
Last updated: 05 July 2014
Copyright (c) 1997-2014 University of Cambridge.
.fi

View File

@ -4973,6 +4973,7 @@ printf(" pcre16 16 bit library support enabled [0, 1]\n");
printf(" pcre32 32 bit library support enabled [0, 1]\n");
printf(" utf Unicode Transformation Format supported [0, 1]\n");
printf(" -d set default pattern control 'debug'\n");
printf(" -dfa set default subject control 'dfa'\n");
printf(" -help show usage information\n");
printf(" -i set default pattern control 'info'\n");
printf(" -q quiet: do not output PCRE version number at start\n");
@ -5258,11 +5259,12 @@ while (argc > 1 && argv[op][0] == '-')
#endif
}
/* Set some common pattern controls */
/* Set some common pattern and subject controls */
else if (strcmp(arg, "-b") == 0) def_patctl.control |= CTL_FULLBINCODE;
else if (strcmp(arg, "-d") == 0) def_patctl.control |= CTL_DEBUG;
else if (strcmp(arg, "-i") == 0) def_patctl.control |= CTL_INFO;
else if (strcmp(arg, "-dfa") == 0) def_datctl.control |= CTL_DFA;
/* Set timing parameters */