Interpreter (computing)

What is an interpreter in computer science?
In computer science, an interpreter is a computer program that directly executes instructions written in a programming or scripting language, without requiring them previously to have been compiled into a machine language program.

What are the general strategies for program execution used by interpreters?

  • Parse the source code and perform its behavior directly;
  • Translate source code into some efficient intermediate representation or object code and immediately execute that;
  • Explicitly execute stored pre-compiled bytecode made by a compiler and matched with the interpreter Virtual Machine.

Here example how Python interpreter works:

  • very small image, resize SR width

how python interpreter works.excalidraw
How python interpreter works