Back to index

php5  5.3.10
Classes | Defines | Typedefs | Enumerations | Functions | Variables
pcre_internal.h File Reference
#include <ctype.h>
#include <limits.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include "pcre.h"
#include "ucp.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  real_pcre
struct  pcre_study_data
struct  open_capitem
struct  compile_data
struct  branch_chain
struct  recursion_info
struct  eptrblock
struct  match_data
struct  dfa_match_data
struct  ucp_type_table
struct  ucd_record

Defines

#define DPRINTF(p)   /* Nothing */
#define PCRE_EXP_DECL   extern
#define PCRE_EXP_DEFN   PCRE_EXP_DECL
#define PCRE_EXP_DATA_DEFN
#define PCRE_CALL_CONVENTION
#define INT64_OR_DOUBLE   double
#define NOTACHAR   0xffffffff
#define NLTYPE_FIXED   0 /* Newline is a fixed length string */
#define NLTYPE_ANY   1 /* Newline is any Unicode line ending */
#define NLTYPE_ANYCRLF   2 /* Newline is CR, LF, or CRLF */
#define IS_NEWLINE(p)
#define WAS_NEWLINE(p)
#define PCRE_SPTR   const char *
#define USPTR   const unsigned char *
#define memmove(a, b, c)   pcre_memmove(a, b, c)
#define PUTINC(a, n, d)   PUT(a,n,d), a += LINK_SIZE
#define PUT2(a, n, d)
#define GET2(a, n)   (((a)[n] << 8) | (a)[(n)+1])
#define PUT2INC(a, n, d)   PUT2(a,n,d), a += 2
#define GETCHAR(c, eptr)   c = *eptr;
#define GETCHARTEST(c, eptr)   c = *eptr;
#define GETCHARINC(c, eptr)   c = *eptr++;
#define GETCHARINCTEST(c, eptr)   c = *eptr++;
#define GETCHARLEN(c, eptr, len)   c = *eptr;
#define offsetof(p_type, field)   ((size_t)&(((p_type *)0)->field))
#define PCRE_IMS   (PCRE_CASELESS|PCRE_MULTILINE|PCRE_DOTALL)
#define PCRE_NOPARTIAL   0x0001 /* can't use partial with this regex */
#define PCRE_FIRSTSET   0x0002 /* first_byte is set */
#define PCRE_REQCHSET   0x0004 /* req_byte is set */
#define PCRE_STARTLINE   0x0008 /* start after \n for multiline */
#define PCRE_JCHANGED   0x0010 /* j option used in regex */
#define PCRE_HASCRORLF   0x0020 /* explicit \r or \n in pattern */
#define PCRE_STUDY_MAPPED   0x01 /* a map of starting chars exists */
#define PCRE_STUDY_MINLEN   0x02 /* a minimum length field exists */
#define PCRE_NEWLINE_BITS
#define PUBLIC_COMPILE_OPTIONS
#define PUBLIC_EXEC_OPTIONS
#define PUBLIC_DFA_EXEC_OPTIONS
#define PUBLIC_STUDY_OPTIONS   0 /* None defined */
#define MAGIC_NUMBER   0x50435245UL /* 'PCRE' */
#define REQ_UNSET   (-2)
#define REQ_NONE   (-1)
#define REQ_BYTE_MAX   1000
#define REQ_CASELESS   0x0100 /* indicates caselessness */
#define REQ_VARY   0x0200 /* reqbyte followed non-literal item */
#define FALSE   0
#define TRUE   1
#define CHAR_HT   '\t'
#define CHAR_VT   '\v'
#define CHAR_FF   '\f'
#define CHAR_CR   '\r'
#define CHAR_NL   '\n'
#define CHAR_BS   '\b'
#define CHAR_BEL   '\a'
#define CHAR_ESC   '\033'
#define CHAR_DEL   '\177'
#define CHAR_SPACE   ' '
#define CHAR_EXCLAMATION_MARK   '!'
#define CHAR_QUOTATION_MARK   '"'
#define CHAR_NUMBER_SIGN   '#'
#define CHAR_DOLLAR_SIGN   '$'
#define CHAR_PERCENT_SIGN   '%'
#define CHAR_AMPERSAND   '&'
#define CHAR_APOSTROPHE   '\''
#define CHAR_LEFT_PARENTHESIS   '('
#define CHAR_RIGHT_PARENTHESIS   ')'
#define CHAR_ASTERISK   '*'
#define CHAR_PLUS   '+'
#define CHAR_COMMA   ','
#define CHAR_MINUS   '-'
#define CHAR_DOT   '.'
#define CHAR_SLASH   '/'
#define CHAR_0   '0'
#define CHAR_1   '1'
#define CHAR_2   '2'
#define CHAR_3   '3'
#define CHAR_4   '4'
#define CHAR_5   '5'
#define CHAR_6   '6'
#define CHAR_7   '7'
#define CHAR_8   '8'
#define CHAR_9   '9'
#define CHAR_COLON   ':'
#define CHAR_SEMICOLON   ';'
#define CHAR_LESS_THAN_SIGN   '<'
#define CHAR_EQUALS_SIGN   '='
#define CHAR_GREATER_THAN_SIGN   '>'
#define CHAR_QUESTION_MARK   '?'
#define CHAR_COMMERCIAL_AT   '@'
#define CHAR_A   'A'
#define CHAR_B   'B'
#define CHAR_C   'C'
#define CHAR_D   'D'
#define CHAR_E   'E'
#define CHAR_F   'F'
#define CHAR_G   'G'
#define CHAR_H   'H'
#define CHAR_I   'I'
#define CHAR_J   'J'
#define CHAR_K   'K'
#define CHAR_L   'L'
#define CHAR_M   'M'
#define CHAR_N   'N'
#define CHAR_O   'O'
#define CHAR_P   'P'
#define CHAR_Q   'Q'
#define CHAR_R   'R'
#define CHAR_S   'S'
#define CHAR_T   'T'
#define CHAR_U   'U'
#define CHAR_V   'V'
#define CHAR_W   'W'
#define CHAR_X   'X'
#define CHAR_Y   'Y'
#define CHAR_Z   'Z'
#define CHAR_LEFT_SQUARE_BRACKET   '['
#define CHAR_BACKSLASH   '\\'
#define CHAR_RIGHT_SQUARE_BRACKET   ']'
#define CHAR_CIRCUMFLEX_ACCENT   '^'
#define CHAR_UNDERSCORE   '_'
#define CHAR_GRAVE_ACCENT   '`'
#define CHAR_a   'a'
#define CHAR_b   'b'
#define CHAR_c   'c'
#define CHAR_d   'd'
#define CHAR_e   'e'
#define CHAR_f   'f'
#define CHAR_g   'g'
#define CHAR_h   'h'
#define CHAR_i   'i'
#define CHAR_j   'j'
#define CHAR_k   'k'
#define CHAR_l   'l'
#define CHAR_m   'm'
#define CHAR_n   'n'
#define CHAR_o   'o'
#define CHAR_p   'p'
#define CHAR_q   'q'
#define CHAR_r   'r'
#define CHAR_s   's'
#define CHAR_t   't'
#define CHAR_u   'u'
#define CHAR_v   'v'
#define CHAR_w   'w'
#define CHAR_x   'x'
#define CHAR_y   'y'
#define CHAR_z   'z'
#define CHAR_LEFT_CURLY_BRACKET   '{'
#define CHAR_VERTICAL_LINE   '|'
#define CHAR_RIGHT_CURLY_BRACKET   '}'
#define CHAR_TILDE   '~'
#define STR_HT   "\t"
#define STR_VT   "\v"
#define STR_FF   "\f"
#define STR_CR   "\r"
#define STR_NL   "\n"
#define STR_BS   "\b"
#define STR_BEL   "\a"
#define STR_ESC   "\033"
#define STR_DEL   "\177"
#define STR_SPACE   " "
#define STR_EXCLAMATION_MARK   "!"
#define STR_QUOTATION_MARK   "\""
#define STR_NUMBER_SIGN   "#"
#define STR_DOLLAR_SIGN   "$"
#define STR_PERCENT_SIGN   "%"
#define STR_AMPERSAND   "&"
#define STR_APOSTROPHE   "'"
#define STR_LEFT_PARENTHESIS   "("
#define STR_RIGHT_PARENTHESIS   ")"
#define STR_ASTERISK   "*"
#define STR_PLUS   "+"
#define STR_COMMA   ","
#define STR_MINUS   "-"
#define STR_DOT   "."
#define STR_SLASH   "/"
#define STR_0   "0"
#define STR_1   "1"
#define STR_2   "2"
#define STR_3   "3"
#define STR_4   "4"
#define STR_5   "5"
#define STR_6   "6"
#define STR_7   "7"
#define STR_8   "8"
#define STR_9   "9"
#define STR_COLON   ":"
#define STR_SEMICOLON   ";"
#define STR_LESS_THAN_SIGN   "<"
#define STR_EQUALS_SIGN   "="
#define STR_GREATER_THAN_SIGN   ">"
#define STR_QUESTION_MARK   "?"
#define STR_COMMERCIAL_AT   "@"
#define STR_A   "A"
#define STR_B   "B"
#define STR_C   "C"
#define STR_D   "D"
#define STR_E   "E"
#define STR_F   "F"
#define STR_G   "G"
#define STR_H   "H"
#define STR_I   "I"
#define STR_J   "J"
#define STR_K   "K"
#define STR_L   "L"
#define STR_M   "M"
#define STR_N   "N"
#define STR_O   "O"
#define STR_P   "P"
#define STR_Q   "Q"
#define STR_R   "R"
#define STR_S   "S"
#define STR_T   "T"
#define STR_U   "U"
#define STR_V   "V"
#define STR_W   "W"
#define STR_X   "X"
#define STR_Y   "Y"
#define STR_Z   "Z"
#define STR_LEFT_SQUARE_BRACKET   "["
#define STR_BACKSLASH   "\\"
#define STR_RIGHT_SQUARE_BRACKET   "]"
#define STR_CIRCUMFLEX_ACCENT   "^"
#define STR_UNDERSCORE   "_"
#define STR_GRAVE_ACCENT   "`"
#define STR_a   "a"
#define STR_b   "b"
#define STR_c   "c"
#define STR_d   "d"
#define STR_e   "e"
#define STR_f   "f"
#define STR_g   "g"
#define STR_h   "h"
#define STR_i   "i"
#define STR_j   "j"
#define STR_k   "k"
#define STR_l   "l"
#define STR_m   "m"
#define STR_n   "n"
#define STR_o   "o"
#define STR_p   "p"
#define STR_q   "q"
#define STR_r   "r"
#define STR_s   "s"
#define STR_t   "t"
#define STR_u   "u"
#define STR_v   "v"
#define STR_w   "w"
#define STR_x   "x"
#define STR_y   "y"
#define STR_z   "z"
#define STR_LEFT_CURLY_BRACKET   "{"
#define STR_VERTICAL_LINE   "|"
#define STR_RIGHT_CURLY_BRACKET   "}"
#define STR_TILDE   "~"
#define STRING_ACCEPT0   "ACCEPT\0"
#define STRING_COMMIT0   "COMMIT\0"
#define STRING_F0   "F\0"
#define STRING_FAIL0   "FAIL\0"
#define STRING_MARK0   "MARK\0"
#define STRING_PRUNE0   "PRUNE\0"
#define STRING_SKIP0   "SKIP\0"
#define STRING_THEN   "THEN"
#define STRING_alpha0   "alpha\0"
#define STRING_lower0   "lower\0"
#define STRING_upper0   "upper\0"
#define STRING_alnum0   "alnum\0"
#define STRING_ascii0   "ascii\0"
#define STRING_blank0   "blank\0"
#define STRING_cntrl0   "cntrl\0"
#define STRING_digit0   "digit\0"
#define STRING_graph0   "graph\0"
#define STRING_print0   "print\0"
#define STRING_punct0   "punct\0"
#define STRING_space0   "space\0"
#define STRING_word0   "word\0"
#define STRING_xdigit   "xdigit"
#define STRING_DEFINE   "DEFINE"
#define STRING_CR_RIGHTPAR   "CR)"
#define STRING_LF_RIGHTPAR   "LF)"
#define STRING_CRLF_RIGHTPAR   "CRLF)"
#define STRING_ANY_RIGHTPAR   "ANY)"
#define STRING_ANYCRLF_RIGHTPAR   "ANYCRLF)"
#define STRING_BSR_ANYCRLF_RIGHTPAR   "BSR_ANYCRLF)"
#define STRING_BSR_UNICODE_RIGHTPAR   "BSR_UNICODE)"
#define STRING_UTF8_RIGHTPAR   "UTF8)"
#define STRING_UCP_RIGHTPAR   "UCP)"
#define STRING_NO_START_OPT_RIGHTPAR   "NO_START_OPT)"
#define ESC_e   CHAR_ESC
#define ESC_f   CHAR_FF
#define ESC_n   CHAR_NL
#define ESC_r   CHAR_CR
#define ESC_tee   CHAR_HT
#define PT_ANY   0 /* Any property - matches all chars */
#define PT_LAMP   1 /* L& - the union of Lu, Ll, Lt */
#define PT_GC   2 /* Specified general characteristic (e.g. L) */
#define PT_PC   3 /* Specified particular characteristic (e.g. Lu) */
#define PT_SC   4 /* Script (e.g. Han) */
#define PT_ALNUM   5 /* Alphanumeric - the union of L and N */
#define PT_SPACE   6 /* Perl space - Z plus 9,10,12,13 */
#define PT_PXSPACE   7 /* POSIX space - Z plus 9,10,11,12,13 */
#define PT_WORD   8 /* Word - L plus N plus underscore */
#define XCL_NOT   0x01 /* Flag: this is a negative class */
#define XCL_MAP   0x02 /* Flag: a 32-byte map is present */
#define XCL_END   0 /* Marks end of individual items */
#define XCL_SINGLE   1 /* Single item (one multibyte char) follows */
#define XCL_RANGE   2 /* A range (two multibyte chars) follows */
#define XCL_PROP   3 /* Unicode property (2-byte property code follows) */
#define XCL_NOTPROP   4 /* Unicode inverted property (ditto) */
#define OP_NAME_LIST
#define OP_LENGTHS
#define RREF_ANY   0xffff
#define ctype_space   0x01
#define ctype_letter   0x02
#define ctype_digit   0x04
#define ctype_xdigit   0x08
#define ctype_word   0x10 /* alphanumeric or '_' */
#define ctype_meta   0x80 /* regexp meta char or zero (end pattern) */
#define cbit_space   0 /* [:space:] or \s */
#define cbit_xdigit   32 /* [:xdigit:] */
#define cbit_digit   64 /* [:digit:] or \d */
#define cbit_upper   96 /* [:upper:] */
#define cbit_lower   128 /* [:lower:] */
#define cbit_word   160 /* [:word:] or \w */
#define cbit_graph   192 /* [:graph:] */
#define cbit_print   224 /* [:print:] */
#define cbit_punct   256 /* [:punct:] */
#define cbit_cntrl   288 /* [:cntrl:] */
#define cbit_length   320 /* Length of the cbits table */
#define lcc_offset   0
#define fcc_offset   256
#define cbits_offset   512
#define ctypes_offset   (cbits_offset + cbit_length)
#define tables_length   (ctypes_offset + 256)
#define UCD_BLOCK_SIZE   128
#define GET_UCD(ch)
#define UCD_CHARTYPE(ch)   GET_UCD(ch)->chartype
#define UCD_SCRIPT(ch)   GET_UCD(ch)->script
#define UCD_CATEGORY(ch)   _pcre_ucp_gentype[UCD_CHARTYPE(ch)]
#define UCD_OTHERCASE(ch)   (ch + GET_UCD(ch)->other_case)

