From 911827fac3a53734c9a4a99c1b8ec2a689bc59d8 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 27 Sep 2021 20:36:10 -0700 Subject: 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. --- pattern.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pattern.h') diff --git a/pattern.h b/pattern.h index 3a78f13..a1f7043 100644 --- a/pattern.h +++ b/pattern.h @@ -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; -- cgit v1.2.3