summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@complang.org>2012-01-14 22:07:12 +0000
committerAdrian Thurston <thurston@complang.org>2012-01-14 22:07:12 +0000
commite3d86f9d80b97cb45b1d113875bbeac01b4475bc (patch)
tree6fd2d83f2446d5e2e8d76e6e70564bce0cbd7352
parentfc79fba65830de8e6dbba647256e449e1acf5457 (diff)
downloadcolm-e3d86f9d80b97cb45b1d113875bbeac01b4475bc.tar.gz
Missing downref added.
-rw-r--r--colm/pdarun.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/colm/pdarun.c b/colm/pdarun.c
index 18ae9d4f..ad6cdb01 100644
--- a/colm/pdarun.c
+++ b/colm/pdarun.c
@@ -191,8 +191,10 @@ void undoStreamAppend( Program *prg, Tree **sp, FsmRun *fsmRun, InputStream *inp
undoAppendData( inputStream, length );
else if ( input->id == LEL_ID_STREAM )
undoAppendStream( inputStream );
- else
- undoAppendTree( inputStream );
+ else {
+ Tree *tree = undoAppendTree( inputStream );
+ treeDownref( prg, sp, tree );
+ }
}
/* Should only be sending back whole tokens/ignores, therefore the send back
@@ -1383,7 +1385,7 @@ void commitKid( Program *prg, PdaRun *pdaRun, Tree **root, Kid *lel, Code **rcod
{
Tree *tree = 0;
Tree **sp = root;
- Tree *restore = 0;
+ //Tree *restore = 0;
head:
/* Commit */
@@ -1394,7 +1396,7 @@ head:
tree = lel->tree;
/* Check for reverse code. */
- restore = 0;
+ //restore = 0;
if ( tree->flags & AF_HAS_RCODE ) {
/* If tree caused some reductions, now is not the right time to backup
* over the reverse code. We need to backup over the reductions first. Store