Erwerb funktionaler, räumlicher und kausaler Beziehungen von ...

ai.cs.uni.dortmund.de

Erwerb funktionaler, räumlicher und kausaler Beziehungen von ...

Anhang 89

get_arg_n(h,buffer,' ',4,sizeof(string));

definition->pred_arg_end_position = string_to_number(h);

get_arg_n(definition->pred_arg_add,buffer,' ',5,sizeof(string));

get_arg_n(definition->pred_arg_pattern,buffer,' ',6,sizeof(string));

}

else

exit_on_error("More than one argument definition");

return;

}

if (strcmp(type_of_line,"PREDICATE_DEFINITION") == 0)

{

pred_def *p;

string h;

p = (pred_def *) new_mem(sizeof(pred_def),1);

definition->count_def++;

if (definition->first == NULL)

definition->first = p;

p->next = NULL;

if (definition->last != NULL)

definition->last->next = p;

definition->last = p;

get_arg_n(h,buffer,' ',2,sizeof(string));

p->pred_position_begin = string_to_number(h);

get_arg_n(h,buffer,' ',3,sizeof(string));

trim(h,h,' ');

if (strcmp(h,"*") == 0)

strcpy(h,"1000");

p->pred_position_end = string_to_number(h);

get_arg_n(h,buffer,' ',4,sizeof(string));

p->pred_start_position = string_to_number(h);

get_arg_n(h,buffer,' ',5,sizeof(string));

p->pred_end_position = string_to_number(h);

get_arg_n(h,buffer,' ',6,sizeof(string));

p->pred_pattern_position = string_to_number(h);

get_arg_n(p->pred_pattern,buffer,' ',7,sizeof(string));

get_arg_n(p->pred_add,buffer,' ',8,sizeof(string));

return;

}

if (strcmp(type_of_line,"NO_INFORMATION") == 0)

{

definition->information = 0;

return;

}

exit_on_error(strcat("Unknown Syntax : ",type_of_line));

}

/* Nachdem pred_def_list vollständig erzeugt wurde, wird sie von check_pred_def

auf Fehler überprüft, die nur nach der Verarbeitung der gesamten Konfigurationsdatei

festgestellt werden können */

bool check_pred_def (pred_def_list *definition)

{

bool check_ok = TRUE;

int count = 1;

pred_def *akt_def;

if(definition->count_def == 0)

exit_on_error("No predicate definition");

if(strcmp(definition->input,"") == 0)

exit_on_error("No inputfile");

Weitere Magazine dieses Users
Ähnliche Magazine