/[pcre]/code/trunk/doc/pcreapi.3
ViewVC logotype

Diff of /code/trunk/doc/pcreapi.3

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 978 by ph10, Sun Jun 17 16:55:07 2012 UTC revision 1022 by ph10, Tue Aug 28 12:28:15 2012 UTC
# Line 1  Line 1 
1  .TH PCREAPI 3 "04 May 2012" "PCRE 8.31"  .TH PCREAPI 3 "28 August 2012" "PCRE 8.32"
2  .SH NAME  .SH NAME
3  PCRE - Perl-compatible regular expressions  PCRE - Perl-compatible regular expressions
4  .sp  .sp
# Line 960  below Line 960  below
960  in the section on matching a pattern.  in the section on matching a pattern.
961  .P  .P
962  If studying the pattern does not produce any useful information,  If studying the pattern does not produce any useful information,
963  \fBpcre_study()\fP returns NULL. In that circumstance, if the calling program  \fBpcre_study()\fP returns NULL by default. In that circumstance, if the
964  wants to pass any of the other fields to \fBpcre_exec()\fP or  calling program wants to pass any of the other fields to \fBpcre_exec()\fP or
965  \fBpcre_dfa_exec()\fP, it must set up its own \fBpcre_extra\fP block.  \fBpcre_dfa_exec()\fP, it must set up its own \fBpcre_extra\fP block. However,
966    if \fBpcre_study()\fP is called with the PCRE_STUDY_EXTRA_NEEDED option, it
967    returns a \fBpcre_extra\fP block even if studying did not find any additional
968    information. It may still return NULL, however, if an error occurs in
969    \fBpcre_study()\fP.
970  .P  .P
971  The second argument of \fBpcre_study()\fP contains option bits. There are three  The second argument of \fBpcre_study()\fP contains option bits. There are three
972  options:  further options in addition to PCRE_STUDY_EXTRA_NEEDED:
973  .sp  .sp
974    PCRE_STUDY_JIT_COMPILE    PCRE_STUDY_JIT_COMPILE
975    PCRE_STUDY_JIT_PARTIAL_HARD_COMPILE    PCRE_STUDY_JIT_PARTIAL_HARD_COMPILE
# Line 974  options: Line 978  options:
978  If any of these are set, and the just-in-time compiler is available, the  If any of these are set, and the just-in-time compiler is available, the
979  pattern is further compiled into machine code that executes much faster than  pattern is further compiled into machine code that executes much faster than
980  the \fBpcre_exec()\fP interpretive matching function. If the just-in-time  the \fBpcre_exec()\fP interpretive matching function. If the just-in-time
981  compiler is not available, these options are ignored. All other bits in the  compiler is not available, these options are ignored. All undefined bits in the
982  \fIoptions\fP argument must be zero.  \fIoptions\fP argument must be zero.
983  .P  .P
984  JIT compilation is a heavyweight optimization. It can take some time for  JIT compilation is a heavyweight optimization. It can take some time for
# Line 1022  real application there should be tests f Line 1026  real application there should be tests f
1026  Studying a pattern does two things: first, a lower bound for the length of  Studying a pattern does two things: first, a lower bound for the length of
1027  subject string that is needed to match the pattern is computed. This does not  subject string that is needed to match the pattern is computed. This does not
1028  mean that there are any strings of that length that match, but it does  mean that there are any strings of that length that match, but it does
1029  guarantee that no shorter strings match. The value is used by  guarantee that no shorter strings match. The value is used to avoid wasting
1030  \fBpcre_exec()\fP and \fBpcre_dfa_exec()\fP to avoid wasting time by trying to  time by trying to match strings that are shorter than the lower bound. You can
1031  match strings that are shorter than the lower bound. You can find out the value  find out the value in a calling program via the \fBpcre_fullinfo()\fP function.
 in a calling program via the \fBpcre_fullinfo()\fP function.  
1032  .P  .P
1033  Studying a pattern is also useful for non-anchored patterns that do not have a  Studying a pattern is also useful for non-anchored patterns that do not have a
1034  single fixed starting character. A bitmap of possible starting bytes is  single fixed starting character. A bitmap of possible starting bytes is
# Line 2667  Cambridge CB2 3QH, England. Line 2670  Cambridge CB2 3QH, England.
2670  .rs  .rs
2671  .sp  .sp
2672  .nf  .nf
2673  Last updated: 17 June 2012  Last updated: 28 August 2012
2674  Copyright (c) 1997-2012 University of Cambridge.  Copyright (c) 1997-2012 University of Cambridge.
2675  .fi  .fi

Legend:
Removed from v.978  
changed lines
  Added in v.1022

  ViewVC Help
Powered by ViewVC 1.1.5