AutoHotkey_L  1.1.33.09
About: AutoHotkey is a macro-creation and automation-oriented scripting utility for Windows that allows to create scripts for all kinds of tasks such as form fillers, auto-clicking, macros, etc. Source Code.
  Fossies Dox: AutoHotkey_L-1.1.33.09.zip  ("unofficial" and yet experimental doxygen-generated source code documentation)  

pcre_dfa_exec.c File Reference
#include "pcre_internal.h"
Include dependency graph for pcre_dfa_exec.c:

Go to the source code of this file.

Classes

struct  stateblock
 

Macros

#define NLBLOCK   md /* Block containing newline information */
 
#define PSSTART   start_subject /* Field containing processed string start */
 
#define PSEND   end_subject /* Field containing processed string end */
 
#define SP   " "
 
#define OP_PROP_EXTRA   300
 
#define OP_EXTUNI_EXTRA   320
 
#define OP_ANYNL_EXTRA   340
 
#define OP_HSPACE_EXTRA   360
 
#define OP_VSPACE_EXTRA   380
 
#define INTS_PER_STATEBLOCK   (sizeof(stateblock)/sizeof(int))
 
#define ADD_ACTIVE(x, y)
 
#define ADD_ACTIVE_DATA(x, y, z)
 
#define ADD_NEW(x, y)
 
#define ADD_NEW_DATA(x, y, z)
 

Typedefs

typedef struct stateblock stateblock
 

Functions

static int internal_dfa_exec (dfa_match_data *md, const pcre_uchar *this_start_code, const pcre_uchar *current_subject, int start_offset, int *offsets, int offsetcount, int *workspace, int wscount, int rlevel)
 
int pcre_dfa_exec (const pcre *argument_re, const pcre_extra *extra_data, const char *subject, int length, int start_offset, int options, int *offsets, int offsetcount, int *workspace, int wscount)
 

Variables

static const pcre_uint8 coptable []
 
static const pcre_uint8 poptable []
 
static const pcre_uint8 toptable1 []
 
static const pcre_uint8 toptable2 []
 

Macro Definition Documentation

◆ ADD_ACTIVE

#define ADD_ACTIVE (   x,
 
)
Value:
if (active_count++ < wscount) \
{ \
next_active_state->offset = (x); \
next_active_state->count = (y); \
next_active_state++; \
DPRINTF(("%.*sADD_ACTIVE(%d,%d)\n", rlevel*2-2, SP, (x), (y))); \
} \
#define PCRE_ERROR_DFA_WSSIZE
Definition: pcre.h:170
#define SP
Definition: pcre_dfa_exec.c:89

Execute a Regular Expression - DFA engine *

Definition at line 347 of file pcre_dfa_exec.c.

◆ ADD_ACTIVE_DATA

#define ADD_ACTIVE_DATA (   x,
  y,
 
)
Value:
if (active_count++ < wscount) \
{ \
next_active_state->offset = (x); \
next_active_state->count = (y); \
next_active_state->data = (z); \
next_active_state++; \
DPRINTF(("%.*sADD_ACTIVE_DATA(%d,%d,%d)\n", rlevel*2-2, SP, (x), (y), (z))); \
} \

Definition at line 357 of file pcre_dfa_exec.c.

◆ ADD_NEW

#define ADD_NEW (   x,
 
)
Value:
if (new_count++ < wscount) \
{ \
next_new_state->offset = (x); \
next_new_state->count = (y); \
next_new_state++; \
DPRINTF(("%.*sADD_NEW(%d,%d)\n", rlevel*2-2, SP, (x), (y))); \
} \

Definition at line 368 of file pcre_dfa_exec.c.

◆ ADD_NEW_DATA

#define ADD_NEW_DATA (   x,
  y,
 
)
Value:
if (new_count++ < wscount) \
{ \
next_new_state->offset = (x); \
next_new_state->count = (y); \
next_new_state->data = (z); \
next_new_state++; \
DPRINTF(("%.*sADD_NEW_DATA(%d,%d,%d)\n", rlevel*2-2, SP, (x), (y), (z))); \
} \

Definition at line 378 of file pcre_dfa_exec.c.

◆ INTS_PER_STATEBLOCK

