Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is meta-circular interpreter [duplicate]

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

like image 515
peto1234 Avatar asked Nov 04 '22 23:11

peto1234


1 Answers

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.

like image 90
Mithrandir Avatar answered Dec 17 '22 18:12

Mithrandir