[previous] [up] [next]     [contents] [index]
Next: Notations and Terminology Up: PLT McMicMac: Parser Manual Previous: Acknowledgements

Motivation

A typical program-processing tool consists of several components: a reader, a parser, and the actual processing component. The reader converts the input text into some internal representation. This representation is parsed into abstract syntax. The core of the tool processes the abstract syntax and possibly produces some output. The output is finally presented to the programmer.

Ideally, the output of a program-processing tool should be presented in terms of the original program. The best way to achieve this form of reporting is to have source-object correlation (or ``source correlation''). Unfortunately, Scheme macros can transform programs in numerous ways, making the task of source correlation difficult.

This document describes the McMicMac package, which provides a front-end for Scheme that generates source correlation maps. The front-end consists of a scanner, reader, macro-expander and parser, which can be combined selectively. It provides a common ground from which numerous programming tools can be built and given powerful and convenient user interfaces.

The rest of this document describes each of these three phases. The parser is only sparsely specified, since the actual abstract syntax produced by it is completely controlled by the user. (Indeed, this is one of the features of McMicMac.) Separate documents will describe the default abstract syntaxes provided with McMicMac.



PLT