diff options
author | Adrian Thurston <thurston@complang.org> | 2013-02-09 20:50:06 -0500 |
---|---|---|
committer | Adrian Thurston <thurston@complang.org> | 2013-02-09 20:50:06 -0500 |
commit | 3b1f71094782b21c0c8da0cd12c1fe97adcecd30 (patch) | |
tree | 5d6c0ac49aef6dee4ba8f441c7067ed2726faf92 | |
parent | 4db469d5320b8a7370d01113fb91c122ffd144cb (diff) | |
download | colm-3b1f71094782b21c0c8da0cd12c1fe97adcecd30.tar.gz |
removal of fsmRun arg from a number of stream interface functions
-rw-r--r-- | colm/bytecode.c | 16 | ||||
-rw-r--r-- | colm/pdarun.c | 10 | ||||
-rw-r--r-- | colm/pdarun.h | 10 |
3 files changed, 18 insertions, 18 deletions
diff --git a/colm/bytecode.c b/colm/bytecode.c index afa67060..d167013c 100644 --- a/colm/bytecode.c +++ b/colm/bytecode.c @@ -314,7 +314,7 @@ void undoPull( Program *prg, StreamImpl *in, Tree *str ) undoStreamPull( in, data, length ); } -long streamPush( Program *prg, Tree **sp, FsmRun *fsmRun, StreamImpl *in, Tree *tree, int ignore ) +static long streamPush( Program *prg, Tree **sp, StreamImpl *in, Tree *tree, int ignore ) { if ( tree->id == LEL_ID_STR ) { /* This should become a compile error. If it's text, it's up to the @@ -326,7 +326,7 @@ long streamPush( Program *prg, Tree **sp, FsmRun *fsmRun, StreamImpl *in, Tree * initStrCollect( &collect ); printTreeCollect( prg, sp, &collect, tree, true ); - streamPushText( fsmRun, in, collect.data, collect.length ); + streamPushText( in, collect.data, collect.length ); long length = collect.length; strCollectDestroy( &collect ); @@ -334,12 +334,12 @@ long streamPush( Program *prg, Tree **sp, FsmRun *fsmRun, StreamImpl *in, Tree * } else if ( tree->id == LEL_ID_STREAM ) { treeUpref( tree ); - streamPushStream( fsmRun, in, tree ); + streamPushStream( in, tree ); return -1; } else { treeUpref( tree ); - streamPushTree( fsmRun, in, tree, ignore ); + streamPushTree( in, tree, ignore ); return -1; } } @@ -2155,7 +2155,7 @@ again: debug( REALM_BYTECODE, "IN_INPUT_APPEND_BKT\n" ); - undoStreamAppend( prg, sp, 0, ((Stream*)accumStream)->in, input, len ); + undoStreamAppend( prg, sp, ((Stream*)accumStream)->in, input, len ); treeDownref( prg, sp, accumStream ); treeDownref( prg, sp, input ); break; @@ -2488,7 +2488,7 @@ again: Stream *input = (Stream*)vm_pop(); Tree *tree = vm_pop(); - long len = streamPush( prg, sp, 0, input->in, tree, false ); + long len = streamPush( prg, sp, input->in, tree, false ); vm_push( 0 ); /* Single unit. */ @@ -2505,7 +2505,7 @@ again: Stream *input = (Stream*)vm_pop(); Tree *tree = vm_pop(); - long len = streamPush( prg, sp, 0, input->in, tree, true ); + long len = streamPush( prg, sp, input->in, tree, true ); vm_push( 0 ); /* Single unit. */ @@ -2525,7 +2525,7 @@ again: debug( REALM_BYTECODE, "IN_INPUT_PUSH_BKT\n" ); - undoStreamPush( prg, sp, 0, input->in, len ); + undoStreamPush( prg, sp, input->in, len ); treeDownref( prg, sp, (Tree*)input ); break; } diff --git a/colm/pdarun.c b/colm/pdarun.c index dfd67074..e789c8e3 100644 --- a/colm/pdarun.c +++ b/colm/pdarun.c @@ -223,22 +223,22 @@ void undoStreamPull( StreamImpl *is, const char *data, long length ) is->funcs->prependData( is, data, length ); } -void streamPushText( FsmRun *fsmRun, StreamImpl *is, const char *data, long length ) +void streamPushText( StreamImpl *is, const char *data, long length ) { is->funcs->prependData( is, data, length ); } -void streamPushTree( FsmRun *fsmRun, StreamImpl *is, Tree *tree, int ignore ) +void streamPushTree( StreamImpl *is, Tree *tree, int ignore ) { is->funcs->prependTree( is, tree, ignore ); } -void streamPushStream( FsmRun *fsmRun, StreamImpl *is, Tree *tree ) +void streamPushStream( StreamImpl *is, Tree *tree ) { is->funcs->prependStream( is, tree ); } -void undoStreamPush( Program *prg, Tree **sp, FsmRun *fsmRun, StreamImpl *is, long length ) +void undoStreamPush( Program *prg, Tree **sp, StreamImpl *is, long length ) { if ( length < 0 ) { Tree *tree = is->funcs->undoPrependTree( is ); @@ -249,7 +249,7 @@ void undoStreamPush( Program *prg, Tree **sp, FsmRun *fsmRun, StreamImpl *is, lo } } -void undoStreamAppend( Program *prg, Tree **sp, FsmRun *fsmRun, StreamImpl *is, Tree *input, long length ) +void undoStreamAppend( Program *prg, Tree **sp, StreamImpl *is, Tree *input, long length ) { if ( input->id == LEL_ID_STR ) is->funcs->undoAppendData( is, length ); diff --git a/colm/pdarun.h b/colm/pdarun.h index 828d2db6..17fa3aa7 100644 --- a/colm/pdarun.h +++ b/colm/pdarun.h @@ -436,11 +436,11 @@ long undoParse( Tree **sp, PdaRun *pdaRun, FsmRun *fsmRun, StreamImpl *inputStre Head *streamPull( struct ColmProgram *prg, FsmRun *fsmRun, StreamImpl *inputStream, long length ); Head *stringAllocPointer( struct ColmProgram *prg, const char *data, long length ); -void streamPushText( FsmRun *fsmRun, StreamImpl *inputStream, const char *data, long length ); -void streamPushTree( FsmRun *fsmRun, StreamImpl *inputStream, Tree *tree, int ignore ); -void streamPushStream( FsmRun *fsmRun, StreamImpl *inputStream, Tree *tree ); -void undoStreamPush( struct ColmProgram *prg, Tree **sp, FsmRun *fsmRun, StreamImpl *inputStream, long length ); -void undoStreamAppend( struct ColmProgram *prg, Tree **sp, FsmRun *fsmRun, StreamImpl *inputStream, struct ColmTree *tree, long length ); +void streamPushText( StreamImpl *inputStream, const char *data, long length ); +void streamPushTree( StreamImpl *inputStream, Tree *tree, int ignore ); +void streamPushStream( StreamImpl *inputStream, Tree *tree ); +void undoStreamPush( struct ColmProgram *prg, Tree **sp, StreamImpl *inputStream, long length ); +void undoStreamAppend( struct ColmProgram *prg, Tree **sp, StreamImpl *inputStream, struct ColmTree *tree, long length ); Kid *makeTokenWithData( struct ColmProgram *prg, PdaRun *pdaRun, FsmRun *fsmRun, StreamImpl *inputStream, int id, Head *tokdata ); |