A Read-Eval-Print Loop (REPL) is the most common model for an interactive interpreter - it Reads input, Evaluates it, Prints it, and Loops back to the beginning.
A Read-Eval-Print Loop (REPL) is an interactive interpreter to a programming language. It originated with LISP systems, but many other languages (Python, Ruby, Haskell, Tcl, Java etc.) use REPL's to manage interactive sessions. They allow for simple experimentation with a language by bypassing the compile stage of the "code -> compile -> execute" cycle.
There are 4 components to a REPL (named in LISP notation):
- A
readfunction, which reads input from the keyboard - An
evalfunction, which evaluates code passed to it - A
printfunction, which formats and displays results - A
loopfunction, which runs the three previous commands until termination