diff options
author | Adrian Thurston <thurston@complang.org> | 2016-03-23 15:23:07 +0100 |
---|---|---|
committer | Adrian Thurston <thurston@complang.org> | 2016-03-23 15:23:07 +0100 |
commit | 2afdfef96c9de759a24ba4cb56928c48e1d86bd3 (patch) | |
tree | b00080639d90458badc067b1d37a6c3936070ca0 /src/pdarun.h | |
parent | b9d35edf909d3b68461e27a8985acb0df25d19b2 (diff) | |
download | colm-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.h | 6 |
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; |