From 34e5d76f9851f13a2c6611de065c229bafb17378 Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Sat, 25 Feb 2023 08:25:31 -0500 Subject: double-width mul/div; error strings --- alee.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'alee.cpp') 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(State::Error::push): + std::cout << "stack overflow" << std::endl; + break; + case static_cast(State::Error::pushr): + std::cout << "return stack overflow" << std::endl; + break; + case static_cast(State::Error::popr): + std::cout << "return stack underflow" << std::endl; + break; + case static_cast(State::Error::pop): + case static_cast(State::Error::top): + case static_cast(State::Error::pick): + std::cout << "stack underflow" << std::endl; + break; default: std::cout << "error: " << r << std::endl; break; -- cgit v1.2.3