1.2 Translation Process

A programming language translator takes a source code written in one language and generates an output code in the target language, for later execution on some execution agent. Sometimes, the output is further processed by another translator to a second target language (see Fig. 1.2).

 

What does a translator do?

 

Fig. 1.2 What does a translator do?

 

Note: One important requirement – the algorithm specified by the source code should remain intact across the translation, i.e. the target code must specify exactly the same algorithm.

Get Compilers: Principles and Practice now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.