summaryrefslogtreecommitdiff
path: root/src/pdarun.h
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@complang.org>2016-03-23 15:23:07 +0100
committerAdrian Thurston <thurston@complang.org>2016-03-23 15:23:07 +0100
commit2afdfef96c9de759a24ba4cb56928c48e1d86bd3 (patch)
treeb00080639d90458badc067b1d37a6c3936070ca0 /src/pdarun.h
parentb9d35edf909d3b68461e27a8985acb0df25d19b2 (diff)
downloadcolm-2afdfef96c9de759a24ba4cb56928c48e1d86bd3.tar.gz
commit shift count needs to be initialized to -1
An initial value of zero for commit shift count means we can erroneously fail a parse when we back up to zero shifts.
Diffstat (limited to 'src/pdarun.h')
-rw-r--r--src/pdarun.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/pdarun.h b/src/pdarun.h
index dfabfea5..a5427576 100644
--- a/src/pdarun.h
+++ b/src/pdarun.h
@@ -317,6 +317,12 @@ struct pda_run
long steps;
long target_steps;
+
+
+ /* The shift count simply tracks the number of shifts that have happend.
+ * The commit shift count is the shift count when the last commit occurred.
+ * If we back up to this number of shifts then we decide we cannot proceed.
+ * The commit shift count is initialized to -1. */
long shift_count;
long commit_shift_count;