문제

Can samebody explain it to me what is meta-circular interpreter? Definition on wikipedia is:

A meta-circular evaluator is a special case of a self-interpreter in which the existing facilities of the parent interpreter are directly applied to the source code being interpreted, without any need for additional implementation.

But I don't know how to understand sentence: "self-interpreter in which the existing facilities of the parent interpreter are directly applied to the source code being interpreted".

Here on stackoverflow I found answer that says meta-circular interpreter is self-interpreter without any additional features so I'm pretty confused.

Thanks in advance

도움이 되었습니까?

해결책

What is unclear to you? The stackoverflow post you mentioned is as clear as possible. Let's say you invent your own, very basic language, call it Tiny ML for tiny meta language (actually don't, that name is taken, the ML part).

Then you program an interpreter, let's say in C, for that tiny ml language. Once that interpreter is up and running, you take this interpreter which can run Tiny ML-code and write another interpreter in Tiny ML which can process a much more sophisticated version of Tiny ML, let's call that language Hyper ML. There you have it, your last interpreter should be the illusive meta-circular interpreter.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top