diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2021-09-27 20:36:10 -0700 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2021-09-27 20:36:10 -0700 |
| commit | 911827fac3a53734c9a4a99c1b8ec2a689bc59d8 (patch) | |
| tree | 5ac9e27f065b66ad613fbcac21c95f8b64706310 /pattern.h | |
| parent | a96284615b27226f4d34de8dfa7235f0c14ac1d4 (diff) | |
Removed definitions as a separate type and instead encode that value in
the patterns themselves. This simplifies memory management a lot and
speeds up performance.
Diffstat (limited to 'pattern.h')
| -rw-r--r-- | pattern.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -34,7 +34,7 @@ enum pattype_e { BP_END_OF_FILE = 22, BP_END_OF_LINE = 23, BP_WORD_BOUNDARY = 24, - BP_DEFINITION = 25, + BP_DEFINITIONS = 25, BP_LEFTRECURSION = 26, }; @@ -57,7 +57,7 @@ typedef struct pat_s { struct { const char *name; size_t namelen; - struct pat_s *def, *pat; + struct pat_s *meaning, *next_def; } def; struct { unsigned char low, high; |
