NCBI C++ ToolKit
Classes | Macros | Typedefs | Enumerations | Functions | Variables
pcre2_compile.c File Reference
#include "pcre2_internal.h"
+ Include dependency graph for pcre2_compile.c:

Go to the source code of this file.

Go to the SVN repository for this file.

Classes

struct  verbitem
 
struct  alasitem
 
struct  pso
 
struct  nest_save
 

Macros

#define NLBLOCK   cb /* Block containing newline information */
 
#define PSSTART   start_pattern /* Field containing processed string start */
 
#define PSEND   end_pattern /* Field containing processed string end */
 
#define XDIGIT(c)   (MAX_255(c)? xdigitab[c] : 0xff)
 
#define STRING_UTFn_RIGHTPAR   STRING_UTF32_RIGHTPAR, 6
 
#define PUTOFFSET(s, p)   *p++ = s
 
#define GETOFFSET(s, p)   s = *p++
 
#define GETPLUSOFFSET(s, p)   s = *(++p)
 
#define READPLUSOFFSET(s, p)   s = p[1]
 
#define SKIPOFFSET(p)   p++
 
#define SIZEOFFSET   1
 
#define META_CODE(x)   (x & 0xffff0000u)
 
#define META_DATA(x)   (x & 0x0000ffffu)
 
#define META_DIFF(x, y)   ((x-y)>>16)
 
#define MAX_GROUP_NUMBER   65535u
 
#define MAX_REPEAT_COUNT   65535u
 
#define REPEAT_UNLIMITED   (MAX_REPEAT_COUNT+1)
 
#define COMPILE_WORK_SIZE   (3000*LINK_SIZE) /* Size in code units */
 
#define C16_WORK_SIZE    ((COMPILE_WORK_SIZE * sizeof(PCRE2_UCHAR))/sizeof(uint16_t))
 
#define GROUPINFO_DEFAULT_SIZE   256
 
#define WORK_SIZE_SAFETY_MARGIN   (100)
 
#define NAMED_GROUP_LIST_SIZE   20
 
#define PARSED_PATTERN_DEFAULT_SIZE   1024
 
#define OFLOW_MAX   (INT_MAX - 20)
 
#define META_END   0x80000000u /* End of pattern */
 
#define META_ALT   0x80010000u /* alternation */
 
#define META_ATOMIC   0x80020000u /* atomic group */
 
#define META_BACKREF   0x80030000u /* Back ref */
 
#define META_BACKREF_BYNAME   0x80040000u /* \k'name' */
 
#define META_BIGVALUE   0x80050000u /* Next is a literal > META_END */
 
#define META_CALLOUT_NUMBER   0x80060000u /* (?C with numerical argument */
 
#define META_CALLOUT_STRING   0x80070000u /* (?C with string argument */
 
#define META_CAPTURE   0x80080000u /* Capturing parenthesis */
 
#define META_CIRCUMFLEX   0x80090000u /* ^ metacharacter */
 
#define META_CLASS   0x800a0000u /* start non-empty class */
 
#define META_CLASS_EMPTY   0x800b0000u /* empty class */
 
#define META_CLASS_EMPTY_NOT   0x800c0000u /* negative empty class */
 
#define META_CLASS_END   0x800d0000u /* end of non-empty class */
 
#define META_CLASS_NOT   0x800e0000u /* start non-empty negative class */
 
#define META_COND_ASSERT   0x800f0000u /* (?(?assertion)... */
 
#define META_COND_DEFINE   0x80100000u /* (?(DEFINE)... */
 
#define META_COND_NAME   0x80110000u /* (?(<name>)... */
 
#define META_COND_NUMBER   0x80120000u /* (?(digits)... */
 
#define META_COND_RNAME   0x80130000u /* (?(R&name)... */
 
#define META_COND_RNUMBER   0x80140000u /* (?(Rdigits)... */
 
#define META_COND_VERSION   0x80150000u /* (?(VERSION<op>x.y)... */
 
#define META_DOLLAR   0x80160000u /* $ metacharacter */
 
#define META_DOT   0x80170000u /* . metacharacter */
 
#define META_ESCAPE   0x80180000u /* \d and friends */
 
#define META_KET   0x80190000u /* closing parenthesis */
 
#define META_NOCAPTURE   0x801a0000u /* no capture parens */
 
#define META_OPTIONS   0x801b0000u /* (?i) and friends */
 
#define META_POSIX   0x801c0000u /* POSIX class item */
 
#define META_POSIX_NEG   0x801d0000u /* negative POSIX class item */
 
#define META_RANGE_ESCAPED   0x801e0000u /* range with at least one escape */
 
#define META_RANGE_LITERAL   0x801f0000u /* range defined literally */
 
#define META_RECURSE   0x80200000u /* Recursion */
 
#define META_RECURSE_BYNAME   0x80210000u /* (?&name) */
 
#define META_SCRIPT_RUN   0x80220000u /* (*script_run:...) */
 
#define META_LOOKAHEAD   0x80230000u /* (?= */
 
#define META_LOOKAHEADNOT   0x80240000u /* (?! */
 
#define META_LOOKBEHIND   0x80250000u /* (?<= */
 
#define META_LOOKBEHINDNOT   0x80260000u /* (?<! */
 
#define META_LOOKAHEAD_NA   0x80270000u /* (*napla: */
 
#define META_LOOKBEHIND_NA   0x80280000u /* (*naplb: */
 
#define META_MARK   0x80290000u /* (*MARK) */
 
#define META_ACCEPT   0x802a0000u /* (*ACCEPT) */
 
#define META_FAIL   0x802b0000u /* (*FAIL) */
 
#define META_COMMIT   0x802c0000u /* These */
 
#define META_COMMIT_ARG   0x802d0000u /* pairs */
 
#define META_PRUNE   0x802e0000u /* must */
 
#define META_PRUNE_ARG   0x802f0000u /* be */
 
#define META_SKIP   0x80300000u /* kept */
 
#define META_SKIP_ARG   0x80310000u /* in */
 
#define META_THEN   0x80320000u /* this */
 
#define META_THEN_ARG   0x80330000u /* order */
 
#define META_ASTERISK   0x80340000u /* * */
 
#define META_ASTERISK_PLUS   0x80350000u /* *+ */
 
#define META_ASTERISK_QUERY   0x80360000u /* *? */
 
#define META_PLUS   0x80370000u /* + */
 
#define META_PLUS_PLUS   0x80380000u /* ++ */
 
#define META_PLUS_QUERY   0x80390000u /* +? */
 
#define META_QUERY   0x803a0000u /* ? */
 
#define META_QUERY_PLUS   0x803b0000u /* ?+ */
 
#define META_QUERY_QUERY   0x803c0000u /* ?? */
 
#define META_MINMAX   0x803d0000u /* {n,m} repeat */
 
#define META_MINMAX_PLUS   0x803e0000u /* {n,m}+ repeat */
 
#define META_MINMAX_QUERY   0x803f0000u /* {n,m}? repeat */
 
#define META_FIRST_QUANTIFIER   META_ASTERISK
 
#define META_LAST_QUANTIFIER   META_MINMAX_QUERY
 
#define META_ATOMIC_SCRIPT_RUN   0x8fff0000u
 
#define SETBIT(a, b)   a[(b)/8] = (uint8_t)(a[(b)/8] | (1u << ((b)&7)))
 
#define REQ_UNSET   0xffffffffu /* Not yet found anything */
 
#define REQ_NONE   0xfffffffeu /* Found not fixed character */
 
#define REQ_CASELESS   0x00000001u /* Code unit in xxcu is caseless */
 
#define REQ_VARY   0x00000002u /* Code unit is followed by non-literal */
 
#define GI_SET_FIXED_LENGTH   0x80000000u
 
#define GI_NOT_FIXED_LENGTH   0x40000000u
 
#define GI_FIXED_LENGTH_MASK   0x0000ffffu
 
#define IS_DIGIT(x)   ((x) >= CHAR_0 && (x) <= CHAR_9)
 
#define ESCAPES_FIRST   CHAR_0
 
#define ESCAPES_LAST   CHAR_z
 
#define UPPER_CASE(c)   (c-32)
 
#define PC_DIGIT   7
 
#define PC_GRAPH   8
 
#define PC_PRINT   9
 
#define PC_PUNCT   10
 
#define PC_XDIGIT   13
 
#define PUBLIC_LITERAL_COMPILE_OPTIONS
 
#define PUBLIC_COMPILE_OPTIONS
 
#define PUBLIC_LITERAL_COMPILE_EXTRA_OPTIONS    (PCRE2_EXTRA_MATCH_LINE|PCRE2_EXTRA_MATCH_WORD|PCRE2_EXTRA_CASELESS_RESTRICT)
 
#define PUBLIC_COMPILE_EXTRA_OPTIONS
 
#define NSF_RESET   0x0001u
 
#define NSF_CONDASSERT   0x0002u
 
#define NSF_ATOMICSR   0x0004u
 
#define PARSE_TRACKED_OPTIONS
 
#define PARSE_TRACKED_EXTRA_OPTIONS
 
#define PARSED_LITERAL(c, p)   *p++ = c; okquantifier = TRUE;
 
#define RSCAN_CACHE_SIZE   8
 

Typedefs

typedef struct verbitem verbitem
 
typedef struct alasitem alasitem
 
typedef struct pso pso
 
typedef struct nest_save nest_save
 

Enumerations

enum  { PSKIP_ALT , PSKIP_CLASS , PSKIP_KET }
 
enum  {
  ERR0 = 100 , 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 , ERR69 , ERR70 , ERR71 ,
  ERR72 , ERR73 , ERR74 , ERR75 ,
  ERR76 , ERR77 , ERR78 , ERR79 ,
  ERR80 , ERR81 , ERR82 , ERR83 ,
  ERR84 , ERR85 , ERR86 , ERR87 ,
  ERR88 , ERR89 , ERR90 , ERR91 ,
  ERR92 , ERR93 , ERR94 , ERR95 ,
  ERR96 , ERR97 , ERR98 , ERR99 ,
  ERR100 , ERR101
}
 
