diff options
Diffstat (limited to 'lexer.h')
-rw-r--r-- | lexer.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -27,6 +27,8 @@ class Lexer size_t newState(std::string state_type = ""); void addTransition(size_t state0, size_t state1, char c); + void removeTransition(size_t state0, size_t state1, char c); + std::vector<std::pair<size_t, char>> getSuccessorsViaEmpty(size_t state); std::vector<std::pair<size_t, char>> getSuccessors(size_t state); // Build up automaton, recursively @@ -37,6 +39,9 @@ class Lexer Token getToken(const std::string& s, Location& location); void skipWhitespace(const std::string& s, Location& location); + void replaceEmptyTransitions(); + void removeEmptyTransitions(); + public: Lexer(const BNF& bnf, const std::string& top); std::vector<Token> Lex(const std::string& s); |