Extract shared helper functions from example grammars

This commit is contained in:
Max Brunsfeld 2014-04-27 21:45:05 -07:00
parent 29bbff655c
commit b86203d205
8 changed files with 1888 additions and 1507 deletions

View file

@ -12,9 +12,8 @@ namespace tree_sitter {
namespace build_tables {
map<ISymbol, set<ISymbol>> follow_sets(const ParseItem &item,
const PreparedGrammar &grammar) {
const PreparedGrammar &grammar) {
map<ISymbol, set<ISymbol>> result;
for (auto &pair : sym_transitions(item.rule)) {
ISymbol symbol = pair.first;
rule_ptr next_rule = pair.second;