#ifndef _VOCABULARY_H_ #define _VOCABULARY_H_ #include #include #include using namespace std; class Vocabulary { public: virtual ~Vocabulary(); virtual int GetTerminalIndex(const string& word); int GetNonterminalIndex(int position); bool IsTerminal(int symbol); virtual string GetTerminalValue(int symbol); int Size(); private: unordered_map dictionary; vector words; }; #endif