Compilers And Interpreters Flashcards

1
Q

What are the stages of compilation

lexical analysis

A

Comments and unneeded spaces are removed
Keywords, constants and identifiers are replace by tokens
A symbol table is created which holds the addresses of variabls, labels and subroutines

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the stages of compilation

syntax analysis

A

Tokens are checked to see if they match the spelling and grammar expected, using standard language definitions.
If syntax errors are found error messages are produced

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the stages of compilation

code generation

A

Machiene code is genertaed

Code optimimisation may be employed to make it more efficient/ faster/ less resources intense

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

All stages of compilation process

A
Lexical anaylisis
Symbol table construction
Syntax error
Semantic analysis
Code generation
Optimisation
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the stages of compilation

semantic analysis

A

Variabls are checked to ensure that they have been properly declared and used and are the right data type
Operations are checked to ensure that they are legal for the type of variable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Compilers

A

Converts high level code into low level code, in whole blocks of code at a time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly