What is meta-circular interpreter

1k views Asked by At

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

1

There are 1 answers

1
Mithrandir On BEST ANSWER

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.