enum  {
  PSO_OPT , PSO_FLG , PSO_NL , PSO_BSR ,
  PSO_LIMH , PSO_LIMM , PSO_LIMD
}
 
enum  { RANGE_NO , RANGE_STARTED , RANGE_OK_ESCAPED , RANGE_OK_LITERAL }
 

Functions

static int compile_regex (uint32_t, uint32_t, PCRE2_UCHAR **, uint32_t **, int *, uint32_t, uint32_t *, uint32_t *, uint32_t *, uint32_t *, branch_chain *, open_capitem *, compile_block *, PCRE2_SIZE *)
 
static int get_branchlength (uint32_t **, int *, int *, int *, parsed_recurse_check *, compile_block *)
 
static BOOL set_lookbehind_lengths (uint32_t **, int *, int *, parsed_recurse_check *, compile_block *)
 
static int check_lookbehinds (uint32_t *, uint32_t **, parsed_recurse_check *, compile_block *, int *)
 
PCRE2_EXPORT pcre2_code *PCRE2_CALL_CONVENTION pcre2_code_copy (const pcre2_code *code)
 
PCRE2_EXPORT pcre2_code *PCRE2_CALL_CONVENTION pcre2_code_copy_with_tables (const pcre2_code *code)
 
PCRE2_EXPORT void PCRE2_CALL_CONVENTION pcre2_code_free (pcre2_code *code)
 
static BOOL read_number (PCRE2_SPTR *ptrptr, PCRE2_SPTR ptrend, int32_t allow_sign, uint32_t max_value, uint32_t max_error, int *intptr, int *errorcodeptr)
 
static BOOL read_repeat_counts (PCRE2_SPTR *ptrptr, PCRE2_SPTR ptrend, uint32_t *minp, uint32_t *maxp, int *errorcodeptr)
 
int _pcre2_check_escape (PCRE2_SPTR *ptrptr, PCRE2_SPTR ptrend, uint32_t *chptr, int *errorcodeptr, uint32_t options, uint32_t xoptions, BOOL isclass, compile_block *cb)
 
static BOOL check_posix_syntax (PCRE2_SPTR ptr, PCRE2_SPTR ptrend, PCRE2_SPTR *endptr)
 
static int check_posix_name (PCRE2_SPTR ptr, int len)
 
static BOOL read_name (PCRE2_SPTR *ptrptr, PCRE2_SPTR ptrend, BOOL utf, uint32_t terminator, PCRE2_SIZE *offsetptr, PCRE2_SPTR *nameptr, uint32_t *namelenptr, int *errorcodeptr, compile_block *cb)
 
static uint32_tmanage_callouts (PCRE2_SPTR ptr, uint32_t **pcalloutptr, BOOL auto_callout, uint32_t *parsed_pattern, compile_block *cb)
 
static uint32_thandle_escdsw (int escape, uint32_t *parsed_pattern, uint32_t options, uint32_t xoptions)
 
static int parse_regex (PCRE2_SPTR ptr, uint32_t options, BOOL *has_lookbehind, compile_block *cb)
 
static const PCRE2_UCHARfirst_significant_code (PCRE2_SPTR code, BOOL skipassert)
 
static unsigned int add_to_class_internal (uint8_t *classbits, PCRE2_UCHAR **uchardptr, uint32_t options, uint32_t xoptions, compile_block *cb, uint32_t start, uint32_t end)
 
static unsigned int add_to_class (uint8_t *classbits, PCRE2_UCHAR **uchardptr, uint32_t options, uint32_t xoptions, compile_block *cb, uint32_t start, uint32_t end)
 
static unsigned int add_list_to_class (uint8_t *classbits, PCRE2_UCHAR **uchardptr, uint32_t options, uint32_t xoptions, compile_block *cb, const uint32_t *p, unsigned int except)
 
static unsigned int add_not_list_to_class (uint8_t *classbits, PCRE2_UCHAR **uchardptr, uint32_t options, uint32_t xoptions, compile_block *cb, const uint32_t *p)
 
static BOOL find_dupname_details (PCRE2_SPTR name, uint32_t length, int *indexptr, int *countptr, int *errorcodeptr, compile_block *cb)
 
static int compile_branch (uint32_t *optionsptr, uint32_t *xoptionsptr, PCRE2_UCHAR **codeptr, uint32_t **pptrptr, int *errorcodeptr, uint32_t *firstcuptr, uint32_t *firstcuflagsptr, uint32_t *reqcuptr, uint32_t *reqcuflagsptr, branch_chain *bcptr, open_capitem *open_caps, compile_block *cb, PCRE2_SIZE *lengthptr)
 
static BOOL is_anchored (PCRE2_SPTR code, uint32_t bracket_map, compile_block *cb, int atomcount, BOOL inassert)
 
static BOOL is_startline (PCRE2_SPTR code, unsigned int bracket_map, compile_block *cb, int atomcount, BOOL inassert)
 
static PCRE2_SPTR find_recurse (PCRE2_SPTR code, BOOL utf)
 
static uint32_t find_firstassertedcu (PCRE2_SPTR code, uint32_t *flags, uint32_t inassert)
 
static void add_name_to_table (compile_block *cb, PCRE2_SPTR name, int length, unsigned int groupno, uint32_t tablecount)
 
static uint32_tparsed_skip (uint32_t *pptr, uint32_t skiptype)
 
static int get_grouplength (uint32_t **pptrptr, int *minptr, BOOL isinline, int *errcodeptr, int *lcptr, int group, parsed_recurse_check *recurses, compile_block *cb)
 
PCRE2_EXPORT pcre2_code *PCRE2_CALL_CONVENTION pcre2_compile (PCRE2_SPTR pattern, PCRE2_SIZE patlen, uint32_t options, int *errorptr, PCRE2_SIZE *erroroffset, pcre2_compile_context *ccontext)
 

Variables

static unsigned char meta_extra_lengths []
 
static const uint8_t xdigitab []
 
static const short int escapes []
 
static const char verbnames []
 
static const verbitem verbs []
 
static const int verbcount = sizeof(verbs)/sizeof(verbitem)
 
static const uint32_t verbops []
 
static const char alasnames []
 
static const alasitem alasmeta []
 
static const int alascount = sizeof(alasmeta)/sizeof(alasitem)
 
static uint32_t chartypeoffset []
 
static const char posix_names []
 
static const uint8_t posix_name_lengths []
 
static const int posix_class_maps []
 
static const pso pso_list []
 
static const uint8_t opcode_possessify []
 

Macro Definition Documentation

◆ C16_WORK_SIZE

#define C16_WORK_SIZE    ((COMPILE_WORK_SIZE * sizeof(PCRE2_UCHAR))/sizeof(uint16_t))

Definition at line 168 of file pcre2_compile.c.

◆ COMPILE_WORK_SIZE

#define COMPILE_WORK_SIZE   (3000*LINK_SIZE) /* Size in code units */

Definition at line 166 of file pcre2_compile.c.

◆ ESCAPES_FIRST

#define ESCAPES_FIRST   CHAR_0

Definition at line 507 of file pcre2_compile.c.

◆ ESCAPES_LAST

#define ESCAPES_LAST   CHAR_z

Definition at line 508 of file pcre2_compile.c.

◆ GETOFFSET

#define GETOFFSET (   s,
 
)    s = *p++

Definition at line 93 of file pcre2_compile.c.

◆ GETPLUSOFFSET

#define GETPLUSOFFSET (   s,
 
)    s = *(++p)

Definition at line 94 of file pcre2_compile.c.

◆ GI_FIXED_LENGTH_MASK

#define GI_FIXED_LENGTH_MASK   0x0000ffffu

Definition at line 402 of file pcre2_compile.c.

◆ GI_NOT_FIXED_LENGTH

#define GI_NOT_FIXED_LENGTH   0x40000000u

Definition at line 401 of file pcre2_compile.c.

◆ GI_SET_FIXED_LENGTH

#define GI_SET_FIXED_LENGTH   0x80000000u

Definition at line 400 of file pcre2_compile.c.

◆ GROUPINFO_DEFAULT_SIZE

#define GROUPINFO_DEFAULT_SIZE   256

Definition at line 175 of file pcre2_compile.c.

◆ IS_DIGIT

#define IS_DIGIT (   x)    ((x) >= CHAR_0 && (x) <= CHAR_9)

Definition at line 408 of file pcre2_compile.c.

◆ MAX_GROUP_NUMBER

#define MAX_GROUP_NUMBER   65535u

Definition at line 147 of file pcre2_compile.c.

◆ MAX_REPEAT_COUNT

#define MAX_REPEAT_COUNT   65535u

Definition at line 148 of file pcre2_compile.c.

◆ META_ACCEPT

#define META_ACCEPT   0x802a0000u /* (*ACCEPT) */

Definition at line 266 of file pcre2_compile.c.

◆ META_ALT

#define META_ALT   0x80010000u /* alternation */

Definition at line 213 of file pcre2_compile.c.

◆ META_ASTERISK

#define META_ASTERISK   0x80340000u /* * */

Definition at line 279 of file pcre2_compile.c.

◆ META_ASTERISK_PLUS

#define META_ASTERISK_PLUS   0x80350000u /* *+ */

Definition at line 280 of file pcre2_compile.c.

◆ META_ASTERISK_QUERY

#define META_ASTERISK_QUERY   0x80360000u /* *? */

Definition at line 281 of file pcre2_compile.c.

◆ META_ATOMIC

#define META_ATOMIC   0x80020000u /* atomic group */

Definition at line 214 of file pcre2_compile.c.

◆ META_ATOMIC_SCRIPT_RUN

#define META_ATOMIC_SCRIPT_RUN   0x8fff0000u

Definition at line 300 of file pcre2_compile.c.

◆ META_BACKREF

#define META_BACKREF   0x80030000u /* Back ref */

