DESIGN AND IMPLEMENTATION OF A TABLE-DRIVEN COMPILER SYSTEM

  • Authors:
  • C. L. Liu;G. D. Chang;R. E. Marks

  • Affiliations:
  • -;-;-

  • Venue:
  • DESIGN AND IMPLEMENTATION OF A TABLE-DRIVEN COMPILER SYSTEM
  • Year:
  • 1967

Quantified Score

Hi-index 0.02

Visualization

Abstract

Our goal is to provide users of the table-driven compiler system with an environment within which they can freely design and produce their compilers. The primary design criterion is generality so that the users can define a large class of input languages oriented toward any kind of problem-solving purposes, and can also define a large class of object programs to be executed on different computer systems. Therefore, in our system we do not limit the users to specific ways of doing syntactic analysis, or doing storage allocation, or producing binary programs of a specific format for a particular computer system. What we provide are mechanisms that are general enough for whichever way a user desires to build his compiler. The table-driven compiler system consists of a base program and two fixed higher-level languages - the Table Declaration and Manipulation Language and the Macro Interpretation Language - together with the corresponding translators which generate the control tables according to the user''s specification. A third higher-level language - the Syntax Defining Language - and its corresponding translator are also needed. However, their definitions are left to the users for the reason of providing them with greater flexibility in specifying the method of syntactic analysis. The base program is controlled by the control tables to perform the task of translating source programs into object machine codes. It is a general program which is independent of the particular source language being translated as well as the method of translation. The control tables contain an encodement of the syntax of the source language, an encodement of the method of translation and an encodement of the characteristics of the target machine. In our design, we emphasize the segmentation of the system so that the functions of each section will be clearly defined and be brought out in evidence. The communication problem between the segments is not a difficult one to handle as illustrated in our design. It should also be pointed out that for the generality and flexibility we try to attain, less consideration is placed on efficiency.