diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2021-10-01 18:21:02 -0700 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2021-10-01 18:21:02 -0700 |
| commit | 007959ca0ff350eeea512360ef39004a6b06fc81 (patch) | |
| tree | 69328f38ddfc8f613979227d925e898e0ee9a773 | |
| parent | b67cb4643cc837728f5c527dbc5bf59958039735 (diff) | |
Better comments
| -rw-r--r-- | match.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -17,7 +17,7 @@ #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 { pat_t *pat; const char *start, *end; @@ -25,12 +25,13 @@ typedef struct cache_hit_s { struct cache_hit_s *next_probe; } cache_hit_t; +// Cache uses a hash table typedef struct { unsigned int size, occupancy, next_free; cache_hit_t *hits; } cache_t; -// Data structure for various ambient state for matching +// Data structure for holding ambient state values during matching typedef struct match_ctx_s { struct match_ctx_s *parent_ctx; pat_t *defs; |