Definition at line 215 of file pcre2_compile.c.

◆ META_BACKREF_BYNAME

#define META_BACKREF_BYNAME   0x80040000u /* \k'name' */

Definition at line 216 of file pcre2_compile.c.

◆ META_BIGVALUE

#define META_BIGVALUE   0x80050000u /* Next is a literal > META_END */

Definition at line 217 of file pcre2_compile.c.

◆ META_CALLOUT_NUMBER

#define META_CALLOUT_NUMBER   0x80060000u /* (?C with numerical argument */

Definition at line 218 of file pcre2_compile.c.

◆ META_CALLOUT_STRING

#define META_CALLOUT_STRING   0x80070000u /* (?C with string argument */

Definition at line 219 of file pcre2_compile.c.

◆ META_CAPTURE

#define META_CAPTURE   0x80080000u /* Capturing parenthesis */

Definition at line 220 of file pcre2_compile.c.

◆ META_CIRCUMFLEX

#define META_CIRCUMFLEX   0x80090000u /* ^ metacharacter */

Definition at line 221 of file pcre2_compile.c.

◆ META_CLASS

#define META_CLASS   0x800a0000u /* start non-empty class */

Definition at line 222 of file pcre2_compile.c.

◆ META_CLASS_EMPTY

#define META_CLASS_EMPTY   0x800b0000u /* empty class */

Definition at line 223 of file pcre2_compile.c.

◆ META_CLASS_EMPTY_NOT

#define META_CLASS_EMPTY_NOT   0x800c0000u /* negative empty class */

Definition at line 224 of file pcre2_compile.c.

◆ META_CLASS_END

#define META_CLASS_END   0x800d0000u /* end of non-empty class */

Definition at line 225 of file pcre2_compile.c.

◆ META_CLASS_NOT

#define META_CLASS_NOT   0x800e0000u /* start non-empty negative class */

Definition at line 226 of file pcre2_compile.c.

◆ META_CODE

#define META_CODE (   x)    (x & 0xffff0000u)

Definition at line 113 of file pcre2_compile.c.

◆ META_COMMIT

#define META_COMMIT   0x802c0000u /* These */

Definition at line 268 of file pcre2_compile.c.

◆ META_COMMIT_ARG

#define META_COMMIT_ARG   0x802d0000u /* pairs */

Definition at line 269 of file pcre2_compile.c.

◆ META_COND_ASSERT

#define META_COND_ASSERT   0x800f0000u /* (?(?assertion)... */

Definition at line 227 of file pcre2_compile.c.

◆ META_COND_DEFINE

#define META_COND_DEFINE   0x80100000u /* (?(DEFINE)... */

Definition at line 228 of file pcre2_compile.c.

◆ META_COND_NAME

#define META_COND_NAME   0x80110000u /* (?(<name>)... */

Definition at line 229 of file pcre2_compile.c.

◆ META_COND_NUMBER

#define META_COND_NUMBER   0x80120000u /* (?(digits)... */

Definition at line 230 of file pcre2_compile.c.

◆ META_COND_RNAME

#define META_COND_RNAME   0x80130000u /* (?(R&name)... */

Definition at line 231 of file pcre2_compile.c.

◆ META_COND_RNUMBER

#define META_COND_RNUMBER   0x80140000u /* (?(Rdigits)... */

Definition at line 232 of file pcre2_compile.c.

◆ META_COND_VERSION

#define META_COND_VERSION   0x80150000u /* (?(VERSION<op>x.y)... */

Definition at line 233 of file pcre2_compile.c.

◆ META_DATA

#define META_DATA (   x)    (x & 0x0000ffffu)

Definition at line 114 of file pcre2_compile.c.

◆ META_DIFF

#define META_DIFF (   x,
 
)    ((x-y)>>16)

Definition at line 115 of file pcre2_compile.c.

◆ META_DOLLAR

#define META_DOLLAR   0x80160000u /* $ metacharacter */

Definition at line 234 of file pcre2_compile.c.

◆ META_DOT

#define META_DOT   0x80170000u /* . metacharacter */

Definition at line 235 of file pcre2_compile.c.

◆ META_END

#define META_END   0x80000000u /* End of pattern */

Definition at line 211 of file pcre2_compile.c.

◆ META_ESCAPE

#define META_ESCAPE   0x80180000u /* \d and friends */

Definition at line 236 of file pcre2_compile.c.

◆ META_FAIL

#define META_FAIL   0x802b0000u /* (*FAIL) */

Definition at line 267 of file pcre2_compile.c.

◆ META_FIRST_QUANTIFIER

#define META_FIRST_QUANTIFIER   META_ASTERISK

Definition at line 292 of file pcre2_compile.c.

◆ META_KET

#define META_KET   0x80190000u /* closing parenthesis */

Definition at line 237 of file pcre2_compile.c.

◆ META_LAST_QUANTIFIER

#define META_LAST_QUANTIFIER   META_MINMAX_QUERY

Definition at line 293 of file pcre2_compile.c.

◆ META_LOOKAHEAD

#define META_LOOKAHEAD   0x80230000u /* (?= */

Definition at line 251 of file pcre2_compile.c.

◆ META_LOOKAHEAD_NA

#define META_LOOKAHEAD_NA   0x80270000u /* (*napla: */

Definition at line 258 of file pcre2_compile.c.

◆ META_LOOKAHEADNOT

#define META_LOOKAHEADNOT   0x80240000u /* (?! */

Definition at line 252 of file pcre2_compile.c.

◆ META_LOOKBEHIND

#define META_LOOKBEHIND   0x80250000u /* (?<= */

Definition at line 253 of file pcre2_compile.c.

◆ META_LOOKBEHIND_NA

#define META_LOOKBEHIND_NA   0x80280000u /* (*naplb: */

Definition at line 259 of file pcre2_compile.c.

◆ META_LOOKBEHINDNOT

#define META_LOOKBEHINDNOT   0x80260000u /* (?<! */

Definition at line 254 of file pcre2_compile.c.

◆ META_MARK

#define META_MARK   0x80290000u /* (*MARK) */

Definition at line 265 of file pcre2_compile.c.

◆ META_MINMAX

#define META_MINMAX   0x803d0000u /* {n,m} repeat */

Definition at line 288 of file pcre2_compile.c.

◆ META_MINMAX_PLUS

#define META_MINMAX_PLUS   0x803e0000u /* {n,m}+ repeat */

Definition at line 289 of file pcre2_compile.c.

◆ META_MINMAX_QUERY

#define META_MINMAX_QUERY   0x803f0000u /* {n,m}? repeat */

Definition at line 290 of file pcre2_compile.c.

◆ META_NOCAPTURE

#define META_NOCAPTURE   0x801a0000u /* no capture parens */

Definition at line 238 of file pcre2_compile.c.

◆ META_OPTIONS

#define META_OPTIONS   0x801b0000u /* (?i) and friends */

Definition at line 239 of file pcre2_compile.c.

◆ META_PLUS

#define META_PLUS   0x80370000u /* + */

Definition at line 282 of file pcre2_compile.c.

◆ META_PLUS_PLUS

#define META_PLUS_PLUS   0x80380000u /* ++ */

Definition at line 283 of file pcre2_compile.c.

◆ META_PLUS_QUERY

#define META_PLUS_QUERY   0x80390000u /* +? */

Definition at line 284 of file pcre2_compile.c.

◆ META_POSIX

#define META_POSIX   0x801c0000u /* POSIX class item */

Definition at line 240 of file pcre2_compile.c.

◆ META_POSIX_NEG

#define META_POSIX_NEG   0x801d0000u /* negative POSIX class item */

Definition at line 241 of file pcre2_compile.c.

◆ META_PRUNE

#define META_PRUNE   0x802e0000u /* must */

Definition at line 270 of file pcre2_compile.c.

◆ META_PRUNE_ARG

#define META_PRUNE_ARG   0x802f0000u /* be */

Definition at line 271 of file pcre2_compile.c.

◆ META_QUERY

#define META_QUERY   0x803a0000u /* ? */

Definition at line 285 of file pcre2_compile.c.

◆ META_QUERY_PLUS

#define META_QUERY_PLUS   0x803b0000u /* ?+ */

Definition at line 286 of file pcre2_compile.c.

◆ META_QUERY_QUERY

#define META_QUERY_QUERY   0x803c0000u /* ?? */

Definition at line 287 of file pcre2_compile.c.

◆ META_RANGE_ESCAPED

#define META_RANGE_ESCAPED   0x801e0000u /* range with at least one escape */

Definition at line 242 of file pcre2_compile.c.

◆ META_RANGE_LITERAL

#define META_RANGE_LITERAL   0x801f0000u /* range defined literally */

Definition at line 243 of file pcre2_compile.c.

◆ META_RECURSE

#define META_RECURSE   0x80200000u /* Recursion */

Definition at line 244 of file pcre2_compile.c.

◆ META_RECURSE_BYNAME

#define META_RECURSE_BYNAME   0x80210000u /* (?&name) */

Definition at line 245 of file pcre2_compile.c.

◆ META_SCRIPT_RUN

#define META_SCRIPT_RUN   0x80220000u /* (*script_run:...) */

Definition at line 246 of file pcre2_compile.c.

◆ META_SKIP

#define META_SKIP   0x80300000u /* kept */

Definition at line 272 of file pcre2_compile.c.

◆ META_SKIP_ARG

#define META_SKIP_ARG   0x80310000u /* in */

Definition at line 273 of file pcre2_compile.c.

◆ META_THEN

#define META_THEN   0x80320000u /* this */

Definition at line 274 of file pcre2_compile.c.

◆ META_THEN_ARG

#define META_THEN_ARG   0x80330000u /* order */

Definition at line 275 of file pcre2_compile.c.

◆ NAMED_GROUP_LIST_SIZE

#define NAMED_GROUP_LIST_SIZE   20

Definition at line 187 of file pcre2_compile.c.

◆ NLBLOCK

