what happens in lexical analysis?
white spaces + comments removed
code left is turned into tokens
symbol table created, on variables data type + scope
what happens in syntax anaylsis?
syntax checked against rules of language
abstract syntax tree created
token breaks syntax rule then error sheet generated
passes code to code generation
what happens in code generation?
abstract syntax tree converted to object code
what happens in code optimisation?
removing redundant code
makes file as small and fast as possible
what is a library?
A library is prewritten code, that can be run when needed
pros of libraries
pretested
precompiled
cons of libraries
difficult to implement changes
problem if discontinued
if updated then have to recompile
what is the role of a linker?
ensures modules + external libraries are linked together correctly (at end)
what is the role of a loader?
part of OS that loads machine code into RAM for execution
Last changeda year ago