Typedefs

typedef unsigned char uschar
typedef int BOOL
typedef struct real_pcre real_pcre
typedef struct pcre_study_data pcre_study_data
typedef struct open_capitem open_capitem
typedef struct compile_data compile_data
typedef struct branch_chain branch_chain
typedef struct recursion_info recursion_info
typedef struct eptrblock eptrblock
typedef struct match_data match_data
typedef struct dfa_match_data dfa_match_data

Enumerations

enum  {
  ESC_A = 1, ESC_G, ESC_K, ESC_B,
  ESC_b, ESC_D, ESC_d, ESC_S,
  ESC_s, ESC_W, ESC_w, ESC_N,
  ESC_dum, ESC_C, ESC_P, ESC_p,
  ESC_R, ESC_H, ESC_h, ESC_V,
  ESC_v, ESC_X, ESC_Z, ESC_z,
  ESC_E, ESC_Q, ESC_g, ESC_k,
  ESC_DU, ESC_du, ESC_SU, ESC_su,
  ESC_WU, ESC_wu, ESC_REF
}
enum  {
  OP_END, OP_SOD, OP_SOM, OP_SET_SOM,
  OP_NOT_WORD_BOUNDARY, OP_WORD_BOUNDARY, OP_NOT_DIGIT, OP_DIGIT,
  OP_NOT_WHITESPACE, OP_WHITESPACE, OP_NOT_WORDCHAR, OP_WORDCHAR,
  OP_ANY, OP_ALLANY, OP_ANYBYTE, OP_NOTPROP,
  OP_PROP, OP_ANYNL, OP_NOT_HSPACE, OP_HSPACE,
  OP_NOT_VSPACE, OP_VSPACE, OP_EXTUNI, OP_EODN,
  OP_EOD, OP_OPT, OP_CIRC, OP_DOLL,
  OP_CHAR, OP_CHARNC, OP_NOT, OP_STAR,
  OP_MINSTAR, OP_PLUS, OP_MINPLUS, OP_QUERY,
  OP_MINQUERY, OP_UPTO, OP_MINUPTO, OP_EXACT,
  OP_POSSTAR, OP_POSPLUS, OP_POSQUERY, OP_POSUPTO,
  OP_NOTSTAR, OP_NOTMINSTAR, OP_NOTPLUS, OP_NOTMINPLUS,
  OP_NOTQUERY, OP_NOTMINQUERY, OP_NOTUPTO, OP_NOTMINUPTO,
  OP_NOTEXACT, OP_NOTPOSSTAR, OP_NOTPOSPLUS, OP_NOTPOSQUERY,
  OP_NOTPOSUPTO, OP_TYPESTAR, OP_TYPEMINSTAR, OP_TYPEPLUS,
  OP_TYPEMINPLUS, OP_TYPEQUERY, OP_TYPEMINQUERY, OP_TYPEUPTO,
  OP_TYPEMINUPTO, OP_TYPEEXACT, OP_TYPEPOSSTAR, OP_TYPEPOSPLUS,
  OP_TYPEPOSQUERY, OP_TYPEPOSUPTO, OP_CRSTAR, OP_CRMINSTAR,
  OP_CRPLUS, OP_CRMINPLUS, OP_CRQUERY, OP_CRMINQUERY,
  OP_CRRANGE, OP_CRMINRANGE, OP_CLASS, OP_NCLASS,
  OP_XCLASS, OP_REF, OP_RECURSE, OP_CALLOUT,
  OP_ALT, OP_KET, OP_KETRMAX, OP_KETRMIN,
  OP_ASSERT, OP_ASSERT_NOT, OP_ASSERTBACK, OP_ASSERTBACK_NOT,
  OP_REVERSE, OP_ONCE, OP_BRA, OP_CBRA,
  OP_COND, OP_SBRA, OP_SCBRA, OP_SCOND,
  OP_CREF, OP_NCREF, OP_RREF, OP_NRREF,
  OP_DEF, OP_BRAZERO, OP_BRAMINZERO, OP_MARK,
  OP_PRUNE, OP_PRUNE_ARG, OP_SKIP, OP_SKIP_ARG,
  OP_THEN, OP_THEN_ARG, OP_COMMIT, OP_FAIL,
  OP_ACCEPT, OP_CLOSE, OP_SKIPZERO, OP_TABLE_LENGTH
}
enum  {
  ERR0, ERR1, ERR2, ERR3,
  ERR4, ERR5, ERR6, ERR7,
  ERR8, ERR9, ERR10, ERR11,
  ERR12, ERR13, ERR14, ERR15,
  ERR16, ERR17, ERR18, ERR19,
  ERR20, ERR21, ERR22, ERR23,
  ERR24, ERR25, ERR26, ERR27,
  ERR28, ERR29, ERR30, ERR31,
  ERR32, ERR33, ERR34, ERR35,
  ERR36, ERR37, ERR38, ERR39,
  ERR40, ERR41, ERR42, ERR43,
  ERR44, ERR45, ERR46, ERR47,
  ERR48, ERR49, ERR50, ERR51,
  ERR52, ERR53, ERR54, ERR55,
  ERR56, ERR57, ERR58, ERR59,
  ERR60, ERR61, ERR62, ERR63,
  ERR64, ERR65, ERR66, ERR67,
  ERR68, ERRCOUNT
}

Functions

static void * pcre_memmove (void *d, const void *s, size_t n)
const uschar_pcre_find_bracket (const uschar *, BOOL, int)
BOOL _pcre_is_newline (USPTR, int, USPTR, int *, BOOL)
int _pcre_ord2utf8 (int, uschar *)
real_pcre_pcre_try_flipped (const real_pcre *, real_pcre *, const pcre_study_data *, pcre_study_data *)
int _pcre_valid_utf8 (USPTR, int)
BOOL _pcre_was_newline (USPTR, int, USPTR, int *, BOOL)
BOOL _pcre_xclass (int, const uschar *)

Variables

const int _pcre_utf8_table1 []
const int _pcre_utf8_table2 []
const int _pcre_utf8_table3 []
const uschar _pcre_utf8_table4 []
const int _pcre_utf8_table1_size
const char _pcre_utt_names []
const ucp_type_table _pcre_utt []
const int _pcre_utt_size
const uschar _pcre_default_tables []
const uschar _pcre_OP_lengths []
const ucd_record _pcre_ucd_records []
const uschar _pcre_ucd_stage1 []
const pcre_uint16 _pcre_ucd_stage2 []
const int _pcre_ucp_gentype []

Class Documentation

struct real_pcre

Definition at line 1596 of file pcre_internal.h.

Class Members
pcre_uint16 dummy1
pcre_uint16 first_byte
pcre_uint16 flags
pcre_uint32 magic_number
pcre_uint16 name_count
pcre_uint16 name_entry_size
pcre_uint16 name_table_offset
const unsigned char * nullpad
pcre_uint32 options
pcre_uint16 ref_count
pcre_uint16 req_byte
pcre_uint32 size
const unsigned char * tables
pcre_uint16 top_backref
pcre_uint16 top_bracket
struct pcre_study_data

