summaryrefslogtreecommitdiffhomepage
path: root/lexer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lexer.cpp')
-rw-r--r--lexer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lexer.cpp b/lexer.cpp
index 0944738..a9cda32 100644
--- a/lexer.cpp
+++ b/lexer.cpp
@@ -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());