#ifndef EFC_STRUCTS_H #define EFC_STRUCTS_H #define TOK_NO 10 #define SS_NO 1 struct new_state { int transition; /* input value triggering transition */ struct state *next_state; /* state to move to */ struct new_state *next; /* alternative transition */ }; struct state { int state_no; /* this state's number (1-7) */ int actions; /* perform on entry */ struct new_state *trans_lst; /* transitions out */ struct state *next; /* links states in table */ }; struct ch_matcher { char *ch_lst; /* list of characters that can be matched */ }; struct tok_follow { struct state *current_st; /* current state number */ int err_cnt; /* total number of ref and ef occurrence s */ int ss_cell; /* cell that token pointer is pointing t o */ int ref; /* 1 -> deletion/transposition has occurred */ int ef; /* 1 -> insertion/substitution has occurred */ int abort; /* 1 -> short search */ int active; /* 1 -> token follower is active */ int number; /* activation order (1, 2, 3, ...) */ }; struct str_matcher { struct tok_follow tok[TOK_NO]; /* token followers */ struct ch_matcher reg_matcher[16]; /* char matchers */ int str_len; /* length of target word-1 */ int enabled; /* matcher is active */ }; struct stats { float mismatches; int subtot; float toks_used[TOK_NO]; /* fraction of words using N tokens */ float errs[4]; /* fraction of matches with 0-3 errors */ }; #endif /* EFC_STRUCTS_H */