Setting up the use of this module.

§1. This section simply sets up the module in ways expected by foundation, and contains no code of interest. The following constant exists only in tools which use this module:

define LEXICON_MODULE TRUE

§2. This module defines the following classes:

enumerate excerpt_meaning_CLASS 
DECLARE_CLASS(excerpt_meaning)

§3. Like all modules, this one must define a start and end function:

enumerate EXCERPT_MEANINGS_DA 
enumerate EXCERPT_PARSING_DA 
void LexiconModule::start(void) {
    Log::declare_aspect(EXCERPT_MEANINGS_DA, U"excerpt meanings", FALSE, FALSE);
    Log::declare_aspect(EXCERPT_PARSING_DA, U"excerpt parsing", FALSE, FALSE);
    Writers::register_logger('M', ExcerptMeanings::log);
    Declare the tree annotations3.1;
}
void LexiconModule::end(void) {
}

§4. This module uses syntax, and adds the following annotations to the syntax tree.

enumerate meaning_ANNOT /* |excerpt_meaning|: for leaves */ 
DECLARE_ANNOTATION_FUNCTIONS(meaning, excerpt_meaning)

MAKE_ANNOTATION_FUNCTIONS(meaning, excerpt_meaning)

§3.1. Declare the tree annotations3.1 =

    Annotations::declare_type(meaning_ANNOT, LexiconModule::write_meaning_ANNOT);

§5.

void LexiconModule::write_meaning_ANNOT(text_stream *OUT, parse_node *p) {
    if (Node::get_meaning(p)) {
        WRITE(" {meaning: ");
        ExcerptMeanings::log(OUT, Node::get_meaning(p));
        WRITE("}");
    }
}