diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2015-03-31 00:01:18 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2015-03-31 00:01:18 +0200 |
commit | 63640911b950905057f2ca925e0b2b2c530721ec (patch) | |
tree | fcb753714e901e4d82e2b63e6dece98614672b39 /src/state.cpp | |
parent | 8de90acc6791a62d4b2e48e9bd05daa0d5cfe4b6 (diff) | |
download | solar-63640911b950905057f2ca925e0b2b2c530721ec.tar solar-63640911b950905057f2ca925e0b2b2c530721ec.zip |
Don't create items with point at end
Diffstat (limited to 'src/state.cpp')
-rw-r--r-- | src/state.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/state.cpp b/src/state.cpp index e798dce..958ab3e 100644 --- a/src/state.cpp +++ b/src/state.cpp @@ -55,11 +55,8 @@ void state_t::add_rule_terminal(unsigned char term) { void state_t::add_rule() { rules.emplace(current.get_lhs(), current); - while (true) { + while (current.has_next()) { items.emplace(current.get_next_symbol(), current); - if (!current.can_shift()) - break; - current.shift(); } } |