#define NLBLOCK   cb /* Block containing newline information */

Definition at line 46 of file pcre2_compile.c.

◆ NSF_ATOMICSR

#define NSF_ATOMICSR   0x0004u

Definition at line 2736 of file pcre2_compile.c.

◆ NSF_CONDASSERT

#define NSF_CONDASSERT   0x0002u

Definition at line 2735 of file pcre2_compile.c.

◆ NSF_RESET

#define NSF_RESET   0x0001u

Definition at line 2734 of file pcre2_compile.c.

◆ OFLOW_MAX

#define OFLOW_MAX   (INT_MAX - 20)

Definition at line 200 of file pcre2_compile.c.

◆ PARSE_TRACKED_EXTRA_OPTIONS

#define PARSE_TRACKED_EXTRA_OPTIONS
Value:
PCRE2_EXTRA_ASCII_DIGIT|PCRE2_EXTRA_ASCII_POSIX)
#define PCRE2_EXTRA_ASCII_POSIX
Definition: pcre2.h:166
#define PCRE2_EXTRA_ASCII_BSS
Definition: pcre2.h:164
#define PCRE2_EXTRA_CASELESS_RESTRICT
Definition: pcre2.h:162
#define PCRE2_EXTRA_ASCII_BSW
Definition: pcre2.h:165

Definition at line 2747 of file pcre2_compile.c.

◆ PARSE_TRACKED_OPTIONS

#define PARSE_TRACKED_OPTIONS
Value:
PCRE2_UNGREEDY)
#define PCRE2_DOTALL
Definition: pcre2.h:130
#define PCRE2_EXTENDED_MORE
Definition: pcre2.h:149
#define PCRE2_CASELESS
Definition: pcre2.h:128
#define PCRE2_DUPNAMES
Definition: pcre2.h:131
#define PCRE2_MULTILINE
Definition: pcre2.h:135
#define PCRE2_NO_AUTO_CAPTURE
Definition: pcre2.h:138

Definition at line 2743 of file pcre2_compile.c.

◆ PARSED_LITERAL

#define PARSED_LITERAL (   c,
 
)    *p++ = c; okquantifier = TRUE;

Definition at line 2768 of file pcre2_compile.c.

◆ PARSED_PATTERN_DEFAULT_SIZE

#define PARSED_PATTERN_DEFAULT_SIZE   1024

Definition at line 193 of file pcre2_compile.c.

◆ PC_DIGIT

#define PC_DIGIT   7

Definition at line 709 of file pcre2_compile.c.

◆ PC_GRAPH

#define PC_GRAPH   8

Definition at line 710 of file pcre2_compile.c.

◆ PC_PRINT

#define PC_PRINT   9

Definition at line 711 of file pcre2_compile.c.

◆ PC_PUNCT

#define PC_PUNCT   10

Definition at line 712 of file pcre2_compile.c.

◆ PC_XDIGIT

#define PC_XDIGIT   13

Definition at line 713 of file pcre2_compile.c.

◆ PSEND

#define PSEND   end_pattern /* Field containing processed string end */

Definition at line 48 of file pcre2_compile.c.

◆ PSSTART

#define PSSTART   start_pattern /* Field containing processed string start */

Definition at line 47 of file pcre2_compile.c.

◆ PUBLIC_COMPILE_EXTRA_OPTIONS

#define PUBLIC_COMPILE_EXTRA_OPTIONS
Value:
PCRE2_EXTRA_ALLOW_SURROGATE_ESCAPES|PCRE2_EXTRA_BAD_ESCAPE_IS_LITERAL| \
PCRE2_EXTRA_ESCAPED_CR_IS_LF|PCRE2_EXTRA_ALT_BSUX| \
PCRE2_EXTRA_ALLOW_LOOKAROUND_BSK|PCRE2_EXTRA_ASCII_BSD| \
PCRE2_EXTRA_ASCII_DIGIT)
#define PCRE2_EXTRA_ALT_BSUX
Definition: pcre2.h:160
#define PCRE2_EXTRA_ASCII_BSD
Definition: pcre2.h:163
#define PCRE2_EXTRA_BAD_ESCAPE_IS_LITERAL
Definition: pcre2.h:156
#define PUBLIC_LITERAL_COMPILE_EXTRA_OPTIONS

Definition at line 786 of file pcre2_compile.c.

◆ PUBLIC_COMPILE_OPTIONS

#define PUBLIC_COMPILE_OPTIONS
Value:
PCRE2_ALLOW_EMPTY_CLASS|PCRE2_ALT_BSUX|PCRE2_ALT_CIRCUMFLEX| \
PCRE2_NO_DOTSTAR_ANCHOR|PCRE2_UCP|PCRE2_UNGREEDY)
#define PCRE2_ALT_BSUX
Definition: pcre2.h:126
#define PCRE2_DOLLAR_ENDONLY
Definition: pcre2.h:129
#define PCRE2_UCP
Definition: pcre2.h:142
#define PCRE2_NO_AUTO_POSSESS
Definition: pcre2.h:139
#define PCRE2_UNGREEDY
Definition: pcre2.h:143
#define PCRE2_MATCH_UNSET_BACKREF
Definition: pcre2.h:134
#define PCRE2_NEVER_UCP
Definition: pcre2.h:136
#define PCRE2_ALT_CIRCUMFLEX
Definition: pcre2.h:146
#define PCRE2_NEVER_BACKSLASH_C
Definition: pcre2.h:145
#define PUBLIC_LITERAL_COMPILE_OPTIONS

Definition at line 774 of file pcre2_compile.c.

◆ PUBLIC_LITERAL_COMPILE_EXTRA_OPTIONS

#define PUBLIC_LITERAL_COMPILE_EXTRA_OPTIONS    (PCRE2_EXTRA_MATCH_LINE|PCRE2_EXTRA_MATCH_WORD|PCRE2_EXTRA_CASELESS_RESTRICT)

Definition at line 783 of file pcre2_compile.c.

◆ PUBLIC_LITERAL_COMPILE_OPTIONS

#define PUBLIC_LITERAL_COMPILE_OPTIONS
Value:
#define PCRE2_LITERAL
Definition: pcre2.h:150
#define PCRE2_ANCHORED
Definition: pcre2.h:111
#define PCRE2_ENDANCHORED
Definition: pcre2.h:113
#define PCRE2_AUTO_CALLOUT
Definition: pcre2.h:127
#define PCRE2_MATCH_INVALID_UTF
Definition: pcre2.h:151
#define PCRE2_USE_OFFSET_LIMIT
Definition: pcre2.h:148
#define PCRE2_UTF
Definition: pcre2.h:144
#define PCRE2_NO_UTF_CHECK
Definition: pcre2.h:112

Definition at line 769 of file pcre2_compile.c.

◆ PUTOFFSET

#define PUTOFFSET (   s,
 
)    *p++ = s

Definition at line 92 of file pcre2_compile.c.

◆ READPLUSOFFSET

#define READPLUSOFFSET (   s,
 
)    s = p[1]

Definition at line 95 of file pcre2_compile.c.

◆ REPEAT_UNLIMITED

#define REPEAT_UNLIMITED   (MAX_REPEAT_COUNT+1)

Definition at line 149 of file pcre2_compile.c.

◆ REQ_CASELESS

#define REQ_CASELESS   0x00000001u /* Code unit in xxcu is caseless */

Definition at line 395 of file pcre2_compile.c.

◆ REQ_NONE

#define REQ_NONE   0xfffffffeu /* Found not fixed character */

Definition at line 394 of file pcre2_compile.c.

◆ REQ_UNSET

#define REQ_UNSET   0xffffffffu /* Not yet found anything */

Definition at line 393 of file pcre2_compile.c.

◆ REQ_VARY

#define REQ_VARY   0x00000002u /* Code unit is followed by non-literal */

Definition at line 396 of file pcre2_compile.c.

◆ RSCAN_CACHE_SIZE

#define RSCAN_CACHE_SIZE   8

◆ SETBIT

#define SETBIT (   a,
  b 
)    a[(b)/8] = (uint8_t)(a[(b)/8] | (1u << ((b)&7)))

Definition at line 386 of file pcre2_compile.c.

◆ SIZEOFFSET

#define SIZEOFFSET   1

Definition at line 97 of file pcre2_compile.c.

◆ SKIPOFFSET

#define SKIPOFFSET (   p)    p++

Definition at line 96 of file pcre2_compile.c.

◆ STRING_UTFn_RIGHTPAR

#define STRING_UTFn_RIGHTPAR   STRING_UTF32_RIGHTPAR, 6

Definition at line 83 of file pcre2_compile.c.

◆ UPPER_CASE

#define UPPER_CASE (   c)    (c-32)

Definition at line 509 of file pcre2_compile.c.

◆ WORK_SIZE_SAFETY_MARGIN

#define WORK_SIZE_SAFETY_MARGIN   (100)

Definition at line 180 of file pcre2_compile.c.

◆ XDIGIT

#define XDIGIT (   c)    (MAX_255(c)? xdigitab[c] : 0xff)

Definition at line 77 of file pcre2_compile.c.

Typedef Documentation

◆ alasitem

typedef struct alasitem alasitem

◆ nest_save

typedef struct nest_save nest_save

◆ pso

typedef struct pso pso

◆ verbitem

typedef struct verbitem verbitem

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
PSKIP_ALT 
PSKIP_CLASS 
PSKIP_KET 

Definition at line 375 of file pcre2_compile.c.

◆ anonymous enum

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 
ERR69 
ERR70 
ERR71 
ERR72 
ERR73 
ERR74 
ERR75 
ERR76 
ERR77 
ERR78 
ERR79 
ERR80 
ERR81 
ERR82 
ERR83 
ERR84 
ERR85 
ERR86 
ERR87 
ERR88 
ERR89 
ERR90 
ERR91 
ERR92 
ERR93 
ERR94 
ERR95 
ERR96 
ERR97 
ERR98 
ERR99 
ERR100 
ERR101 

