1.0 Introduction

1.1 History

1.2 Characteristics

1.3 Scanner Generators

1.4 Parser Generators

1.5 Semantic Analyzer Generators

1.6 Optimization

1.7 Code Generation

1.8 Summary

Web References

Exercises

1.2.3 Functionality

The functional characteristics of a compiler tool describe how the system works, its capabilities, and the usual software issues of extensibility, robustness, and integration.

Many generated compiler parts consist of two "pieces". The first piece is the table, graph or program stub generated by the tool from the metalanguage input. The second piece is a driver program that reads input and consults the table (or graph or program) for the next action.

Most generators now generate these tables in the form of program stubs (often a huge CASE statement) which are then compiled and linked with the driver. Although this is less efficient than just accessing a table, it allows the user to make changes, that is, to fine tune the result.

Some tools are parametrized. They can produce separate scanners and separate parsers. Other tools produce only one result - the scanner/parser/ semantic analyzer.

Most tools either generate a semantic analyzer or allow the user to write semantic routines that are executed during parsing. When the parser recognizes a construct such as, say, an assignment statement, this routine is executed. Some tools allow the user to input the semantics in the form of an attribute grammar.

Properties of Good Functionality