16.2 Translation Software Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

Stages in the compilation of a program.

A

1) Lexical analysis
2) Syntax analysis
3) Code generation
3) Optimisation

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

How RPN is used by an interpreter to evaluate expressions?

A
  • Expressions evaluated left to right

- Each operator uses the previous two values on the stack.

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

How does an interpreter execute a program without producing a complete translated version of it?

A
  • Examines source code one statement at a time
  • Checks each statement for errors
  • If no error found the statement is executed, if error found the interpreter halts.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Why is RPN used?

A
  • reading from left to right
  • no need to use brackets
  • no need for rules of precedence
How well did you know this?
1
Not at all
2
3
4
5
Perfectly