Save
...
Fundamentals of computer systems
Translators
Interpreters
Save
Share
Learn
Content
Leaderboard
Learn
Created by
uearhfowghofr
Visit profile
Cards (10)
Interpreters:
1. Translate and execute each line of source code one by one
2. Syntax-check each program line
3. Convert each line of source code into machine code equivalent
4. Execute each line
View source
If a
syntax
error is found, e.g. a missing bracket, the program
halts
and it is reported
View source
If a
runtime
error occurs, the program
crashes
View source
Interpreters
Allow the developer to test the program and to quickly
identify
and remedy each error as it occurs, without having to go through the whole process of
translating
the entire program every time
Very useful at the
development
stage of a program
View source
Source code that is interpreted
Runs more
slowly
than
compiled
code
View source
Each time the program is run
It must be
translated
all over again
View source
The user must have the
interpreter
installed to be able to
run
the program
View source
Interpreted code
Can be advantageous if the programmer does not know which
platform
will be used to run the code
View source
Most interpreted languages now use bytecode
1.
Source code
is compiled to produce bytecode (low-level code)
2. Bytecode is
interpreted
(i.e. translated and executed) by a
virtual machine
View source
Bytecode is used as an intermediate stage to speed up the
translation
process
View source