/[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 547 by ph10, Mon Jun 21 14:06:54 2010 UTC revision 548 by ph10, Fri Jun 25 14:42:00 2010 UTC
# Line 765  out of use. To avoid confusion, they hav Line 765  out of use. To avoid confusion, they hav
765    50  [this code is not in use]    50  [this code is not in use]
766    51  octal value is greater than \e377 (not in UTF-8 mode)    51  octal value is greater than \e377 (not in UTF-8 mode)
767    52  internal error: overran compiling workspace    52  internal error: overran compiling workspace
768    53  internal error: previously-checked referenced subpattern    53  internal error: previously-checked referenced subpattern
769          not found          not found
770    54  DEFINE group contains more than one branch    54  DEFINE group contains more than one branch
771    55  repeating a DEFINE group is not allowed    55  repeating a DEFINE group is not allowed
# Line 779  out of use. To avoid confusion, they hav Line 779  out of use. To avoid confusion, they hav
779    62  subpattern name expected    62  subpattern name expected
780    63  digit expected after (?+    63  digit expected after (?+
781    64  ] is an invalid data character in JavaScript compatibility mode    64  ] is an invalid data character in JavaScript compatibility mode
782    65  different names for subpatterns of the same number are    65  different names for subpatterns of the same number are
783          not allowed          not allowed
784    66  (*MARK) must have an argument    66  (*MARK) must have an argument
785    67  this version of PCRE is not compiled with PCRE_UCP support    67  this version of PCRE is not compiled with PCRE_UCP support
# Line 849  single fixed starting character. A bitma Line 849  single fixed starting character. A bitma
849  created. This speeds up finding a position in the subject at which to start  created. This speeds up finding a position in the subject at which to start
850  matching.  matching.
851  .P  .P
852  The two optimizations just described can be disabled by setting the  The two optimizations just described can be disabled by setting the
853  PCRE_NO_START_OPTIMIZE option when calling \fBpcre_exec()\fP or  PCRE_NO_START_OPTIMIZE option when calling \fBpcre_exec()\fP or
854  \fBpcre_dfa_exec()\fP. You might want to do this if your pattern contains  \fBpcre_dfa_exec()\fP. You might want to do this if your pattern contains
855  callouts, or make use of (*MARK), and you make use of these in cases where  callouts, or make use of (*MARK), and you make use of these in cases where
856  matching fails. See the discussion of PCRE_NO_START_OPTIMIZE  matching fails. See the discussion of PCRE_NO_START_OPTIMIZE
857  .\" HTML <a href="#execoptions">  .\" HTML <a href="#execoptions">
858  .\" </a>  .\" </a>
# Line 1460  unanchored match must start with a speci Line 1460  unanchored match must start with a speci
1460  for that character, and fails immediately if it cannot find it, without  for that character, and fails immediately if it cannot find it, without
1461  actually running the main matching function. This means that a special item  actually running the main matching function. This means that a special item
1462  such as (*COMMIT) at the start of a pattern is not considered until after a  such as (*COMMIT) at the start of a pattern is not considered until after a
1463  suitable starting point for the match has been found. When callouts or (*MARK)  suitable starting point for the match has been found. When callouts or (*MARK)
1464  items are in use, these "start-up" optimizations can cause them to be skipped  items are in use, these "start-up" optimizations can cause them to be skipped
1465  if the pattern is never actually used. The start-up optimizations are in effect  if the pattern is never actually used. The start-up optimizations are in effect
1466  a pre-scan of the subject that takes place before the pattern is run.  a pre-scan of the subject that takes place before the pattern is run.
# Line 1475  Consider the pattern Line 1475  Consider the pattern
1475    (*COMMIT)ABC    (*COMMIT)ABC
1476  .sp  .sp
1477  When this is compiled, PCRE records the fact that a match must start with the  When this is compiled, PCRE records the fact that a match must start with the
1478  character "A". Suppose the subject string is "DEFABC". The start-up  character "A". Suppose the subject string is "DEFABC". The start-up
1479  optimization scans along the subject, finds "A" and runs the first match  optimization scans along the subject, finds "A" and runs the first match
1480  attempt from there. The (*COMMIT) item means that the pattern must match the  attempt from there. The (*COMMIT) item means that the pattern must match the
1481  current starting position, which in this case, it does. However, if the same  current starting position, which in this case, it does. However, if the same
1482  match is run with PCRE_NO_START_OPTIMIZE set, the initial scan along the  match is run with PCRE_NO_START_OPTIMIZE set, the initial scan along the
1483  subject string does not happen. The first match attempt is run starting from  subject string does not happen. The first match attempt is run starting from
1484  "D" and when this fails, (*COMMIT) prevents any further matches being tried, so  "D" and when this fails, (*COMMIT) prevents any further matches being tried, so
1485  the overall result is "no match". If the pattern is studied, more start-up  the overall result is "no match". If the pattern is studied, more start-up
1486  optimizations may be used. For example, a minimum length for the subject may be  optimizations may be used. For example, a minimum length for the subject may be
# Line 1488  recorded. Consider the pattern Line 1488  recorded. Consider the pattern
1488  .sp  .sp
1489    (*MARK:A)(X|Y)    (*MARK:A)(X|Y)
1490  .sp  .sp
1491  The minimum length for a match is one character. If the subject is "ABC", there  The minimum length for a match is one character. If the subject is "ABC", there
1492  will be attempts to match "ABC", "BC", "C", and then finally an empty string.  will be attempts to match "ABC", "BC", "C", and then finally an empty string.
1493  If the pattern is studied, the final attempt does not take place, because PCRE  If the pattern is studied, the final attempt does not take place, because PCRE
1494  knows that the subject is too short, and so the (*MARK) is never encountered.  knows that the subject is too short, and so the (*MARK) is never encountered.
1495  In this case, studying the pattern does not affect the overall match result,  In this case, studying the pattern does not affect the overall match result,
1496  which is still "no match", but it does affect the auxiliary information that is  which is still "no match", but it does affect the auxiliary information that is
1497  returned.  returned.
1498  .sp  .sp
1499    PCRE_NO_UTF8_CHECK    PCRE_NO_UTF8_CHECK

Legend:
Removed from v.547  
changed lines
  Added in v.548

  ViewVC Help
Powered by ViewVC 1.1.5