Definition at line 1618 of file pcre_internal.h.

Class Members
pcre_uint32 flags
pcre_uint32 minlength
pcre_uint32 size
uschar start_bits
struct open_capitem

Definition at line 1630 of file pcre_internal.h.

Collaboration diagram for open_capitem:
Class Members
pcre_uint16 flag
struct open_capitem * next
pcre_uint16 number
struct compile_data

Definition at line 1639 of file pcre_internal.h.

Collaboration diagram for compile_data:
Class Members
unsigned int backref_map
int bracount
const uschar * cbits
BOOL check_lookbehind
const uschar * ctypes
const uschar * end_pattern
int external_flags
int external_options
const uschar * fcc
int final_bracount
BOOL had_accept
uschar * hwm
const uschar * lcc
int name_entry_size
uschar * name_table
int names_found
uschar nl
int nllen
int nltype
open_capitem * open_caps
int req_varyopt
const uschar * start_code
const uschar * start_pattern
const uschar * start_workspace
int top_backref
struct branch_chain

Definition at line 1670 of file pcre_internal.h.

Collaboration diagram for branch_chain:
Class Members
uschar * current_branch
struct branch_chain * outer
struct recursion_info

Definition at line 1678 of file pcre_internal.h.

Collaboration diagram for recursion_info:
Class Members
const uschar * after_call
int group_num
int * offset_save
struct recursion_info * prevrec
int save_offset_top
int saved_max
struct eptrblock

Definition at line 1691 of file pcre_internal.h.

Collaboration diagram for eptrblock:
Class Members
struct eptrblock * epb_prev
USPTR epb_saved_eptr
struct match_data

Definition at line 1700 of file pcre_internal.h.

Collaboration diagram for match_data:
Class Members
BOOL bsr_anycrlf
void * callout_data
int capture_last
const uschar * ctypes
USPTR end_match_ptr
int end_offset_top
USPTR end_subject
BOOL endonly
eptrblock * eptrchain
int eptrn
BOOL hitend
BOOL jscript_compat
const uschar * lcc
const uschar * mark
unsigned long int match_call_count
unsigned long int match_limit
unsigned long int match_limit_recursion
int name_count
int name_entry_size
uschar * name_table
uschar nl
int nllen
int nltype
BOOL notbol
BOOL notempty
BOOL notempty_atstart
BOOL noteol
int offset_end
int offset_max
BOOL offset_overflow
int * offset_vector
int partial
recursion_info * recursive
const uschar * start_code
USPTR start_match_ptr
int start_offset
USPTR start_subject
USPTR start_used_ptr
BOOL use_ucp
BOOL utf8
struct dfa_match_data

Definition at line 1746 of file pcre_internal.h.

Class Members
void * callout_data
const uschar * end_subject
int moptions
uschar nl
int nllen
int nltype
int poptions
const uschar * start_code
int start_offset
const uschar * start_subject
const uschar * start_used_ptr
const uschar * tables
struct ucp_type_table

Definition at line 1799 of file pcre_internal.h.

Class Members
pcre_uint16 name_offset
pcre_uint16 type
pcre_uint16 value
struct ucd_record

Definition at line 1843 of file pcre_internal.h.

Class Members
uschar chartype
pcre_int32 other_case
uschar script

Define Documentation

#define cbit_cntrl   288 /* [:cntrl:] */

Definition at line 1782 of file pcre_internal.h.

#define cbit_digit   64 /* [:digit:] or \d */

Definition at line 1775 of file pcre_internal.h.

#define cbit_graph   192 /* [:graph:] */

Definition at line 1779 of file pcre_internal.h.

#define cbit_length   320 /* Length of the cbits table */

Definition at line 1783 of file pcre_internal.h.

#define cbit_lower   128 /* [:lower:] */

Definition at line 1777 of file pcre_internal.h.

#define cbit_print   224 /* [:print:] */

Definition at line 1780 of file pcre_internal.h.

#define cbit_punct   256 /* [:punct:] */

Definition at line 1781 of file pcre_internal.h.

#define cbit_space   0 /* [:space:] or \s */

Definition at line 1773 of file pcre_internal.h.

#define cbit_upper   96 /* [:upper:] */

Definition at line 1776 of file pcre_internal.h.

#define cbit_word   160 /* [:word:] or \w */

Definition at line 1778 of file pcre_internal.h.

#define cbit_xdigit   32 /* [:xdigit:] */

Definition at line 1774 of file pcre_internal.h.

#define cbits_offset   512

Definition at line 1790 of file pcre_internal.h.

#define CHAR_0   '0'

Definition at line 720 of file pcre_internal.h.

#define CHAR_1   '1'

Definition at line 721 of file pcre_internal.h.

#define CHAR_2   '2'

Definition at line 722 of file pcre_internal.h.

#define CHAR_3   '3'

Definition at line 723 of file pcre_internal.h.

#define CHAR_4   '4'

Definition at line 724 of file pcre_internal.h.

#define CHAR_5   '5'

Definition at line 725 of file pcre_internal.h.

#define CHAR_6   '6'

Definition at line 726 of file pcre_internal.h.

#define CHAR_7   '7'

Definition at line 727 of file pcre_internal.h.

#define CHAR_8   '8'

Definition at line 728 of file pcre_internal.h.

#define CHAR_9   '9'

Definition at line 729 of file pcre_internal.h.

#define CHAR_A   'A'

Definition at line 737 of file pcre_internal.h.

#define CHAR_a   'a'

Definition at line 769 of file pcre_internal.h.

#define CHAR_AMPERSAND   '&'

Definition at line 710 of file pcre_internal.h.

#define CHAR_APOSTROPHE   '\''

Definition at line 711 of file pcre_internal.h.

#define CHAR_ASTERISK   '*'

Definition at line 714 of file pcre_internal.h.

#define CHAR_B   'B'

Definition at line 738 of file pcre_internal.h.

#define CHAR_b   'b'

Definition at line 770 of file pcre_internal.h.

#define CHAR_BACKSLASH   '\\'

Definition at line 764 of file pcre_internal.h.

#define CHAR_BEL   '\a'

Definition at line 695 of file pcre_internal.h.

#define CHAR_BS   '\b'

Definition at line 694 of file pcre_internal.h.

#define CHAR_C   'C'

Definition at line 739 of file pcre_internal.h.

#define CHAR_c   'c'

Definition at line 771 of file pcre_internal.h.

#define CHAR_CIRCUMFLEX_ACCENT   '^'

Definition at line 766 of file pcre_internal.h.

#define CHAR_COLON   ':'

Definition at line 730 of file pcre_internal.h.

#define CHAR_COMMA   ','

Definition at line 716 of file pcre_internal.h.

#define CHAR_COMMERCIAL_AT   '@'

Definition at line 736 of file pcre_internal.h.

#define CHAR_CR   '\r'

Definition at line 692 of file pcre_internal.h.

#define CHAR_D   'D'

Definition at line 740 of file pcre_internal.h.

#define CHAR_d   'd'

Definition at line 772 of file pcre_internal.h.

#define CHAR_DEL   '\177'

Definition at line 701 of file pcre_internal.h.

#define CHAR_DOLLAR_SIGN   '$'

Definition at line 708 of file pcre_internal.h.

#define CHAR_DOT   '.'

Definition at line 718 of file pcre_internal.h.

#define CHAR_E   'E'

Definition at line 741 of file pcre_internal.h.

#define CHAR_e   'e'

Definition at line 773 of file pcre_internal.h.

#define CHAR_EQUALS_SIGN   '='

Definition at line 733 of file pcre_internal.h.

#define CHAR_ESC   '\033'

Definition at line 700 of file pcre_internal.h.

#define CHAR_EXCLAMATION_MARK   '!'

Definition at line 705 of file pcre_internal.h.

#define CHAR_F   'F'

Definition at line 742 of file pcre_internal.h.

#define CHAR_f   'f'

Definition at line 774 of file pcre_internal.h.

#define CHAR_FF   '\f'

Definition at line 691 of file pcre_internal.h.

#define CHAR_G   'G'

Definition at line 743 of file pcre_internal.h.

#define CHAR_g   'g'

Definition at line 775 of file pcre_internal.h.

#define CHAR_GRAVE_ACCENT   '`'

Definition at line 768 of file pcre_internal.h.

#define CHAR_GREATER_THAN_SIGN   '>'

Definition at line 734 of file pcre_internal.h.

#define CHAR_H   'H'

Definition at line 744 of file pcre_internal.h.

#define CHAR_h   'h'

Definition at line 776 of file pcre_internal.h.

#define CHAR_HT   '\t'

Definition at line 689 of file pcre_internal.h.

#define CHAR_I   'I'

Definition at line 745 of file pcre_internal.h.

#define CHAR_i   'i'

Definition at line 777 of file pcre_internal.h.

#define CHAR_J   'J'

Definition at line 746 of file pcre_internal.h.

#define CHAR_j   'j'

Definition at line 778 of file pcre_internal.h.

#define CHAR_K   'K'

Definition at line 747 of file pcre_internal.h.

#define CHAR_k   'k'

Definition at line 779 of file pcre_internal.h.

#define CHAR_L   'L'

Definition at line 748 of file pcre_internal.h.

#define CHAR_l   'l'

Definition at line 780 of file pcre_internal.h.

#define CHAR_LEFT_CURLY_BRACKET   '{'

Definition at line 795 of file pcre_internal.h.

#define CHAR_LEFT_PARENTHESIS   '('

Definition at line 712 of file pcre_internal.h.

#define CHAR_LEFT_SQUARE_BRACKET   '['

Definition at line 763 of file pcre_internal.h.

#define CHAR_LESS_THAN_SIGN   '<'

Definition at line 732 of file pcre_internal.h.

#define CHAR_M   'M'

Definition at line 749 of file pcre_internal.h.

#define CHAR_m   'm'

Definition at line 781 of file pcre_internal.h.

#define CHAR_MINUS   '-'

Definition at line 717 of file pcre_internal.h.

#define CHAR_N   'N'

Definition at line 750 of file pcre_internal.h.

#define CHAR_n   'n'

Definition at line 782 of file pcre_internal.h.

#define CHAR_NL   '\n'

Definition at line 693 of file pcre_internal.h.

#define CHAR_NUMBER_SIGN   '#'

Definition at line 707 of file pcre_internal.h.

#define CHAR_O   'O'

Definition at line 751 of file pcre_internal.h.

#define CHAR_o   'o'

Definition at line 783 of file pcre_internal.h.

#define CHAR_P   'P'

Definition at line 752 of file pcre_internal.h.

#define CHAR_p   'p'

Definition at line 784 of file pcre_internal.h.

#define CHAR_PERCENT_SIGN   '%'

Definition at line 709 of file pcre_internal.h.

#define CHAR_PLUS   '+'

Definition at line 715 of file pcre_internal.h.

#define CHAR_Q   'Q'

Definition at line 753 of file pcre_internal.h.

#define CHAR_q   'q'

Definition at line 785 of file pcre_internal.h.

#define CHAR_QUESTION_MARK   '?'

Definition at line 735 of file pcre_internal.h.

#define CHAR_QUOTATION_MARK   '"'

Definition at line 706 of file pcre_internal.h.

