summaryrefslogtreecommitdiff
path: root/colm/tree.h
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@complang.org>2012-05-14 17:41:12 -0400
committerAdrian Thurston <thurston@complang.org>2012-05-14 17:41:12 -0400
commit2984710ed2ab3eb5cd146c106e338315d65c1b35 (patch)
tree9cd87350e2a52c44cd34cd19615239df8cee8224 /colm/tree.h
parent55b247c0fba4e2c047bc81654055ad73ed75f106 (diff)
downloadcolm-2984710ed2ab3eb5cd146c106e338315d65c1b35.tar.gz
Eliminated PtKid. Worked on first test run (!).
Diffstat (limited to 'colm/tree.h')
-rw-r--r--colm/tree.h15
1 files changed, 3 insertions, 12 deletions
diff --git a/colm/tree.h b/colm/tree.h
index f696f585..dbca9096 100644
--- a/colm/tree.h
+++ b/colm/tree.h
@@ -65,16 +65,6 @@ 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;
-} PtKid;
-
typedef struct _Ref
{
struct ColmKid *kid;
@@ -119,7 +109,7 @@ typedef struct _ParseTree
short id;
unsigned short flags;
long refs;
- PtKid *child;
+ struct _ParseTree *child;
Head *tokdata;
@@ -135,7 +125,8 @@ typedef struct _ParseTree
char retryUpper;
Kid *shadow;
- PtKid *ignore;
+ struct _ParseTree *ignore;
+ struct _ParseTree *next;
} ParseTree;
typedef struct _Int