Stages Of Compilation

?
  • Created by: ac.x123
  • Created on: 19-10-21 14:40
What is Stage 1?
Lexical Analysis
1 of 12
What is Stage 2?
Symbol Table
2 of 12
What is Stage 3?
Syntax Analysis
3 of 12
What is Stage 4?
Semantic Analysis
4 of 12
What is Stage 5?
Code Generation
5 of 12
What is Stage 6?
Code Optimisation
6 of 12
What is Lexical Analysis?
Lexical Analysis is the stage where all of the unnecessary spaces and the comments are removed, keywords within a program are replaced with tokens and identifiers which represent their function within the program
7 of 12
What is a/the Symbol Table?
During the Lexical Analysis, the lexer (software) builds up a table containing all of the keywords and identifiers within the program which helps to keep track of each item and its order in the program. This provides a clear overview of each keyword and i
8 of 12
What is Syntax Analysis?
The tokens that are taken during the lexing stage are split into phrases. Each phrase is checked against the rules of the language and if a phrase is invalid, an error is recorded
9 of 12
What is Semantic Analysis?
Chains of tokens are created. These make valid syntax but not valid programs. Semantic Analysis checks to make sure that the chains of tokens are compatible. Makes sure that there are no errors in the program
10 of 12
What is Code Generation?
Once the Symbol Table is checked and the Semantic Analysis creates correct chains with the tokens, the program is checked and the compiler generates the machine code which runs the program
11 of 12
What is Code Optimisation?
The optimisation stage is responsible for making code as efficient and effective as possible. All redundant instructions are removed from the program. Inefficient code is replaced by better and more efficient code
12 of 12

Other cards in this set

Card 2

Front

Symbol Table

Back

What is Stage 2?

Card 3

Front

Syntax Analysis

Back

Preview of the back of card 3

Card 4

Front

Semantic Analysis

Back

Preview of the back of card 4

Card 5

Front

Code Generation

Back

Preview of the back of card 5
View more cards

Comments

No comments have yet been made

Similar Computing resources:

See all Computing resources »See all Software resources »