Definition at line 801 of file pcre2_compile.c.

◆ anonymous enum

anonymous enum
Enumerator
PSO_OPT 
PSO_FLG 
PSO_NL 
PSO_BSR 
PSO_LIMH 
PSO_LIMM 
PSO_LIMD 

Definition at line 819 of file pcre2_compile.c.

◆ anonymous enum

anonymous enum
Enumerator
RANGE_NO 
RANGE_STARTED 
RANGE_OK_ESCAPED 
RANGE_OK_LITERAL 

Definition at line 2754 of file pcre2_compile.c.

Function Documentation

◆ _pcre2_check_escape()

int _pcre2_check_escape ( PCRE2_SPTR ptrptr,
PCRE2_SPTR  ptrend,
uint32_t chptr,
int errorcodeptr,
uint32_t  options,
uint32_t  xoptions,
BOOL  isclass,
compile_block cb 
)

◆ add_list_to_class()

static unsigned int add_list_to_class ( uint8_t classbits,
PCRE2_UCHAR **  uchardptr,
uint32_t  options,
uint32_t  xoptions,
compile_block cb,
const uint32_t p,
unsigned int  except 
)
static

◆ add_name_to_table()

static void add_name_to_table ( compile_block cb,
PCRE2_SPTR  name,
int  length,
unsigned int  groupno,
uint32_t  tablecount 
)
static

◆ add_not_list_to_class()

static unsigned int add_not_list_to_class ( uint8_t classbits,
PCRE2_UCHAR **  uchardptr,
uint32_t  options,
uint32_t  xoptions,
compile_block cb,
const uint32_t p 
)
static

Definition at line 5515 of file pcre2_compile.c.

References add_to_class(), NOTACHAR, PCRE2_UTF, and utf.

Referenced by compile_branch().

◆ add_to_class()

static unsigned int add_to_class ( uint8_t classbits,
PCRE2_UCHAR **  uchardptr,
uint32_t  options,
uint32_t  xoptions,
compile_block cb,
uint32_t  start,
uint32_t  end 
)
static

◆ add_to_class_internal()

static unsigned int add_to_class_internal ( uint8_t classbits,
PCRE2_UCHAR **  uchardptr,
uint32_t  options,
uint32_t  xoptions,
compile_block cb,
uint32_t  start,
uint32_t  end 
)
static

◆ check_lookbehinds()

static int check_lookbehinds ( uint32_t pptr,
uint32_t **  retptr,
parsed_recurse_check recurses,
compile_block cb,
int lcptr 
)
static

◆ check_posix_name()

static int check_posix_name ( PCRE2_SPTR  ptr,
int  len 
)
static

Definition at line 2418 of file pcre2_compile.c.

References len, posix_name_lengths, posix_names, and PRIV.

Referenced by parse_regex().

◆ check_posix_syntax()

static BOOL check_posix_syntax ( PCRE2_SPTR  ptr,
PCRE2_SPTR  ptrend,
PCRE2_SPTR endptr 
)
static

◆ compile_branch()

static int compile_branch ( uint32_t optionsptr,
uint32_t xoptionsptr,
PCRE2_UCHAR **  codeptr,
uint32_t **  pptrptr,
int errorcodeptr,
uint32_t firstcuptr,
uint32_t firstcuflagsptr,
uint32_t reqcuptr,
uint32_t reqcuflagsptr,
branch_chain bcptr,
open_capitem open_caps,
compile_block cb,
PCRE2_SIZE lengthptr 
)
static

Definition at line 5636 of file pcre2_compile.c.

References add_list_to_class(), add_not_list_to_class(), add_to_class(), open_capitem::assert_depth, compile_block::assert_depth, compile_block::backref_map, compile_block::bracount, C, cbit_digit, cbit_space, cbit_word, compile_block::cbits, CHAR_0, CHAR_CR, CHAR_i, CHAR_j, CHAR_LEFT_CURLY_BRACKET, CHAR_NL, CHAR_NUL, CHAR_r, CHAR_RIGHT_CURLY_BRACKET, CHAR_s, CHAR_z, chartypeoffset, compile_regex(), count, ctype_letter, compile_block::ctypes, CU2BYTES, D, delimiter, delta(), ERR10, ERR15, ERR20, ERR27, ERR52, ERR54, ERR61, ERR86, ERR89, ERR99, compile_block::erroroffset, ESC_A, ESC_b, ESC_B, ESC_C, ESC_D, ESC_d, ESC_H, ESC_h, ESC_K, ESC_P, ESC_p, ESC_S, ESC_s, ESC_v, ESC_V, ESC_w, ESC_W, ESC_Z, compile_block::external_flags, FALSE, compile_block::fcc, find_dupname_details(), GETPLUSOFFSET, compile_block::had_accept, compile_block::had_pruneorskip, compile_block::had_recurse, i, IMM2_SIZE, int, named_group::isdup, compile_block::lastcapture, len, named_group::length, LINK_SIZE, MAX_GROUP_NUMBER, compile_block::max_lookbehind, MAX_UTF_CODE_POINT, memmove, META_ACCEPT, META_ALT, META_ASTERISK, META_ASTERISK_PLUS, META_ASTERISK_QUERY, META_ATOMIC, META_BACKREF, META_BACKREF_BYNAME, META_BIGVALUE, META_CALLOUT_NUMBER, META_CALLOUT_STRING, META_CAPTURE, META_CIRCUMFLEX, META_CLASS, META_CLASS_EMPTY, META_CLASS_EMPTY_NOT, META_CLASS_END, META_CLASS_NOT, META_CODE, META_COMMIT, META_COMMIT_ARG, META_COND_ASSERT, META_COND_DEFINE, META_COND_NAME, META_COND_NUMBER, META_COND_RNAME, META_COND_RNUMBER, META_COND_VERSION, META_DATA, META_DOLLAR, META_DOT, META_END, META_ESCAPE, META_FAIL, META_KET, META_LOOKAHEAD, META_LOOKAHEAD_NA, META_LOOKAHEADNOT, META_LOOKBEHIND, META_LOOKBEHIND_NA, META_LOOKBEHINDNOT, META_MARK, META_MINMAX, META_MINMAX_PLUS, META_MINMAX_QUERY, META_NOCAPTURE, META_OPTIONS, META_PLUS, META_PLUS_PLUS, META_PLUS_QUERY, META_POSIX, META_POSIX_NEG, META_PRUNE, META_PRUNE_ARG, META_QUERY, META_QUERY_PLUS, META_QUERY_QUERY, META_RANGE_ESCAPED, META_RANGE_LITERAL, META_RECURSE, META_RECURSE_BYNAME, META_SCRIPT_RUN, META_SKIP, META_SKIP_ARG, META_THEN, META_THEN_ARG, named_group::name, compile_block::named_groups, compile_block::names_found, open_capitem::next, NOTACHAR, NULL, open_capitem::number, named_group::number, offset, OFLOW_MAX, OP_ACCEPT, OP_ALLANY, OP_ALT, OP_ANY, OP_ASSERT, OP_ASSERT_ACCEPT, OP_ASSERT_NA, OP_ASSERT_NOT, OP_ASSERTBACK, OP_ASSERTBACK_NA, OP_ASSERTBACK_NOT, OP_BRA, OP_BRAPOS, OP_BRAPOSZERO, OP_BRAZERO, OP_CALLOUT, OP_CALLOUT_STR, OP_CBRA, OP_CHAR, OP_CHARI, OP_CIRC, OP_CIRCM, OP_CLASS, OP_CLOSE, OP_COND, OP_CREF, OP_CRPLUS, OP_CRQUERY, OP_CRRANGE, OP_CRSTAR, OP_DEFINE, OP_DNREF, OP_DNREFI, OP_DOLL, OP_DOLLM, OP_EODN, OP_EXACT, OP_EXACTI, OP_FAIL, OP_FALSE, OP_KET, OP_KETRMAX, OP_KETRPOS, OP_lengths, OP_NCLASS, OP_NOT, OP_NOT_UCP_WORD_BOUNDARY, OP_NOTEXACT, OP_NOTEXACTI, OP_NOTI, OP_NOTPROP, OP_ONCE, OP_PLUS, OP_PROP, OP_QUERY, OP_RECURSE, OP_REF, OP_REFI, OP_RREF, OP_SBRA, OP_SBRAPOS, OP_SCOND, OP_SCRIPT_RUN, OP_SKIPZERO, OP_STAR, OP_THEN, OP_TRUE, OP_TYPEEXACT, OP_TYPESTAR, OP_UCP_WORD_BOUNDARY, OP_UPTO, OP_XCLASS, opcode_possessify, compile_block::parens_depth, PC_GRAPH, PC_PRINT, PC_PUNCT, PCRE2_CASELESS, PCRE2_CODE_UNIT_WIDTH, PCRE2_DOTALL, PCRE2_EXTRA_ALLOW_LOOKAROUND_BSK, PCRE2_EXTRA_ASCII_BSW, PCRE2_EXTRA_ASCII_POSIX, PCRE2_EXTRA_CASELESS_RESTRICT, PCRE2_HASBKC, PCRE2_HASCRORLF, PCRE2_HASTHEN, PCRE2_MAJOR, PCRE2_MINOR, PCRE2_MULTILINE, PCRE2_SIZE, PCRE2_SPTR, PCRE2_UCHAR, PCRE2_UCP, PCRE2_UNGREEDY, PCRE2_UTF, posix_class_maps, PRIV, PT_ANY, PT_CLIST, PT_PXGRAPH, PT_PXPRINT, PT_PXPUNCT, PUT2, PUT2INC, PUTCHAR, PUTINC, REPEAT_UNLIMITED, REQ_CASELESS, REQ_NONE, REQ_UNSET, REQ_VARY, compile_block::req_varyopt, RREF_ANY, SKIPOFFSET, compile_block::small_ref_offset, compile_block::start_pattern, compile_block::start_workspace, util::strncmp(), SUPPORT_UNICODE, TABLE_GET, compile_block::top_backref, TRUE, UCD_CASESET, UCD_OTHERCASE, uint32_t, utf, verbops, WORK_SIZE_SAFETY_MARGIN, compile_block::workspace_size, XCL_END, XCL_HASPROP, XCL_MAP, XCL_NOT, XCL_NOTPROP, XCL_PROP, and XCL_RANGE.

