Re:Show HN: PlanckForth – Bootstrapping an interpreter from ...
by qgc on Wednesday December 08, 2021 @05:38AM
(#29483173)
It would be more accurate to describe a metacompiler as a cross compiler to the machine an interpreted Forth is implemented on.
I recommend Moving Forth [1] for the full explanation. (That's the part that addresses metacompliers, the rest is still quite a great book.)
So in this case, the base implementation starts with support for only a subset of the Forth language, picked for being either essential or much more performant when implemented "natively" in the binary. A subset of this subset is then used to construct support for the rest of the language. This is very typical for Forth- and Lisp-like languages.
[0] https://en.wikipedia.org/wiki/Meta-circular_evaluator
[1] https://en.wikipedia.org/wiki/Self-hosting_(compilers)