Re:Why I wrote a book about interpreters
by taneq on Thursday December 01, 2016 @09:58PM
(#13085618)
So by this definition, an interpreter is a compiler plus a virtual machine, bundled together?
Re:Why I wrote a book about interpreters
by cestith on Friday December 02, 2016 @05:26PM
(#13092884)
It can be but needn't be. You can evaluate straight from walking your AST. You can also transform from your AST into an output then run the output. Either one is commonly called an interpreter but the former is further to that end of a spectrum.
If all you have are compilers, you can never run a program. All you can do is convert it between different languages. Fortunately your computer comes with an interpreter built in: you can think of your cpu as an interpreter for machine code, implemented in hardware.