/[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 637 by ph10, Sun Jul 24 17:44:12 2011 UTC revision 667 by ph10, Mon Aug 22 14:57:32 2011 UTC
# Line 7  Line 7 
7  and semantics are as close as possible to those of the Perl 5 language.  and semantics are as close as possible to those of the Perl 5 language.
8    
9                         Written by Philip Hazel                         Written by Philip Hazel
10             Copyright (c) 1997-2010 University of Cambridge             Copyright (c) 1997-2011 University of Cambridge
11    
12  -----------------------------------------------------------------------------  -----------------------------------------------------------------------------
13  Redistribution and use in source and binary forms, with or without  Redistribution and use in source and binary forms, with or without
# Line 624  time, run time, or study time, respectiv Line 624  time, run time, or study time, respectiv
624     PCRE_DFA_RESTART|PCRE_NEWLINE_BITS|PCRE_BSR_ANYCRLF|PCRE_BSR_UNICODE| \     PCRE_DFA_RESTART|PCRE_NEWLINE_BITS|PCRE_BSR_ANYCRLF|PCRE_BSR_UNICODE| \
625     PCRE_NO_START_OPTIMIZE)     PCRE_NO_START_OPTIMIZE)
626    
627  #define PUBLIC_STUDY_OPTIONS 0   /* None defined */  #define PUBLIC_STUDY_OPTIONS \
628       PCRE_STUDY_JIT_COMPILE
629    
630  /* Magic number to provide a small check against being handed junk. Also used  /* Magic number to provide a small check against being handed junk. Also used
631  to detect whether a pattern was compiled on a host of different endianness. */  to detect whether a pattern was compiled on a host of different endianness. */
# Line 1741  typedef struct compile_data { Line 1742  typedef struct compile_data {
1742    int  final_bracount;          /* Saved value after first pass */    int  final_bracount;          /* Saved value after first pass */
1743    int  top_backref;             /* Maximum back reference */    int  top_backref;             /* Maximum back reference */
1744    unsigned int backref_map;     /* Bitmap of low back refs */    unsigned int backref_map;     /* Bitmap of low back refs */
1745    int  assert_depth;            /* Depth of nested assertions */    int  assert_depth;            /* Depth of nested assertions */
1746    int  external_options;        /* External (initial) options */    int  external_options;        /* External (initial) options */
1747    int  external_flags;          /* External flag bits to be set */    int  external_flags;          /* External flag bits to be set */
1748    int  req_varyopt;             /* "After variable item" flag for reqbyte */    int  req_varyopt;             /* "After variable item" flag for reqbyte */
# Line 1753  typedef struct compile_data { Line 1754  typedef struct compile_data {
1754  } compile_data;  } compile_data;
1755    
1756  /* Structure for maintaining a chain of pointers to the currently incomplete  /* Structure for maintaining a chain of pointers to the currently incomplete
1757  branches, for testing for left recursion. */  branches, for testing for left recursion while compiling. */
1758    
1759  typedef struct branch_chain {  typedef struct branch_chain {
1760    struct branch_chain *outer;    struct branch_chain *outer;
# Line 1761  typedef struct branch_chain { Line 1762  typedef struct branch_chain {
1762  } branch_chain;  } branch_chain;
1763    
1764  /* Structure for items in a linked list that represents an explicit recursive  /* Structure for items in a linked list that represents an explicit recursive
1765  call within the pattern. */  call within the pattern; used by pcre_exec(). */
1766    
1767  typedef struct recursion_info {  typedef struct recursion_info {
1768    struct recursion_info *prevrec; /* Previous recursion record (or NULL) */    struct recursion_info *prevrec; /* Previous recursion record (or NULL) */
1769    int group_num;                  /* Number of group that was called */    int group_num;                  /* Number of group that was called */
1770    int *offset_save;               /* Pointer to start of saved offsets */    int *offset_save;               /* Pointer to start of saved offsets */
1771    int saved_max;                  /* Number of saved offsets */    int saved_max;                  /* Number of saved offsets */
1772      USPTR subject_position;         /* Position at start of recursion */
1773  } recursion_info;  } recursion_info;
1774    
1775    /* A similar structure for pcre_dfa_exec(). */
1776    
1777    typedef struct dfa_recursion_info {
1778      struct dfa_recursion_info *prevrec;
1779      int group_num;
1780      USPTR subject_position;
1781    } dfa_recursion_info;
1782    
1783  /* 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
1784  pointer at the start of each subpattern, so as to detect when an empty string  pointer at the start of each subpattern, so as to detect when an empty string
1785  has been matched by a subpattern - to break infinite loops. */  has been matched by a subpattern - to break infinite loops; used by
1786    pcre_exec(). */
1787    
1788  typedef struct eptrblock {  typedef struct eptrblock {
1789    struct eptrblock *epb_prev;    struct eptrblock *epb_prev;
# Line 1825  typedef struct match_data { Line 1836  typedef struct match_data {
1836    recursion_info *recursive;    /* Linked list of recursion data */    recursion_info *recursive;    /* Linked list of recursion data */
1837    void  *callout_data;          /* To pass back to callouts */    void  *callout_data;          /* To pass back to callouts */
1838    const  uschar *mark;          /* Mark pointer to pass back */    const  uschar *mark;          /* Mark pointer to pass back */
1839    const  uschar *once_target;   /* Where to back up to for atomic groups */    const  uschar *once_target;   /* Where to back up to for atomic groups */
1840  } match_data;  } match_data;
1841    
1842  /* A similar structure is used for the same purpose by the DFA matching  /* A similar structure is used for the same purpose by the DFA matching
1843  functions. */  functions. */
1844    
1845  typedef struct dfa_match_data {  typedef struct dfa_match_data {
1846    const uschar *start_code;     /* Start of the compiled pattern */    const uschar *start_code;      /* Start of the compiled pattern */
1847    const uschar *start_subject;  /* Start of the subject string */    const uschar *start_subject;   /* Start of the subject string */
1848    const uschar *end_subject;    /* End of subject string */    const uschar *end_subject;     /* End of subject string */
1849    const uschar *start_used_ptr; /* Earliest consulted character */    const uschar *start_used_ptr;  /* Earliest consulted character */
1850    const uschar *tables;         /* Character tables */    const uschar *tables;          /* Character tables */
1851    int   start_offset;           /* The start offset value */    int   start_offset;            /* The start offset value */
1852    int   moptions;               /* Match options */    int   moptions;                /* Match options */
1853    int   poptions;               /* Pattern options */    int   poptions;                /* Pattern options */
1854    int    nltype;                /* Newline type */    int    nltype;                 /* Newline type */
1855    int    nllen;                 /* Newline string length */    int    nllen;                  /* Newline string length */
1856    uschar nl[4];                 /* Newline string when fixed */    uschar nl[4];                  /* Newline string when fixed */
1857    void  *callout_data;          /* To pass back to callouts */    void  *callout_data;           /* To pass back to callouts */
1858      dfa_recursion_info *recursive; /* Linked list of recursion data */
1859  } dfa_match_data;  } dfa_match_data;
1860    
1861  /* Bit definitions for entries in the pcre_ctypes table. */  /* Bit definitions for entries in the pcre_ctypes table. */
# Line 1901  extern const int    _pcre_utf8_table2[]; Line 1913  extern const int    _pcre_utf8_table2[];
1913  extern const int    _pcre_utf8_table3[];  extern const int    _pcre_utf8_table3[];
1914  extern const uschar _pcre_utf8_table4[];  extern const uschar _pcre_utf8_table4[];
1915    
1916    #ifdef SUPPORT_JIT
1917    extern const uschar _pcre_utf8_char_sizes[];
1918    #endif
1919    
1920  extern const int    _pcre_utf8_table1_size;  extern const int    _pcre_utf8_table1_size;
1921    
1922  extern const char   _pcre_utt_names[];  extern const char   _pcre_utt_names[];
# Line 1925  extern int           _pcre_valid_utf8(US Line 1941  extern int           _pcre_valid_utf8(US
1941  extern BOOL          _pcre_was_newline(USPTR, int, USPTR, int *, BOOL);  extern BOOL          _pcre_was_newline(USPTR, int, USPTR, int *, BOOL);
1942  extern BOOL          _pcre_xclass(int, const uschar *);  extern BOOL          _pcre_xclass(int, const uschar *);
1943    
1944    #ifdef SUPPORT_JIT
1945    extern void          _pcre_jit_compile(const real_pcre *, pcre_extra *);
1946    extern int           _pcre_jit_exec(const real_pcre *, void *, PCRE_SPTR,
1947                            int, int, int, int *, int);
1948    extern void          _pcre_jit_free(void *);
1949    #endif
1950    
1951  /* Unicode character database (UCD) */  /* Unicode character database (UCD) */
1952    
# Line 1938  extern const ucd_record  _pcre_ucd_recor Line 1960  extern const ucd_record  _pcre_ucd_recor
1960  extern const uschar      _pcre_ucd_stage1[];  extern const uschar      _pcre_ucd_stage1[];
1961  extern const pcre_uint16 _pcre_ucd_stage2[];  extern const pcre_uint16 _pcre_ucd_stage2[];
1962  extern const int         _pcre_ucp_gentype[];  extern const int         _pcre_ucp_gentype[];
1963    #ifdef SUPPORT_JIT
1964    extern const int         _pcre_ucp_typerange[];
1965    #endif
1966    
1967  /* UCD access macros */  /* UCD access macros */
1968    

Legend:
Removed from v.637  
changed lines
  Added in v.667

  ViewVC Help
Powered by ViewVC 1.1.5