1.2.2 Applications Generation Flashcards
Lexical analysis
White space and comments are removed.
The keywords and identifiers are replaced with tokens and they are stored with each keyword in a symbol table
Syntax Analysis
Abstract tree is produced, which is a representation of the source code in the form of a tree
Errors generated if token break any rules of the language.
Errors are reported as a list
Error diagnostic is given
Machine Code Generator
Abstract syntax tree is converted to produce object code which is the machine code before final step
Optimisation
Tweaks the code so it will run as quickly and use as little memory as possible. Redundant parts of the code are detected and removed.
Linkers
Piece of software responsible for linking external modules and libraries within code
Dynamic Linker
The loader retrieves the program when the program is run (files remain small and updates automatically)
Loaders
Program provided by the OS. When a file is executed, the loader retrieves the library from given memory location
Libraries
Precompiled programs that can be incorporated within other programs.
They are ready to use and error-free so saving development time and testing modules.
It can be reused in many programs.
Utility
Performs a specific task relating to the upkeep of the OS ie disk defragmentation
Translators
Program that converts high- level code into low level object code ready to be executed.
Compiler
Translate high level code into machine code all at once.
Interpreter
Translate and execute code line by line. They stop to produce an error if a line contains an error.
Assembler
Next level from machine code is platform specific as instructions used are independent on instruction set of processor.