#include <sent/stddefs.h>
#include <sent/dfa.h>
関数 | |
void | dfa_state_init (DFA_INFO *dinfo) |
Initialize and allocate DFA state information list in the grammar. | |
void | dfa_state_expand (DFA_INFO *dinfo, int needed) |
Expand the state information list to the required length. | |
boolean | rddfa (FILE *fp, DFA_INFO *dinfo) |
Top loop function to read DFA grammar via file pointer | |
boolean | rddfa_fd (int fd, DFA_INFO *dinfo) |
Top loop function to read DFA grammar via file descriptor | |
boolean | rddfa_sd (int sd, DFA_INFO *dinfo) |
Top loop function to read DFA grammar via socket descriptor | |
boolean | rddfa_line (char *line, DFA_INFO *dinfo, int *state_max, int *arc_num, int *terminal_max) |
Parse the input line and set grammar information, one by line. | |
void | dfa_append (DFA_INFO *dst, DFA_INFO *src, int soffset, int coffset) |
Append the DFA state information to other | |
変数 | |
static char | buf [MAXLINELEN] |
Local text buffer |
rddfa.c で定義されています。
void dfa_state_init | ( | DFA_INFO * | dinfo | ) |
Initialize and allocate DFA state information list in the grammar.
dinfo | [i/o] DFA grammar |
参照元 multigram_update(), rddfa(), rddfa_fd(), と rddfa_sd().
void dfa_state_expand | ( | DFA_INFO * | dinfo, | |
int | needed | |||
) |
Expand the state information list to the required length.
dinfo | [i/o] DFA grammar | |
needed | [in] required new length |
参照元 dfa_append(), と rddfa_line().
boolean rddfa | ( | FILE * | fp, | |
DFA_INFO * | dinfo | |||
) |
Top loop function to read DFA grammar via file pointer
fp | [in] file pointer that points to the DFA grammar data | |
dinfo | [out] the read data will be stored in this DFA grammar structure |
参照元 init_dfa().
boolean rddfa_fd | ( | int | fd, | |
DFA_INFO * | dinfo | |||
) |
Top loop function to read DFA grammar via file descriptor
fd | [in] file descriptor that points to the DFA grammar data | |
dinfo | [out] the read data will be stored in this DFA grammar structure |
boolean rddfa_sd | ( | int | sd, | |
DFA_INFO * | dinfo | |||
) |
Top loop function to read DFA grammar via socket descriptor
sd | [in] socket descriptor that points to the DFA grammar data | |
dinfo | [out] the read data will be stored in this DFA grammar structure |
boolean rddfa_line | ( | char * | line, | |
DFA_INFO * | dinfo, | |||
int * | state_max, | |||
int * | arc_num, | |||
int * | terminal_max | |||
) |
Parse the input line and set grammar information, one by line.
line | [in] text buffer that holds a line of DFA file | |
dinfo | [i/o] the read data will be appended to this DFA data | |
state_max | [i/o] maximum number of state id appeared, will be updated | |
arc_num | [i/o] number of read arcs, will be updated | |
terminal_max | [i/o] maximum number of state id appended, will be updated |
参照元 rddfa(), rddfa_fd(), と rddfa_sd().
Append the DFA state information to other
dst | [i/o] DFA grammar | |
src | [i/o] DFA grammar to be appended to dst | |
soffset | [in] offset state number in dst where the new state should be stored | |
coffset | [in] category id offset in dst where the new data should be stored |