#define CHAR_R   'R'

Definition at line 754 of file pcre_internal.h.

#define CHAR_r   'r'

Definition at line 786 of file pcre_internal.h.

#define CHAR_RIGHT_CURLY_BRACKET   '}'

Definition at line 797 of file pcre_internal.h.

#define CHAR_RIGHT_PARENTHESIS   ')'

Definition at line 713 of file pcre_internal.h.

#define CHAR_RIGHT_SQUARE_BRACKET   ']'

Definition at line 765 of file pcre_internal.h.

#define CHAR_S   'S'

Definition at line 755 of file pcre_internal.h.

#define CHAR_s   's'

Definition at line 787 of file pcre_internal.h.

#define CHAR_SEMICOLON   ';'

Definition at line 731 of file pcre_internal.h.

#define CHAR_SLASH   '/'

Definition at line 719 of file pcre_internal.h.

#define CHAR_SPACE   ' '

Definition at line 704 of file pcre_internal.h.

#define CHAR_T   'T'

Definition at line 756 of file pcre_internal.h.

#define CHAR_t   't'

Definition at line 788 of file pcre_internal.h.

#define CHAR_TILDE   '~'

Definition at line 798 of file pcre_internal.h.

#define CHAR_U   'U'

Definition at line 757 of file pcre_internal.h.

#define CHAR_u   'u'

Definition at line 789 of file pcre_internal.h.

#define CHAR_UNDERSCORE   '_'

Definition at line 767 of file pcre_internal.h.

#define CHAR_V   'V'

Definition at line 758 of file pcre_internal.h.

#define CHAR_v   'v'

Definition at line 790 of file pcre_internal.h.

#define CHAR_VERTICAL_LINE   '|'

Definition at line 796 of file pcre_internal.h.

#define CHAR_VT   '\v'

Definition at line 690 of file pcre_internal.h.

#define CHAR_W   'W'

Definition at line 759 of file pcre_internal.h.

#define CHAR_w   'w'

Definition at line 791 of file pcre_internal.h.

#define CHAR_X   'X'

Definition at line 760 of file pcre_internal.h.

#define CHAR_x   'x'

Definition at line 792 of file pcre_internal.h.

#define CHAR_Y   'Y'

Definition at line 761 of file pcre_internal.h.

#define CHAR_y   'y'

Definition at line 793 of file pcre_internal.h.

#define CHAR_Z   'Z'

Definition at line 762 of file pcre_internal.h.

#define CHAR_z   'z'

Definition at line 794 of file pcre_internal.h.

#define ctype_digit   0x04

Definition at line 1765 of file pcre_internal.h.

#define ctype_letter   0x02

Definition at line 1764 of file pcre_internal.h.

#define ctype_meta   0x80 /* regexp meta char or zero (end pattern) */

Definition at line 1768 of file pcre_internal.h.

#define ctype_space   0x01

Definition at line 1763 of file pcre_internal.h.

#define ctype_word   0x10 /* alphanumeric or '_' */

Definition at line 1767 of file pcre_internal.h.

#define ctype_xdigit   0x08

Definition at line 1766 of file pcre_internal.h.

Definition at line 1791 of file pcre_internal.h.

#define DPRINTF (   p)    /* Nothing */

Definition at line 80 of file pcre_internal.h.

#define ESC_e   CHAR_ESC

Definition at line 1208 of file pcre_internal.h.

#define ESC_f   CHAR_FF

Definition at line 1212 of file pcre_internal.h.

#define ESC_n   CHAR_NL

Definition at line 1216 of file pcre_internal.h.

#define ESC_r   CHAR_CR

Definition at line 1220 of file pcre_internal.h.

#define ESC_tee   CHAR_HT

Definition at line 1227 of file pcre_internal.h.

#define FALSE   0

Definition at line 663 of file pcre_internal.h.

#define fcc_offset   256

Definition at line 1789 of file pcre_internal.h.

#define GET2 (   a,
  n 
)    (((a)[n] << 8) | (a)[(n)+1])

Definition at line 405 of file pcre_internal.h.

#define GET_UCD (   ch)
Value:

Definition at line 1858 of file pcre_internal.h.

#define GETCHAR (   c,
  eptr 
)    c = *eptr;

Definition at line 419 of file pcre_internal.h.

#define GETCHARINC (   c,
  eptr 
)    c = *eptr++;

Definition at line 421 of file pcre_internal.h.

#define GETCHARINCTEST (   c,
  eptr 
)    c = *eptr++;

Definition at line 422 of file pcre_internal.h.

#define GETCHARLEN (   c,
  eptr,
  len 
)    c = *eptr;

Definition at line 423 of file pcre_internal.h.

#define GETCHARTEST (   c,
  eptr 
)    c = *eptr;

Definition at line 420 of file pcre_internal.h.

#define INT64_OR_DOUBLE   double

Definition at line 206 of file pcre_internal.h.

#define IS_NEWLINE (   p)
Value:
((NLBLOCK->nltype != NLTYPE_FIXED)? \
    ((p) < NLBLOCK->PSEND && \
     _pcre_is_newline((p), NLBLOCK->nltype, NLBLOCK->PSEND, &(NLBLOCK->nllen),\
       utf8)) \
    : \
    ((p) <= NLBLOCK->PSEND - NLBLOCK->nllen && \
     (p)[0] == NLBLOCK->nl[0] && \
     (NLBLOCK->nllen == 1 || (p)[1] == NLBLOCK->nl[1]) \
    ) \
  )

Definition at line 236 of file pcre_internal.h.

#define lcc_offset   0

Definition at line 1788 of file pcre_internal.h.

#define MAGIC_NUMBER   0x50435245UL /* 'PCRE' */

Definition at line 638 of file pcre_internal.h.

#define memmove (   a,
  b,
 
)    pcre_memmove(a, b, c)

Definition at line 329 of file pcre_internal.h.

#define NLTYPE_ANY   1 /* Newline is any Unicode line ending */

Definition at line 231 of file pcre_internal.h.

#define NLTYPE_ANYCRLF   2 /* Newline is CR, LF, or CRLF */

Definition at line 232 of file pcre_internal.h.

#define NLTYPE_FIXED   0 /* Newline is a fixed length string */

Definition at line 230 of file pcre_internal.h.

#define NOTACHAR   0xffffffff

Definition at line 222 of file pcre_internal.h.

#define offsetof (   p_type,
  field 
)    ((size_t)&(((p_type *)0)->field))

Definition at line 583 of file pcre_internal.h.

#define OP_LENGTHS

Definition at line 1502 of file pcre_internal.h.

#define OP_NAME_LIST
Value:
"End", "\\A", "\\G", "\\K", "\\B", "\\b", "\\D", "\\d",         \
  "\\S", "\\s", "\\W", "\\w", "Any", "AllAny", "Anybyte",         \
  "notprop", "prop", "\\R", "\\H", "\\h", "\\V", "\\v",           \
  "extuni",  "\\Z", "\\z",                                        \
  "Opt", "^", "$", "char", "charnc", "not",                       \
  "*", "*?", "+", "+?", "?", "??", "{", "{", "{",                 \
  "*+","++", "?+", "{",                                           \
  "*", "*?", "+", "+?", "?", "??", "{", "{", "{",                 \
  "*+","++", "?+", "{",                                           \
  "*", "*?", "+", "+?", "?", "??", "{", "{", "{",                 \
  "*+","++", "?+", "{",                                           \
  "*", "*?", "+", "+?", "?", "??", "{", "{",                      \
  "class", "nclass", "xclass", "Ref", "Recurse", "Callout",       \
  "Alt", "Ket", "KetRmax", "KetRmin", "Assert", "Assert not",     \
  "AssertB", "AssertB not", "Reverse",                            \
  "Once", "Bra", "CBra", "Cond", "SBra", "SCBra", "SCond",        \
  "Cond ref", "Cond nref", "Cond rec", "Cond nrec", "Cond def",   \
  "Brazero", "Braminzero",                                        \
  "*MARK", "*PRUNE", "*PRUNE", "*SKIP", "*SKIP",                  \
  "*THEN", "*THEN", "*COMMIT", "*FAIL", "*ACCEPT",                \
  "Close", "Skip zero"

Definition at line 1469 of file pcre_internal.h.

Definition at line 158 of file pcre_internal.h.

Definition at line 142 of file pcre_internal.h.

#define PCRE_EXP_DECL   extern

Definition at line 136 of file pcre_internal.h.

Definition at line 139 of file pcre_internal.h.

#define PCRE_FIRSTSET   0x0002 /* first_byte is set */

Definition at line 598 of file pcre_internal.h.

#define PCRE_HASCRORLF   0x0020 /* explicit \r or \n in pattern */

Definition at line 602 of file pcre_internal.h.

Definition at line 589 of file pcre_internal.h.

#define PCRE_JCHANGED   0x0010 /* j option used in regex */

Definition at line 601 of file pcre_internal.h.

Value:

Definition at line 612 of file pcre_internal.h.

#define PCRE_NOPARTIAL   0x0001 /* can't use partial with this regex */

Definition at line 597 of file pcre_internal.h.

#define PCRE_REQCHSET   0x0004 /* req_byte is set */

Definition at line 599 of file pcre_internal.h.

#define PCRE_SPTR   const char *

Definition at line 275 of file pcre_internal.h.

#define PCRE_STARTLINE   0x0008 /* start after \n for multiline */

Definition at line 600 of file pcre_internal.h.

#define PCRE_STUDY_MAPPED   0x01 /* a map of starting chars exists */

Definition at line 606 of file pcre_internal.h.

#define PCRE_STUDY_MINLEN   0x02 /* a minimum length field exists */

Definition at line 607 of file pcre_internal.h.

#define PT_ALNUM   5 /* Alphanumeric - the union of L and N */

Definition at line 1237 of file pcre_internal.h.

#define PT_ANY   0 /* Any property - matches all chars */

Definition at line 1232 of file pcre_internal.h.

#define PT_GC   2 /* Specified general characteristic (e.g. L) */

Definition at line 1234 of file pcre_internal.h.

#define PT_LAMP   1 /* L& - the union of Lu, Ll, Lt */

Definition at line 1233 of file pcre_internal.h.

#define PT_PC   3 /* Specified particular characteristic (e.g. Lu) */

Definition at line 1235 of file pcre_internal.h.

#define PT_PXSPACE   7 /* POSIX space - Z plus 9,10,11,12,13 */

Definition at line 1239 of file pcre_internal.h.

#define PT_SC   4 /* Script (e.g. Han) */

Definition at line 1236 of file pcre_internal.h.

#define PT_SPACE   6 /* Perl space - Z plus 9,10,12,13 */

Definition at line 1238 of file pcre_internal.h.

#define PT_WORD   8 /* Word - L plus N plus underscore */

Definition at line 1240 of file pcre_internal.h.

#define PUBLIC_STUDY_OPTIONS   0 /* None defined */

Definition at line 633 of file pcre_internal.h.

#define PUT2 (   a,
  n,
  d 
)
Value:
a[n] = (d) >> 8; \
  a[(n)+1] = (d) & 255

Definition at line 401 of file pcre_internal.h.

#define PUT2INC (   a,
  n,
  d 
)    PUT2(a,n,d), a += 2

Definition at line 408 of file pcre_internal.h.

#define PUTINC (   a,
  n,
  d 
)    PUT(a,n,d), a += LINK_SIZE

