diff --git a/spec/stream_methods.h b/spec/stream_methods.h index 2f94bd3b..18f41c16 100644 --- a/spec/stream_methods.h +++ b/spec/stream_methods.h @@ -3,7 +3,6 @@ #include #include -#include #include #include diff --git a/src/compiler/build_tables/follow_sets.cpp b/src/compiler/build_tables/follow_sets.cpp index 56579205..1b7068ad 100644 --- a/src/compiler/build_tables/follow_sets.cpp +++ b/src/compiler/build_tables/follow_sets.cpp @@ -3,7 +3,7 @@ #include "rule_transitions.h" #include "grammar.h" -using std::unordered_map; +using std::map; using std::set; using std::dynamic_pointer_cast; using tree_sitter::rules::Symbol; @@ -12,8 +12,8 @@ namespace tree_sitter { class Grammar; namespace build_tables { - unordered_map> follow_sets(const ParseItem &item, const Grammar &grammar) { - unordered_map> result; + map> follow_sets(const ParseItem &item, const Grammar &grammar) { + map> result; for (auto pair : sym_transitions(item.rule)) { auto symbol = *pair.first; diff --git a/src/compiler/build_tables/follow_sets.h b/src/compiler/build_tables/follow_sets.h index d670bdf8..cc9184b3 100644 --- a/src/compiler/build_tables/follow_sets.h +++ b/src/compiler/build_tables/follow_sets.h @@ -4,13 +4,13 @@ #include "item.h" #include "symbol.h" #include -#include +#include namespace tree_sitter { class Grammar; namespace build_tables { - std::unordered_map> follow_sets(const ParseItem &item, const Grammar &grammar); + std::map> follow_sets(const ParseItem &item, const Grammar &grammar); } } diff --git a/src/compiler/build_tables/item.h b/src/compiler/build_tables/item.h index 6dc2e535..c46ebf37 100644 --- a/src/compiler/build_tables/item.h +++ b/src/compiler/build_tables/item.h @@ -4,7 +4,6 @@ #include #include "rule.h" #include -#include #include "symbol.h" #include diff --git a/src/compiler/build_tables/perform.cpp b/src/compiler/build_tables/perform.cpp index 01c97153..af72c0a4 100644 --- a/src/compiler/build_tables/perform.cpp +++ b/src/compiler/build_tables/perform.cpp @@ -1,7 +1,6 @@ #include "./perform.h" #include "item.h" #include "item_set_closure.h" -#include "first_set.h" #include "item_set_transitions.h" #include "rules.h" #include "grammar.h" @@ -9,7 +8,7 @@ using std::pair; using std::string; using std::vector; -using std::unordered_map; +using std::map; namespace tree_sitter { namespace build_tables { @@ -20,8 +19,8 @@ namespace tree_sitter { class TableBuilder { const Grammar grammar; const Grammar lex_grammar; - unordered_map parse_state_indices; - unordered_map lex_state_indices; + map parse_state_indices; + map lex_state_indices; ParseTable parse_table; LexTable lex_table; diff --git a/src/compiler/lex_table.h b/src/compiler/lex_table.h index 3624c718..fb0eafff 100644 --- a/src/compiler/lex_table.h +++ b/src/compiler/lex_table.h @@ -1,7 +1,6 @@ #ifndef __TreeSitter__lex_table__ #define __TreeSitter__lex_table__ -#include #include #include #include diff --git a/src/compiler/rules/symbol.cpp b/src/compiler/rules/symbol.cpp index 492033c5..217dfa79 100644 --- a/src/compiler/rules/symbol.cpp +++ b/src/compiler/rules/symbol.cpp @@ -1,5 +1,4 @@ #include "rules.h" -#include using std::string; using std::hash;