[rescue] Mainframe on eBay

Jonathan C. Patschke jp at celestrion.net
Fri Sep 23 22:15:50 CDT 2005


On Fri, 23 Sep 2005, Phil Stracchino wrote:

> Oh, sure, you can write an interpreted language interpreter in an
> interpreted language .... but NOT in the same one.

Why not?  Assuming the language implemented by the "parent" interpreter
is reasonably complete (ie: Turing complete), you can implement anything
in it.

> You have to run the interpreter to interpret the code in order to run
> the interpreter to...

No, you run the interpreter to interpret the code, and the interpreter
runs in the parent interpreter's scope.  That the interpreter is written
in the same language that it is interpreting is merely of academic
interest.  The "parent" interpreter has no idea that the program it's
running is also interpreting commands in the same language.

-- 
Jonathan Patschke   )  "When we are young, wandering the face of the
Elgin, TX          (    earth, wondering what our dreams might be worth,
USA                 )   learning that we're only immortal--for a limited
                    (    time."                              --Neil Peart



More information about the rescue mailing list