Definition at line 394 of file pcre_internal.h.

#define REQ_BYTE_MAX   1000

Definition at line 648 of file pcre_internal.h.

#define REQ_CASELESS   0x0100 /* indicates caselessness */

Definition at line 653 of file pcre_internal.h.

#define REQ_NONE   (-1)

Definition at line 643 of file pcre_internal.h.

#define REQ_UNSET   (-2)

Definition at line 642 of file pcre_internal.h.

#define REQ_VARY   0x0200 /* reqbyte followed non-literal item */

Definition at line 654 of file pcre_internal.h.

#define RREF_ANY   0xffff

Definition at line 1564 of file pcre_internal.h.

#define STR_0   "0"

Definition at line 831 of file pcre_internal.h.

#define STR_1   "1"

Definition at line 832 of file pcre_internal.h.

#define STR_2   "2"

Definition at line 833 of file pcre_internal.h.

#define STR_3   "3"

Definition at line 834 of file pcre_internal.h.

#define STR_4   "4"

Definition at line 835 of file pcre_internal.h.

#define STR_5   "5"

Definition at line 836 of file pcre_internal.h.

#define STR_6   "6"

Definition at line 837 of file pcre_internal.h.

#define STR_7   "7"

Definition at line 838 of file pcre_internal.h.

#define STR_8   "8"

Definition at line 839 of file pcre_internal.h.

#define STR_9   "9"

Definition at line 840 of file pcre_internal.h.

#define STR_A   "A"

Definition at line 848 of file pcre_internal.h.

#define STR_a   "a"

Definition at line 880 of file pcre_internal.h.

#define STR_AMPERSAND   "&"

Definition at line 821 of file pcre_internal.h.

#define STR_APOSTROPHE   "'"

Definition at line 822 of file pcre_internal.h.

#define STR_ASTERISK   "*"

Definition at line 825 of file pcre_internal.h.

#define STR_B   "B"

Definition at line 849 of file pcre_internal.h.

#define STR_b   "b"

Definition at line 881 of file pcre_internal.h.

#define STR_BACKSLASH   "\\"

Definition at line 875 of file pcre_internal.h.

#define STR_BEL   "\a"

Definition at line 806 of file pcre_internal.h.

#define STR_BS   "\b"

Definition at line 805 of file pcre_internal.h.

#define STR_C   "C"

Definition at line 850 of file pcre_internal.h.

#define STR_c   "c"

Definition at line 882 of file pcre_internal.h.

#define STR_CIRCUMFLEX_ACCENT   "^"

Definition at line 877 of file pcre_internal.h.

#define STR_COLON   ":"

Definition at line 841 of file pcre_internal.h.

#define STR_COMMA   ","

Definition at line 827 of file pcre_internal.h.

#define STR_COMMERCIAL_AT   "@"

Definition at line 847 of file pcre_internal.h.

#define STR_CR   "\r"

Definition at line 803 of file pcre_internal.h.

#define STR_D   "D"

Definition at line 851 of file pcre_internal.h.

#define STR_d   "d"

Definition at line 883 of file pcre_internal.h.

#define STR_DEL   "\177"

Definition at line 812 of file pcre_internal.h.

#define STR_DOLLAR_SIGN   "$"

Definition at line 819 of file pcre_internal.h.

#define STR_DOT   "."

Definition at line 829 of file pcre_internal.h.

#define STR_E   "E"

Definition at line 852 of file pcre_internal.h.

#define STR_e   "e"

Definition at line 884 of file pcre_internal.h.

#define STR_EQUALS_SIGN   "="

Definition at line 844 of file pcre_internal.h.

#define STR_ESC   "\033"

Definition at line 811 of file pcre_internal.h.

#define STR_EXCLAMATION_MARK   "!"

Definition at line 816 of file pcre_internal.h.

#define STR_F   "F"

Definition at line 853 of file pcre_internal.h.

#define STR_f   "f"

Definition at line 885 of file pcre_internal.h.

#define STR_FF   "\f"

Definition at line 802 of file pcre_internal.h.

#define STR_G   "G"

Definition at line 854 of file pcre_internal.h.

#define STR_g   "g"

Definition at line 886 of file pcre_internal.h.

#define STR_GRAVE_ACCENT   "`"

Definition at line 879 of file pcre_internal.h.

#define STR_GREATER_THAN_SIGN   ">"

Definition at line 845 of file pcre_internal.h.

#define STR_H   "H"

Definition at line 855 of file pcre_internal.h.

#define STR_h   "h"

Definition at line 887 of file pcre_internal.h.

#define STR_HT   "\t"

Definition at line 800 of file pcre_internal.h.

#define STR_I   "I"

Definition at line 856 of file pcre_internal.h.

#define STR_i   "i"

Definition at line 888 of file pcre_internal.h.

#define STR_J   "J"

Definition at line 857 of file pcre_internal.h.

#define STR_j   "j"

Definition at line 889 of file pcre_internal.h.

#define STR_K   "K"

Definition at line 858 of file pcre_internal.h.

#define STR_k   "k"

Definition at line 890 of file pcre_internal.h.

#define STR_L   "L"

Definition at line 859 of file pcre_internal.h.

#define STR_l   "l"

Definition at line 891 of file pcre_internal.h.

#define STR_LEFT_CURLY_BRACKET   "{"

Definition at line 906 of file pcre_internal.h.

#define STR_LEFT_PARENTHESIS   "("

Definition at line 823 of file pcre_internal.h.

#define STR_LEFT_SQUARE_BRACKET   "["

Definition at line 874 of file pcre_internal.h.

#define STR_LESS_THAN_SIGN   "<"

Definition at line 843 of file pcre_internal.h.

#define STR_M   "M"

Definition at line 860 of file pcre_internal.h.

#define STR_m   "m"

Definition at line 892 of file pcre_internal.h.

#define STR_MINUS   "-"

Definition at line 828 of file pcre_internal.h.

#define STR_N   "N"

Definition at line 861 of file pcre_internal.h.

#define STR_n   "n"

Definition at line 893 of file pcre_internal.h.

#define STR_NL   "\n"

Definition at line 804 of file pcre_internal.h.

#define STR_NUMBER_SIGN   "#"

Definition at line 818 of file pcre_internal.h.

#define STR_O   "O"

Definition at line 862 of file pcre_internal.h.

#define STR_o   "o"

Definition at line 894 of file pcre_internal.h.

#define STR_P   "P"

Definition at line 863 of file pcre_internal.h.

#define STR_p   "p"

Definition at line 895 of file pcre_internal.h.

#define STR_PERCENT_SIGN   "%"

Definition at line 820 of file pcre_internal.h.

#define STR_PLUS   "+"

Definition at line 826 of file pcre_internal.h.

#define STR_Q   "Q"

Definition at line 864 of file pcre_internal.h.

#define STR_q   "q"

Definition at line 896 of file pcre_internal.h.

#define STR_QUESTION_MARK   "?"

Definition at line 846 of file pcre_internal.h.

#define STR_QUOTATION_MARK   "\""

Definition at line 817 of file pcre_internal.h.

#define STR_R   "R"

Definition at line 865 of file pcre_internal.h.

#define STR_r   "r"

Definition at line 897 of file pcre_internal.h.

#define STR_RIGHT_CURLY_BRACKET   "}"

Definition at line 908 of file pcre_internal.h.

#define STR_RIGHT_PARENTHESIS   ")"

Definition at line 824 of file pcre_internal.h.

#define STR_RIGHT_SQUARE_BRACKET   "]"

Definition at line 876 of file pcre_internal.h.

#define STR_S   "S"

Definition at line 866 of file pcre_internal.h.

#define STR_s   "s"

Definition at line 898 of file pcre_internal.h.

#define STR_SEMICOLON   ";"

Definition at line 842 of file pcre_internal.h.

#define STR_SLASH   "/"

Definition at line 830 of file pcre_internal.h.

#define STR_SPACE   " "

Definition at line 815 of file pcre_internal.h.

#define STR_T   "T"

Definition at line 867 of file pcre_internal.h.

#define STR_t   "t"

Definition at line 899 of file pcre_internal.h.

#define STR_TILDE   "~"

Definition at line 909 of file pcre_internal.h.

#define STR_U   "U"

Definition at line 868 of file pcre_internal.h.

#define STR_u   "u"

Definition at line 900 of file pcre_internal.h.

#define STR_UNDERSCORE   "_"

Definition at line 878 of file pcre_internal.h.

#define STR_V   "V"

Definition at line 869 of file pcre_internal.h.

#define STR_v   "v"

Definition at line 901 of file pcre_internal.h.

#define STR_VERTICAL_LINE   "|"

Definition at line 907 of file pcre_internal.h.

#define STR_VT   "\v"

Definition at line 801 of file pcre_internal.h.

#define STR_W   "W"

Definition at line 870 of file pcre_internal.h.

#define STR_w   "w"

Definition at line 902 of file pcre_internal.h.

#define STR_X   "X"

Definition at line 871 of file pcre_internal.h.

#define STR_x   "x"

Definition at line 903 of file pcre_internal.h.

#define STR_Y   "Y"

Definition at line 872 of file pcre_internal.h.

#define STR_y   "y"

Definition at line 904 of file pcre_internal.h.

#define STR_Z   "Z"

Definition at line 873 of file pcre_internal.h.

#define STR_z   "z"

Definition at line 905 of file pcre_internal.h.

#define STRING_ACCEPT0   "ACCEPT\0"

Definition at line 911 of file pcre_internal.h.

#define STRING_alnum0   "alnum\0"

Definition at line 923 of file pcre_internal.h.

#define STRING_alpha0   "alpha\0"

Definition at line 920 of file pcre_internal.h.

#define STRING_ANY_RIGHTPAR   "ANY)"

Definition at line 940 of file pcre_internal.h.

#define STRING_ANYCRLF_RIGHTPAR   "ANYCRLF)"

Definition at line 941 of file pcre_internal.h.

#define STRING_ascii0   "ascii\0"

Definition at line 924 of file pcre_internal.h.

#define STRING_blank0   "blank\0"

Definition at line 925 of file pcre_internal.h.

#define STRING_BSR_ANYCRLF_RIGHTPAR   "BSR_ANYCRLF)"

Definition at line 942 of file pcre_internal.h.

#define STRING_BSR_UNICODE_RIGHTPAR   "BSR_UNICODE)"

Definition at line 943 of file pcre_internal.h.

#define STRING_cntrl0   "cntrl\0"

Definition at line 926 of file pcre_internal.h.

#define STRING_COMMIT0   "COMMIT\0"

Definition at line 912 of file pcre_internal.h.

#define STRING_CR_RIGHTPAR   "CR)"

Definition at line 937 of file pcre_internal.h.

#define STRING_CRLF_RIGHTPAR   "CRLF)"

Definition at line 939 of file pcre_internal.h.

#define STRING_DEFINE   "DEFINE"

Definition at line 935 of file pcre_internal.h.

#define STRING_digit0   "digit\0"

Definition at line 927 of file pcre_internal.h.

#define STRING_F0   "F\0"

Definition at line 913 of file pcre_internal.h.

#define STRING_FAIL0   "FAIL\0"

Definition at line 914 of file pcre_internal.h.

#define STRING_graph0   "graph\0"

Definition at line 928 of file pcre_internal.h.

#define STRING_LF_RIGHTPAR   "LF)"