Referenced by compile_regex().

◆ compile_regex()

static int compile_regex ( uint32_t  options,
uint32_t  xoptions,
PCRE2_UCHAR **  codeptr,
uint32_t **  pptrptr,
int errorcodeptr,
uint32_t  skipunits,
uint32_t firstcuptr,
uint32_t firstcuflagsptr,
uint32_t reqcuptr,
uint32_t reqcuflagsptr,
branch_chain bcptr,
open_capitem open_caps,
compile_block cb,
PCRE2_SIZE lengthptr 
)
static

◆ find_dupname_details()

static BOOL find_dupname_details ( PCRE2_SPTR  name,
uint32_t  length,
int indexptr,
int countptr,
int errorcodeptr,
compile_block cb 
)
static

◆ find_firstassertedcu()

static uint32_t find_firstassertedcu ( PCRE2_SPTR  code,
uint32_t flags,
uint32_t  inassert 
)
static

◆ find_recurse()

static PCRE2_SPTR find_recurse ( PCRE2_SPTR  code,
BOOL  utf 
)
static

◆ first_significant_code()

static const PCRE2_UCHAR* first_significant_code ( PCRE2_SPTR  code,
BOOL  skipassert 
)
static

◆ get_branchlength()

static int get_branchlength ( uint32_t **  pptrptr,
int minptr,
int errcodeptr,
int lcptr,
parsed_recurse_check recurses,
compile_block cb 
)
static

Definition at line 9443 of file pcre2_compile.c.

References compile_block::bracount, check_lookbehinds(), ERR15, ERR25, ERR35, ERR36, ERR87, ERR90, compile_block::erroroffset, ESC_b, ESC_C, ESC_P, ESC_p, ESC_R, ESC_X, ESC_Z, compile_block::external_flags, compile_block::external_options, FALSE, get_grouplength(), GETPLUSOFFSET, parsed_recurse_check::groupptr, i, named_group::isdup, named_group::length, LOOKBEHIND_MAX, max(), META_ACCEPT, META_ALT, META_ASTERISK, META_ASTERISK_PLUS, META_ASTERISK_QUERY, META_ATOMIC, META_BACKREF, META_BACKREF_BYNAME, META_BIGVALUE, META_CALLOUT_NUMBER, META_CALLOUT_STRING, META_CAPTURE, META_CIRCUMFLEX, META_CLASS, META_CLASS_EMPTY_NOT, META_CLASS_NOT, META_CODE, META_COMMIT, META_COMMIT_ARG, META_COND_ASSERT, META_COND_DEFINE, META_COND_NAME, META_COND_NUMBER, META_COND_RNAME, META_COND_RNUMBER, META_COND_VERSION, META_DATA, META_DOLLAR, META_DOT, META_END, META_ESCAPE, META_FAIL, META_KET, META_LOOKAHEAD, META_LOOKAHEAD_NA, META_LOOKAHEADNOT, META_LOOKBEHIND, META_LOOKBEHIND_NA, META_LOOKBEHINDNOT, META_MARK, META_MINMAX, META_MINMAX_PLUS, META_MINMAX_QUERY, META_NOCAPTURE, META_OPTIONS, META_PLUS, META_PLUS_PLUS, META_PLUS_QUERY, META_PRUNE, META_PRUNE_ARG, META_QUERY, META_QUERY_PLUS, META_QUERY_QUERY, META_RECURSE, META_RECURSE_BYNAME, META_SCRIPT_RUN, META_SKIP, META_SKIP_ARG, META_THEN, META_THEN_ARG, min(), named_group::name, compile_block::named_groups, compile_block::names_found, NULL, named_group::number, offset, compile_block::parsed_pattern, parsed_skip(), PCRE2_DUPCAPUSED, PCRE2_MATCH_UNSET_BACKREF, PCRE2_SIZE, PCRE2_SPTR, PCRE2_UTF, parsed_recurse_check::prev, PRIV, PSKIP_ALT, PSKIP_CLASS, PSKIP_KET, r(), REPEAT_UNLIMITED, set_lookbehind_lengths(), SIZEOFFSET, compile_block::small_ref_offset, compile_block::start_pattern, util::strncmp(), and TRUE.

Referenced by get_grouplength(), and set_lookbehind_lengths().

◆ get_grouplength()

static int get_grouplength ( uint32_t **  pptrptr,
int minptr,
BOOL  isinline,
int errcodeptr,
int lcptr,
int  group,
parsed_recurse_check recurses,
compile_block cb 
)
static

◆ handle_escdsw()

static uint32_t* handle_escdsw ( int  escape,
uint32_t parsed_pattern,
uint32_t  options,
uint32_t  xoptions 
)
static

◆ is_anchored()

static BOOL is_anchored ( PCRE2_SPTR  code,
uint32_t  bracket_map,
compile_block cb,
int  atomcount,
BOOL  inassert 
)
static

◆ is_startline()

static BOOL is_startline ( PCRE2_SPTR  code,
unsigned int  bracket_map,
compile_block cb,
int  atomcount,
BOOL  inassert 
)
static

◆ manage_callouts()

static uint32_t* manage_callouts ( PCRE2_SPTR  ptr,
uint32_t **  pcalloutptr,
BOOL  auto_callout,
uint32_t parsed_pattern,
compile_block cb 
)
static

Definition at line 2595 of file pcre2_compile.c.

References META_CALLOUT_NUMBER, NULL, PCRE2_SIZE, compile_block::start_pattern, and uint32_t.

Referenced by parse_regex().

◆ parse_regex()

static int parse_regex ( PCRE2_SPTR  ptr,
uint32_t  options,
BOOL has_lookbehind,
compile_block cb 
)
static

Definition at line 2773 of file pcre2_compile.c.

References alascount, alasmeta, alasnames, compile_block::bracount, CHAR_0, CHAR_1, CHAR_2, CHAR_3, CHAR_4, CHAR_5, CHAR_6, CHAR_7, CHAR_8, CHAR_9, CHAR_a, CHAR_AMPERSAND, CHAR_APOSTROPHE, CHAR_ASTERISK, CHAR_BACKSLASH, CHAR_BS, CHAR_C, CHAR_CIRCUMFLEX_ACCENT, CHAR_COLON, CHAR_D, CHAR_DOLLAR_SIGN, CHAR_DOT, CHAR_E, CHAR_EQUALS_SIGN, CHAR_EXCLAMATION_MARK, CHAR_GREATER_THAN_SIGN, CHAR_HT, CHAR_i, CHAR_J, CHAR_LEFT_CURLY_BRACKET, CHAR_LEFT_PARENTHESIS, CHAR_LEFT_SQUARE_BRACKET, CHAR_LESS_THAN_SIGN, CHAR_m, CHAR_MINUS, CHAR_n, CHAR_NEL, CHAR_NUMBER_SIGN, CHAR_P, CHAR_PLUS, CHAR_Q, CHAR_QUESTION_MARK, CHAR_R, CHAR_r, CHAR_RIGHT_CURLY_BRACKET, CHAR_RIGHT_PARENTHESIS, CHAR_RIGHT_SQUARE_BRACKET, CHAR_S, CHAR_s, CHAR_SPACE, CHAR_T, CHAR_U, CHAR_u, CHAR_VERTICAL_LINE, CHAR_W, CHAR_x, check_posix_name(), check_posix_syntax(), CHMAX_255, ctype_lcletter, ctype_space, compile_block::ctypes, compile_block::cx, delimiter, compile_block::dupnames, compile_block::end_pattern, ERR11, ERR12, ERR13, ERR14, ERR15, ERR18, ERR19, ERR21, ERR22, ERR24, ERR28, ERR29, ERR30, ERR38, ERR39, ERR40, ERR41, ERR43, ERR45, ERR49, ERR50, ERR57, ERR58, ERR6, ERR60, ERR61, ERR63, ERR65, ERR66, ERR69, ERR7, ERR71, ERR72, ERR76, ERR79, ERR8, ERR81, ERR82, ERR83, ERR84, ERR85, ERR89, ERR9, ERR94, ERR95, ERR96, ERR97, ERR98, compile_block::erroroffset, ESC_B, ESC_b, ESC_C, ESC_D, ESC_d, ESC_E, ESC_g, ESC_H, ESC_h, ESC_k, ESC_N, ESC_p, ESC_P, ESC_Q, ESC_R, ESC_S, ESC_s, ESC_ub, ESC_V, ESC_v, ESC_W, ESC_w, ESC_X, compile_block::external_flags, compile_block::external_options, pcre2_real_compile_context::extra_options, FAILED, FALSE, nest_save::flags, pcre2_memctl::free, ge(), GETCHARINCTEST, handle_escdsw(), i, if(), IMM2_SIZE, int, IS_DIGIT, IS_NEWLINE, named_group::isdup, len, verbitem::len, alasitem::len, named_group::length, pcre2_memctl::malloc, manage_callouts(), MAX_255, nest_save::max_group, MAX_GROUP_NUMBER, MAX_MARK, MAX_NAME_COUNT, pcre2_real_compile_context::memctl, pcre2_memctl::memory_data, verbitem::meta, alasitem::meta, META_ACCEPT, META_ALT, META_ASTERISK, META_ATOMIC, META_ATOMIC_SCRIPT_RUN, META_BACKREF, META_BACKREF_BYNAME, META_BIGVALUE, META_CALLOUT_NUMBER, META_CALLOUT_STRING, META_CAPTURE, META_CIRCUMFLEX, META_CLASS, META_CLASS_EMPTY, META_CLASS_EMPTY_NOT, META_CLASS_END, META_CLASS_NOT, META_COND_ASSERT, META_COND_DEFINE, META_COND_NAME, META_COND_NUMBER, META_COND_RNAME, META_COND_RNUMBER, META_COND_VERSION, META_DOLLAR, META_DOT, META_END, META_ESCAPE, META_KET, META_LOOKAHEAD, META_LOOKAHEAD_NA, META_LOOKAHEADNOT, META_LOOKBEHIND, META_LOOKBEHIND_NA, META_LOOKBEHINDNOT, META_MARK, META_MINMAX, META_NOCAPTURE, META_OPTIONS, META_PLUS, META_POSIX, META_POSIX_NEG, META_QUERY, META_RANGE_ESCAPED, META_RANGE_LITERAL, META_RECURSE, META_RECURSE_BYNAME, META_SCRIPT_RUN, n, named_group::name, compile_block::name_entry_size, NAMED_GROUP_LIST_SIZE, compile_block::named_group_list_size, compile_block::named_groups, compile_block::names_found, nest_save::nest_depth, compile_block::nllen, NSF_ATOMICSR, NSF_CONDASSERT, NSF_RESET, NULL, named_group::number, offset, ok, nest_save::options, pcre2_real_compile_context::parens_nest_limit, PARSE_TRACKED_EXTRA_OPTIONS, PARSE_TRACKED_OPTIONS, PARSED_LITERAL, compile_block::parsed_pattern, compile_block::parsed_pattern_end, PC_DIGIT, PC_XDIGIT, PCRE2_ALLOW_EMPTY_CLASS, PCRE2_ALT_VERBNAMES, PCRE2_AUTO_CALLOUT, PCRE2_CASELESS, PCRE2_DOTALL, PCRE2_DUPCAPUSED, PCRE2_DUPNAMES, PCRE2_EXTENDED, PCRE2_EXTENDED_MORE, PCRE2_EXTRA_ASCII_BSD, PCRE2_EXTRA_ASCII_BSS, PCRE2_EXTRA_ASCII_BSW, PCRE2_EXTRA_ASCII_DIGIT, PCRE2_EXTRA_ASCII_POSIX, PCRE2_EXTRA_BAD_ESCAPE_IS_LITERAL, PCRE2_EXTRA_CASELESS_RESTRICT, PCRE2_EXTRA_MATCH_LINE, PCRE2_EXTRA_MATCH_WORD, PCRE2_JCHANGED, PCRE2_LITERAL, PCRE2_MULTILINE, PCRE2_NEVER_BACKSLASH_C, PCRE2_NO_AUTO_CAPTURE, PCRE2_SIZE, PCRE2_SPTR, PCRE2_UCHAR, PCRE2_UCP, PCRE2_UNGREEDY, PCRE2_UNSET, PCRE2_UTF, PRIV, PT_WORD, PUTOFFSET, RANGE_NO, RANGE_OK_ESCAPED, RANGE_OK_LITERAL, RANGE_STARTED, read_name(), read_number(), read_repeat_counts(), nest_save::reset_group, compile_block::small_ref_offset, compile_block::start_pattern, compile_block::start_workspace, STR_BACKSLASH, STR_E, STR_Q, STRING_DEFINE, STRING_VERSION, STRING_WEIRD_ENDWORD, STRING_WEIRD_STARTWORD, util::strncmp(), SUPPORT_UNICODE, terminator, TRUE, UINT32_MAX, uint32_t, utf, verbcount, verbnames, verbs, compile_block::workspace_size, and nest_save::xoptions.

