Advertisement

Translating between programming languages

Chapter
Part of the Lecture Notes in Computer Science book series (LNCS, volume 302)

Abstract

In this chapter we have shown how AG inversion can be used in a source-to-source translation system. By using invertible grammars in this context, one is provided with a framework in which to reason about the complexities of bi-directional translators, as well as a tool to perform much of the work. By phrasing the problem as one of finding a canonical form in which to represent all source language programs and writing invertible AGs to and from this canonical form, many of the real difficulties of the translation problem become immediately apparent.

This chapter has also related our experience in using the inversion approach to source-to-source translation in writing translators between C and Pascal. This experiment demonstrated that invertible AGs are a satisfactory tool for describing much of the translators, although the complete system needs to incorporate other modules as well. In conclusion, AG inversion promises to be a useful tool in facilitating source-to-source translations.

Keywords

Programming Language Canonical Form Great Common Divisor Source Language Pointer Arithmetic 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Springer-Verlag Berlin Heidelberg 1988

Personalised recommendations