Concepts of Programming Languages

(Sean Pound) #1

26 Chapter 1 Preliminaries


Source
program

Lexical
analyzer

Syntax
analyzer

Intermediate
code generator
and semantic
analyzer

Optimization
(optional)

Symbol
table

Code
generator

Computer

Results

Input data

Machine
language

Intermediate
code

Parse trees

Lexical units

Figure 1.3


The compilation process


The intermediate code generator produces a program in a different lan-
guage, at an intermediate level between the source program and the final out-
put of the compiler: the machine language program.^4 Intermediate languages
sometimes look very much like assembly languages, and in fact, sometimes are
actual assembly languages. In other cases, the intermediate code is at a level


  1. Note that the words program and code are often used interchangeably.

Free download pdf