summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@complang.org>2015-10-04 10:49:10 -0400
committerAdrian Thurston <thurston@complang.org>2015-10-04 10:49:10 -0400
commit672040140417c53b278aa79ac91b8e89a1a3d634 (patch)
tree0cfc7ceeb5a3be4840e7d0d26ae1fa3adcbc13c8
parent6aa9bd3e02f4c9ace4c991ffc1efa7f9439d3710 (diff)
downloadcolm-672040140417c53b278aa79ac91b8e89a1a3d634.tar.gz
replaced commit on finish with rcode downref
Since using shift counts to block backtracking past commit points, all we really need the current commit code for is to downref rcode. Just call it directly.
-rw-r--r--src/pdarun.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pdarun.c b/src/pdarun.c
index eeb5ddcb..d2c70d8c 100644
--- a/src/pdarun.c
+++ b/src/pdarun.c
@@ -2301,7 +2301,7 @@ long colm_parse_finish( tree_t **result, program_t *prg, tree_t **sp,
//assert( (pdaRun->stopTarget > 0 && pdaRun->stopParsing) || streamToImpl( input )->eofSent );
if ( !revert_on )
- commit_full( prg, sp, pda_run, 0 );
+ colm_rcode_downref_all( prg, sp, &pda_run->reverse_code );
tree_t *tree = get_parsed_root( pda_run, pda_run->stop_target > 0 );
colm_tree_upref( tree );