25 const Def* new_app = def;
27 if (
auto app = def->isa<
App>()) {
28 auto callee = app->callee();
29 if (match<regex::conj>(callee) || match<regex::disj>(callee) || match<regex::not_>(callee)
30 || match<regex::range>(callee) || match<regex::any>(callee) || match<quant>(callee)) {
31 const auto n = app->arg();
33 def->
world().DLOG(
"nfa: {}", *nfa);
36 def->
world().DLOG(
"dfa: {}", *dfa);
Helper class to retrieve Infer::arg if present.
Ref rewrite(Ref) override
THORIN_EXPORT const thorin::Def * dfa2matcher(thorin::World &, const automaton::DFA &, thorin::Ref)
You can dl::get this function.
std::unique_ptr< DFA > minimize_dfa(const DFA &dfa)
std::unique_ptr< DFA > nfa2dfa(const NFA &nfa)
const Def * op_cps2ds_dep(const Def *f)
std::unique_ptr< automaton::NFA > regex2nfa(Ref regex)