DFA matching is starting to work.

This commit is contained in:
Philip.Hazel 2014-07-05 11:09:59 +00:00
parent 0188214a63
commit cfea40d7b5
4 changed files with 3438 additions and 18 deletions

View File

@ -175,7 +175,7 @@ sure both macros are undefined; an emulation function will then be used. */
recursion in the match() function; instead it creates its own stack by recursion in the match() function; instead it creates its own stack by
steam using memory from the heap. For more detail, see the comments and steam using memory from the heap. For more detail, see the comments and
other stuff just above the match() function. */ other stuff just above the match() function. */
#define NO_RECURSE /**/ /* #undef NO_RECURSE */
/* Name of package */ /* Name of package */
#define PACKAGE "pcre2" #define PACKAGE "pcre2"
@ -259,13 +259,13 @@ sure both macros are undefined; an emulation function will then be used. */
#define SUPPORT_LIBZ /**/ #define SUPPORT_LIBZ /**/
/* Define to any value to enable the 16 bit PCRE2 library. */ /* Define to any value to enable the 16 bit PCRE2 library. */
#define SUPPORT_PCRE16 /**/ /* #undef SUPPORT_PCRE16 */
/* Define to any value to enable JIT support in pcre2grep. */ /* Define to any value to enable JIT support in pcre2grep. */
/* #undef SUPPORT_PCRE2GREP_JIT */ /* #undef SUPPORT_PCRE2GREP_JIT */
/* Define to any value to enable the 32 bit PCRE2 library. */ /* Define to any value to enable the 32 bit PCRE2 library. */
#define SUPPORT_PCRE32 /**/ /* #undef SUPPORT_PCRE32 */
/* Define to any value to enable the 8 bit PCRE2 library. */ /* Define to any value to enable the 8 bit PCRE2 library. */
#define SUPPORT_PCRE8 /**/ #define SUPPORT_PCRE8 /**/

File diff suppressed because it is too large Load Diff

View File

@ -764,18 +764,21 @@ typedef struct match_block {
functions. */ functions. */
typedef struct dfa_match_block { typedef struct dfa_match_block {
pcre2_memctl memctl; /* For general use */
PCRE2_SPTR start_code; /* Start of the compiled pattern */ PCRE2_SPTR start_code; /* Start of the compiled pattern */
PCRE2_SPTR start_subject ; /* Start of the subject string */ PCRE2_SPTR start_subject ; /* Start of the subject string */
PCRE2_SPTR end_subject; /* End of subject string */ PCRE2_SPTR end_subject; /* End of subject string */
PCRE2_SPTR start_used_ptr; /* Earliest consulted character */ PCRE2_SPTR start_used_ptr; /* Earliest consulted character */
const uint8_t *tables; /* Character tables */ const uint8_t *tables; /* Character tables */
int start_offset; /* The start offset value */ PCRE2_OFFSET start_offset; /* The start offset value */
uint32_t moptions; /* Match options */ uint32_t moptions; /* Match options */
uint32_t poptions; /* Pattern options */ uint32_t poptions; /* Pattern options */
int nltype; /* Newline type */ uint32_t nltype; /* Newline type */
int nllen; /* Newline string length */ uint32_t nllen; /* Newline string length */
PCRE2_UCHAR nl[4]; /* Newline string when fixed */ PCRE2_UCHAR nl[4]; /* Newline string when fixed */
uint16_t bsr_convention; /* \R interpretation */
void *callout_data; /* To pass back to callouts */ void *callout_data; /* To pass back to callouts */
int (*callout)(pcre2_callout_block *); /* Callout function or NULL */
dfa_recursion_info *recursive; /* Linked list of recursion data */ dfa_recursion_info *recursive; /* Linked list of recursion data */
} dfa_match_block; } dfa_match_block;

View File

@ -4402,12 +4402,8 @@ for (gmatched = 0;; gmatched++)
{ {
int capcount; int capcount;
#ifdef FIXME #ifdef FIXME
jit_was_used = FALSE; jit_was_used = FALSE;
Need to set newline and bsr in match context and allow them to be
set in the datctl block.
#endif #endif
/* Adjust match_data according to size of offsets required. */ /* Adjust match_data according to size of offsets required. */