3.1 Major objects
The classes of
Libmarpa’s object system fall into two types:
major and numbered.
These are the Libmarpa’s major classes,
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.
A grammar object contains rules and symbols,
with their properties.
A recognizer object reads input.
A bocage object is a collection of
parse trees, as found by a recognizer.
Bocages are similar to parse forests.
An ordering object
is an ordering of the trees
in a bocage.
A tree object is a bocage iterator.
A value object is a tree iterator.
Iteration of tree using a value object
These “steps” are
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