diff options
author | Adrian Thurston <thurston@complang.org> | 2012-05-14 11:57:05 -0400 |
---|---|---|
committer | Adrian Thurston <thurston@complang.org> | 2012-05-14 11:57:05 -0400 |
commit | c07ff3da211df08d3fcbc3ea0b7fe67350a08142 (patch) | |
tree | 1ae1f0712869bd9d6c1a3378830285d53b4428ee /colm/tree.h | |
parent | 4c7b1e79d8c07485c067833cee998123acfcf57f (diff) | |
download | colm-c07ff3da211df08d3fcbc3ea0b7fe67350a08142.tar.gz |
Added a separate Kid data structure for use with parse trees.
Diffstat (limited to 'colm/tree.h')
-rw-r--r-- | colm/tree.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/colm/tree.h b/colm/tree.h index f1b1bd8b..d846e561 100644 --- a/colm/tree.h +++ b/colm/tree.h @@ -65,6 +65,16 @@ typedef struct ColmKid unsigned char flags; } Kid; +typedef struct ColmKid2 +{ + /* The tree needs to be first since pointers to kids are used to reference + * trees on the stack. A pointer to the word that is a Tree* is cast to + * a Kid*. */ + struct _ParseTree *tree; + struct ColmKid2 *next; + unsigned char flags; +} Kid2; + typedef struct _Ref { struct ColmKid *kid; @@ -125,7 +135,7 @@ typedef struct _ParseTree char retryUpper; Kid *shadow; - Kid *ignore; + Kid2 *ignore; } ParseTree; typedef struct _Int |