The purpose of syntactic analysis is to determine the structure of the
This structure consists of a hierarchy of phrases,
the smallest of which are the basic symbols
and the largest of which is the sentence.
The structure can be described by a tree with one node for each phrase.
Basic symbols are represented by values stored at the nodes.
The root of the tree represents the sentence.
This manual explains how to use a `.con' specification to describe
the set of all possible phrases that could appear in sentences of a language.
It also discusses methods of resolving ambiguity in such descriptions, and
how to carry out arbitrary actions during the recognition process itself.
The use of `.perr' specifications to improve the error
recovery of the generated parser is described as well.
Computations over the input can be written with attribute grammar
specifications that are based on an abstract syntax. The abstract syntax
describes the structure of an abstract syntax tree, much the way the concrete
syntax describes the phrase structure of the input. Eli uses a tool,
called Maptool, that automatically generates the abstract syntax
tree based on an analysis of the concrete and abstract syntaxes and
user specifications given in files of type `.map'. This manual
will describe the rules used by Maptool to determine a unique correspondence
between the concrete and abstract syntax and the information users can
provide in `.map' files to assist in the process.
This manual will also discuss how Maptool makes it possible to only
partially specify the concrete and abstract syntaxes, as long as together they
specify a complete syntax.
Although Maptool simplifies the task of relating the phrase structure of a
language to the abstract syntax on which a computation is based, it is
cometimes necessary to use a parser that was not generated by Eli to
analyze phrase structure.
In that case, the relationship between phrase structure and abstract syntax
must be embedded in a hand-coded tree construction module.
The last section of this manual explains how such a module is implemented,
and describes the way in which Eli supports that implementation and manages
its integration with the generated tree computations.