/[pcre]/code/trunk/pcre_internal.h
ViewVC logotype

Diff of /code/trunk/pcre_internal.h

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

revision 427 by ph10, Fri Aug 28 09:55:54 2009 UTC revision 455 by ph10, Sat Sep 26 19:12:32 2009 UTC
# Line 549  compatibility. */ Line 549  compatibility. */
549  /* Options for the "extra" block produced by pcre_study(). */  /* Options for the "extra" block produced by pcre_study(). */
550    
551  #define PCRE_STUDY_MAPPED   0x01     /* a map of starting chars exists */  #define PCRE_STUDY_MAPPED   0x01     /* a map of starting chars exists */
552    #define PCRE_STUDY_MINLEN   0x02     /* a minimum length field exists */
553    
554  /* Masks for identifying the public options that are permitted at compile  /* Masks for identifying the public options that are permitted at compile
555  time, run time, or study time, respectively. */  time, run time, or study time, respectively. */
# Line 564  time, run time, or study time, respectiv Line 565  time, run time, or study time, respectiv
565     PCRE_JAVASCRIPT_COMPAT)     PCRE_JAVASCRIPT_COMPAT)
566    
567  #define PUBLIC_EXEC_OPTIONS \  #define PUBLIC_EXEC_OPTIONS \
568    (PCRE_ANCHORED|PCRE_NOTBOL|PCRE_NOTEOL|PCRE_NOTEMPTY|PCRE_NO_UTF8_CHECK| \    (PCRE_ANCHORED|PCRE_NOTBOL|PCRE_NOTEOL|PCRE_NOTEMPTY|PCRE_NOTEMPTY_ATSTART| \
569     PCRE_PARTIAL_HARD|PCRE_PARTIAL_SOFT|PCRE_NEWLINE_BITS|PCRE_BSR_ANYCRLF| \     PCRE_NO_UTF8_CHECK|PCRE_PARTIAL_HARD|PCRE_PARTIAL_SOFT|PCRE_NEWLINE_BITS| \
570     PCRE_BSR_UNICODE|PCRE_NO_START_OPTIMIZE)     PCRE_BSR_ANYCRLF|PCRE_BSR_UNICODE|PCRE_NO_START_OPTIMIZE)
571    
572  #define PUBLIC_DFA_EXEC_OPTIONS \  #define PUBLIC_DFA_EXEC_OPTIONS \
573    (PCRE_ANCHORED|PCRE_NOTBOL|PCRE_NOTEOL|PCRE_NOTEMPTY|PCRE_NO_UTF8_CHECK| \    (PCRE_ANCHORED|PCRE_NOTBOL|PCRE_NOTEOL|PCRE_NOTEMPTY|PCRE_NOTEMPTY_ATSTART| \
574     PCRE_PARTIAL_HARD|PCRE_PARTIAL_SOFT|PCRE_DFA_SHORTEST|PCRE_DFA_RESTART| \     PCRE_NO_UTF8_CHECK|PCRE_PARTIAL_HARD|PCRE_PARTIAL_SOFT|PCRE_DFA_SHORTEST| \
575     PCRE_NEWLINE_BITS|PCRE_BSR_ANYCRLF|PCRE_BSR_UNICODE|PCRE_NO_START_OPTIMIZE)     PCRE_DFA_RESTART|PCRE_NEWLINE_BITS|PCRE_BSR_ANYCRLF|PCRE_BSR_UNICODE| \
576       PCRE_NO_START_OPTIMIZE)
577    
578  #define PUBLIC_STUDY_OPTIONS 0   /* None defined */  #define PUBLIC_STUDY_OPTIONS 0   /* None defined */
579    
# Line 1363  enum { Line 1365  enum {
1365    
1366    OP_FAIL,           /* 109 */    OP_FAIL,           /* 109 */
1367    OP_ACCEPT,         /* 110 */    OP_ACCEPT,         /* 110 */
1368      OP_CLOSE,          /* 111 Used before OP_ACCEPT to close open captures */
1369    
1370    /* This is used to skip a subpattern with a {0} quantifier */    /* This is used to skip a subpattern with a {0} quantifier */
1371    
1372    OP_SKIPZERO        /* 111 */    OP_SKIPZERO        /* 112 */
1373  };  };
1374    
1375    
# Line 1392  for debugging. The macro is referenced o Line 1395  for debugging. The macro is referenced o
1395    "Once", "Bra", "CBra", "Cond", "SBra", "SCBra", "SCond",        \    "Once", "Bra", "CBra", "Cond", "SBra", "SCBra", "SCond",        \
1396    "Cond ref", "Cond rec", "Cond def", "Brazero", "Braminzero",    \    "Cond ref", "Cond rec", "Cond def", "Brazero", "Braminzero",    \
1397    "*PRUNE", "*SKIP", "*THEN", "*COMMIT", "*FAIL", "*ACCEPT",      \    "*PRUNE", "*SKIP", "*THEN", "*COMMIT", "*FAIL", "*ACCEPT",      \
1398    "Skip zero"    "Close", "Skip zero"
1399    
1400    
1401  /* This macro defines the length of fixed length operations in the compiled  /* This macro defines the length of fixed length operations in the compiled
# Line 1457  in UTF-8 mode. The code that uses this t Line 1460  in UTF-8 mode. The code that uses this t
1460    1,                             /* DEF                                    */ \    1,                             /* DEF                                    */ \
1461    1, 1,                          /* BRAZERO, BRAMINZERO                    */ \    1, 1,                          /* BRAZERO, BRAMINZERO                    */ \
1462    1, 1, 1, 1,                    /* PRUNE, SKIP, THEN, COMMIT,             */ \    1, 1, 1, 1,                    /* PRUNE, SKIP, THEN, COMMIT,             */ \
1463    1, 1, 1                        /* FAIL, ACCEPT, SKIPZERO                 */    1, 1, 3, 1                     /* FAIL, ACCEPT, CLOSE, SKIPZERO          */
1464    
1465    
1466  /* A magic value for OP_RREF to indicate the "any recursion" condition. */  /* A magic value for OP_RREF to indicate the "any recursion" condition. */
# Line 1489  Because people can now save and re-use c Line 1492  Because people can now save and re-use c
1492  structure should be made at the end, and something earlier (e.g. a new  structure should be made at the end, and something earlier (e.g. a new
1493  flag in the options or one of the dummy fields) should indicate that the new  flag in the options or one of the dummy fields) should indicate that the new
1494  fields are present. Currently PCRE always sets the dummy fields to zero.  fields are present. Currently PCRE always sets the dummy fields to zero.
1495  NOTE NOTE NOTE:  NOTE NOTE NOTE
1496  */  */
1497    
1498  typedef struct real_pcre {  typedef struct real_pcre {
# Line 1516  remark (see NOTE above) about extending Line 1519  remark (see NOTE above) about extending
1519    
1520  typedef struct pcre_study_data {  typedef struct pcre_study_data {
1521    pcre_uint32 size;               /* Total that was malloced */    pcre_uint32 size;               /* Total that was malloced */
1522    pcre_uint32 options;    pcre_uint32 flags;              /* Private flags */
1523    uschar start_bits[32];    uschar start_bits[32];          /* Starting char bits */
1524      pcre_uint32 minlength;          /* Minimum subject length */
1525  } pcre_study_data;  } pcre_study_data;
1526    
1527    /* Structure for building a chain of open capturing subpatterns during
1528    compiling, so that instructions to close them can be compiled when (*ACCEPT) is
1529    encountered. */
1530    
1531    typedef struct open_capitem {
1532      struct open_capitem *next;    /* Chain link */
1533      pcre_uint16 number;           /* Capture number */
1534    } open_capitem;
1535    
1536  /* Structure for passing "static" information around between the functions  /* Structure for passing "static" information around between the functions
1537  doing the compiling, so that they are thread-safe. */  doing the compiling, so that they are thread-safe. */
1538    
# Line 1532  typedef struct compile_data { Line 1545  typedef struct compile_data {
1545    const uschar *start_code;     /* The start of the compiled code */    const uschar *start_code;     /* The start of the compiled code */
1546    const uschar *start_pattern;  /* The start of the pattern */    const uschar *start_pattern;  /* The start of the pattern */
1547    const uschar *end_pattern;    /* The end of the pattern */    const uschar *end_pattern;    /* The end of the pattern */
1548      open_capitem *open_caps;      /* Chain of open capture items */
1549    uschar *hwm;                  /* High watermark of workspace */    uschar *hwm;                  /* High watermark of workspace */
1550    uschar *name_table;           /* The name/number table */    uschar *name_table;           /* The name/number table */
1551    int  names_found;             /* Number of entries so far */    int  names_found;             /* Number of entries so far */
# Line 1544  typedef struct compile_data { Line 1558  typedef struct compile_data {
1558    int  external_flags;          /* External flag bits to be set */    int  external_flags;          /* External flag bits to be set */
1559    int  req_varyopt;             /* "After variable item" flag for reqbyte */    int  req_varyopt;             /* "After variable item" flag for reqbyte */
1560    BOOL had_accept;              /* (*ACCEPT) encountered */    BOOL had_accept;              /* (*ACCEPT) encountered */
1561      BOOL check_lookbehind;        /* Lookbehinds need later checking */
1562    int  nltype;                  /* Newline type */    int  nltype;                  /* Newline type */
1563    int  nllen;                   /* Newline string length */    int  nllen;                   /* Newline string length */
1564    uschar nl[4];                 /* Newline string when fixed length */    uschar nl[4];                 /* Newline string when fixed length */
# Line 1567  typedef struct recursion_info { Line 1582  typedef struct recursion_info {
1582    USPTR save_start;             /* Old value of mstart */    USPTR save_start;             /* Old value of mstart */
1583    int *offset_save;             /* Pointer to start of saved offsets */    int *offset_save;             /* Pointer to start of saved offsets */
1584    int saved_max;                /* Number of saved offsets */    int saved_max;                /* Number of saved offsets */
1585      int offset_top;               /* Current value of offset_top */
1586  } recursion_info;  } recursion_info;
1587    
1588  /* Structure for building a chain of data for holding the values of the subject  /* Structure for building a chain of data for holding the values of the subject
# Line 1601  typedef struct match_data { Line 1617  typedef struct match_data {
1617    BOOL   jscript_compat;        /* JAVASCRIPT_COMPAT flag */    BOOL   jscript_compat;        /* JAVASCRIPT_COMPAT flag */
1618    BOOL   endonly;               /* Dollar not before final \n */    BOOL   endonly;               /* Dollar not before final \n */
1619    BOOL   notempty;              /* Empty string match not wanted */    BOOL   notempty;              /* Empty string match not wanted */
1620    int    partial;               /* PARTIAL options */    BOOL   notempty_atstart;      /* Empty string match at start not wanted */
1621    BOOL   hitend;                /* Hit the end of the subject at some point */    BOOL   hitend;                /* Hit the end of the subject at some point */
1622    BOOL   bsr_anycrlf;           /* \R is just any CRLF, not full Unicode */    BOOL   bsr_anycrlf;           /* \R is just any CRLF, not full Unicode */
1623    const uschar *start_code;     /* For use when recursing */    const uschar *start_code;     /* For use when recursing */
# Line 1609  typedef struct match_data { Line 1625  typedef struct match_data {
1625    USPTR  end_subject;           /* End of the subject string */    USPTR  end_subject;           /* End of the subject string */
1626    USPTR  start_match_ptr;       /* Start of matched string */    USPTR  start_match_ptr;       /* Start of matched string */
1627    USPTR  end_match_ptr;         /* Subject position at end match */    USPTR  end_match_ptr;         /* Subject position at end match */
1628      USPTR  start_used_ptr;        /* Earliest consulted character */
1629      int    partial;               /* PARTIAL options */
1630    int    end_offset_top;        /* Highwater mark at end of match */    int    end_offset_top;        /* Highwater mark at end of match */
1631    int    capture_last;          /* Most recent capture number */    int    capture_last;          /* Most recent capture number */
1632    int    start_offset;          /* The start offset value */    int    start_offset;          /* The start offset value */
# Line 1625  typedef struct dfa_match_data { Line 1643  typedef struct dfa_match_data {
1643    const uschar *start_code;     /* Start of the compiled pattern */    const uschar *start_code;     /* Start of the compiled pattern */
1644    const uschar *start_subject;  /* Start of the subject string */    const uschar *start_subject;  /* Start of the subject string */
1645    const uschar *end_subject;    /* End of subject string */    const uschar *end_subject;    /* End of subject string */
1646      const uschar *start_used_ptr; /* Earliest consulted character */
1647    const uschar *tables;         /* Character tables */    const uschar *tables;         /* Character tables */
1648      int   start_offset;           /* The start offset value */
1649    int   moptions;               /* Match options */    int   moptions;               /* Match options */
1650    int   poptions;               /* Pattern options */    int   poptions;               /* Pattern options */
1651    int    nltype;                /* Newline type */    int    nltype;                /* Newline type */
# Line 1704  extern const uschar _pcre_OP_lengths[]; Line 1724  extern const uschar _pcre_OP_lengths[];
1724  one of the exported public functions. They have to be "external" in the C  one of the exported public functions. They have to be "external" in the C
1725  sense, but are not part of the PCRE public API. */  sense, but are not part of the PCRE public API. */
1726    
1727  extern BOOL         _pcre_is_newline(const uschar *, int, const uschar *,  extern const uschar *_pcre_find_bracket(const uschar *, BOOL, int);
1728                        int *, BOOL);  extern BOOL          _pcre_is_newline(const uschar *, int, const uschar *,
1729  extern int          _pcre_ord2utf8(int, uschar *);                         int *, BOOL);
1730  extern real_pcre   *_pcre_try_flipped(const real_pcre *, real_pcre *,  extern int           _pcre_ord2utf8(int, uschar *);
1731                        const pcre_study_data *, pcre_study_data *);  extern real_pcre    *_pcre_try_flipped(const real_pcre *, real_pcre *,
1732  extern int          _pcre_valid_utf8(const uschar *, int);                         const pcre_study_data *, pcre_study_data *);
1733  extern BOOL         _pcre_was_newline(const uschar *, int, const uschar *,  extern int           _pcre_valid_utf8(const uschar *, int);
1734                        int *, BOOL);  extern BOOL          _pcre_was_newline(const uschar *, int, const uschar *,
1735  extern BOOL         _pcre_xclass(int, const uschar *);                         int *, BOOL);
1736    extern BOOL          _pcre_xclass(int, const uschar *);
1737    
1738    
1739  /* Unicode character database (UCD) */  /* Unicode character database (UCD) */

Legend:
Removed from v.427  
changed lines
  Added in v.455

  ViewVC Help
Powered by ViewVC 1.1.5