update fst struct

This commit is contained in:
yihaoDeng 2021-11-24 20:17:37 +08:00
parent d674fcc8ba
commit 7b62d02f95
2 changed files with 7 additions and 5 deletions

View File

@ -100,7 +100,7 @@ FstState fstStateCreate(State state);
//compile
void fstStateCompileForOneTransNext(FstCountingWriter *w, CompiledAddr addr, uint8_t inp);
void fstStateCompileForOneTrans(FstCountingWriter *w, CompiledAddr addr, FstTransition trn);
void fstStateCompileForOneTrans(FstCountingWriter *w, CompiledAddr addr, FstTransition *trn);
void fstStateCompileForAnyTrans(FstCountingWriter *w, CompiledAddr addr, FstBuilderNode *node);
// set_comm_input

View File

@ -195,12 +195,14 @@ void fstStateCompileForOneTransNext(FstCountingWriter *w, CompiledAddr addr, uin
uint8_t v = fstStateCommInput(&s, &null);
if (null) {
// w->write_all(&[inp])
fstCountingWriterWrite(w, &inp, 1);
}
fstCountingWriterWrite(w, &(s.val), 1);
// w->write_all(&[s.val])
return ;
return;
}
void fstStateCompileForOneTrans(FstCountingWriter *w, CompiledAddr addr, FstTransition trn) {
void fstStateCompileForOneTrans(FstCountingWriter *w, CompiledAddr addr, FstTransition* trn) {
Output val = trn->out;
return ;
}