Remove unused version of first_set function

This commit is contained in:
Max Brunsfeld 2014-06-16 13:25:30 -07:00
parent 5c089d0563
commit 17040e32ec
2 changed files with 0 additions and 20 deletions

View file

@ -57,18 +57,5 @@ namespace tree_sitter {
set<Symbol> first_set(const rules::rule_ptr &rule, const PreparedGrammar &grammar) {
return FirstSet(&grammar).apply(rule);
}
set<Symbol> first_set(const ParseItemSet &item_set, const PreparedGrammar &grammar) {
set<Symbol> 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;
}
}
}

View file

@ -17,13 +17,6 @@ namespace tree_sitter {
*/
std::set<rules::Symbol>
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<rules::Symbol>
first_set(const ParseItemSet &item_set, const PreparedGrammar &grammar);
}
}