Referenced by pcre2_compile().

◆ parsed_skip()

static uint32_t* parsed_skip ( uint32_t pptr,
uint32_t  skiptype 
)
static

◆ pcre2_code_copy()

Definition at line 1200 of file pcre2_compile.c.

References NULL, pcre2_code, PCRE2_DEREF_TABLES, PCRE2_SIZE, and TABLES_LENGTH.

◆ pcre2_code_copy_with_tables()

PCRE2_EXPORT pcre2_code* PCRE2_CALL_CONVENTION pcre2_code_copy_with_tables ( const pcre2_code code)

Definition at line 1234 of file pcre2_compile.c.

References NULL, pcre2_code, PCRE2_DEREF_TABLES, PCRE2_SIZE, and TABLES_LENGTH.

◆ pcre2_code_free()

PCRE2_EXPORT void PCRE2_CALL_CONVENTION pcre2_code_free ( pcre2_code code)

◆ pcre2_compile()

PCRE2_EXPORT pcre2_code* PCRE2_CALL_CONVENTION pcre2_compile ( PCRE2_SPTR  pattern,
PCRE2_SIZE  patlen,
uint32_t  options,
int errorptr,
PCRE2_SIZE erroroffset,
pcre2_compile_context ccontext 
)

Definition at line 10126 of file pcre2_compile.c.

References add_name_to_table(), compile_block::assert_depth, compile_block::backref_map, pcre2_real_code::blocksize, compile_block::bracount, pcre2_real_code::bsr_convention, C16_WORK_SIZE, compile_block::cbits, cbits_offset, CHAR_0, CHAR_ASTERISK, CHAR_CR, CHAR_LEFT_PARENTHESIS, CHAR_NL, CHAR_NUL, CHAR_RIGHT_PARENTHESIS, check_lookbehinds(), pcre2_real_code::compile_options, compile_regex(), COMPILE_WORK_SIZE, compile_block::ctypes, ctypes_offset, CU2BYTES, compile_block::cx, compile_block::dupnames, compile_block::end_pattern, ERR0, ERR101, ERR16, ERR17, ERR20, ERR21, ERR23, ERR31, ERR32, ERR53, ERR56, ERR60, ERR74, ERR75, ERR80, ERR88, ERR91, ERR92, compile_block::erroroffset, pcre2_real_code::executable_jit, compile_block::external_flags, compile_block::external_options, pcre2_real_code::extra_options, FALSE, compile_block::fcc, fcc_offset, find_firstassertedcu(), find_recurse(), pcre2_real_code::first_codeunit, pcre2_real_code::flags, recurse_cache::group, compile_block::groupinfo, GROUPINFO_DEFAULT_SIZE, recurse_cache::groupnumber, compile_block::had_accept, compile_block::had_pruneorskip, compile_block::had_recurse, i, if(), int, is_anchored(), IS_DIGIT, is_startline(), pcre2_real_code::last_codeunit, compile_block::lastcapture, compile_block::lcc, lcc_offset, pso::length, named_group::length, pcre2_real_code::limit_depth, pcre2_real_code::limit_heap, pcre2_real_code::limit_match, LINK_SIZE, MAGIC_NUMBER, pcre2_real_code::magic_number, pcre2_memctl::malloc, pcre2_real_code::max_lookbehind, compile_block::max_lookbehind, MAX_UTF_CODE_POINT, compile_block::max_varlookbehind, pcre2_real_code::memctl, META_END, pcre2_real_code::minlength, pso::name, named_group::name, pcre2_real_code::name_count, pcre2_real_code::name_entry_size, compile_block::name_entry_size, compile_block::name_table, NAMED_GROUP_LIST_SIZE, compile_block::named_group_list_size, compile_block::named_groups, compile_block::names_found, pcre2_real_code::newline_convention, compile_block::nl, compile_block::nllen, compile_block::nltype, NLTYPE_ANY, NLTYPE_ANYCRLF, NLTYPE_FIXED, NULL, named_group::number, OP_BRA, OP_END, pcre2_real_code::overall_options, compile_block::parens_depth, parse_regex(), compile_block::parsed_pattern, PARSED_PATTERN_DEFAULT_SIZE, compile_block::parsed_pattern_end, PCRE2_ANCHORED, PCRE2_AUTO_CALLOUT, PCRE2_BSR_SET, pcre2_code_free(), PCRE2_CODE_UNIT_WIDTH, pcre2_compile_context, PCRE2_EXTRA_ALLOW_SURROGATE_ESCAPES, PCRE2_EXTRA_MATCH_LINE, PCRE2_EXTRA_MATCH_WORD, PCRE2_FIRSTCASELESS, PCRE2_FIRSTMAPSET, PCRE2_FIRSTSET, PCRE2_HASACCEPT, PCRE2_LASTCASELESS, PCRE2_LASTSET, PCRE2_LITERAL, PCRE2_MATCH_EMPTY, PCRE2_MATCH_INVALID_UTF, PCRE2_NEVER_UCP, PCRE2_NEVER_UTF, PCRE2_NEWLINE_ANY, PCRE2_NEWLINE_ANYCRLF, PCRE2_NEWLINE_CR, PCRE2_NEWLINE_CRLF, PCRE2_NEWLINE_LF, PCRE2_NEWLINE_NUL, PCRE2_NL_SET, PCRE2_NO_AUTO_POSSESS, PCRE2_NO_START_OPTIMIZE, PCRE2_NO_UTF_CHECK, pcre2_printint, PCRE2_SIZE, PCRE2_SPTR, PCRE2_STARTLINE, PCRE2_UCHAR, PCRE2_UCP, PCRE2_UNSET, PCRE2_UTF, PCRE2_ZERO_TERMINATED, PRIV, PSO_BSR, PSO_FLG, PSO_LIMD, PSO_LIMH, PSO_LIMM, pso_list, PSO_NL, PSO_OPT, PUBLIC_COMPILE_EXTRA_OPTIONS, PUBLIC_COMPILE_OPTIONS, PUBLIC_LITERAL_COMPILE_EXTRA_OPTIONS, PUBLIC_LITERAL_COMPILE_OPTIONS, REQ_CASELESS, REQ_NONE, REQ_VARY, compile_block::req_varyopt, RSCAN_CACHE_SIZE, compile_block::small_ref_offset, pcre2_real_code::start_bitmap, compile_block::start_code, compile_block::start_pattern, compile_block::start_workspace, pcre2_real_code::tables, pcre2_real_code::top_backref, compile_block::top_backref, pcre2_real_code::top_bracket, TRUE, pso::type, UCD_OTHERCASE, UINT32_MAX, uint32_t, utf, valid_utf(), pso::value, and compile_block::workspace_size.

