/[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 978 by ph10, Sun Jun 17 16:55:07 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 523  capturing parenthesis numbers in back re Line 523  capturing parenthesis numbers in back re
523    
524  #define PUT2INC(a,n,d)  PUT2(a,n,d), a += IMM2_SIZE  #define PUT2INC(a,n,d)  PUT2(a,n,d), a += IMM2_SIZE
525    
526    /* The maximum length of a MARK name is currently one data unit; it may be
527    changed in future to be a fixed number of bytes or to depend on LINK_SIZE. */
528    
529    #define MAX_MARK ((1 << (sizeof(pcre_uchar)*8)) - 1)
530    
531  /* When UTF encoding is being used, a character is no longer just a single  /* When UTF encoding is being used, a character is no longer just a single
532  character. The macros for character handling generate simple sequences when  character. The macros for character handling generate simple sequences when
533  used in character-mode, and more complicated ones for UTF characters.  used in character-mode, and more complicated ones for UTF characters.
# Line 887  time, run time, or study time, respectiv Line 892  time, run time, or study time, respectiv
892     PCRE_NO_START_OPTIMIZE)     PCRE_NO_START_OPTIMIZE)
893    
894  #define PUBLIC_STUDY_OPTIONS \  #define PUBLIC_STUDY_OPTIONS \
895     PCRE_STUDY_JIT_COMPILE     (PCRE_STUDY_JIT_COMPILE|PCRE_STUDY_JIT_PARTIAL_SOFT_COMPILE| \
896        PCRE_STUDY_JIT_PARTIAL_HARD_COMPILE)
897    
898  /* Magic number to provide a small check against being handed junk. */  /* Magic number to provide a small check against being handed junk. */
899    
# Line 1939  enum { ERR0,  ERR1,  ERR2,  ERR3,  ERR4, Line 1945  enum { ERR0,  ERR1,  ERR2,  ERR3,  ERR4,
1945         ERR40, ERR41, ERR42, ERR43, ERR44, ERR45, ERR46, ERR47, ERR48, ERR49,         ERR40, ERR41, ERR42, ERR43, ERR44, ERR45, ERR46, ERR47, ERR48, ERR49,
1946         ERR50, ERR51, ERR52, ERR53, ERR54, ERR55, ERR56, ERR57, ERR58, ERR59,         ERR50, ERR51, ERR52, ERR53, ERR54, ERR55, ERR56, ERR57, ERR58, ERR59,
1947         ERR60, ERR61, ERR62, ERR63, ERR64, ERR65, ERR66, ERR67, ERR68, ERR69,         ERR60, ERR61, ERR62, ERR63, ERR64, ERR65, ERR66, ERR67, ERR68, ERR69,
1948         ERR70, ERR71, ERR72, ERR73, ERR74, ERRCOUNT };         ERR70, ERR71, ERR72, ERR73, ERR74, ERR75, ERR76, ERRCOUNT };
1949    
1950    /* JIT compiling modes. The function list is indexed by them. */
1951    enum { JIT_COMPILE, JIT_PARTIAL_SOFT_COMPILE, JIT_PARTIAL_HARD_COMPILE,
1952           JIT_NUMBER_OF_COMPILE_MODES };
1953    
1954  /* 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
1955  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
# Line 1958  fields are present. Currently PCRE alway Line 1968  fields are present. Currently PCRE alway
1968  NOTE NOTE NOTE  NOTE NOTE NOTE
1969  */  */
1970    
1971  typedef struct real_pcre {  #ifdef COMPILE_PCRE8
1972    #define REAL_PCRE real_pcre
1973    #else
1974    #define REAL_PCRE real_pcre16
1975    #endif
1976    
1977    typedef struct REAL_PCRE {
1978    pcre_uint32 magic_number;    pcre_uint32 magic_number;
1979    pcre_uint32 size;               /* Total that was malloced */    pcre_uint32 size;               /* Total that was malloced */
1980    pcre_uint32 options;            /* Public options */    pcre_uint32 options;            /* Public options */
1981    pcre_uint16 flags;              /* Private flags */    pcre_uint16 flags;              /* Private flags */
1982    pcre_uint16 dummy1;             /* For future use */    pcre_uint16 max_lookbehind;     /* Longest lookbehind (characters) */
1983    pcre_uint16 top_bracket;    pcre_uint16 top_bracket;        /* Highest numbered group */
1984    pcre_uint16 top_backref;    pcre_uint16 top_backref;        /* Highest numbered back reference */
1985    pcre_uint16 first_char;         /* Starting character */    pcre_uint16 first_char;         /* Starting character */
1986    pcre_uint16 req_char;           /* This character must be seen */    pcre_uint16 req_char;           /* This character must be seen */
1987    pcre_uint16 name_table_offset;  /* Offset to name table that follows */    pcre_uint16 name_table_offset;  /* Offset to name table that follows */
1988    pcre_uint16 name_entry_size;    /* Size of any name items */    pcre_uint16 name_entry_size;    /* Size of any name items */
1989    pcre_uint16 name_count;         /* Number of name items */    pcre_uint16 name_count;         /* Number of name items */
1990    pcre_uint16 ref_count;          /* Reference count */    pcre_uint16 ref_count;          /* Reference count */
   
1991    const pcre_uint8 *tables;       /* Pointer to tables or NULL for std */    const pcre_uint8 *tables;       /* Pointer to tables or NULL for std */
1992    const pcre_uint8 *nullpad;      /* NULL padding */    const pcre_uint8 *nullpad;      /* NULL padding */
1993  } real_pcre;  } REAL_PCRE;
1994    
1995  /* 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
1996  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 2033  typedef struct compile_data {
2033    int  workspace_size;              /* Size of workspace */    int  workspace_size;              /* Size of workspace */
2034    int  bracount;                    /* Count of capturing parens as we compile */    int  bracount;                    /* Count of capturing parens as we compile */
2035    int  final_bracount;              /* Saved value after first pass */    int  final_bracount;              /* Saved value after first pass */
2036      int  max_lookbehind;              /* Maximum lookbehind (characters) */
2037    int  top_backref;                 /* Maximum back reference */    int  top_backref;                 /* Maximum back reference */
2038    unsigned int backref_map;         /* Bitmap of low back refs */    unsigned int backref_map;         /* Bitmap of low back refs */
2039    int  assert_depth;                /* Depth of nested assertions */    int  assert_depth;                /* Depth of nested assertions */
# Line 2119  typedef struct match_data { Line 2135  typedef struct match_data {
2135    const  pcre_uchar *mark;        /* Mark pointer to pass back on success */    const  pcre_uchar *mark;        /* Mark pointer to pass back on success */
2136    const  pcre_uchar *nomatch_mark;/* Mark pointer to pass back on failure */    const  pcre_uchar *nomatch_mark;/* Mark pointer to pass back on failure */
2137    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 */
2138    #ifdef NO_RECURSE
2139      void  *match_frames_base;       /* For remembering malloc'd frames */
2140    #endif
2141  } match_data;  } match_data;
2142    
2143  /* 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 2192  total length. */
2192  #define ctypes_offset (cbits_offset + cbit_length)  #define ctypes_offset (cbits_offset + cbit_length)
2193  #define tables_length (ctypes_offset + 256)  #define tables_length (ctypes_offset + 256)
2194    
2195  /* Internal function prefix */  /* Internal function and data prefixes. */
2196    
2197  #ifdef COMPILE_PCRE8  #ifdef COMPILE_PCRE8
2198    #ifndef PUBL
2199  #define PUBL(name) pcre_##name  #define PUBL(name) pcre_##name
2200    #endif
2201    #ifndef PRIV
2202  #define PRIV(name) _pcre_##name  #define PRIV(name) _pcre_##name
2203  #else  #endif
2204    #else /* COMPILE_PCRE8 */
2205  #ifdef COMPILE_PCRE16  #ifdef COMPILE_PCRE16
2206    #ifndef PUBL
2207  #define PUBL(name) pcre16_##name  #define PUBL(name) pcre16_##name
2208    #endif
2209    #ifndef PRIV
2210  #define PRIV(name) _pcre16_##name  #define PRIV(name) _pcre16_##name
2211    #endif
2212  #else  #else
2213  #error Unsupported compiling mode  #error Unsupported compiling mode
2214  #endif /* COMPILE_PCRE16 */  #endif /* COMPILE_PCRE16 */
# Line 2274  extern BOOL              PRIV(was_newlin Line 2301  extern BOOL              PRIV(was_newlin
2301  extern BOOL              PRIV(xclass)(int, const pcre_uchar *, BOOL);  extern BOOL              PRIV(xclass)(int, const pcre_uchar *, BOOL);
2302    
2303  #ifdef SUPPORT_JIT  #ifdef SUPPORT_JIT
2304  extern void              PRIV(jit_compile)(const real_pcre *, PUBL(extra) *);  extern void              PRIV(jit_compile)(const REAL_PCRE *,
2305  extern int               PRIV(jit_exec)(const real_pcre *, void *,                             PUBL(extra) *, int);
2306                             const pcre_uchar *, int, int, int, int, int *, int);  extern int               PRIV(jit_exec)(const REAL_PCRE *, const PUBL(extra) *,
2307                               const pcre_uchar *, int, int, int, int *, int);
2308  extern void              PRIV(jit_free)(void *);  extern void              PRIV(jit_free)(void *);
2309  extern int               PRIV(jit_get_size)(void *);  extern int               PRIV(jit_get_size)(void *);
2310    extern const char*       PRIV(jit_get_target)(void);
2311  #endif  #endif
2312    
2313  /* Unicode character database (UCD) */  /* Unicode character database (UCD) */

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

  ViewVC Help
Powered by ViewVC 1.1.5