18.5.19

Yorumlayıcı

Tercüman, kodu okuyan ve yürüten bir programdır . Bu, kaynak kodu , önceden derlenmiş kod ve komut dosyalarını içerir . Ortak tercümanlar dahil Perl , Python ve Ruby sırasıyla Perl, Python yürütmek tercümanlar, ve Ruby kodu.

Yorumlayıcı ve derleyiciler benzerdir, çünkü hem kaynak kodu hem tanır hem de işler. Ancak, bir derleyici gibi bir kod çalıştırmaz ve yorumlayıcı yapar. Bunun yerine, bir derleyici kaynak kodunu doğrudan işletim sistemi tarafından çalıştırılabilir bir program olarak çalıştırılabilen makine koduna dönüştürür . Yorumlayıcılar derleme işlemini atlar ve kodu doğrudan yürütür.

Yorumlayıcılar tek bir adımda kodu okuyup çalıştırdığından, komut dosyalarını ve diğer küçük programları çalıştırmak için kullanışlıdır. Bu nedenle, Yorumlayıcılar genellikle geliştiricilerin web sayfalarında çalıştırılabilir komut dosyaları çalıştırmalarını sağlayan Web sunucularına kurulur . Bu komut dosyaları, kodu yeniden derlemeye gerek kalmadan kolayca düzenlenebilir ve kaydedilebilir.

Yorumlayıcılar küçük programlar yürütmek için çeşitli avantajlar sunarken, Yorumlayıcı dillerin de bazı kısıtlamaları vardır. En kayda değer, yorumlanmış kodun gerektirdiği ve yorumlayıcının çalışması gerektiği gerçeğidir. Bu nedenle, bir Yorumlayıcı olmadan, kaynak kod çalıştırılabilir bir programdan ziyade düz bir metin dosyası olarak işlev görür . Ek olarak, bir Yorumlayıcı için yazılmış programlar, yerleşik sistem işlevlerini kullanamayabilir veya derlenmiş programlar gibi donanım kaynaklarına erişemeyebilir. Bu nedenle, çoğu yazılım uygulaması yorumlanmak yerine derlenir.

An interpreter is a program that reads and executes code. This includes source code, pre-compiled code, and scripts. Common interpreters include Perl, Python, and Ruby interpreters, which execute Perl, Python, and Ruby code respectively.

Interpreters and compilers are similar, since they both recognize and process source code. However, a compiler does not execute the code like and interpreter does. Instead, a compiler simply converts the source code into machine code, which can be run directly by the operating system as an executable program. Interpreters bypass the compilation process and execute the code directly.

Since interpreters read and execute code in a single step, they are useful for running scripts and other small programs. Therefore, interpreters are commonly installed on Web servers, which allows developers to run executable scripts within their webpages. These scripts can be easily edited and saved without the need to recompile the code.

While interpreters offer several advantages for running small programs, interpreted languages also have some limitations. The most notable is the fact that interpreted code requires and interpreter to run. Therefore, without an interpreter, the source code serves as a plain text file rather than an executable program. Additionally, programs written for an interpreter may not be able to use built-in system functions or access hardware resources like compiled programs can. Therefore, most software applications are compiled rather than interpreted.