From eplmediawiki
This is the approved revision of this page, as well as being the most recent.
Jump to: navigation, search

An interpreter performs the operations implied by the source program, instead of producing a target program as a translation. For an assignment statement, for example, an interpreter might build a tree and then carry out the operations at the nodes as it "walks" the tree. At the root it would discover it had an assignment to perform, so it would call a routine to evaluate the expression on the right, and then store the resulting value in the identifier at the left.

Interpreters are frequently used to execute command languages, since each operator executed in a command language is usually an invocation of a complex routine such as an editor or compiler. Similarly, some high-level languages are normally interpreted because there are many things about the data, such as the size and shape of arrays, that cannot be deduced at compile time.

Personal tools