Phases Flashcards

1
Q

How many phases does a compiler typically go through?

A

7

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

What are the two ends of the compile process?

A

Front End
Back End

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

What is the first phase of the front end called and what object completes it?

A

Lexical Analyzer - Scanner

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

What is the second phase of the front end called and what object completes it?

A

Syntax Analyzer - Parser

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

What is the third phase of the front end called?

A

Semantic Analysis

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

What is the fourth phase of the front end called and what object completes it?

A

Intermediate Code Generation - Generator

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

What is the fifth phase of the front end called and what object completes it?

A

Optimization - Optimizer

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

What is the first phase of the back end called?

A

Code Generator

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

What is the second phase of the back end called?

A

Machine-Dependent Code Optimizer

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

What details are sent by the scanner to the parser?

A

Lexemes/Tokens

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

How does the parser organize data to check for syntax errors?

A

Using an Abstract-Syntax Tree

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

What is a typical example of intermediate code generation?

A

3-Address code

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

What is ‘|’ is regular expression?

A

Or

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

What is ‘.’ is regular expression?

A

Followed by

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

What is ‘*’ is regular expression?

A

Zero of more instances of

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

What is the output of the Scanner?

A

Token Stream

17
Q

What is the output of the Parser?

A

Abstract-Syntax Tree

18
Q

What is the output of phase three?

A

Annotated-Syntax Tree

19
Q

What is the output of the Generator?

A

Intermediate Code

20
Q

What is the output of the Optimizer?

A

Optimized Intermediate Code

21
Q

What is the output of the back end code generator?

A

Target-Machine Code

22
Q

What is the output of the back end optimizer?

A

Object Program