Lines Matching refs:fsm
136 struct ts_fsm *fsm = ts_config_priv(conf); in fsm_find() local
160 strict = fsm->tokens[0].recur != TS_FSM_HEAD_IGNORE; in fsm_find()
165 for (tok_idx = 0; tok_idx < fsm->ntokens; tok_idx++) { in fsm_find()
166 cur = &fsm->tokens[tok_idx]; in fsm_find()
168 if (likely(tok_idx < (fsm->ntokens - 1))) in fsm_find()
169 next = &fsm->tokens[tok_idx + 1]; in fsm_find()
260 struct ts_fsm *fsm; in fsm_init() local
263 size_t priv_size = sizeof(*fsm) + len; in fsm_init()
287 fsm = ts_config_priv(conf); in fsm_init()
288 fsm->ntokens = ntokens; in fsm_init()
289 memcpy(fsm->tokens, pattern, len); in fsm_init()
291 for (i = 0; i < fsm->ntokens; i++) { in fsm_init()
292 struct ts_fsm_token *t = &fsm->tokens[i]; in fsm_init()
304 struct ts_fsm *fsm = ts_config_priv(conf); in fsm_get_pattern() local
305 return fsm->tokens; in fsm_get_pattern()
310 struct ts_fsm *fsm = ts_config_priv(conf); in fsm_get_pattern_len() local
311 return fsm->ntokens * sizeof(struct ts_fsm_token); in fsm_get_pattern_len()