summaryrefslogtreecommitdiff
path: root/colm/tree.h
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@complang.org>2011-12-22 03:38:43 +0000
committerAdrian Thurston <thurston@complang.org>2011-12-22 03:38:43 +0000
commite6901816358367ecbb0362134d2dbcd49dc4e19e (patch)
tree7edefed1645c5e8f10281873f387d8823e60f25b /colm/tree.h
parentf861654bb0246043873489db1b8f947b6f347455 (diff)
downloadcolm-e6901816358367ecbb0362134d2dbcd49dc4e19e.tar.gz
Added AccumStream, a tree-based object containing the input stream wrapper that
is set into parsers. Allows us to pass these input streams around in bytecode.
Diffstat (limited to 'colm/tree.h')
-rw-r--r--colm/tree.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/colm/tree.h b/colm/tree.h
index 37e6f62a..63da66aa 100644
--- a/colm/tree.h
+++ b/colm/tree.h
@@ -205,6 +205,17 @@ typedef struct _Stream
SourceStream *in;
} Stream;
+typedef struct _AccumStream
+{
+ /* Must overlay Tree. */
+ short id;
+ unsigned short flags;
+ long refs;
+ Kid *child;
+
+ InputStream *in;
+} AccumStream;
+
typedef struct AccumStruct
{
/* Must overlay Tree. */
@@ -217,7 +228,7 @@ typedef struct AccumStruct
struct _PdaRun *pdaRun;
struct _FsmRun *fsmRun;
- struct _InputStream *in;
+ struct _AccumStream *accumStream;
Tree *result;
} Accum;