#define INTS_PER_STATEBLOCK   (sizeof(stateblock)/sizeof(int))

Definition at line 285 of file pcre_dfa_exec.c.

◆ NLBLOCK

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

Perl-Compatible Regular Expressions *

Definition at line 80 of file pcre_dfa_exec.c.

◆ OP_ANYNL_EXTRA

#define OP_ANYNL_EXTRA   340

Definition at line 103 of file pcre_dfa_exec.c.

◆ OP_EXTUNI_EXTRA

#define OP_EXTUNI_EXTRA   320

Definition at line 102 of file pcre_dfa_exec.c.

◆ OP_HSPACE_EXTRA

#define OP_HSPACE_EXTRA   360

Definition at line 104 of file pcre_dfa_exec.c.

◆ OP_PROP_EXTRA

#define OP_PROP_EXTRA   300

Code parameters and static tables *

Definition at line 101 of file pcre_dfa_exec.c.

◆ OP_VSPACE_EXTRA

#define OP_VSPACE_EXTRA   380

Definition at line 105 of file pcre_dfa_exec.c.

◆ PSEND

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

Definition at line 82 of file pcre_dfa_exec.c.

◆ PSSTART

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

Definition at line 81 of file pcre_dfa_exec.c.

◆ SP

#define SP   " "

Definition at line 89 of file pcre_dfa_exec.c.

Typedef Documentation

◆ stateblock

typedef struct stateblock stateblock

Function Documentation

◆ internal_dfa_exec()

static int internal_dfa_exec ( dfa_match_data md,
const pcre_uchar this_start_code,
const pcre_uchar current_subject,
int  start_offset,
int *  offsets,
int  offsetcount,
int *  workspace,
int  wscount,
int  rlevel 
)
static

Definition at line 392 of file pcre_dfa_exec.c.

