From 9502989aec80e8f75cf14e7dd7d1d85333090866 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Sun, 15 Mar 2020 21:47:42 +0100 Subject: Fix lex error --- lexer.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lexer.h') diff --git a/lexer.h b/lexer.h index eb41e3d..a033cbc 100644 --- a/lexer.h +++ b/lexer.h @@ -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> getSuccessorsViaEmpty(size_t state); std::vector> 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 Lex(const std::string& s); -- cgit v1.2.3