Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Interpreter (computing)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Program that executes source code without a separate compilation step}} [[File:W3sDesign Interpreter Design Pattern UML.jpg|thumb|300px|W3sDesign Interpreter Design Pattern [[Unified Modeling Language|UML]]]] {{Program execution}} In [[computer science]], an '''interpreter''' is a [[computer program]] that directly [[execution (computers)|executes]] instructions written in a [[Programming language|programming]] or [[scripting language]], without requiring them previously to have been [[Compiler|compiled]] into a [[machine language]] program. An interpreter generally uses one of the following strategies for program execution: # [[Parse]] the [[source code]] and perform its behavior directly; # [[Translator (computing)|Translate]] source code into some efficient [[intermediate representation]] or [[object code]] and immediately execute that; # Explicitly execute stored precompiled [[bytecode]]<ref>''In this sense, the [[Central processing unit|CPU]] is also an interpreter, of machine instructions.''</ref> made by a [[compiler]] and matched with the interpreter's [[virtual machine]]. Early versions of [[Lisp programming language]] and [[BASIC interpreter|minicomputer and microcomputer BASIC dialects]] would be examples of the first type. [[Perl]], [[Raku (programming language)|Raku]], [[Python (programming language)|Python]], [[MATLAB]], and [[Ruby (programming language)|Ruby]] are examples of the second, while [[UCSD Pascal]] is an example of the third type. Source programs are compiled ahead of time and stored as machine independent code, which is then [[Linker (computing)|linked]] at run-time and executed by an interpreter and/or compiler (for [[Just-in-time compilation|JIT]] systems). Some systems, such as [[Smalltalk]] and contemporary versions of [[BASIC]] and [[Java (programming language)|Java]], may also combine two and three types.<ref>Although this scheme (combining strategy 2 and 3) was used to implement certain BASIC interpreters already in the 1970s, such as the efficient BASIC interpreter of the [[ABC 80]], for instance.</ref> Interpreters of various types have also been constructed for many languages traditionally associated with compilation, such as [[ALGOL|Algol]], [[Fortran]], [[COBOL|Cobol]], [[C (programming language)|C]] and [[C++]]. While interpretation and compilation are the two main means by which programming languages are implemented, they are not mutually exclusive, as most interpreting systems also perform some translation work, just like compilers. The terms "[[interpreted language]]" or "[[compiled language]]" signify that the canonical implementation of that language is an interpreter or a compiler, respectively. A [[high-level programming language|high-level language]] is ideally an [[Abstraction (computer science)|abstraction]] independent of particular implementations.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)