Referenced by compile_pattern(), LLVMFuzzerTestOneInput(), main(), pcre2_regcomp(), and CRegexp::Set().

◆ read_name()

static BOOL read_name ( PCRE2_SPTR ptrptr,
PCRE2_SPTR  ptrend,
BOOL  utf,
uint32_t  terminator,
PCRE2_SIZE offsetptr,
PCRE2_SPTR nameptr,
uint32_t namelenptr,
int errorcodeptr,
compile_block cb 
)
static

◆ read_number()

static BOOL read_number ( PCRE2_SPTR ptrptr,
PCRE2_SPTR  ptrend,
int32_t  allow_sign,
uint32_t  max_value,
uint32_t  max_error,
int intptr,
int errorcodeptr 
)
static

◆ read_repeat_counts()

static BOOL read_repeat_counts ( PCRE2_SPTR ptrptr,
PCRE2_SPTR  ptrend,
uint32_t minp,
uint32_t maxp,
int errorcodeptr 
)
static

◆ set_lookbehind_lengths()

static BOOL set_lookbehind_lengths ( uint32_t **  pptrptr,
int errcodeptr,
int lcptr,
parsed_recurse_check recurses,
compile_block cb 
)
static

Variable Documentation

◆ alascount

const int alascount = sizeof(alasmeta)/sizeof(alasitem)
static

Definition at line 685 of file pcre2_compile.c.

Referenced by parse_regex().

◆ alasmeta

const alasitem alasmeta[]
static
Initial value:
= {
{ 3, 0x80230000u },
{ 3, 0x80250000u },
{ 5, 0x80270000u },
{ 5, 0x80280000u },
{ 3, 0x80240000u },
{ 3, 0x80260000u },
{ 18, 0x80230000u },
{ 19, 0x80250000u },
{ 29, 0x80270000u },
{ 30, 0x80280000u },
{ 18, 0x80240000u },
{ 19, 0x80260000u },
{ 6, 0x80020000u },
{ 2, 0x80220000u },
{ 3, 0x8fff0000u },
{ 10, 0x80220000u },
{ 17, 0x8fff0000u }
}

Definition at line 665 of file pcre2_compile.c.

Referenced by parse_regex().

◆ alasnames

const char alasnames[]
static
Initial value:
=
"pla\0"
"plb\0"
"napla\0"
"naplb\0"
"nla\0"
"nlb\0"
"positive_lookahead\0"
"positive_lookbehind\0"
"non_atomic_positive_lookahead\0"
"non_atomic_positive_lookbehind\0"
"negative_lookahead\0"
"negative_lookbehind\0"
"atomic\0"
"sr\0"
"asr\0"
"script_run\0"
"atomic_script_run"

Definition at line 646 of file pcre2_compile.c.

Referenced by parse_regex().

◆ chartypeoffset

uint32_t chartypeoffset[]
static
Initial value:

Definition at line 689 of file pcre2_compile.c.

Referenced by compile_branch().

◆ escapes

const short int escapes[]
static

Definition at line 511 of file pcre2_compile.c.

Referenced by _pcre2_check_escape().

◆ meta_extra_lengths

unsigned char meta_extra_lengths[]
static

Definition at line 306 of file pcre2_compile.c.

Referenced by parsed_skip().

◆ opcode_possessify

const uint8_t opcode_possessify[]
static

Definition at line 867 of file pcre2_compile.c.

Referenced by compile_branch().

◆ posix_class_maps

const int posix_class_maps[]
static
Initial value:
= {
160 , 64 , -2,
128 , -1, 0,
96 , -1, 0,
160 , -1, 2,
224 , 288 , 0,
0 , -1, 1,
288 , -1, 0,
64 , -1, 0,
192 , -1, 0,
224 , -1, 0,
256 , -1, 0,
0 , -1, 0,
160 , -1, 0,
32 , -1, 0
}

Definition at line 725 of file pcre2_compile.c.

Referenced by compile_branch().

◆ posix_name_lengths

const uint8_t posix_name_lengths[]
static
Initial value:
= {
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 6, 0 }

Definition at line 706 of file pcre2_compile.c.

Referenced by check_posix_name().

◆ posix_names

const char posix_names[]
static
Initial value:
=
"alpha\0" "lower\0" "upper\0" "alnum\0"
"ascii\0" "blank\0" "cntrl\0" "digit\0"
"graph\0" "print\0" "punct\0" "space\0"
"word\0" "xdigit"

Definition at line 700 of file pcre2_compile.c.

Referenced by check_posix_name().

◆ pso_list

const pso pso_list[]
static
Initial value:
= {
{ (uint8_t *) "UTF32)" , 6 , PSO_OPT, PCRE2_UTF },
{ (uint8_t *) "UTF)" , 4, PSO_OPT, PCRE2_UTF },
{ (uint8_t *) "UCP)" , 4, PSO_OPT, PCRE2_UCP },
{ (uint8_t *) "NOTEMPTY)" , 9, PSO_FLG, 0x00010000 },
{ (uint8_t *) "NOTEMPTY_ATSTART)" , 17, PSO_FLG, 0x00020000 },
{ (uint8_t *) "NO_AUTO_POSSESS)" , 16, PSO_OPT, PCRE2_NO_AUTO_POSSESS },
{ (uint8_t *) "NO_DOTSTAR_ANCHOR)" , 18, PSO_OPT, PCRE2_NO_DOTSTAR_ANCHOR },
{ (uint8_t *) "NO_JIT)" , 7, PSO_FLG, 0x00080000 },
{ (uint8_t *) "NO_START_OPT)" , 13, PSO_OPT, PCRE2_NO_START_OPTIMIZE },
{ (uint8_t *) "LIMIT_HEAP=" , 11, PSO_LIMH, 0 },
{ (uint8_t *) "LIMIT_MATCH=" , 12, PSO_LIMM, 0 },
{ (uint8_t *) "LIMIT_DEPTH=" , 12, PSO_LIMD, 0 },
{ (uint8_t *) "LIMIT_RECURSION=" , 16, PSO_LIMD, 0 },
{ (uint8_t *) "CR)" , 3, PSO_NL, PCRE2_NEWLINE_CR },
{ (uint8_t *) "LF)" , 3, PSO_NL, PCRE2_NEWLINE_LF },
{ (uint8_t *) "CRLF)" , 5, PSO_NL, PCRE2_NEWLINE_CRLF },
{ (uint8_t *) "ANY)" , 4, PSO_NL, PCRE2_NEWLINE_ANY },
{ (uint8_t *) "NUL)" , 4, PSO_NL, PCRE2_NEWLINE_NUL },
{ (uint8_t *) "ANYCRLF)" , 8, PSO_NL, PCRE2_NEWLINE_ANYCRLF },
{ (uint8_t *) "BSR_ANYCRLF)" , 12, PSO_BSR, PCRE2_BSR_ANYCRLF },
{ (uint8_t *) "BSR_UNICODE)" , 12, PSO_BSR, PCRE2_BSR_UNICODE }
}
unsigned char uint8_t
#define PCRE2_BSR_ANYCRLF
Definition: pcre2.h:224
#define PCRE2_NEWLINE_ANYCRLF
Definition: pcre2.h:220
#define PCRE2_NEWLINE_CR
Definition: pcre2.h:216
#define PCRE2_NO_DOTSTAR_ANCHOR
Definition: pcre2.h:140
#define PCRE2_NEWLINE_CRLF
Definition: pcre2.h:218
#define PCRE2_NEWLINE_NUL
Definition: pcre2.h:221
#define PCRE2_BSR_UNICODE
Definition: pcre2.h:223
#define PCRE2_NO_START_OPTIMIZE
Definition: pcre2.h:141
#define PCRE2_NEWLINE_ANY
Definition: pcre2.h:219
#define PCRE2_NEWLINE_LF
Definition: pcre2.h:217
@ PSO_LIMH
@ PSO_OPT
@ PSO_FLG
@ PSO_NL
@ PSO_LIMM
@ PSO_BSR
@ PSO_LIMD

Definition at line 837 of file pcre2_compile.c.

Referenced by pcre2_compile().

◆ verbcount

const int verbcount = sizeof(verbs)/sizeof(verbitem)
static

Definition at line 631 of file pcre2_compile.c.

Referenced by parse_regex().

◆ verbnames

const char verbnames[]
static
Initial value:
=
"\0"
"MARK\0"
"ACCEPT\0"
"F\0"
"FAIL\0"
"COMMIT\0"
"PRUNE\0"
"SKIP\0"
"THEN"

Definition at line 608 of file pcre2_compile.c.

Referenced by parse_regex().

◆ verbops

const uint32_t verbops[]
static
Initial value:
= {
@ OP_SKIP_ARG
@ OP_PRUNE_ARG
@ OP_THEN_ARG
@ OP_THEN
@ OP_MARK
@ OP_SKIP
@ OP_COMMIT_ARG
@ OP_PRUNE
@ OP_COMMIT
@ OP_FAIL
@ OP_ACCEPT

Definition at line 635 of file pcre2_compile.c.

Referenced by compile_branch().

◆ verbs

const verbitem verbs[]
static
Initial value:
= {
{ 0, 0x80290000u , +1 },
{ 4, 0x80290000u , +1 },
{ 6, 0x802a0000u , -1 },
{ 1, 0x802b0000u , -1 },
{ 4, 0x802b0000u , -1 },
{ 6, 0x802c0000u , 0 },
{ 5, 0x802e0000u , 0 },
{ 4, 0x80300000u , 0 },
{ 4, 0x80320000u , 0 }
}

Definition at line 619 of file pcre2_compile.c.

Referenced by parse_regex().

◆ xdigitab

const uint8_t xdigitab[]
static

Definition at line 422 of file pcre2_compile.c.

Modified on Fri Sep 20 14:58:05 2024 by modify_doxy.py rev. 669887