diff options
Diffstat (limited to 'bnf.cpp')
-rw-r--r-- | bnf.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1,8 +1,8 @@ #include "bnf.h" -std::map<std::string, std::set<std::string>> Reverse(BNF bnf) +std::unordered_map<std::string, std::set<std::string>> Reverse(BNF bnf) { - std::map<std::string, std::set<std::string>> result; + std::unordered_map<std::string, std::set<std::string>> result; for (const auto& [from, to] : bnf) { for (const auto& list : to) { @@ -19,9 +19,9 @@ std::map<std::string, std::set<std::string>> Reverse(BNF bnf) return result; } -std::map<std::string, std::set<std::string>> reverseFirst(BNF bnf) +std::unordered_map<std::string, std::set<std::string>> reverseFirst(BNF bnf) { - std::map<std::string, std::set<std::string>> result; + std::unordered_map<std::string, std::set<std::string>> result; for (const auto& [from, to] : bnf) { for (const auto& list : to) { |