diff options
author | Adrian Thurston <thurston@complang.org> | 2011-12-31 20:55:10 +0000 |
---|---|---|
committer | Adrian Thurston <thurston@complang.org> | 2011-12-31 20:55:10 +0000 |
commit | 863bead07680b832a07221f08291f19266a2397f (patch) | |
tree | 982e4ae2ddf04dfc4f09b88c71f29c07bd385434 /colm/input.h | |
parent | 127782c33740f49cac09317d1136dcc77a02d97c (diff) | |
download | colm-863bead07680b832a07221f08291f19266a2397f.tar.gz |
Bringing back the connection between fsm runs and input streams. This allows us
to clear the buffered data only when we need to. refs #341.
Diffstat (limited to 'colm/input.h')
-rw-r--r-- | colm/input.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/colm/input.h b/colm/input.h index fec76374..d267c866 100644 --- a/colm/input.h +++ b/colm/input.h @@ -151,6 +151,8 @@ struct _SourceStream struct PatternItem *patItem; struct Replacement *replacement; struct ReplItem *replItem; + + struct _FsmRun *attached2; }; SourceStream *newInputStreamPattern( struct Pattern *pattern ); @@ -192,15 +194,17 @@ struct _InputStream struct PatternItem *patItem; struct Replacement *replacement; struct ReplItem *replItem; + + struct _FsmRun *attached1; }; typedef struct _InputStream InputStream; /* The input stream interface. */ -int getData( InputStream *in, int offset, char *dest, int length, int *copied ); +int getData( struct _FsmRun *fsmRun, InputStream *in, int offset, char *dest, int length, int *copied ); int consumeData( InputStream *in, int length ); -int undoConsumeData( InputStream *is, const char *data, int length ); +int undoConsumeData( struct _FsmRun *fsmRun, InputStream *is, const char *data, int length ); struct ColmTree *consumeTree( InputStream *in ); void undoConsumeTree( InputStream *in, struct ColmTree *tree, int ignore ); |