Professional Documents
Culture Documents
Syntax vs Semantics
Syntax: rules that govern how statements in a
computer programming language must be
constructed.
Incorrect spelling
Wrong brackets
Leave off matching brackets
Leave off end statements
Compiler
Translation program that converts source code into
object code format (from HLL to machine code to be
executed)
Checks for syntax errors and reports to programmer.
Programmer corrects source code and compiles
again.
If syntactically correct compiler links modules and
generates required object code.
Compiled code usually executes faster than an
interpreted version and can be moved to other
computers.
IDE
Integrated Development Environment
Integrates editor (to create the code) +
debugger (allows programmer to
remove bugs from source code)
Compiler
Interpreter
Translation Process
(Summary)
Compiler
Creates a completely
new prg to be executed.
Does not stop at the
first error and continues
reporting syntax errors
found.
No need to load into
memory to execute a
compiled prg
The object code cannot
be modified
Interpreter
Analyses and executes
each line of source
code in succession
Does not look first to
the entire prg
Runs slower than
compiled prg
Line being interpreted is
executed straight away
(good for large prg)
Need to be loaded each
time memory usage
javac compiler
.java extension