Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

pcre.c File Reference

#include "pcreinternal.h"
#include "pcretables.h"

Go to the source code of this file.

Defines

#define DPRINTF(p)
#define BRASTACK_SIZE   200

Functions

BOOL compile_regex (int, int, int *, uschar **, const uschar **, const char **, BOOL, int, compile_data *)
const char * vmdpcre_version (void)
int vmdpcre_info (const pcre *external_re, int *optptr, int *first_char)
int check_escape (const uschar **ptrptr, const char **errorptr, int bracount, int options, BOOL isclass, compile_data *cd)
BOOL is_counted_repeat (const uschar *p, compile_data *cd)
const uscharread_repeat_counts (const uschar *p, int *minp, int *maxp, const char **errorptr, compile_data *cd)
int find_fixedlength (uschar *code)
BOOL compile_branch (int options, int *brackets, uschar **codeptr, const uschar **ptrptr, const char **errorptr, int *optchanged, compile_data *cd)
const uscharfirst_significant_code (const uschar *code, int *options, int optbit, BOOL optstop)
BOOL is_anchored (register const uschar *code, int *options)
BOOL is_startline (const uschar *code)
int find_firstchar (const uschar *code, int *options)
pcrevmdpcre_compile (const char *pattern, int options, const char **errorptr, int *erroroffset, const unsigned char *tables)
BOOL match_ref (int offset, register const uschar *eptr, int length, match_data *md, int ims)
BOOL match (register const uschar *eptr, register const uschar *ecode, int offset_top, match_data *md, int ims, BOOL condassert, const uschar *eptrb)
int vmdpcre_exec (const pcre *external_re, const pcre_extra *external_extra, const char *subject, int length, int start_offset, int options, int *offsets, int offsetcount)

Variables

const char rep_min [] = { 0, 0, 1, 1, 0, 0 }
const char rep_max [] = { 0, 0, 0, 0, 1, 1 }
const short int escapes []
void *(* vmdpcre_malloc )(size_t)=malloc
void(* vmdpcre_free )(void *)=free


Define Documentation

#define BRASTACK_SIZE   200
 

Definition at line 75 of file pcre.c.

Referenced by vmdpcre_compile.

#define DPRINTF  
 

Definition at line 56 of file pcre.c.

Referenced by compile_regex, match, vmdpcre_compile, and vmdpcre_exec.


Function Documentation

int check_escape const uschar **    ptrptr,
const char **    errorptr,
int    bracount,
int    options,
BOOL    isclass,
compile_data   cd
[static]
 

Definition at line 257 of file pcre.c.

References BOOL, ctype_digit, ctype_xdigit, compile_data::ctypes, ERR1, ERR2, ERR3, ESC_REF, escapes, compile_data::fcc, compile_data::lcc, PCRE_EXTRA, and uschar.

Referenced by compile_branch, and vmdpcre_compile.

BOOL compile_branch int    options,
int *    brackets,
uschar **    codeptr,
const uschar **    ptrptr,
const char **    errorptr,
int *    optchanged,
compile_data   cd
[static]
 

Definition at line 647 of file pcre.c.

References BOOL, cbit_digit, cbit_space, cbit_word, compile_data::cbits, check_escape, compile_regex, ctype_digit, ctype_meta, ctype_space, compile_data::ctypes, ERR11, ERR12, ERR13, ERR14, ERR24, ERR27, ERR6, ERR7, ERR8, ERR9, ESC_b, ESC_D, ESC_d, ESC_REF, ESC_S, ESC_s, ESC_W, ESC_w, ESC_Z, EXTRACT_MAX, compile_data::fcc, is_counted_repeat, length, NULL, OP_ANY, OP_ASSERT, OP_ASSERT_NOT, OP_ASSERTBACK, OP_ASSERTBACK_NOT, OP_BRA, OP_BRAZERO, OP_CHARS, OP_CIRC, OP_CLASS, OP_COND, OP_CRPLUS, OP_CRQUERY, OP_CRRANGE, OP_CRSTAR, OP_DOLL, OP_EODN, OP_EXACT, OP_KET, OP_KETRMAX, OP_NOT, OP_NOTSTAR, OP_ONCE, OP_OPT, OP_PLUS, OP_QUERY, OP_REF, OP_STAR, OP_TYPESTAR, OP_UPTO, PCRE_CASELESS, PCRE_DOTALL, PCRE_EXTENDED, PCRE_EXTRA, PCRE_IMS, PCRE_INGROUP, PCRE_MULTILINE, PCRE_UNGREEDY, read_repeat_counts, and uschar.

