函数逻辑报告 |
Source Code:lib\ts_fsm.c |
Create Date:2022-07-27 08:08:51 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:fsm_find
函数原型:static unsigned int fsm_find(struct ts_config *conf, struct ts_state *state)
返回类型:unsigned int
参数:
类型 | 参数 | 名称 |
---|---|---|
struct ts_config * | conf | |
struct ts_state * | state |
136 | fsm等于ts_config_priv(conf) |
138 | block_idx等于0 |
157 | 如果end_of_data()则转到:no_match |
160 | strict等于recur不等于TS_FSM_HEAD_IGNORE |
162 | startover : |
163 | match_start等于consumed加block_idx |
170 | 否则next = NULL |
174 | 当:recur恒等于TS_FSM_SINGLE |
182 | 当:recur恒等于TS_FSM_PERHAPS |
183 | 如果end_of_data()或非match_token(cur, data[block_idx])则继续下一循环 |
186 | 退出 |
188 | 当:recur恒等于TS_FSM_MULTI |
189 | 如果end_of_data()则转到:no_match |
192 | 如果非match_token(cur, data[block_idx])则TOKEN_MISMATCH() |
195 | block_idx自加 |
198 | 当:recur恒等于TS_FSM_ANY |
199 | 如果(next == NULL)则转到:found_match |
202 | 如果end_of_data()则继续下一循环 |
205 | 当非match_token(next, data[block_idx])循环 |
206 | 如果非match_token(cur, data[block_idx])则TOKEN_MISMATCH() |
208 | block_idx自加 |
209 | 如果end_of_data()则转到:no_match |
212 | 继续下一循环 |
218 | 当:recur恒等于TS_FSM_HEAD_IGNORE |
219 | 如果end_of_data()则继续下一循环 |
222 | 当非match_token(next, data[block_idx])循环 |
229 | 如果非match_token(cur, data[block_idx])则转到:no_match |
232 | block_idx自加 |
233 | 如果end_of_data()则转到:no_match |
237 | match_start等于consumed加block_idx |
238 | 继续下一循环 |
241 | block_idx自加 |
244 | 如果end_of_data()则转到:found_match |
247 | no_match : |
248 | 返回:UINT_MAX |
250 | found_match : |
252 | 返回:match_start |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |