3 ms·
This project completely misses the point of Forth. Forth is an interactive assembler. This one has no REPL. Control structures are easy to introduce in the Fo
by ycmbntrthrwaway 10y ago
This project completely misses the point of Forth.
Forth is an interactive assembler. This one has no REPL.
Control structures are easy to introduce in the Forth itself because IF, ELSE and THEN are separate "immediate" words that just manipulate the return stack and compile some branching code immediately when parser encounters them. This compiler has no return stack at all and just looks for IF..ELSE..THEN during parsing.
Forth is ugly outside but has beautiful implementation. This compiler is some ugly python code inside.