Interpret (Definition)

The act of parsing a JavaScript script source text.

To execute a JavaScript script source text, you first have to convert its textual representation into a series of executable steps. This interpretation phase involves the stripping out of commented blocks and the division of the script into tokens - each token is then evaluated and executed sequentially.

Interpretation is distinct from compiling a program. A compiler renders the interpreted code down to a machine-readable form that can be executed directly in terms of CPU opcodes. An interpreted program partially compiles the program to an intermediate form and may store this interpreted data as a series of byte codes. These are then executed in a virtual machine.

Java applets work like this and so do many JavaScript implementations although you cannot normally store the byte-coded version of a JavaScript script. This is beginning to change however and some interactive TV platforms are delivering byte-code forms of JavaScript sourced software to set top boxes. This is particularly appropriate, since the available bandwidth is much reduced compared to web delivery and a byte-code form takes less time to transmit.

The same applies to the delivery of WMLScript code to WAP enabled mobile phones.

See also:ATVEF, DVB-MHP, Implementation, Liberate TV Navigator, OpenTV, WAP, WebTV, WML, WMLScript