|
|
|
|
|
by nene
5166 days ago
|
|
I'm a bit disappointed, that the author didn't built a turing-complete interpreter. Frankly I've seen several of such articles which tell you how to build this kind of deterministic evaluator, but they all seem to stop before loops and branching. And then there are articles about building compilers which do support loops etc, but the trick is that these constructs are implemented by some other already existing machine. So I feel like there's some gap in my education. Pointers, anybody? |
|
Anyway, I'm pretty sure it wouldn't be that hard to extend the language to add some looping and branching constructs to the language, there's nothing really special there to add, it's just another simple type of construct to evaluate.
In my understanding, loops are implemented at the lowest level with jump instructions, but I've never really done much low-lever programming so maybe someone else can explain that better.