aboutsummaryrefslogtreecommitdiffstats
path: root/libalee/parser.cpp
diff options
context:
space:
mode:
authorClyne Sullivan <clyne@bitgloo.com>2023-11-12 14:38:30 -0500
committerClyne Sullivan <clyne@bitgloo.com>2023-11-12 14:38:30 -0500
commitcdf19490df966f53e8c89677296e6a8b34cff497 (patch)
tree154e1f9784fa1d55d49767c4c6391bf91cf0d556 /libalee/parser.cpp
parent69152efdad181c70fd794ecba5f5f48f23bc67bd (diff)
no more cstring; 16mhz/115200 msp430; fix dict init
Diffstat (limited to 'libalee/parser.cpp')
-rw-r--r--libalee/parser.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/libalee/parser.cpp b/libalee/parser.cpp
index 3236ae2..19aa5f7 100644
--- a/libalee/parser.cpp
+++ b/libalee/parser.cpp
@@ -20,16 +20,13 @@
#include "ctype.hpp"
#include "parser.hpp"
-#include <algorithm>
-#include <cstring>
-
Error (*Parser::customParse)(State&, Word) = nullptr;
Error Parser::parse(State& state, const char *str)
{
auto addr = Dictionary::Input;
- const auto len = static_cast<Cell>(std::strlen(str));
+ const auto len = static_cast<Cell>(strlen(str));
state.dict.write(addr, 0);
state.dict.write(Dictionary::SourceLen, len);
@@ -95,7 +92,7 @@ Error Parser::parseNumber(State& state, Word word)
++it;
const auto end = word.end(&state.dict);
- for (char c; it != end; ++it) {
+ for (uint8_t c; it != end; ++it) {
c = *it;
if (isdigit(c)) {