summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@complang.org>2013-02-09 20:32:37 -0500
committerAdrian Thurston <thurston@complang.org>2013-02-09 20:32:37 -0500
commit4db469d5320b8a7370d01113fb91c122ffd144cb (patch)
tree34c60064abe535f2c6acf2bf38a6bb494dc1a723
parentfa4a8cddabbb7f3ef30b91b038cf97c3ab905026 (diff)
downloadcolm-4db469d5320b8a7370d01113fb91c122ffd144cb.tar.gz
converted resetToken to tak PdaRun
-rw-r--r--colm/bytecode.c3
-rw-r--r--colm/pdarun.c4
-rw-r--r--colm/pdarun.h2
3 files changed, 5 insertions, 4 deletions
diff --git a/colm/bytecode.c b/colm/bytecode.c
index ff407332..afa67060 100644
--- a/colm/bytecode.c
+++ b/colm/bytecode.c
@@ -259,12 +259,11 @@ break; }
long undoParseFrag( Program *prg, Tree **sp, Parser *parser, long steps, long entry )
{
StreamImpl *is = parser->input->in;
- FsmRun *fsmRun = parser->pdaRun->fsmRun;
PdaRun *pdaRun = parser->pdaRun;
debug( REALM_PARSE, "undo parse frag, target steps: %ld, pdarun steps: %ld\n", steps, pdaRun->steps );
- resetToken( fsmRun );
+ resetToken( pdaRun );
switch ( entry ) {
case PcrStart:
diff --git a/colm/pdarun.c b/colm/pdarun.c
index cff8854b..dfd67074 100644
--- a/colm/pdarun.c
+++ b/colm/pdarun.c
@@ -330,8 +330,10 @@ void clearBuffered( FsmRun *fsmRun )
}
}
-void resetToken( FsmRun *fsmRun )
+void resetToken( PdaRun *pdaRun )
{
+ FsmRun *fsmRun = pdaRun->fsmRun;
+
/* If there is a token started, but never finished for a lack of data, we
* must first backup over it. */
if ( fsmRun->tokstart != 0 ) {
diff --git a/colm/pdarun.h b/colm/pdarun.h
index 17ea1ab8..828d2db6 100644
--- a/colm/pdarun.h
+++ b/colm/pdarun.h
@@ -465,7 +465,7 @@ void undoParseStream( struct ColmProgram *prg, Tree **sp, StreamImpl *inputStrea
PdaRun *pdaRun, long steps );
void clearBuffered( FsmRun *fsmRun );
-void resetToken( FsmRun *fsmRun );
+void resetToken( PdaRun *pdaRun );
#ifdef __cplusplus
}