Lines Matching refs:fsm
140 struct ts_fsm *fsm = ts_config_priv(conf); in fsm_find() local
164 strict = fsm->tokens[0].recur != TS_FSM_HEAD_IGNORE; in fsm_find()
169 for (tok_idx = 0; tok_idx < fsm->ntokens; tok_idx++) { in fsm_find()
170 cur = &fsm->tokens[tok_idx]; in fsm_find()
172 if (likely(tok_idx < (fsm->ntokens - 1))) in fsm_find()
173 next = &fsm->tokens[tok_idx + 1]; in fsm_find()
264 struct ts_fsm *fsm; in fsm_init() local
267 size_t priv_size = sizeof(*fsm) + len; in fsm_init()
291 fsm = ts_config_priv(conf); in fsm_init()
292 fsm->ntokens = ntokens; in fsm_init()
293 memcpy(fsm->tokens, pattern, len); in fsm_init()
295 for (i = 0; i < fsm->ntokens; i++) { in fsm_init()
296 struct ts_fsm_token *t = &fsm->tokens[i]; in fsm_init()
308 struct ts_fsm *fsm = ts_config_priv(conf); in fsm_get_pattern() local
309 return fsm->tokens; in fsm_get_pattern()
314 struct ts_fsm *fsm = ts_config_priv(conf); in fsm_get_pattern_len() local
315 return fsm->ntokens * sizeof(struct ts_fsm_token); in fsm_get_pattern_len()