- #1
- 13
- 4
I was reading the page about interpreters on wikipedia and one particular section caught my eye:
"An interpreter generally uses one of the following strategies for program execution:
I know that an example of the third one would be Java or C#, and I understand what the second sentence means too. But the first one in particular intrigued me, is it even possible to have an interpreter that executes parsed code directly without an intermediate representation? I've searched around for quite a while but got no answers, and although the article mentions the early Lisp and BASIC interpreters as examples of interpreters without IRs, I haven't been able to find anything after googling Lisp and BASIC either
(I had to squish even and possible in the title together because I ran out of space oops)
"An interpreter generally uses one of the following strategies for program execution:
- Parse the source code and perform its behavior directly;
- Translate source code into some efficient intermediate representation and immediately execute this;
- Explicitly execute stored precompiled code[1] made by a compiler which is part of the interpreter system (Which is often combined with a Just-in-Time Compiler).
I know that an example of the third one would be Java or C#, and I understand what the second sentence means too. But the first one in particular intrigued me, is it even possible to have an interpreter that executes parsed code directly without an intermediate representation? I've searched around for quite a while but got no answers, and although the article mentions the early Lisp and BASIC interpreters as examples of interpreters without IRs, I haven't been able to find anything after googling Lisp and BASIC either
(I had to squish even and possible in the title together because I ran out of space oops)