Interpreter (Trình thông dịch (Phân biệt với compiler))

Trình thông dịch biên dịch một chương trình nguồn theo từng phân đoạn. Sau đó, thực thi các đoạn mã đã được biên dịch. Hoàn toàn khác với trình biên dịch (biên dịch hoàn toàn rồi mới thực thi chương trình). Ví dụ như Việt Nam gặp nước Anh-thì cần phải có một thông dịch viên để dịch lại cho quan chức người Anh nghe vì quan chức Việt Nam không biết nói tiếng Anh hoặc vì một lý do nào đó. Khi quan chức Việt Nam nói một câu hoặc một đoạn nhỏ bằng tiếng Việt thì đồng thời người thông dịch sẽ dịch cho quan chức Anh nghe, khi nghe xong quan chức Anh sẽ nói lại một câu hoặc một đoạn nhỏ, người thông dịch lại dịch sang tiếng Việt cho quan chức Việt nghe, cứ như thế cho đến khi nào cuộc trò chuyện hoàn tất. Quá trình này được gọi là thông dịch. 

By English

In computer science, an interpreter is a computer program that executes, i.e. performs, instructions written in a programming language. 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 made by a compiler which is part of the interpreter system.

Early versions of the Lisp programming language and Dartmouth BASIC would be examples of the first type. Perl, Python, MATLAB, and 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 linked at run-time and executed by an interpreter and/or compiler (for JIT systems). Some systems, such as Smalltalk, contemporary versions of BASIC, Java and others may also combine two and three. 

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 language is ideally an abstraction independent of particular implementations.

Like Doanh nhân số