Definition at line 938 of file pcre_internal.h.

#define STRING_lower0   "lower\0"

Definition at line 921 of file pcre_internal.h.

#define STRING_MARK0   "MARK\0"

Definition at line 915 of file pcre_internal.h.

#define STRING_NO_START_OPT_RIGHTPAR   "NO_START_OPT)"

Definition at line 946 of file pcre_internal.h.

#define STRING_print0   "print\0"

Definition at line 929 of file pcre_internal.h.

#define STRING_PRUNE0   "PRUNE\0"

Definition at line 916 of file pcre_internal.h.

#define STRING_punct0   "punct\0"

Definition at line 930 of file pcre_internal.h.

#define STRING_SKIP0   "SKIP\0"

Definition at line 917 of file pcre_internal.h.

#define STRING_space0   "space\0"

Definition at line 931 of file pcre_internal.h.

#define STRING_THEN   "THEN"

Definition at line 918 of file pcre_internal.h.

#define STRING_UCP_RIGHTPAR   "UCP)"

Definition at line 945 of file pcre_internal.h.

#define STRING_upper0   "upper\0"

Definition at line 922 of file pcre_internal.h.

#define STRING_UTF8_RIGHTPAR   "UTF8)"

Definition at line 944 of file pcre_internal.h.

#define STRING_word0   "word\0"

Definition at line 932 of file pcre_internal.h.

#define STRING_xdigit   "xdigit"

Definition at line 933 of file pcre_internal.h.

#define tables_length   (ctypes_offset + 256)

Definition at line 1792 of file pcre_internal.h.

#define TRUE   1

Definition at line 664 of file pcre_internal.h.

#define UCD_BLOCK_SIZE   128

Definition at line 1857 of file pcre_internal.h.

#define UCD_CATEGORY (   ch)    _pcre_ucp_gentype[UCD_CHARTYPE(ch)]

Definition at line 1864 of file pcre_internal.h.

#define UCD_CHARTYPE (   ch)    GET_UCD(ch)->chartype

Definition at line 1862 of file pcre_internal.h.

#define UCD_OTHERCASE (   ch)    (ch + GET_UCD(ch)->other_case)

Definition at line 1865 of file pcre_internal.h.

#define UCD_SCRIPT (   ch)    GET_UCD(ch)->script

Definition at line 1863 of file pcre_internal.h.

#define USPTR   const unsigned char *

Definition at line 276 of file pcre_internal.h.

#define WAS_NEWLINE (   p)
Value:
((NLBLOCK->nltype != NLTYPE_FIXED)? \
    ((p) > NLBLOCK->PSSTART && \
     _pcre_was_newline((p), NLBLOCK->nltype, NLBLOCK->PSSTART, \
       &(NLBLOCK->nllen), utf8)) \
    : \
    ((p) >= NLBLOCK->PSSTART + NLBLOCK->nllen && \
     (p)[-NLBLOCK->nllen] == NLBLOCK->nl[0] && \
     (NLBLOCK->nllen == 1 || (p)[-NLBLOCK->nllen+1] == NLBLOCK->nl[1]) \
    ) \
  )

Definition at line 250 of file pcre_internal.h.

#define XCL_END   0 /* Marks end of individual items */

Definition at line 1248 of file pcre_internal.h.

#define XCL_MAP   0x02 /* Flag: a 32-byte map is present */

Definition at line 1246 of file pcre_internal.h.

#define XCL_NOT   0x01 /* Flag: this is a negative class */

Definition at line 1245 of file pcre_internal.h.

#define XCL_NOTPROP   4 /* Unicode inverted property (ditto) */

Definition at line 1252 of file pcre_internal.h.

#define XCL_PROP   3 /* Unicode property (2-byte property code follows) */

Definition at line 1251 of file pcre_internal.h.

#define XCL_RANGE   2 /* A range (two multibyte chars) follows */

Definition at line 1250 of file pcre_internal.h.

#define XCL_SINGLE   1 /* Single item (one multibyte char) follows */

Definition at line 1249 of file pcre_internal.h.


Typedef Documentation

typedef int BOOL

Definition at line 660 of file pcre_internal.h.

typedef struct branch_chain branch_chain
typedef struct compile_data compile_data
typedef struct eptrblock eptrblock
typedef struct match_data match_data
typedef struct open_capitem open_capitem
typedef struct real_pcre real_pcre
typedef unsigned char uschar

Definition at line 216 of file pcre_internal.h.


Enumeration Type Documentation

anonymous enum
Enumerator:
ESC_A 
ESC_G 
ESC_K 
ESC_B 
ESC_b 
ESC_D 
ESC_d 
ESC_S 
ESC_s 
ESC_W 
ESC_w 
ESC_N 
ESC_dum 
ESC_C 
ESC_P 
ESC_p 
ESC_R 
ESC_H 
ESC_h 
ESC_V 
ESC_v 
ESC_X 
ESC_Z 
ESC_z 
ESC_E 
ESC_Q 
ESC_g 
ESC_k 
ESC_DU 
ESC_du 
ESC_SU 
ESC_su 
ESC_WU 
ESC_wu 
ESC_REF 

Definition at line 1274 of file pcre_internal.h.

anonymous enum
Enumerator:
OP_END 
OP_SOD 
OP_SOM 
OP_SET_SOM 
OP_NOT_WORD_BOUNDARY 
OP_WORD_BOUNDARY 
OP_NOT_DIGIT 
OP_DIGIT 
OP_NOT_WHITESPACE 
OP_WHITESPACE 
OP_NOT_WORDCHAR 
OP_WORDCHAR 
OP_ANY 
OP_ALLANY 
OP_ANYBYTE 
OP_NOTPROP 
OP_PROP 
OP_ANYNL 
OP_NOT_HSPACE 
OP_HSPACE 
OP_NOT_VSPACE 
OP_VSPACE 
OP_EXTUNI 
OP_EODN 
OP_EOD 
OP_OPT 
OP_CIRC 
OP_DOLL 
OP_CHAR 
OP_CHARNC 
OP_NOT 
OP_STAR 
OP_MINSTAR 
OP_PLUS 
OP_MINPLUS 
OP_QUERY 
OP_MINQUERY 
OP_UPTO 
OP_MINUPTO 
OP_EXACT 
OP_POSSTAR 
OP_POSPLUS 
OP_POSQUERY 
OP_POSUPTO 
OP_NOTSTAR 
OP_NOTMINSTAR 
OP_NOTPLUS 
OP_NOTMINPLUS 
OP_NOTQUERY 
OP_NOTMINQUERY 
OP_NOTUPTO 
OP_NOTMINUPTO 
OP_NOTEXACT 
OP_NOTPOSSTAR 
OP_NOTPOSPLUS 
OP_NOTPOSQUERY 
OP_NOTPOSUPTO 
OP_TYPESTAR 
OP_TYPEMINSTAR 
OP_TYPEPLUS 
OP_TYPEMINPLUS 
OP_TYPEQUERY 
OP_TYPEMINQUERY 
OP_TYPEUPTO 
OP_TYPEMINUPTO 
OP_TYPEEXACT 
OP_TYPEPOSSTAR 
OP_TYPEPOSPLUS 
OP_TYPEPOSQUERY 
OP_TYPEPOSUPTO 
OP_CRSTAR 
OP_CRMINSTAR 
OP_CRPLUS 
OP_CRMINPLUS 
OP_CRQUERY 
OP_CRMINQUERY 
OP_CRRANGE 
OP_CRMINRANGE 
OP_CLASS 
OP_NCLASS 
OP_XCLASS 
OP_REF 
OP_RECURSE 
OP_CALLOUT 
OP_ALT 
OP_KET 
OP_KETRMAX 
OP_KETRMIN 
OP_ASSERT 
OP_ASSERT_NOT 
OP_ASSERTBACK 
OP_ASSERTBACK_NOT 
OP_REVERSE 
OP_ONCE 
OP_BRA 
OP_CBRA 
OP_COND 
OP_SBRA 
OP_SCBRA 
OP_SCOND 
OP_CREF 
OP_NCREF 
OP_RREF 
OP_NRREF 
OP_DEF 
OP_BRAZERO 
OP_BRAMINZERO 
OP_MARK 
OP_PRUNE 
OP_PRUNE_ARG 
OP_SKIP 
OP_SKIP_ARG 
OP_THEN 
OP_THEN_ARG 
OP_COMMIT 
OP_FAIL 
OP_ACCEPT 
OP_CLOSE 
OP_SKIPZERO 
OP_TABLE_LENGTH 

