Wed Jun 3 10:32:21 CEST 2009
it's a trap!
Combining the Staapl language tower approach and the self-hosted Forth
with immediate words is confusing stuff. I keep seeing ways to
bootstrap more directly using the compiler infrastructure, but this
requires unrolling the immediate words.
Now, in essence, that is not so difficult. There are only a couple.
What keeps escaping me however is how to do this automatically. Given
a single (standard) Forth file, lift the immediate words (and their
dependencies!) to the macro side.
What this requires is a shift in perspective: Forth macros are
lowlevel macros, so they should really correspond to _scat_ words
instead of _macro_ words.
So to keep things in perspective:
* circular bootstrapping seems interesting, but might not be
necessary if the forth code can be unrolled just enough to compile
itself. the challenge here is to find the right primitives
(prefix parsers and compiler words) to do this..