Lecrapouille / SimForth

[Application][lib][Version 0.2 Prototype][WIP] A Forth interpreter made in C++11
GNU General Public License v3.0
3 stars 0 forks source link

WIP, FIXME, TODO #1

Open Lecrapouille opened 4 years ago

Lecrapouille commented 4 years ago

dev-refacto branch:

API:

Issues:

KO ANSI-Forth:

ANSI-Forth suxx:

Travis CI / Unit tests:

Endian:

TODO/improvements:

Minimal Forth system:

Dictionary:

CLib improvements:

Improvements:

Debugger:

Benchmark:

Done:

Lecrapouille commented 4 years ago

Thinking: Qt QScriptEngine:

QScriptEngine engine = new QScriptEngine(this);
MyObject* obj = ... ;
QScriptValue scriptObj = engine->NewQObject(obj);
QScprtValue global = engine->globalObject();
global.setProperty("obj", scriptObj);

QString script = ;
QScriptValue result = engine->evaluate(script);
if (result.isError())
  ... result.toString()
Lecrapouille commented 4 years ago

Upgrade words primitive managing the input stream:

Forth primitives such as SOURCE, WORD KEY, >IN, TIB, follow outdated specifications and made my Stream API more ugly. Their idea to allow the Forth interpreter to self-evolve by reading the Forth script is greater but their usage is very limited. For example, my Stream API was mainly made of feed(stream), hasWord() and getWord() and private methods such split() as but these words made me add methods such as split(delimiter) (delimiter is a string but only the 1st is used to follow the standard), skip(offset) (negative offset is badly managed)

We can make think a more modern way primitives words.