Definition at line 1288 of file pcre_internal.h.

     {
  OP_END,            /* 0 End of pattern */

  /* Values corresponding to backslashed metacharacters */

  OP_SOD,            /* 1 Start of data: \A */
  OP_SOM,            /* 2 Start of match (subject + offset): \G */
  OP_SET_SOM,        /* 3 Set start of match (\K) */
  OP_NOT_WORD_BOUNDARY,  /*  4 \B */
  OP_WORD_BOUNDARY,      /*  5 \b */
  OP_NOT_DIGIT,          /*  6 \D */
  OP_DIGIT,              /*  7 \d */
  OP_NOT_WHITESPACE,     /*  8 \S */
  OP_WHITESPACE,         /*  9 \s */
  OP_NOT_WORDCHAR,       /* 10 \W */
  OP_WORDCHAR,           /* 11 \w */
  OP_ANY,            /* 12 Match any character except newline */
  OP_ALLANY,         /* 13 Match any character */
  OP_ANYBYTE,        /* 14 Match any byte (\C); different to OP_ANY for UTF-8 */
  OP_NOTPROP,        /* 15 \P (not Unicode property) */
  OP_PROP,           /* 16 \p (Unicode property) */
  OP_ANYNL,          /* 17 \R (any newline sequence) */
  OP_NOT_HSPACE,     /* 18 \H (not horizontal whitespace) */
  OP_HSPACE,         /* 19 \h (horizontal whitespace) */
  OP_NOT_VSPACE,     /* 20 \V (not vertical whitespace) */
  OP_VSPACE,         /* 21 \v (vertical whitespace) */
  OP_EXTUNI,         /* 22 \X (extended Unicode sequence */
  OP_EODN,           /* 23 End of data or \n at end of data: \Z. */
  OP_EOD,            /* 24 End of data: \z */

  OP_OPT,            /* 25 Set runtime options */
  OP_CIRC,           /* 26 Start of line - varies with multiline switch */
  OP_DOLL,           /* 27 End of line - varies with multiline switch */
  OP_CHAR,           /* 28 Match one character, casefully */
  OP_CHARNC,         /* 29 Match one character, caselessly */
  OP_NOT,            /* 30 Match one character, not the following one */

  OP_STAR,           /* 31 The maximizing and minimizing versions of */
  OP_MINSTAR,        /* 32 these six opcodes must come in pairs, with */
  OP_PLUS,           /* 33 the minimizing one second. */
  OP_MINPLUS,        /* 34 This first set applies to single characters.*/
  OP_QUERY,          /* 35 */
  OP_MINQUERY,       /* 36 */

  OP_UPTO,           /* 37 From 0 to n matches */
  OP_MINUPTO,        /* 38 */
  OP_EXACT,          /* 39 Exactly n matches */

  OP_POSSTAR,        /* 40 Possessified star */
  OP_POSPLUS,        /* 41 Possessified plus */
  OP_POSQUERY,       /* 42 Posesssified query */
  OP_POSUPTO,        /* 43 Possessified upto */

  OP_NOTSTAR,        /* 44 The maximizing and minimizing versions of */
  OP_NOTMINSTAR,     /* 45 these six opcodes must come in pairs, with */
  OP_NOTPLUS,        /* 46 the minimizing one second. They must be in */
  OP_NOTMINPLUS,     /* 47 exactly the same order as those above. */
  OP_NOTQUERY,       /* 48 This set applies to "not" single characters. */
  OP_NOTMINQUERY,    /* 49 */

  OP_NOTUPTO,        /* 50 From 0 to n matches */
  OP_NOTMINUPTO,     /* 51 */
  OP_NOTEXACT,       /* 52 Exactly n matches */

  OP_NOTPOSSTAR,     /* 53 Possessified versions */
  OP_NOTPOSPLUS,     /* 54 */
  OP_NOTPOSQUERY,    /* 55 */
  OP_NOTPOSUPTO,     /* 56 */

  OP_TYPESTAR,       /* 57 The maximizing and minimizing versions of */
  OP_TYPEMINSTAR,    /* 58 these six opcodes must come in pairs, with */
  OP_TYPEPLUS,       /* 59 the minimizing one second. These codes must */
  OP_TYPEMINPLUS,    /* 60 be in exactly the same order as those above. */
  OP_TYPEQUERY,      /* 61 This set applies to character types such as \d */
  OP_TYPEMINQUERY,   /* 62 */

  OP_TYPEUPTO,       /* 63 From 0 to n matches */
  OP_TYPEMINUPTO,    /* 64 */
  OP_TYPEEXACT,      /* 65 Exactly n matches */

  OP_TYPEPOSSTAR,    /* 66 Possessified versions */
  OP_TYPEPOSPLUS,    /* 67 */
  OP_TYPEPOSQUERY,   /* 68 */
  OP_TYPEPOSUPTO,    /* 69 */

  OP_CRSTAR,         /* 70 The maximizing and minimizing versions of */
  OP_CRMINSTAR,      /* 71 all these opcodes must come in pairs, with */
  OP_CRPLUS,         /* 72 the minimizing one second. These codes must */
  OP_CRMINPLUS,      /* 73 be in exactly the same order as those above. */
  OP_CRQUERY,        /* 74 These are for character classes and back refs */
  OP_CRMINQUERY,     /* 75 */
  OP_CRRANGE,        /* 76 These are different to the three sets above. */
  OP_CRMINRANGE,     /* 77 */

  OP_CLASS,          /* 78 Match a character class, chars < 256 only */
  OP_NCLASS,         /* 79 Same, but the bitmap was created from a negative
                           class - the difference is relevant only when a UTF-8
                           character > 255 is encountered. */

  OP_XCLASS,         /* 80 Extended class for handling UTF-8 chars within the
                           class. This does both positive and negative. */

  OP_REF,            /* 81 Match a back reference */
  OP_RECURSE,        /* 82 Match a numbered subpattern (possibly recursive) */
  OP_CALLOUT,        /* 83 Call out to external function if provided */

  OP_ALT,            /* 84 Start of alternation */
  OP_KET,            /* 85 End of group that doesn't have an unbounded repeat */
  OP_KETRMAX,        /* 86 These two must remain together and in this */
  OP_KETRMIN,        /* 87 order. They are for groups the repeat for ever. */

  /* The assertions must come before BRA, CBRA, ONCE, and COND.*/

  OP_ASSERT,         /* 88 Positive lookahead */
  OP_ASSERT_NOT,     /* 89 Negative lookahead */
  OP_ASSERTBACK,     /* 90 Positive lookbehind */
  OP_ASSERTBACK_NOT, /* 91 Negative lookbehind */
  OP_REVERSE,        /* 92 Move pointer back - used in lookbehind assertions */

  /* ONCE, BRA, CBRA, and COND must come after the assertions, with ONCE first,
  as there's a test for >= ONCE for a subpattern that isn't an assertion. */

  OP_ONCE,           /* 93 Atomic group */
  OP_BRA,            /* 94 Start of non-capturing bracket */
  OP_CBRA,           /* 95 Start of capturing bracket */
  OP_COND,           /* 96 Conditional group */

  /* These three must follow the previous three, in the same order. There's a
  check for >= SBRA to distinguish the two sets. */

  OP_SBRA,           /* 97 Start of non-capturing bracket, check empty  */
  OP_SCBRA,          /* 98 Start of capturing bracket, check empty */
  OP_SCOND,          /* 99 Conditional group, check empty */

  /* The next two pairs must (respectively) be kept together. */

  OP_CREF,           /* 100 Used to hold a capture number as condition */
  OP_NCREF,          /* 101 Same, but generaged by a name reference*/
  OP_RREF,           /* 102 Used to hold a recursion number as condition */
  OP_NRREF,          /* 103 Same, but generaged by a name reference*/
  OP_DEF,            /* 104 The DEFINE condition */

  OP_BRAZERO,        /* 105 These two must remain together and in this */
  OP_BRAMINZERO,     /* 106 order. */

  /* These are backtracking control verbs */

  OP_MARK,           /* 107 always has an argument */
  OP_PRUNE,          /* 108 */
  OP_PRUNE_ARG,      /* 109 same, but with argument */
  OP_SKIP,           /* 110 */
  OP_SKIP_ARG,       /* 111 same, but with argument */
  OP_THEN,           /* 112 */
  OP_THEN_ARG,       /* 113 same, but with argument */
  OP_COMMIT,         /* 114 */

  /* These are forced failure and success verbs */

  OP_FAIL,           /* 115 */
  OP_ACCEPT,         /* 116 */
  OP_CLOSE,          /* 117 Used before OP_ACCEPT to close open captures */

  /* This is used to skip a subpattern with a {0} quantifier */

  OP_SKIPZERO,       /* 118 */

  /* This is not an opcode, but is used to check that tables indexed by opcode
  are the correct length, in order to catch updating errors - there have been
  some in the past. */

  OP_TABLE_LENGTH
};
anonymous enum
Enumerator:
ERR0 
ERR1 
ERR2 
ERR3 
ERR4 
ERR5 
ERR6 
ERR7 
ERR8 
ERR9 
ERR10 
ERR11 
ERR12 
ERR13 
ERR14 
ERR15 
ERR16 
ERR17 
ERR18 
ERR19 
ERR20 
ERR21 
ERR22 
ERR23 
ERR24 
ERR25 
ERR26 
ERR27 
ERR28 
ERR29 
ERR30 
ERR31 
ERR32 
ERR33 
ERR34 
ERR35 
ERR36 
ERR37 
ERR38 
ERR39 
ERR40 
ERR41 
ERR42 
ERR43 
ERR44 
ERR45 
ERR46 
ERR47 
ERR48 
ERR49 
ERR50 
ERR51 
ERR52 
ERR53 
ERR54 
ERR55 
ERR56 
ERR57 
ERR58 
ERR59 
ERR60 
ERR61 
ERR62 
ERR63 
ERR64 
ERR65 
ERR66 
ERR67 
ERR68 
ERRCOUNT 

Definition at line 1570 of file pcre_internal.h.


Function Documentation

const uschar* _pcre_find_bracket ( const uschar ,
BOOL  ,
int   
)

Definition at line 1694 of file pcre_compile.c.

{
for (;;)
  {
  register int c = *code;
  if (c == OP_END) return NULL;

  /* XCLASS is used for classes that cannot be represented just by a bit
  map. This includes negated single high-valued characters. The length in
  the table is zero; the actual length is stored in the compiled code. */

  if (c == OP_XCLASS) code += GET(code, 1);

  /* Handle recursion */

  else if (c == OP_REVERSE)
    {
    if (number < 0) return (uschar *)code;
    code += _pcre_OP_lengths[c];
    }

  /* Handle capturing bracket */

  else if (c == OP_CBRA)
    {
    int n = GET2(code, 1+LINK_SIZE);
    if (n == number) return (uschar *)code;
    code += _pcre_OP_lengths[c];
    }

  /* Otherwise, we can get the item's length from the table, except that for
  repeated character types, we have to test for \p and \P, which have an extra
  two bytes of parameters, and for MARK/PRUNE/SKIP/THEN with an argument, we
  must add in its length. */

  else
    {
    switch(c)
      {
      case OP_TYPESTAR:
      case OP_TYPEMINSTAR:
      case OP_TYPEPLUS:
      case OP_TYPEMINPLUS:
      case OP_TYPEQUERY:
      case OP_TYPEMINQUERY:
      case OP_TYPEPOSSTAR:
      case OP_TYPEPOSPLUS:
      case OP_TYPEPOSQUERY:
      if (code[1] == OP_PROP || code[1] == OP_NOTPROP) code += 2;
      break;

      case OP_TYPEUPTO:
      case OP_TYPEMINUPTO:
      case OP_TYPEEXACT:
      case OP_TYPEPOSUPTO:
      if (code[3] == OP_PROP || code[3] == OP_NOTPROP) code += 2;
      break;

      case OP_MARK:
      case OP_PRUNE_ARG:
      case OP_SKIP_ARG:
      code += code[1];
      break;

      case OP_THEN_ARG:
      code += code[1+LINK_SIZE];
      break;
      }

    /* Add in the fixed length from the table */

    code += _pcre_OP_lengths[c];

  /* In UTF-8 mode, opcodes that are followed by a character may be followed by
  a multi-byte character. The length in the table is a minimum, so we have to
  arrange to skip the extra bytes. */

#ifdef SUPPORT_UTF8
    if (utf8) switch(c)
      {
      case OP_CHAR:
      case OP_CHARNC:
      case OP_EXACT:
      case OP_UPTO:
      case OP_MINUPTO:
      case OP_POSUPTO:
      case OP_STAR:
      case OP_MINSTAR:
      case OP_POSSTAR:
      case OP_PLUS:
      case OP_MINPLUS:
      case OP_POSPLUS:
      case OP_QUERY:
      case OP_MINQUERY:
      case OP_POSQUERY:
      if (code[-1] >= 0xc0) code += _pcre_utf8_table4[code[-1] & 0x3f];
      break;
      }
#else
    (void)(utf8);  /* Keep compiler happy by referencing function argument */
#endif
    }
  }
}

Here is the caller graph for this function:

BOOL _pcre_is_newline ( USPTR  ,
int  ,
USPTR  ,
int ,
BOOL   
)

Definition at line 74 of file pcre_newline.c.

{
int c;
if (utf8) { GETCHAR(c, ptr); } else c = *ptr;

if (type == NLTYPE_ANYCRLF) switch(c)
  {
  case 0x000a: *lenptr = 1; return TRUE;             /* LF */
  case 0x000d: *lenptr = (ptr < endptr - 1 && ptr[1] == 0x0a)? 2 : 1;
               return TRUE;                          /* CR */
  default: return FALSE;
  }

/* NLTYPE_ANY */

else switch(c)
  {
  case 0x000a:                                       /* LF */
  case 0x000b:                                       /* VT */
  case 0x000c: *lenptr = 1; return TRUE;             /* FF */
  case 0x000d: *lenptr = (ptr < endptr - 1 && ptr[1] == 0x0a)? 2 : 1;
               return TRUE;                          /* CR */
  case 0x0085: *lenptr = utf8? 2 : 1; return TRUE;   /* NEL */
  case 0x2028:                                       /* LS */
  case 0x2029: *lenptr = 3; return TRUE;             /* PS */
  default: return FALSE;
  }
}
int _pcre_ord2utf8 ( int  ,
uschar  
)

