On 17-Apr-14 16:35, Simon Clubley wrote: > Are there FORTH compilers for every platform a C compiler runs on ? Probably. And even if there's not, FORTH is apparently really, /really/ easy to bootstrap. From the attached text-file: > Why then would you want to learn FORTH? There are several very good > reasons. […] > > Secondly FORTH has a peculiar bootstrapping property. By that I > mean that after writing a little bit of assembly to talk to the > hardware and implement a few primitives, all the rest of the language > and compiler is written in FORTH itself. So then, we could construct a FORTH-emitting compiler to bootstrap to a new system and have only to bootstrap FORTH (most of which we could write in itself) with those few [assembly] primitives. Yes, it's a bit indirect -- but I don't see why most of that can't be generally automated into what is essentially a template -- (1) Enter these basic parameters (native int-size, endianness, etc) (2) Fill in these basic assembly functions (3) Compile. (a) Spit out the Forth. (b) Feed the Forth emission of the compiler's own source to the FORTH. (c) Thus obtaining a compiler which runs on the new system. (d) Feed the compiler's own source to the Forth-bootstrap. (4) You now have a native and self-hosting Ada compiler. Another option would be to have a component for describing the new hardware-target [in VHDL] and using that to target/emit. In either case, targeting a new system should be EASY.