At the top level, these objects represent all the input files.
Hier instance represents the hierarchy
of taxonomic levels: class, order, family, and so on.
Hier instance is a container
class for a sequence of
one representing each taxonomic level.
Txny instance represents both sets of
names in the taxonomy: scientific names and bird codes.
It is a container class for instances of the next two
TaxaTree represents the set of all
taxa, structured as a tree.
AbTab instance contains the symbol
table for form codes. It is a container class for
instances of class
AbSym, each of
which represents one form code.
In general, then, the task of nomcompile3 is to read all the input files and incorporate them into these instances, and then use the instances to generate all the output files.
A background in the construction of compilers and
assemblers will be useful in understanding this program.
In particular, the structure of the
file has the classic forward reference
problem: some of the codes refer to other
codes that have not yet been seen.
The classic technique for solving the forward reference problem is to build a symbol table—a structure containing an entry for every name that has been used so far, even though some names have not yet been defined.
Once all the names have been processed, we must make a pass through the symbol table to insure that all referenced symbols have been defined.
The symbol table entries are instances of a class named
AbSym. Each instance contains two
.abbr, the bird code as a
.binding, which describes the
definition of that bird code, if one has been encountered.
.binding attribute is initially set to
None. When a definition of that code is
.binding attribute is set
to an instance derived from the abstract class
AbBind. The various concrete classes derived from
AbBind represent the different kinds of
definitions of a bird code:
StdBind instance represents a
connection between this bird code and one of the
standard taxa from the
Such instances arise from two different sources.
Each species defined in the
will have a code. However, some of the lines in
.alt file refer specific codes
to higher taxa.
EqBind instance represents a
deprecated bird code that points to a different code
that is preferred.
CollBind instance represents a
collision form, that is, multiple names that would
normally all abbreviate to the same code using the
standard abbreviation rules.
Here, then, is an entity-relationship diagram that depicts the relationships among these classes.