aboutsummaryrefslogtreecommitdiffstats
path: root/alee.cpp
diff options
context:
space:
mode:
authorClyne Sullivan <clyne@bitgloo.com>2023-02-25 08:25:31 -0500
committerClyne Sullivan <clyne@bitgloo.com>2023-02-25 08:25:31 -0500
commit34e5d76f9851f13a2c6611de065c229bafb17378 (patch)
tree7ee094718de01f949877d5f00b8fc5dc1f5f35d8 /alee.cpp
parent0b88b4596e6265863e75e7aabcca52734e147fae (diff)
double-width mul/div; error strings
Diffstat (limited to 'alee.cpp')
-rw-r--r--alee.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/alee.cpp b/alee.cpp
index 0f270a8..f65b700 100644
--- a/alee.cpp
+++ b/alee.cpp
@@ -115,6 +115,20 @@ void parseLine(Parser& parser, State& state, const std::string& line)
case Parser::UnknownWord:
std::cout << "word not found in: " << line << std::endl;
break;
+ case static_cast<int>(State::Error::push):
+ std::cout << "stack overflow" << std::endl;
+ break;
+ case static_cast<int>(State::Error::pushr):
+ std::cout << "return stack overflow" << std::endl;
+ break;
+ case static_cast<int>(State::Error::popr):
+ std::cout << "return stack underflow" << std::endl;
+ break;
+ case static_cast<int>(State::Error::pop):
+ case static_cast<int>(State::Error::top):
+ case static_cast<int>(State::Error::pick):
+ std::cout << "stack underflow" << std::endl;
+ break;
default:
std::cout << "error: " << r << std::endl;
break;