summaryrefslogtreecommitdiffhomepage
path: root/grammer.h
diff options
context:
space:
mode:
Diffstat (limited to 'grammer.h')
-rw-r--r--grammer.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/grammer.h b/grammer.h
index c2eb705..ee2897d 100644
--- a/grammer.h
+++ b/grammer.h
@@ -38,8 +38,8 @@ private:
BNF &bnf; // not const for access via operator[]
const std::string& Top;
- std::map<std::string, std::set<std::string>> ReverseBNF; // possible parent types of a given type; unused now: remove?
- std::map<std::string, std::set<std::string>> reversedFirst; // possible parent types of first childs of a given type
+ std::unordered_map<std::string, std::set<std::string>> ReverseBNF; // possible parent types of a given type; unused now: remove?
+ std::unordered_map<std::string, std::set<std::string>> reversedFirst; // possible parent types of first childs of a given type
// Tree specific
void clear();
@@ -61,7 +61,7 @@ private:
void ChangeNodeType();
void TrackBack();
void Validate() const;
- std::map<std::string, std::string> traverse(const std::string& lower, const std::string& upper);
+ std::unordered_map<std::string, std::string> traverse(const std::string& lower, const std::string& upper);
std::vector<std::string> GetPath(std::string upper, std::string lower);
index_t AddNode(const std::string& child_type, index_t parent_index);
void AddPath(const std::vector<std::string>& path, index_t current_index);