4 ms·
It seems more like a parser than a compiler. It doesn't write a binary, it just translates brainfuck to C source code. In the OPs defense, they did say "by abus
by zelon88 5y ago
It seems more like a parser than a compiler. It doesn't write a binary, it just translates brainfuck to C source code. In the OPs defense, they did say "by abusing everything."
- barosl 5y agoA compiler doesn't have to emit machine code. It just needs to translate one language into another, which the author's program does. Also, a parser implies having an internal, structured representation. As the C language is neither internal nor structured, I'd say the program is more likely a compiler.
- recursive 5y agoI blame the rise of the word "transpiler" for making people think that compilation is some more magic/narrow/special thing.
- whatshisface 5y agoThere is a practical, empirical distinction between compilers and transpilers. Most compilers in practice have backends full of deep and well-explored techniques specific to machine code like register allocation, window optimizations, and other stuff like that. Most transpilers you see out in the wild share more in common with compiler frontends in the techniques and the theory they apply.
- mywittyname 5y agoThe term transpiler arose when there was a need to denote a special kind of compiler whose target is another language or version of the same language.
- notme77 5y agoWell then, I can write a tiny C compiler in bash...