From 0b94e9d814ee62447e9347c5413d092ad97976fd Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Thu, 13 Jul 2017 13:42:28 -0700 Subject: [PATCH] Don't include preceding production steps in ParseItem hash --- src/compiler/build_tables/parse_item.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/build_tables/parse_item.cc b/src/compiler/build_tables/parse_item.cc index 55db646c..f06898ac 100644 --- a/src/compiler/build_tables/parse_item.cc +++ b/src/compiler/build_tables/parse_item.cc @@ -159,7 +159,7 @@ struct hash { hash_combine(&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);