/[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 850 by zherczeg, Wed Jan 4 17:29:11 2012 UTC revision 933 by ph10, Sat Feb 25 12:18:23 2012 UTC
# Line 254  typedef unsigned char pcre_uchar; Line 254  typedef unsigned char pcre_uchar;
254    
255  #ifdef COMPILE_PCRE16  #ifdef COMPILE_PCRE16
256  #if USHRT_MAX != 65535  #if USHRT_MAX != 65535
257  /* This is a warning message. Change PCRE_SCHAR16 to a 16 bit data type in  /* This is a warning message. Change PCRE_UCHAR16 to a 16 bit data type in
258  pcre.h(.in) and disable (comment out) this message. */  pcre.h(.in) and disable (comment out) this message. */
259  #error Warning: PCRE_SCHAR16 is not a 16 bit data type.  #error Warning: PCRE_UCHAR16 is not a 16 bit data type.
260  #endif  #endif
261    
262  typedef pcre_uint16 pcre_uchar;  typedef pcre_uint16 pcre_uchar;
# Line 887  time, run time, or study time, respectiv Line 887  time, run time, or study time, respectiv
887     PCRE_NO_START_OPTIMIZE)     PCRE_NO_START_OPTIMIZE)
888    
889  #define PUBLIC_STUDY_OPTIONS \  #define PUBLIC_STUDY_OPTIONS \
890     PCRE_STUDY_JIT_COMPILE     (PCRE_STUDY_JIT_COMPILE|PCRE_STUDY_JIT_PARTIAL_SOFT_COMPILE| \
891        PCRE_STUDY_JIT_PARTIAL_HARD_COMPILE)
892    
893  /* Magic number to provide a small check against being handed junk. */  /* Magic number to provide a small check against being handed junk. */
894    
# Line 1941  enum { ERR0,  ERR1,  ERR2,  ERR3,  ERR4, Line 1942  enum { ERR0,  ERR1,  ERR2,  ERR3,  ERR4,
1942         ERR60, ERR61, ERR62, ERR63, ERR64, ERR65, ERR66, ERR67, ERR68, ERR69,         ERR60, ERR61, ERR62, ERR63, ERR64, ERR65, ERR66, ERR67, ERR68, ERR69,
1943         ERR70, ERR71, ERR72, ERR73, ERR74, ERRCOUNT };         ERR70, ERR71, ERR72, ERR73, ERR74, ERRCOUNT };
1944    
1945    /* JIT compiling modes. The function list is indexed by them. */
1946    enum { JIT_COMPILE, JIT_PARTIAL_SOFT_COMPILE, JIT_PARTIAL_HARD_COMPILE,
1947           JIT_NUMBER_OF_COMPILE_MODES };
1948    
1949  /* The real format of the start of the pcre block; the index of names and the  /* The real format of the start of the pcre block; the index of names and the
1950  code vector run on as long as necessary after the end. We store an explicit  code vector run on as long as necessary after the end. We store an explicit
1951  offset to the name table so that if a regex is compiled on one host, saved, and  offset to the name table so that if a regex is compiled on one host, saved, and
# Line 1958  fields are present. Currently PCRE alway Line 1963  fields are present. Currently PCRE alway
1963  NOTE NOTE NOTE  NOTE NOTE NOTE
1964  */  */
1965    
1966  typedef struct real_pcre {  #ifdef COMPILE_PCRE8
1967    #define REAL_PCRE real_pcre
1968    #else
1969    #define REAL_PCRE real_pcre16
1970    #endif
1971    
1972    typedef struct REAL_PCRE {
1973    pcre_uint32 magic_number;    pcre_uint32 magic_number;
1974    pcre_uint32 size;               /* Total that was malloced */    pcre_uint32 size;               /* Total that was malloced */
1975    pcre_uint32 options;            /* Public options */    pcre_uint32 options;            /* Public options */
1976    pcre_uint16 flags;              /* Private flags */    pcre_uint16 flags;              /* Private flags */
1977    pcre_uint16 dummy1;             /* For future use */    pcre_uint16 max_lookbehind;     /* Longest lookbehind (characters) */
1978    pcre_uint16 top_bracket;    pcre_uint16 top_bracket;        /* Highest numbered group */
1979    pcre_uint16 top_backref;    pcre_uint16 top_backref;        /* Highest numbered back reference */
1980    pcre_uint16 first_char;         /* Starting character */    pcre_uint16 first_char;         /* Starting character */
1981    pcre_uint16 req_char;           /* This character must be seen */    pcre_uint16 req_char;           /* This character must be seen */
1982    pcre_uint16 name_table_offset;  /* Offset to name table that follows */    pcre_uint16 name_table_offset;  /* Offset to name table that follows */
1983    pcre_uint16 name_entry_size;    /* Size of any name items */    pcre_uint16 name_entry_size;    /* Size of any name items */
1984    pcre_uint16 name_count;         /* Number of name items */    pcre_uint16 name_count;         /* Number of name items */
1985    pcre_uint16 ref_count;          /* Reference count */    pcre_uint16 ref_count;          /* Reference count */
   
1986    const pcre_uint8 *tables;       /* Pointer to tables or NULL for std */    const pcre_uint8 *tables;       /* Pointer to tables or NULL for std */
1987    const pcre_uint8 *nullpad;      /* NULL padding */    const pcre_uint8 *nullpad;      /* NULL padding */
1988  } real_pcre;  } REAL_PCRE;
1989    
1990  /* The format of the block used to store data from pcre_study(). The same  /* The format of the block used to store data from pcre_study(). The same
1991  remark (see NOTE above) about extending this structure applies. */  remark (see NOTE above) about extending this structure applies. */
# Line 2018  typedef struct compile_data { Line 2028  typedef struct compile_data {
2028    int  workspace_size;              /* Size of workspace */    int  workspace_size;              /* Size of workspace */
2029    int  bracount;                    /* Count of capturing parens as we compile */    int  bracount;                    /* Count of capturing parens as we compile */
2030    int  final_bracount;              /* Saved value after first pass */    int  final_bracount;              /* Saved value after first pass */
2031      int  max_lookbehind;              /* Maximum lookbehind (characters) */
2032    int  top_backref;                 /* Maximum back reference */    int  top_backref;                 /* Maximum back reference */
2033    unsigned int backref_map;         /* Bitmap of low back refs */    unsigned int backref_map;         /* Bitmap of low back refs */
2034    int  assert_depth;                /* Depth of nested assertions */    int  assert_depth;                /* Depth of nested assertions */
# Line 2119  typedef struct match_data { Line 2130  typedef struct match_data {
2130    const  pcre_uchar *mark;        /* Mark pointer to pass back on success */    const  pcre_uchar *mark;        /* Mark pointer to pass back on success */
2131    const  pcre_uchar *nomatch_mark;/* Mark pointer to pass back on failure */    const  pcre_uchar *nomatch_mark;/* Mark pointer to pass back on failure */
2132    const  pcre_uchar *once_target; /* Where to back up to for atomic groups */    const  pcre_uchar *once_target; /* Where to back up to for atomic groups */
2133    #ifdef NO_RECURSE
2134      void  *match_frames_base;       /* For remembering malloc'd frames */
2135    #endif
2136  } match_data;  } match_data;
2137    
2138  /* 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
# Line 2173  total length. */ Line 2187  total length. */
2187  #define ctypes_offset (cbits_offset + cbit_length)  #define ctypes_offset (cbits_offset + cbit_length)
2188  #define tables_length (ctypes_offset + 256)  #define tables_length (ctypes_offset + 256)
2189    
2190  /* Internal function prefix */  /* Internal function and data prefixes. */
2191    
2192  #ifdef COMPILE_PCRE8  #ifdef COMPILE_PCRE8
2193    #ifndef PUBL
2194  #define PUBL(name) pcre_##name  #define PUBL(name) pcre_##name
2195    #endif
2196    #ifndef PRIV
2197  #define PRIV(name) _pcre_##name  #define PRIV(name) _pcre_##name
2198  #else  #endif
2199    #else /* COMPILE_PCRE8 */
2200  #ifdef COMPILE_PCRE16  #ifdef COMPILE_PCRE16
2201    #ifndef PUBL
2202  #define PUBL(name) pcre16_##name  #define PUBL(name) pcre16_##name
2203    #endif
2204    #ifndef PRIV
2205  #define PRIV(name) _pcre16_##name  #define PRIV(name) _pcre16_##name
2206    #endif
2207  #else  #else
2208  #error Unsupported compiling mode  #error Unsupported compiling mode
2209  #endif /* COMPILE_PCRE16 */  #endif /* COMPILE_PCRE16 */
# Line 2274  extern BOOL              PRIV(was_newlin Line 2296  extern BOOL              PRIV(was_newlin
2296  extern BOOL              PRIV(xclass)(int, const pcre_uchar *, BOOL);  extern BOOL              PRIV(xclass)(int, const pcre_uchar *, BOOL);
2297    
2298  #ifdef SUPPORT_JIT  #ifdef SUPPORT_JIT
2299  extern void              PRIV(jit_compile)(const real_pcre *, PUBL(extra) *);  extern void              PRIV(jit_compile)(const REAL_PCRE *, PUBL(extra) *, int);
2300  extern int               PRIV(jit_exec)(const real_pcre *, void *,  extern int               PRIV(jit_exec)(const REAL_PCRE *, void *,
2301                             const pcre_uchar *, int, int, int, int, int *, int);                             const pcre_uchar *, int, int, int, int, int *, int,
2302                               pcre_uchar **);
2303  extern void              PRIV(jit_free)(void *);  extern void              PRIV(jit_free)(void *);
2304  extern int               PRIV(jit_get_size)(void *);  extern int               PRIV(jit_get_size)(void *);
2305    extern const char*       PRIV(jit_get_target)(void);
2306  #endif  #endif
2307    
2308  /* Unicode character database (UCD) */  /* Unicode character database (UCD) */

Legend:
Removed from v.850  
changed lines
  Added in v.933

  ViewVC Help
Powered by ViewVC 1.1.5