示例#1
0
static really_inline
void rawEodExec(hs_stream_t *id, hs_scratch_t *scratch) {
    const struct RoseEngine *rose = id->rose;

    if (can_stop_matching(scratch)) {
        DEBUG_PRINTF("stream already broken\n");
        return;
    }

    if (isAllExhausted(rose, scratch->core_info.exhaustionVector)) {
        DEBUG_PRINTF("stream exhausted\n");
        return;
    }

    roseEodExec(rose, id->offset, scratch);
}
示例#2
0
static really_inline
void rawEodExec(hs_stream_t *id, hs_scratch_t *scratch) {
    const struct RoseEngine *rose = id->rose;
    char *state = getMultiState(id);
    u8 broken = getBroken(state);

    if (broken) {
        DEBUG_PRINTF("stream already broken\n");
        assert(broken == BROKEN_FROM_USER || broken == BROKEN_EXHAUSTED);
        return;
    }

    if (isAllExhausted(rose, scratch->core_info.exhaustionVector)) {
        DEBUG_PRINTF("stream exhausted\n");
        return;
    }

    roseEodExec(rose, (u8 *)state, id->offset, scratch, selectAdaptor(rose),
                selectSomAdaptor(rose), scratch);
}