6.1 Major objects
The classes of
Libmarpa’s object system fall into two types:
major and numbered.
These are the Libmarpa’s major classes,
in sequence.
- Configuration:
A configuration object is
a thread-safe way to hold configuration variables,
as well as the return code from failed attempts
to create grammar objects.
- Grammar:
A grammar object contains rules and symbols,
with their properties.
- Recognizer:
A recognizer object reads input.
- Bocage:
A bocage object is a collection of
parse trees, as found by a recognizer.
A bocage is a way of representing a parse forest.
- Ordering:
An ordering object
is an ordering of the trees
in a bocage.
- Tree:
A tree object is a bocage iterator.
- Value:
A value object is a tree iterator.
Iteration of a tree using a value object
produces “steps”.
These “steps” are
instructions to
the application on how
to evaluate the semantics,
and how to manipulate the stack.
The major objects have one letter abbreviations,
which are used frequently.
These are, in the standard sequence,
- Configuration: C
- Grammar: G
- Recognizer: R
- Bocage: B
- Ordering: O
- Tree: T
- Value: V