Setting up the use of this module.
§1. This section simoly 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 IF_MODULE TRUE
§2. This module defines the following classes:
enum action_name_CLASS enum auxiliary_file_CLASS enum backdrop_found_in_notice_CLASS enum cached_understanding_CLASS enum command_index_entry_CLASS enum connected_submap_CLASS enum door_dir_notice_CLASS enum door_to_notice_CLASS enum EPS_map_level_CLASS enum grammar_line_CLASS enum grammar_verb_CLASS enum loop_over_scope_CLASS enum map_data_CLASS enum named_action_pattern_CLASS enum noun_filter_token_CLASS enum parse_name_notice_CLASS enum parsing_data_CLASS enum parsing_pp_data_CLASS enum regions_data_CLASS enum reserved_command_verb_CLASS enum rubric_holder_CLASS enum scene_CLASS enum short_name_notice_CLASS enum slash_gpr_CLASS enum spatial_data_CLASS enum action_name_list_CLASS enum action_pattern_CLASS enum ap_optional_clause_CLASS enum scene_connector_CLASS enum understanding_item_CLASS enum understanding_reference_CLASS
DECLARE_CLASS(action_name) DECLARE_CLASS(auxiliary_file) DECLARE_CLASS(backdrop_found_in_notice) DECLARE_CLASS(cached_understanding) DECLARE_CLASS(command_index_entry) DECLARE_CLASS(connected_submap) DECLARE_CLASS(door_dir_notice) DECLARE_CLASS(door_to_notice) DECLARE_CLASS(EPS_map_level) DECLARE_CLASS(grammar_line) DECLARE_CLASS(grammar_verb) DECLARE_CLASS(loop_over_scope) DECLARE_CLASS(map_data) DECLARE_CLASS(named_action_pattern) DECLARE_CLASS(noun_filter_token) DECLARE_CLASS(parse_name_notice) DECLARE_CLASS(parsing_data) DECLARE_CLASS(parsing_pp_data) DECLARE_CLASS(regions_data) DECLARE_CLASS(reserved_command_verb) DECLARE_CLASS(rubric_holder) DECLARE_CLASS(scene) DECLARE_CLASS(short_name_notice) DECLARE_CLASS(slash_gpr) DECLARE_CLASS(spatial_data) DECLARE_CLASS_ALLOCATED_IN_ARRAYS(action_name_list, 1000) DECLARE_CLASS_ALLOCATED_IN_ARRAYS(action_pattern, 100) DECLARE_CLASS_ALLOCATED_IN_ARRAYS(ap_optional_clause, 400) DECLARE_CLASS_ALLOCATED_IN_ARRAYS(scene_connector, 1000) DECLARE_CLASS_ALLOCATED_IN_ARRAYS(understanding_item, 100) DECLARE_CLASS_ALLOCATED_IN_ARRAYS(understanding_reference, 100) MAKE_ANNOTATION_FUNCTIONS(action_meaning, action_pattern) MAKE_ANNOTATION_FUNCTIONS(constant_action_name, action_name) MAKE_ANNOTATION_FUNCTIONS(constant_action_pattern, action_pattern) MAKE_ANNOTATION_FUNCTIONS(constant_grammar_verb, grammar_verb) MAKE_ANNOTATION_FUNCTIONS(constant_named_action_pattern, named_action_pattern) MAKE_ANNOTATION_FUNCTIONS(constant_scene, scene)
§3. The beginning. (The client doesn't need to call the start and end routines, because the foundation module does that automatically.)
COMPILE_WRITER(action_pattern *, PL::Actions::Patterns::log) COMPILE_WRITER(grammar_verb *, PL::Parsing::Verbs::log) COMPILE_WRITER(grammar_line *, PL::Parsing::Lines::log) COMPILE_WRITER(action_name_list *, PL::Actions::Lists::log) COMPILE_WRITER(action_name *, PL::Actions::log) void IFModule::start(void) { Register this module's memory allocation reasons3.1; Register this module's stream writers3.2; Register this module's debugging log aspects3.4; Register this module's debugging log writers3.5; PL::SpatialRelations::start(); PL::MapDirections::start(); } void IFModule::end(void) { }
§3.1. Register this module's memory allocation reasons3.1 =
;
- This code is used in §3.
§3.2. Register this module's stream writers3.2 =
;
- This code is used in §3.
enum ACTION_CREATIONS_DA enum ACTION_PATTERN_COMPILATION_DA enum ACTION_PATTERN_PARSING_DA enum GRAMMAR_DA enum GRAMMAR_CONSTRUCTION_DA enum OBJECT_TREE_DA enum SPATIAL_MAP_DA enum SPATIAL_MAP_WORKINGS_DA
§3.4. Register this module's debugging log aspects3.4 =
Log::declare_aspect(ACTION_CREATIONS_DA, L"action creations", FALSE, FALSE); Log::declare_aspect(ACTION_PATTERN_COMPILATION_DA, L"action pattern compilation", FALSE, FALSE); Log::declare_aspect(ACTION_PATTERN_PARSING_DA, L"action pattern parsing", FALSE, FALSE); Log::declare_aspect(GRAMMAR_DA, L"grammar", FALSE, FALSE); Log::declare_aspect(GRAMMAR_CONSTRUCTION_DA, L"grammar construction", FALSE, FALSE); Log::declare_aspect(OBJECT_TREE_DA, L"object tree", FALSE, FALSE); Log::declare_aspect(SPATIAL_MAP_DA, L"spatial map", FALSE, FALSE); Log::declare_aspect(SPATIAL_MAP_WORKINGS_DA, L"spatial map workings", FALSE, FALSE);
- This code is used in §3.
§3.5. Register this module's debugging log writers3.5 =
REGISTER_WRITER('A', PL::Actions::Patterns::log); REGISTER_WRITER('G', PL::Parsing::Verbs::log); REGISTER_WRITER('g', PL::Parsing::Lines::log); REGISTER_WRITER('L', PL::Actions::Lists::log); REGISTER_WRITER('l', PL::Actions::log);
- This code is used in §3.
§4. This module uses syntax, and adds the following annotations to the syntax tree.
DECLARE_ANNOTATION_FUNCTIONS(action_meaning, action_pattern) DECLARE_ANNOTATION_FUNCTIONS(constant_action_name, action_name) DECLARE_ANNOTATION_FUNCTIONS(constant_action_pattern, action_pattern) DECLARE_ANNOTATION_FUNCTIONS(constant_grammar_verb, grammar_verb) DECLARE_ANNOTATION_FUNCTIONS(constant_named_action_pattern, named_action_pattern) DECLARE_ANNOTATION_FUNCTIONS(constant_scene, scene)
void IFModule::declare_annotations(void) { Annotations::declare_type(constant_action_name_ANNOT, NULL); Annotations::declare_type(constant_action_pattern_ANNOT, NULL); Annotations::declare_type(constant_grammar_verb_ANNOT, NULL); Annotations::declare_type(constant_named_action_pattern_ANNOT, NULL); Annotations::declare_type(constant_scene_ANNOT, NULL); }