Referenced by compile_regex.

BOOL compile_regex int   ,
int   ,
int *   ,
uschar **   ,
const uschar **   ,
const char **   ,
BOOL   ,
int   ,
compile_data  
[static]
 

Definition at line 1648 of file pcre.c.

References BOOL, compile_branch, DPRINTF, ERR25, find_fixedlength, length, NULL, OP_ALT, OP_CREF, OP_END, OP_KET, OP_OPT, OP_REVERSE, PCRE_IMS, and uschar.

Referenced by compile_branch, and vmdpcre_compile.

int find_firstchar const uschar   code,
int *    options
[static]
 

Definition at line 1919 of file pcre.c.

References first_significant_code, OP_ALT, OP_ASSERT, OP_BRA, OP_CHARS, OP_COND, OP_EXACT, OP_MINPLUS, OP_ONCE, OP_PLUS, PCRE_CASELESS, and uschar.

Referenced by vmdpcre_compile.

int find_fixedlength uschar   code [static]
 

Definition at line 487 of file pcre.c.

References cc, length, OP_ALT, OP_ANY, OP_ASSERT, OP_ASSERT_NOT, OP_ASSERTBACK, OP_ASSERTBACK_NOT, OP_BRA, OP_CHARS, OP_CIRC, OP_CLASS, OP_COND, OP_CREF, OP_CRMINQUERY, OP_CRMINRANGE, OP_CRMINSTAR, OP_CRQUERY, OP_CRRANGE, OP_CRSTAR, OP_DIGIT, OP_DOLL, OP_END, OP_EOD, OP_EODN, OP_EXACT, OP_KET, OP_KETRMAX, OP_KETRMIN, OP_NOT_DIGIT, OP_NOT_WHITESPACE, OP_NOT_WORD_BOUNDARY, OP_NOT_WORDCHAR, OP_ONCE, OP_OPT, OP_REF, OP_REVERSE, OP_SOD, OP_TYPEEXACT, OP_WHITESPACE, OP_WORD_BOUNDARY, OP_WORDCHAR, and uschar.

Referenced by compile_regex.

const uschar* first_significant_code const uschar   code,
int *    options,
int    optbit,
BOOL    optstop
[static]
 

Definition at line 1783 of file pcre.c.

References BOOL, OP_ALT, OP_ASSERT_NOT, OP_ASSERTBACK, OP_ASSERTBACK_NOT, OP_CREF, OP_NOT_WORD_BOUNDARY, OP_OPT, OP_WORD_BOUNDARY, and uschar.

Referenced by find_firstchar, is_anchored, and is_startline.

BOOL is_anchored register const uschar   code,
int *    options
[static]
 

Definition at line 1847 of file pcre.c.

References first_significant_code, OP_ALT, OP_ANY, OP_ASSERT, OP_BRA, OP_CIRC, OP_COND, OP_ONCE, OP_SOD, OP_TYPEMINSTAR, OP_TYPESTAR, PCRE_DOTALL, PCRE_MULTILINE, and uschar.

Referenced by vmdpcre_compile.

BOOL is_counted_repeat const uschar   p,
compile_data   cd
[static]
 

Definition at line 399 of file pcre.c.

References ctype_digit, compile_data::ctypes, and uschar.

Referenced by compile_branch, and vmdpcre_compile.

BOOL is_startline const uschar   code [static]
 

Definition at line 1883 of file pcre.c.

References first_significant_code, NULL, OP_ALT, OP_ANY, OP_ASSERT, OP_BRA, OP_CIRC, OP_COND, OP_ONCE, OP_TYPEMINSTAR, OP_TYPESTAR, and uschar.

Referenced by vmdpcre_compile.

BOOL match register const uschar   eptr,
register const uschar   ecode,
int    offset_top,
match_data   md,
int    ims,
BOOL    condassert,
const uschar   eptrb
[static]
 

Definition at line 2914 of file pcre.c.