References ADD_ACTIVE, ADD_NEW, ADD_NEW_DATA, allow_zero, dfa_match_data::callout_data, CHAR_CR, CHAR_FF, CHAR_HT, CHAR_NL, CHAR_UNDERSCORE, CHAR_VT, ucd_record::chartype, coptable, stateblock::count, ctype_word, ctypes_offset, stateblock::data, DPRINTF, dfa_match_data::end_subject, FALSE, fcc_offset, GET2, GETCHARLEN, GETCHARTEST, dfa_recursion_info::group_num, IMM2_SIZE, INTS_PER_STATEBLOCK, IS_NEWLINE, lcc_offset, LINK_SIZE, memmove, dfa_match_data::moptions, dfa_match_data::nllen, NOTACHAR, stateblock::offset, OK, OP_ALLANY, OP_ALT, OP_ANY, OP_ANYBYTE, OP_ANYNL, OP_ANYNL_EXTRA, OP_ASSERT, OP_ASSERT_NOT, OP_ASSERTBACK, OP_ASSERTBACK_NOT, OP_BRA, OP_BRAMINZERO, OP_BRAPOS, OP_BRAPOSZERO, OP_BRAZERO, OP_CALLOUT, OP_CBRA, OP_CBRAPOS, OP_CHAR, OP_CHARI, OP_CIRC, OP_CIRCM, OP_CLASS, OP_COND, OP_CREF, OP_CRMINPLUS, OP_CRMINQUERY, OP_CRMINRANGE, OP_CRMINSTAR, OP_CRPLUS, OP_CRQUERY, OP_CRRANGE, OP_CRSTAR, OP_DEF, OP_DIGIT, OP_DOLL, OP_DOLLM, OP_EOD, OP_EODN, OP_EXACT, OP_EXACTI, OP_EXTUNI, OP_EXTUNI_EXTRA, OP_FAIL, OP_HSPACE, OP_HSPACE_EXTRA, OP_KET, OP_KETRMAX, OP_KETRMIN, OP_KETRPOS, OP_MINPLUS, OP_MINPLUSI, OP_MINQUERY, OP_MINQUERYI, OP_MINSTAR, OP_MINSTARI, OP_MINUPTO, OP_MINUPTOI, OP_NCLASS, OP_NCREF, OP_NOT, OP_NOT_DIGIT, OP_NOT_HSPACE, OP_NOT_VSPACE, OP_NOT_WHITESPACE, OP_NOT_WORD_BOUNDARY, OP_NOT_WORDCHAR, OP_NOTEXACT, OP_NOTEXACTI, OP_NOTI, OP_NOTMINPLUS, OP_NOTMINPLUSI, OP_NOTMINQUERY, OP_NOTMINQUERYI, OP_NOTMINSTAR, OP_NOTMINSTARI, OP_NOTMINUPTO, OP_NOTMINUPTOI, OP_NOTPLUS, OP_NOTPLUSI, OP_NOTPOSPLUS, OP_NOTPOSPLUSI, OP_NOTPOSQUERY, OP_NOTPOSQUERYI, OP_NOTPOSSTAR, OP_NOTPOSSTARI, OP_NOTPOSUPTO, OP_NOTPOSUPTOI, OP_NOTPROP, OP_NOTQUERY, OP_NOTQUERYI, OP_NOTSTAR, OP_NOTSTARI, OP_NOTUPTO, OP_NOTUPTOI, OP_NRREF, OP_ONCE, OP_ONCE_NC, OP_PLUS, OP_PLUSI, OP_POSPLUS, OP_POSPLUSI, OP_POSQUERY, OP_POSQUERYI, OP_POSSTAR, OP_POSSTARI, OP_POSUPTO, OP_POSUPTOI, OP_PROP, OP_PROP_EXTRA, OP_QUERY, OP_QUERYI, OP_RECURSE, OP_REVERSE, OP_RREF, OP_SBRA, OP_SBRAPOS, OP_SCBRA, OP_SCBRAPOS, OP_SCOND, OP_SKIPZERO, OP_SOD, OP_SOM, OP_STAR, OP_STARI, OP_TABLE_LENGTH, OP_TYPEEXACT, OP_TYPEMINPLUS, OP_TYPEMINQUERY, OP_TYPEMINSTAR, OP_TYPEMINUPTO, OP_TYPEPLUS, OP_TYPEPOSPLUS, OP_TYPEPOSQUERY, OP_TYPEPOSSTAR, OP_TYPEPOSUPTO, OP_TYPEQUERY, OP_TYPESTAR, OP_TYPEUPTO, OP_UPTO, OP_UPTOI, OP_VSPACE, OP_VSPACE_EXTRA, OP_WHITESPACE, OP_WORD_BOUNDARY, OP_WORDCHAR, OP_XCLASS, PCRE_BSR_ANYCRLF, PCRE_DFA_RESTART, PCRE_DFA_SHORTEST, PCRE_DOLLAR_ENDONLY, PCRE_ERROR_DFA_RECURSE, PCRE_ERROR_DFA_UCOND, PCRE_ERROR_DFA_UITEM, PCRE_ERROR_NOMATCH, PCRE_ERROR_PARTIAL, PCRE_ERROR_RECURSELOOP, PCRE_NOTBOL, PCRE_NOTEMPTY, PCRE_NOTEMPTY_ATSTART, PCRE_NOTEOL, PCRE_PARTIAL_HARD, PCRE_PARTIAL_SOFT, PCRE_SPTR, PCRE_SPTR16, PCRE_UCP, PCRE_UTF8, poptable, dfa_match_data::poptions, dfa_recursion_info::prevrec, PRIV, PT_ALNUM, PT_ANY, PT_GC, PT_LAMP, PT_PC, PT_PXSPACE, PT_SC, PT_SPACE, PT_WORD, PUBL, dfa_match_data::recursive, RREF_ANY, ucd_record::script, SP, dfa_match_data::start_code, dfa_match_data::start_offset, dfa_match_data::start_subject, dfa_match_data::start_used_ptr, STRLEN_UC, dfa_recursion_info::subject_position, TABLE_GET, dfa_match_data::tables, toptable1, toptable2, TRUE, ucp_L, ucp_Ll, ucp_Lt, ucp_Lu, ucp_M, ucp_N, ucp_Z, and WAS_NEWLINE.

Referenced by pcre_dfa_exec().

◆ pcre_dfa_exec()

int pcre_dfa_exec ( const pcre argument_re,
const pcre_extra extra_data,
const char *  subject,
int  length,
int  start_offset,
int  options,
int *  offsets,
int  offsetcount,
int *  workspace,
int  wscount 
)

