From 17040e32ec997c253ed1fd90a386ee7876440d02 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Mon, 16 Jun 2014 13:25:30 -0700 Subject: [PATCH] Remove unused version of first_set function --- src/compiler/build_tables/first_set.cc | 13 ------------- src/compiler/build_tables/first_set.h | 7 ------- 2 files changed, 20 deletions(-) diff --git a/src/compiler/build_tables/first_set.cc b/src/compiler/build_tables/first_set.cc index 39558197..fcf2045f 100644 --- a/src/compiler/build_tables/first_set.cc +++ b/src/compiler/build_tables/first_set.cc @@ -57,18 +57,5 @@ namespace tree_sitter { set first_set(const rules::rule_ptr &rule, const PreparedGrammar &grammar) { return FirstSet(&grammar).apply(rule); } - - set first_set(const ParseItemSet &item_set, const PreparedGrammar &grammar) { - set result; - for (const auto &pair : item_set) { - const auto &item = pair.first; - const auto &lookahead_symbols = pair.second; - const auto &rule_set = first_set(item.rule, grammar); - result.insert(rule_set.begin(), rule_set.end()); - if (rule_can_be_blank(item.rule, grammar)) - result.insert(lookahead_symbols.begin(), lookahead_symbols.end()); - } - return result; - } } } diff --git a/src/compiler/build_tables/first_set.h b/src/compiler/build_tables/first_set.h index b816e8d8..1011bf02 100644 --- a/src/compiler/build_tables/first_set.h +++ b/src/compiler/build_tables/first_set.h @@ -17,13 +17,6 @@ namespace tree_sitter { */ std::set first_set(const rules::rule_ptr &rule, const PreparedGrammar &grammar); - - /* - * Returns the set of terminal symbols that can appear at - * the beginning of any item in the given set. - */ - std::set - first_set(const ParseItemSet &item_set, const PreparedGrammar &grammar); } }