References BOOL, ctype_digit, ctype_space, ctype_word, match_data::ctypes, data, DPRINTF, match_data::end_match_ptr, match_data::end_offset_top, match_data::end_subject, match_data::endonly, match_data::errorcode, match_data::lcc, length, match_ref, match_data::notbol, match_data::noteol, NULL, match_data::offset_end, match_data::offset_max, match_data::offset_overflow, match_data::offset_vector, OP_ALT, OP_ANY, OP_ASSERT, OP_ASSERT_NOT, OP_ASSERTBACK, OP_ASSERTBACK_NOT, OP_BRA, OP_BRAMINZERO, OP_BRAZERO, OP_CHARS, OP_CIRC, OP_CLASS, OP_COND, OP_CREF, OP_CRMINPLUS, OP_CRMINQUERY, OP_CRMINRANGE, OP_CRMINSTAR, OP_CRPLUS, OP_CRQUERY, OP_CRRANGE, OP_CRSTAR, OP_DIGIT, OP_DOLL, OP_END, OP_EOD, OP_EODN, OP_EXACT, OP_KET, OP_KETRMAX, OP_KETRMIN, OP_MINPLUS, OP_MINQUERY, OP_MINSTAR, OP_MINUPTO, OP_NOT, OP_NOT_DIGIT, OP_NOT_WHITESPACE, OP_NOT_WORD_BOUNDARY, OP_NOT_WORDCHAR, OP_NOTEXACT, OP_NOTMINPLUS, OP_NOTMINQUERY, OP_NOTMINSTAR, OP_NOTMINUPTO, OP_NOTPLUS, OP_NOTQUERY, OP_NOTSTAR, OP_NOTUPTO, OP_ONCE, OP_OPT, OP_PLUS, OP_QUERY, OP_REF, OP_REVERSE, OP_SOD, OP_STAR, OP_TYPEEXACT, OP_TYPEMINPLUS, OP_TYPEMINQUERY, OP_TYPEMINSTAR, OP_TYPEMINUPTO, OP_TYPEPLUS, OP_TYPEQUERY, OP_TYPESTAR, OP_TYPEUPTO, OP_UPTO, OP_WHITESPACE, OP_WORD_BOUNDARY, OP_WORDCHAR, PCRE_CASELESS, PCRE_DOTALL, PCRE_ERROR_UNKNOWN_NODE, PCRE_IMS, PCRE_MULTILINE, rep_max, rep_min, match_data::start_subject, and uschar.

Referenced by vmdpcre_exec.

BOOL match_ref int    offset,
register const uschar   eptr,
int    length,
match_data   md,
int    ims
[static]
 

Definition at line 2855 of file pcre.c.

References match_data::end_subject, match_data::lcc, length, match_data::offset_vector, PCRE_CASELESS, match_data::start_subject, and uschar.

Referenced by match.

const uschar* read_repeat_counts const uschar   p,
int *    minp,
int *    maxp,
const char **    errorptr,
compile_data   cd
[static]
 

Definition at line 436 of file pcre.c.

References ctype_digit, compile_data::ctypes, ERR4, ERR5, and uschar.

Referenced by compile_branch, and vmdpcre_compile.

pcre* vmdpcre_compile const char *    pattern,
int    options,
const char **    errorptr,
int *    erroroffset,
const unsigned char *    tables
 

Definition at line 1984 of file pcre.c.

References BRASTACK_SIZE, compile_data::cbits, cbits_offset, check_escape, real_pcre::code, compile_regex, ctype_digit, ctype_meta, ctype_space, compile_data::ctypes, ctypes_offset, DPRINTF, ERR12, ERR15, ERR16, ERR17, ERR18, ERR19, ERR20, ERR21, ERR22, ERR23, ERR24, ERR26, ERR28, ESC_b, ESC_REF, compile_data::fcc, fcc_offset, find_firstchar, real_pcre::first_char, is_anchored, is_counted_repeat, is_startline, compile_data::lcc, lcc_offset, length, MAGIC_NUMBER, real_pcre::magic_number, NULL, offsetof, OP_ALT, OP_ASSERT, OP_ASSERT_NOT, OP_ASSERTBACK, OP_ASSERTBACK_NOT, OP_BRA, OP_CHARS, OP_CLASS, OP_COND, OP_CREF, OP_CRMINPLUS, OP_CRMINQUERY, OP_CRMINRANGE, OP_CRMINSTAR, OP_CRPLUS, OP_CRQUERY, OP_CRRANGE, OP_CRSTAR, OP_END, OP_EXACT, OP_KET, OP_KETRMAX, OP_KETRMIN, OP_MINPLUS, OP_MINQUERY, OP_MINSTAR, OP_MINUPTO, OP_NOT, OP_NOTEXACT, OP_NOTMINPLUS, OP_NOTMINQUERY, OP_NOTMINSTAR, OP_NOTMINUPTO, OP_NOTPLUS, OP_NOTQUERY, OP_NOTSTAR, OP_NOTUPTO, OP_ONCE, OP_OPT, OP_PLUS, OP_QUERY, OP_REF, OP_REVERSE, OP_STAR, OP_TYPEEXACT, OP_TYPEMINPLUS, OP_TYPEMINQUERY, OP_TYPEMINSTAR, OP_TYPEMINUPTO, OP_TYPEPLUS, OP_TYPEQUERY, OP_TYPESTAR, OP_TYPEUPTO, OP_UPTO, real_pcre::options, pcre, PCRE_ANCHORED, PCRE_CASELESS, PCRE_DOLLAR_ENDONLY, PCRE_DOTALL, PCRE_EXTENDED, PCRE_EXTRA, PCRE_FIRSTSET, PCRE_IMS, PCRE_MULTILINE, PCRE_STARTLINE, PCRE_UNGREEDY, PUBLIC_OPTIONS, read_repeat_counts, size, real_pcre::tables, real_pcre::top_backref, real_pcre::top_bracket, and uschar.