Execute a Regular Expression - DFA engine *

Definition at line 3019 of file pcre_dfa_exec.c.

References pcre16_extra::callout_data, dfa_match_data::callout_data, CHAR_CR, CHAR_NL, dfa_match_data::end_subject, FALSE, fcc_offset, pcre16_extra::flags, pcre_study_data::flags, internal_dfa_exec(), IS_NEWLINE, MAGIC_NUMBER, pcre_study_data::minlength, dfa_match_data::moptions, NEWLINE, dfa_match_data::nl, dfa_match_data::nllen, dfa_match_data::nltype, NLTYPE_ANY, NLTYPE_ANYCRLF, NLTYPE_FIXED, PCRE_ANCHORED, PCRE_BSR_ANYCRLF, PCRE_BSR_UNICODE, PCRE_DFA_RESTART, PCRE_ERROR_BADCOUNT, PCRE_ERROR_BADENDIANNESS, PCRE_ERROR_BADMAGIC, PCRE_ERROR_BADMODE, PCRE_ERROR_BADNEWLINE, PCRE_ERROR_BADOFFSET, PCRE_ERROR_BADOPTION, PCRE_ERROR_BADUTF8, PCRE_ERROR_BADUTF8_OFFSET, PCRE_ERROR_DFA_UMLIMIT, PCRE_ERROR_DFA_WSSIZE, PCRE_ERROR_NOMATCH, PCRE_ERROR_NULL, PCRE_ERROR_SHORTUTF8, PCRE_EXTRA_CALLOUT_DATA, PCRE_EXTRA_MATCH_LIMIT, PCRE_EXTRA_MATCH_LIMIT_RECURSION, PCRE_EXTRA_STUDY_DATA, PCRE_EXTRA_TABLES, PCRE_FCH_CASELESS, PCRE_FIRSTLINE, PCRE_FIRSTSET, PCRE_HASCRORLF, PCRE_MODE, PCRE_NEWLINE_ANY, PCRE_NEWLINE_ANYCRLF, PCRE_NEWLINE_BITS, PCRE_NEWLINE_CR, PCRE_NEWLINE_LF, PCRE_NO_START_OPTIMIZE, PCRE_NO_UTF8_CHECK, PCRE_PARTIAL_HARD, PCRE_PARTIAL_SOFT, PCRE_PUCHAR, PCRE_RCH_CASELESS, PCRE_REQCHSET, PCRE_STARTLINE, PCRE_STUDY_MAPPED, PCRE_STUDY_MINLEN, PCRE_UTF8, PCRE_UTF8_ERR5, dfa_match_data::poptions, PRIV, PUBLIC_DFA_EXEC_OPTIONS, REAL_PCRE, dfa_match_data::recursive, REQ_BYTE_MAX, REVERSED_MAGIC_NUMBER, pcre_study_data::start_bits, dfa_match_data::start_code, dfa_match_data::start_offset, dfa_match_data::start_subject, dfa_match_data::start_used_ptr, pcre16_extra::study_data, TABLE_GET, pcre16_extra::tables, dfa_match_data::tables, TRUE, and WAS_NEWLINE.

Variable Documentation

◆ coptable

const pcre_uint8 coptable[]
static

Definition at line 116 of file pcre_dfa_exec.c.

Referenced by internal_dfa_exec().

◆ poptable

const pcre_uint8 poptable[]
static

Definition at line 190 of file pcre_dfa_exec.c.

Referenced by internal_dfa_exec().

◆ toptable1

const pcre_uint8 toptable1[]
static
Initial value:
= {
0, 0, 0, 0, 0, 0,
0x04 , 0x04 ,
0x01 , 0x01 ,
0x10 , 0x10 ,
0, 0
}

Definition at line 257 of file pcre_dfa_exec.c.

Referenced by internal_dfa_exec().

◆ toptable2

const pcre_uint8 toptable2[]
static
Initial value:
= {
0, 0, 0, 0, 0, 0,
0x04 , 0,
0x01 , 0,
0x10 , 0,
1, 1
}

Definition at line 265 of file pcre_dfa_exec.c.

Referenced by internal_dfa_exec().