mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-26 23:52:26 +00:00
Ensured that the mark_end step can't overwrite another recognised symbol.
This commit is contained in:
parent
a6b239698c
commit
456fdda6c2
@ -35,7 +35,7 @@ template <typename SymbolType> class Parser {
|
|||||||
while(!has_next_symbol_ && !tape->is_at_end()) {
|
while(!has_next_symbol_ && !tape->is_at_end()) {
|
||||||
process_pulse(tape->get_next_pulse());
|
process_pulse(tape->get_next_pulse());
|
||||||
}
|
}
|
||||||
if(tape->is_at_end()) mark_end();
|
if(!has_next_symbol_ && tape->is_at_end()) mark_end();
|
||||||
has_next_symbol_ = false;
|
has_next_symbol_ = false;
|
||||||
return next_symbol_;
|
return next_symbol_;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user