int vmdpcre_exec const pcre   external_re,
const pcre_extra   external_extra,
const char *    subject,
int    length,
int    start_offset,
int    options,
int *    offsets,
int    offsetcount
 

Definition at line 4143 of file pcre.c.

References BOOL, real_pcre::code, match_data::ctypes, ctypes_offset, DPRINTF, match_data::end_match_ptr, match_data::end_offset_top, match_data::end_subject, match_data::endonly, match_data::errorcode, real_pcre::first_char, match_data::lcc, lcc_offset, length, MAGIC_NUMBER, real_pcre::magic_number, match, match_data::notbol, match_data::noteol, NULL, match_data::offset_end, match_data::offset_max, match_data::offset_overflow, match_data::offset_vector, real_pcre_extra::options, real_pcre::options, pcre, PCRE_ANCHORED, PCRE_CASELESS, PCRE_DOLLAR_ENDONLY, PCRE_DOTALL, PCRE_ERROR_BADMAGIC, PCRE_ERROR_BADOPTION, PCRE_ERROR_NOMATCH, PCRE_ERROR_NOMEMORY, PCRE_ERROR_NULL, pcre_extra, PCRE_FIRSTSET, PCRE_MULTILINE, PCRE_NOTBOL, PCRE_NOTEOL, PCRE_STARTLINE, PCRE_STUDY_MAPPED, PUBLIC_EXEC_OPTIONS, real_pcre_extra::start_bits, match_data::start_subject, real_pcre::tables, real_pcre::top_backref, real_pcre::top_bracket, and uschar.

int vmdpcre_info const pcre   external_re,
int *    optptr,
int *    first_char
 

Definition at line 188 of file pcre.c.

References real_pcre::first_char, MAGIC_NUMBER, real_pcre::magic_number, NULL, real_pcre::options, pcre, PCRE_ERROR_BADMAGIC, PCRE_ERROR_NULL, PCRE_FIRSTSET, PCRE_STARTLINE, PUBLIC_OPTIONS, and real_pcre::top_bracket.

const char* vmdpcre_version void   
 

Definition at line 161 of file pcre.c.

References PCRE_VERSION.


Variable Documentation

const short int escapes[] [static]
 

Initial value:

 {
    0,      0,      0,      0,      0,      0,      0,      0,   
    0,      0,    ':',    ';',    '<',    '=',    '>',    '?',   
  '@', -ESC_A, -ESC_B,      0, -ESC_D,      0,      0,      0,   
    0,      0,      0,      0,      0,      0,      0,      0,   
    0,      0,      0, -ESC_S,      0,      0,      0, -ESC_W,   
    0,      0, -ESC_Z,    '[',   '\\',    ']',    '^',    '_',   
  '`',      7, -ESC_b,      0, -ESC_d,     27,   '\f',      0,   
    0,      0,      0,      0,      0,      0,   '\n',      0,   
    0,      0,   '\r', -ESC_s,   '\t',      0,      0, -ESC_w,   
    0,      0, -ESC_z                                            
}

Definition at line 106 of file pcre.c.

Referenced by check_escape.

const char rep_max[] = { 0, 0, 0, 0, 1, 1 } [static]
 

Definition at line 81 of file pcre.c.

Referenced by match.

const char rep_min[] = { 0, 0, 1, 1, 0, 0 } [static]
 

Definition at line 80 of file pcre.c.

Referenced by match.

void(* vmdpcre_free)(void *) = free
 

Definition at line 137 of file pcre.c.

void*(* vmdpcre_malloc)(size_t) = malloc
 

Definition at line 136 of file pcre.c.


Generated on Fri Apr 19 02:45:55 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002