diff options
Diffstat (limited to 'lexer.cpp')
-rw-r--r-- | lexer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -85,14 +85,14 @@ void Lexer::addRule(const std::vector<std::string>& list, size_t list_index_from for (size_t i = list_index_from; i < list_index_to - 1; i++) { std::string symbol{list[i]}; if (symbol == rule_symbol) - throw std::runtime_error("Recursion found but not allowed"); + throw std::runtime_error("Recursion found but not allowed. Only head recursion allowed for lexer."); size_t state{newState()}; addPathOrTransition(previousState, state, symbol); previousState = state; } if (list.back() == rule_symbol) - throw std::runtime_error("Recursion found but not allowed"); + throw std::runtime_error("Tail recursion found but not allowed. Only head recursion allowed for lexer."); // last transition addPathOrTransition(previousState, state1, list.back()); |