MimIR 0.1
MimIR is my Intermediate Representation
Loading...
Searching...
No Matches
regex2nfa.h
Go to the documentation of this file.
1#pragma once
2
3#include <automaton/nfa.h>
4
6
7/// You can dl::get this function.
8/// @returns a raw pointer to automanton::NFA; use mim::regex::regex2nfa to pack it into a `std::unique_ptr`.
10
11namespace mim::plug::regex {
12
13std::unique_ptr<automaton::NFA> regex2nfa(Ref regex);
14
15inline std::unique_ptr<automaton::NFA> regex2nfa(decltype(::regex2nfa)* fptr, Ref regex) {
16 return std::unique_ptr<automaton::NFA>(fptr(regex), std::default_delete<automaton::NFA>());
17}
18
19} // namespace mim::plug::regex
Helper class to retrieve Infer::arg if present.
Definition def.h:85
#define MIM_EXPORT
Definition config.h:16
The regex Plugin
Definition lower_regex.h:5
std::unique_ptr< automaton::NFA > regex2nfa(Ref regex)
Definition regex2nfa.cpp:89
MIM_EXPORT automaton::NFA * regex2nfa(mim::Ref regex)
You can dl::get this function.
Definition regex2nfa.cpp:97