Notation: { } are used for grouping; [ ] means optional (i.e., 0 or 1); + means 1 or more; and * means 0 or more.
<ontology> :=
<concept>+
<onomasticon> :=
<instance>+
Onomasticon is the database of remembered instances (of people,
places, organizations, events, etc.)
<concept> :=
<root> | <object-or-event> | <property>
<root> :=
ALL
<def-slot>
<time-stamp-slot>
<subclasses-slot>
ALL is the name of the root concept
<object-or-event> :=
<concept-name>
<def-slot>
<time-stamp-slot>
<isa-slot>
[<subclasses-slot>]
[<instances-slot>]
<other-slot>*
<instance> :=
<instance-name>
<def-slot>
<time-stamp-slot>
<instance-of-slot>
<instance-other-slot>*
<property> :=
<relation> | <attribute>
<relation> :=
<relation-name>
<def-slot>
<time-stamp-slot>
<isa-slot>
[<subclasses-slot>]
<domain-slot>
<rel-range-slot>
<inverse-slot>
<attribute> :=
<attribute-name>
<def-slot>
<time-stamp-slot>
<isa-slot>
[<subclasses-slot>]
<domain-slot>
[<attr-range-slot>]
<concept-name> := <name-string>
<instance-name> := <name-string>
<relation-name> := <name-string>
<attribute-name> := <name-string>
<name-string> :=
<alpha> {<alpha> | <digit>}* {- {<alpha> | <digit>}+ }*
<def-slot> :=
DEFINITION Value ``an English definition string''
<time-stamp-slot> :=
TIME-STAMP Value <time-date-and-username>+
<isa-slot> :=
IS-A Value { ALL | <concept-name>+ | <relation-name>+ | <attribute-name>+ }
<subclasses-slot> :=
SUBCLASSES Value { <concept-name>+ | <relation-name>+ | <attribute-name>+ }
<instances-slot> :=
INSTANCES Value <instance-name>+
<instance-of-slot> :=
INSTANCE-OF Value <concept-name>+
<other-slot> :=
<relation-slot> | <attribute-slot>
<relation-slot> :=
<relation-name> <facet> <concept-name>+
<attribute-slot> :=
<attribute-name> <facet> { <number> | <literal> }+
<facet> :=
Sem | Default | Measuring-Unit
<instance-other-slot> :=
<instance-relation-slot> | <instance-attribute-slot>
<instance-relation-slot> :=
<relation-name> Value <instance-name>+
<instance-attribute-slot> :=
<attribute-name> Value { <number> | <literal> }+
<domain-slot> :=
DOMAIN Sem <concept-name>+
<rel-range-slot> :=
RANGE Sem <concept-name>+
<attr-range-slot> :=
RANGE Sem { <number> | <literal> }*
<inverse-slot> :=
INVERSE Value <relation-name>
<alpha> :=
A | B | C | ... | Y | Z
<number> and <literal> have not been expanded here but have obvious
definitions: a number is any string of digits with a possible decimal
point and a possible +/- sign; a literal is any alphanumeric string
starting with an <alpha>.