Better comments
This commit is contained in:
parent
b67cb4643c
commit
007959ca0f
5
match.c
5
match.c
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
#define MAX_CACHE_SIZE (1<<14)
|
#define MAX_CACHE_SIZE (1<<14)
|
||||||
|
|
||||||
// Cache datastructures
|
// Cache entries for results of matching a pattern at a string position
|
||||||
typedef struct cache_hit_s {
|
typedef struct cache_hit_s {
|
||||||
pat_t *pat;
|
pat_t *pat;
|
||||||
const char *start, *end;
|
const char *start, *end;
|
||||||
@ -25,12 +25,13 @@ typedef struct cache_hit_s {
|
|||||||
struct cache_hit_s *next_probe;
|
struct cache_hit_s *next_probe;
|
||||||
} cache_hit_t;
|
} cache_hit_t;
|
||||||
|
|
||||||
|
// Cache uses a hash table
|
||||||
typedef struct {
|
typedef struct {
|
||||||
unsigned int size, occupancy, next_free;
|
unsigned int size, occupancy, next_free;
|
||||||
cache_hit_t *hits;
|
cache_hit_t *hits;
|
||||||
} cache_t;
|
} cache_t;
|
||||||
|
|
||||||
// Data structure for various ambient state for matching
|
// Data structure for holding ambient state values during matching
|
||||||
typedef struct match_ctx_s {
|
typedef struct match_ctx_s {
|
||||||
struct match_ctx_s *parent_ctx;
|
struct match_ctx_s *parent_ctx;
|
||||||
pat_t *defs;
|
pat_t *defs;
|
||||||
|
Loading…
Reference in New Issue
Block a user