diff options
author | Benjamin Paassen <bpaassen@techfak.uni-bielefeld.de> | 2014-10-31 13:20:09 +0000 |
---|---|---|
committer | benjamin <benjamin@daaaf23c-2e50-4459-9457-1e69db5a47bf> | 2014-10-31 13:20:09 +0000 |
commit | c54065160a03f266c1406edf74d97ab74ee75d51 (patch) | |
tree | 68b3d83aee2b592b94130892461a368f7756a210 /src/core/utils/Tokenizer.hpp | |
parent | 73cc54cbf494d9da61b640035f25ad9c5eb86d84 (diff) |
finished work on TokenTree and tested it.
git-svn-id: file:///var/local/svn/basicwriter@88 daaaf23c-2e50-4459-9457-1e69db5a47bf
Diffstat (limited to 'src/core/utils/Tokenizer.hpp')
-rw-r--r-- | src/core/utils/Tokenizer.hpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/utils/Tokenizer.hpp b/src/core/utils/Tokenizer.hpp index 1d0db43..24c4f30 100644 --- a/src/core/utils/Tokenizer.hpp +++ b/src/core/utils/Tokenizer.hpp @@ -20,7 +20,7 @@ #define _OUSIA_UTILS_TOKENIZER_HPP_ #include <istream> -#include <unordered_map> +#include <map> #include <queue> namespace ousia { @@ -30,14 +30,14 @@ class TokenizerException : public std::exception { public: const std::string msg; - ArgumentValidatorError(const std::string &msg) : msg(msg){}; + TokenizerException(const std::string &msg) : msg(msg){}; virtual const char *what() const noexcept override { return msg.c_str(); } }; class TokenTreeNode { public: - const std::unordered_map<char, TokenTreeNode> children; + const std::map<char, TokenTreeNode> children; const int tokenId; TokenTreeNode(const std::map<std::string, int> &inputs); @@ -59,7 +59,7 @@ class Tokenizer { private: const std::istream &input; const TokenTreeNode root; - const std::queue<Token> peek; + const std::queue<Token> peekQueue; public: Tokenizer(const TokenTreeNode &root, std::istream &input); |