Save
computer science
1.2.2 application generation
Save
Share
Learn
Content
Leaderboard
Share
Learn
Created by
elliot radcliffe
Visit profile
Cards (13)
translators are programs that convert
source
code into
object
code
Compiler
translates
high level
code into
machine
code all at once
initial
compilation
process is
longer
than using other translators
compiled code is
platform specific
compiled code can be run without a
translator
present
Interpreter
translates
and
executes
code line by line
produce an
error
if a line contains an
error
slower
than running
compiled
code
correct
interpreter
required to run on different
platforms
code is
platform independent
useful for
testing
code
Assembler
low level language
that is
platform specific
translates
assembly
code into
machine
code
each line of
assembly
code is
equivalent
to almost
one line
of
machine
code
Lexical analysis
whitespace
and
comments
are removed
keywords
and
identifiers
are replaced with
tokens
information about
tokens
is stored in a
symbol table
Syntax analysis
tokens analysed against
rules
of the
programming
language
syntax errors
are flagged up
abstract
syntax
tree
is produced
Code generation
abstract syntax tree
used to produced
machine code
Optimisation
Aims
reduce
execution
time
is a very
time consuming stage
redundant
parts of code are
removed
Linkers
software that links
external modules
and
libraries
included within the
code
Static linker
module
/
library code
is
copied directly
into the
file
increases
the
size
of the
file
Dynamic linker
addresses of
modules
/
libraries
are added to the file
external module
/
library
updates automatically
feed
through to the
main
file
Loaders
programs provided by the
OS
fetches the
library
/
module
from the given
memory location
Use of
libraries
pre compiled programs
which can be
incorporated
within other
programs
error free
saves
time
and
effort
of
developing
and
testing modules
can be
reused
across
multiple programs