aboutsummaryrefslogtreecommitdiffstats
path: root/dictionary.hpp
diff options
context:
space:
mode:
authorClyne Sullivan <clyne@bitgloo.com>2023-02-16 20:12:03 -0500
committerClyne Sullivan <clyne@bitgloo.com>2023-02-16 20:12:03 -0500
commite45926fa2a1bc332214f0467de6020529d91b7ba (patch)
treed9d1d32f9dc23ad145b0a73aeb4b537314188ad1 /dictionary.hpp
parenta506b65bdd589997195e3f93222c37a539a29a28 (diff)
handle input within dictionary
Diffstat (limited to 'dictionary.hpp')
-rw-r--r--dictionary.hpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/dictionary.hpp b/dictionary.hpp
index fd27920..b2c2107 100644
--- a/dictionary.hpp
+++ b/dictionary.hpp
@@ -28,9 +28,15 @@
class Dictionary
{
public:
- constexpr static Addr Base = 0 * sizeof(Cell);
- constexpr static Addr Compiling = 1 * sizeof(Cell);
- constexpr static Addr Begin = 2 * sizeof(Cell);
+ constexpr static Addr Base = 0;
+ constexpr static Addr Compiling = Base + sizeof(Cell);
+ constexpr static Addr Input = Compiling + sizeof(Cell); // len data...
+ constexpr static Addr InputCells = 80; // bytes!
+ constexpr static Addr Begin = Input + sizeof(Cell) + InputCells;
+
+ Word input();
+ bool equal(Word, std::string_view) const;
+ bool equal(Word, Word) const;
Addr here = Begin;
Addr latest = Begin;
@@ -43,8 +49,8 @@ public:
Addr alignhere();
Addr allot(Cell);
void add(Cell);
- void addDefinition(std::string_view);
- Addr find(std::string_view);
+ void addDefinition(Word);
+ Addr find(Word);
Addr getexec(Addr);
private: