1.2.2 Applications Generation Flashcards
What are the stages of compilation?
● Lexical analysis
● Syntax analysis
● Code generation
● Optimisation
What happens during syntax analysis?
● Tokens are compared to the rules of the
programming language
● Syntax errors are identified and reported as a list
● Detail added to
● Semantic analysis (finding logic errors)
What happens during the lexical analysis?
● Comments and whitespace are removed
● Variables, and subroutines stored in a symbol table
● Code is converted into tokens
What happens at code generation and optimisation?
● Object code is created
● Will attempt to reduce any redundancy by producing object code that achieves the same effect specified by the source program
What does the linker do?
Combines together a number of separate object codes so that the modules are linked together correctly
What does the loader do?
Loads an executable program into the main memory
What is a library?
A collection of ready-complied programs, which can be loaded and run when required