4 ms·
> This actually parses a subset of Pascal and translates it into another representation. Perhaps you can call it an interpreter. I didn't read TFA thoroughly,
by astrobe_ 3y ago
> This actually parses a subset of Pascal and translates it into another representation. Perhaps you can call it an interpreter.
I didn't read TFA thoroughly, but traditionally a compiler that translates not to machine code but into another language (source level) is called a "transpiler".
> On metaprogrammable languages like Forth, what is the point of compiling to disk, if the final goal is to execute it anyway? ;)
Lua and probably other languages do have a "pre-compiler", something that parses and compiles to bytecode. This reminds of image-based systems, except it is only one half of them (the other half being the value of variables, stack state, etc.).
It must be much more rare for Forth dialects, as the parsing step is really simple - almost trivial. It has nothing to do with metaprogramming, though - actually, it adds a tiny bot of complexity (must check the "immediate" flag when compiling).