Sat May 30 09:05:05 CEST 2009
forth on forth
The proper way to have _both_ an anonymous compiler and a dictionary
compiler requires some juggling.
This is an energy sink.. It's clearly not anticipated in the design,
so I wonder if i should persue it. The irony is that a threaded Forth
compiler is really trivial compared to one based on composition of
What should this be used for?
- A standard Forth: yes
- A standalone Forth: yes
- Use inside native code: maybe
The important observation is that a standard Forth doesn't need the
"macro:" layer because it can be written entirely in the interaction
mode. This is how it was implemented before.
In other words: the toplevel namespace module is better suited to a
standard Forth than the declarative module one. Let's not waste too
much time on this.
Conclusion: there is no way around writing a full-fledged Forth
parser, which either runs on the target or on the host. It's probably
possible to make some minor hacks in target-double: but that's what
they be: hacks. Anyway, it really only needs ":" and "variable".
Then, maybe there really is no reason to first write a tethered
standard Forth and then make it stand-alone? Probably best to have
only the standalone version.