Don't include preceding production steps in ParseItem hash

This commit is contained in:
Max Brunsfeld 2017-07-13 13:42:28 -07:00
parent 561821d011
commit 0b94e9d814

View file

@ -159,7 +159,7 @@ struct hash<ParseItem> {
hash_combine<unsigned>(&result, item.production->back().associativity);
}
} else {
for (size_t i = 0, n = item.production->size(); i < n; i++) {
for (size_t i = item.step_index, n = item.production->size(); i < n; i++) {
auto &step = item.production->at(i);
hash_combine(&result, step.symbol);
hash_combine(&result, step.precedence);