/[pcre]/code/trunk/HACKING
ViewVC logotype

Diff of /code/trunk/HACKING

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

revision 603 by ph10, Wed May 25 08:29:03 2011 UTC revision 604 by ph10, Thu Jun 2 19:04:54 2011 UTC
# Line 349  number immediately follows the offset, a Line 349  number immediately follows the offset, a
349    
350  OP_KET is used for subpatterns that do not repeat indefinitely, while  OP_KET is used for subpatterns that do not repeat indefinitely, while
351  OP_KETRMIN and OP_KETRMAX are used for indefinite repetitions, minimally or  OP_KETRMIN and OP_KETRMAX are used for indefinite repetitions, minimally or
352  maximally respectively. All three are followed by LINK_SIZE bytes giving (as a  maximally respectively (see below for possessive repetitions). All three are
353  positive number) the offset back to the matching bracket opcode.  followed by LINK_SIZE bytes giving (as a positive number) the offset back to
354    the matching bracket opcode.
355    
356  If a subpattern is quantified such that it is permitted to match zero times, it  If a subpattern is quantified such that it is permitted to match zero times, it
357  is preceded by one of OP_BRAZERO, OP_BRAMINZERO, or OP_SKIPZERO. These are  is preceded by one of OP_BRAZERO, OP_BRAMINZERO, or OP_SKIPZERO. These are
# Line 377  final replication is changed to OP_SBRA Line 378  final replication is changed to OP_SBRA
378  that it needs to check for matching an empty string when it hits OP_KETRMIN or  that it needs to check for matching an empty string when it hits OP_KETRMIN or
379  OP_KETRMAX, and if so, to break the loop.  OP_KETRMAX, and if so, to break the loop.
380    
381    Possessive brackets
382    -------------------
383    
384    When a repeated group (capturing or non-capturing) is marked as possessive by
385    the "+" notation, e.g. (abc)++, different opcodes are used. Their names all
386    have POS on the end, e.g. OP_BRAPOS instead of OP_BRA and OP_SCPBRPOS instead
387    of OP_SCBRA. The end of such a group is marked by OP_KETRPOS. If the minimum
388    repetition is zero, the group is preceded by OP_BRAPOSZERO.
389    
390    
391  Assertions  Assertions
392  ----------  ----------

Legend:
Removed from v.603  
changed lines
  Added in v.604

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12