Definition at line 64 of file pcre_ord2utf8.c.

{
#ifdef SUPPORT_UTF8
register int i, j;
for (i = 0; i < _pcre_utf8_table1_size; i++)
  if (cvalue <= _pcre_utf8_table1[i]) break;
buffer += i;
for (j = i; j > 0; j--)
 {
 *buffer-- = 0x80 | (cvalue & 0x3f);
 cvalue >>= 6;
 }
*buffer = _pcre_utf8_table2[i] | cvalue;
return i + 1;
#else
(void)(cvalue);  /* Keep compiler happy; this function won't ever be */
(void)(buffer);  /* called when SUPPORT_UTF8 is not defined. */
return 0;
#endif
}

Definition at line 100 of file pcre_try_flipped.c.

{
if (byteflip(re->magic_number, sizeof(re->magic_number)) != MAGIC_NUMBER)
  return NULL;

*internal_re = *re;           /* To copy other fields */
internal_re->size = byteflip(re->size, sizeof(re->size));
internal_re->options = byteflip(re->options, sizeof(re->options));
internal_re->flags = (pcre_uint16)byteflip(re->flags, sizeof(re->flags));
internal_re->top_bracket =
  (pcre_uint16)byteflip(re->top_bracket, sizeof(re->top_bracket));
internal_re->top_backref =
  (pcre_uint16)byteflip(re->top_backref, sizeof(re->top_backref));
internal_re->first_byte =
  (pcre_uint16)byteflip(re->first_byte, sizeof(re->first_byte));
internal_re->req_byte =
  (pcre_uint16)byteflip(re->req_byte, sizeof(re->req_byte));
internal_re->name_table_offset =
  (pcre_uint16)byteflip(re->name_table_offset, sizeof(re->name_table_offset));
internal_re->name_entry_size =
  (pcre_uint16)byteflip(re->name_entry_size, sizeof(re->name_entry_size));
internal_re->name_count =
  (pcre_uint16)byteflip(re->name_count, sizeof(re->name_count));

if (study != NULL)
  {
  *internal_study = *study;   /* To copy other fields */
  internal_study->size = byteflip(study->size, sizeof(study->size));
  internal_study->flags = byteflip(study->flags, sizeof(study->flags));
  internal_study->minlength = byteflip(study->minlength,
    sizeof(study->minlength));
  }

return internal_re;
}

Here is the call graph for this function:

int _pcre_valid_utf8 ( USPTR  ,
int   
)

Definition at line 90 of file pcre_valid_utf8.c.

{
#ifdef SUPPORT_UTF8
register USPTR p;

if (length < 0)
  {
  for (p = string; *p != 0; p++);
  length = p - string;
  }

for (p = string; length-- > 0; p++)
  {
  register int ab;
  register int c = *p;
  if (c < 128) continue;
  if (c < 0xc0) return p - string;
  ab = _pcre_utf8_table4[c & 0x3f];     /* Number of additional bytes */
  if (ab > 3) return p - string;        /* Too many for RFC 3629 */
  if (length < ab) return p + 1 + length - string;   /* Missing bytes */
  length -= ab;

  /* Check top bits in the second byte */
  if ((*(++p) & 0xc0) != 0x80) return p - string;

  /* Check for overlong sequences for each different length, and for the
  excluded range 0xd000 to 0xdfff.  */

  switch (ab)
    {
    /* Check for xx00 000x (overlong sequence) */

    case 1:
    if ((c & 0x3e) == 0) return p - string;
    continue;   /* We know there aren't any more bytes to check */

    /* Check for 1110 0000, xx0x xxxx (overlong sequence) or
                 1110 1101, 1010 xxxx (0xd000 - 0xdfff) */

    case 2:
    if ((c == 0xe0 && (*p & 0x20) == 0) ||
        (c == 0xed && *p >= 0xa0))
      return p - string;
    break;

    /* Check for 1111 0000, xx00 xxxx (overlong sequence) or
       greater than 0x0010ffff (f4 8f bf bf) */

    case 3:
    if ((c == 0xf0 && (*p & 0x30) == 0) ||
        (c > 0xf4 ) ||
        (c == 0xf4 && *p > 0x8f))
      return p - string;
    break;

#if 0
    /* These cases can no longer occur, as we restrict to a maximum of four
    bytes nowadays. Leave the code here in case we ever want to add an option
    for longer sequences. */

    /* Check for 1111 1000, xx00 0xxx */
    case 4:
    if (c == 0xf8 && (*p & 0x38) == 0) return p - string;
    break;

    /* Check for leading 0xfe or 0xff, and then for 1111 1100, xx00 00xx */
    case 5:
    if (c == 0xfe || c == 0xff ||
       (c == 0xfc && (*p & 0x3c) == 0)) return p - string;
    break;
#endif

    }

  /* Check for valid bytes after the 2nd, if any; all must start 10 */
  while (--ab > 0)
    {
    if ((*(++p) & 0xc0) != 0x80) return p - string;
    }
  }
#else
(void)(string);  /* Keep picky compilers happy */
(void)(length);
#endif

return -1;
}
BOOL _pcre_was_newline ( USPTR  ,
int  ,
USPTR  ,
int ,
BOOL   
)

Definition at line 123 of file pcre_newline.c.

{
int c;
ptr--;
#ifdef SUPPORT_UTF8
if (utf8)
  {
  BACKCHAR(ptr);
  GETCHAR(c, ptr);
  }
else c = *ptr;
#else   /* no UTF-8 support */
c = *ptr;
#endif  /* SUPPORT_UTF8 */

if (type == NLTYPE_ANYCRLF) switch(c)
  {
  case 0x000a: *lenptr = (ptr > startptr && ptr[-1] == 0x0d)? 2 : 1;
               return TRUE;                         /* LF */
  case 0x000d: *lenptr = 1; return TRUE;            /* CR */
  default: return FALSE;
  }

else switch(c)
  {
  case 0x000a: *lenptr = (ptr > startptr && ptr[-1] == 0x0d)? 2 : 1;
               return TRUE;                         /* LF */
  case 0x000b:                                      /* VT */
  case 0x000c:                                      /* FF */
  case 0x000d: *lenptr = 1; return TRUE;            /* CR */
  case 0x0085: *lenptr = utf8? 2 : 1; return TRUE;  /* NEL */
  case 0x2028:                                      /* LS */
  case 0x2029: *lenptr = 3; return TRUE;            /* PS */
  default: return FALSE;
  }
}
BOOL _pcre_xclass ( int  ,
const uschar  
)

Definition at line 65 of file pcre_xclass.c.

{
int t;
BOOL negated = (*data & XCL_NOT) != 0;

/* Character values < 256 are matched against a bitmap, if one is present. If
not, we still carry on, because there may be ranges that start below 256 in the
additional data. */

if (c < 256)
  {
  if ((*data & XCL_MAP) != 0 && (data[1 + c/8] & (1 << (c&7))) != 0)
    return !negated;   /* char found */
  }

/* First skip the bit map if present. Then match against the list of Unicode
properties or large chars or ranges that end with a large char. We won't ever
encounter XCL_PROP or XCL_NOTPROP when UCP support is not compiled. */

if ((*data++ & XCL_MAP) != 0) data += 32;

while ((t = *data++) != XCL_END)
  {
  int x, y;
  if (t == XCL_SINGLE)
    {
    GETCHARINC(x, data);
    if (c == x) return !negated;
    }
  else if (t == XCL_RANGE)
    {
    GETCHARINC(x, data);
    GETCHARINC(y, data);
    if (c >= x && c <= y) return !negated;
    }

#ifdef SUPPORT_UCP
  else  /* XCL_PROP & XCL_NOTPROP */
    {
    const ucd_record *prop = GET_UCD(c);

    switch(*data)
      {
      case PT_ANY:
      if (t == XCL_PROP) return !negated;
      break;

      case PT_LAMP:
      if ((prop->chartype == ucp_Lu || prop->chartype == ucp_Ll ||
           prop->chartype == ucp_Lt) == (t == XCL_PROP)) return !negated;
      break;

      case PT_GC:
      if ((data[1] == _pcre_ucp_gentype[prop->chartype]) == (t == XCL_PROP))
        return !negated;
      break;

      case PT_PC:
      if ((data[1] == prop->chartype) == (t == XCL_PROP)) return !negated;
      break;

      case PT_SC:
      if ((data[1] == prop->script) == (t == XCL_PROP)) return !negated;
      break;

      case PT_ALNUM:
      if ((_pcre_ucp_gentype[prop->chartype] == ucp_L ||
           _pcre_ucp_gentype[prop->chartype] == ucp_N) == (t == XCL_PROP))
        return !negated;
      break;

      case PT_SPACE:    /* Perl space */
      if ((_pcre_ucp_gentype[prop->chartype] == ucp_Z ||
           c == CHAR_HT || c == CHAR_NL || c == CHAR_FF || c == CHAR_CR)
             == (t == XCL_PROP))
        return !negated;
      break;

      case PT_PXSPACE:  /* POSIX space */
      if ((_pcre_ucp_gentype[prop->chartype] == ucp_Z ||
           c == CHAR_HT || c == CHAR_NL || c == CHAR_VT ||
           c == CHAR_FF || c == CHAR_CR) == (t == XCL_PROP))
        return !negated;
      break;

      case PT_WORD:
      if ((_pcre_ucp_gentype[prop->chartype] == ucp_L ||
           _pcre_ucp_gentype[prop->chartype] == ucp_N || c == CHAR_UNDERSCORE)
             == (t == XCL_PROP))
        return !negated;
      break;

      /* This should never occur, but compilers may mutter if there is no
      default. */

      default:
      return FALSE;
      }

    data += 2;
    }
#endif  /* SUPPORT_UCP */
  }

return negated;   /* char did not match */
}
static void* pcre_memmove ( void *  d,
const void *  s,
size_t  n 
) [static]

Definition at line 311 of file pcre_internal.h.

{
size_t i;
unsigned char *dest = (unsigned char *)d;
const unsigned char *src = (const unsigned char *)s;
if (dest > src)
  {
  dest += n;
  src += n;
  for (i = 0; i < n; ++i) *(--dest) = *(--src);
  return (void *)dest;
  }
else
  {
  for (i = 0; i < n; ++i) *dest++ = *src++;
  return (void *)(dest - n);
  }
}

Variable Documentation

Definition at line 27 of file pcre_chartables.c.

Definition at line 55 of file pcre_tables.c.

Definition at line 33 of file pcre_ucd.c.

Definition at line 554 of file pcre_ucd.c.

const pcre_uint16 _pcre_ucd_stage2[]

Definition at line 1101 of file pcre_ucd.c.

Definition at line 90 of file pcre_tables.c.

Definition at line 68 of file pcre_tables.c.

Definition at line 71 of file pcre_tables.c.

Definition at line 76 of file pcre_tables.c.

Definition at line 77 of file pcre_tables.c.

Definition at line 82 of file pcre_tables.c.

Definition at line 391 of file pcre_tables.c.

const char _pcre_utt_names[]

Definition at line 254 of file pcre_tables.c.

Definition at line 529 of file pcre_tables.c.