MimIR
MimIR is my Intermediate Representation
Loading...
Searching...
No Matches
regex.cpp
Go to the documentation of this file.
2
3#include <mim/phase.h>
4#include <mim/plugin.h>
5
9
10using namespace mim;
11using namespace mim::plug;
12
14
19
21 plugin.register_normalizers = regex::register_normalizers;
22 plugin.register_phases = reg_phases;
23 plugin.syms = known_syms;
24 plugin.num_syms = std::size(known_syms);
25}
static void hook(Flags2Phases &phases)
Definition phase.h:51
const mim::Def * dfa2matcher(mim::World &, const automaton::DFA &, const mim::Def *)
You can fe::dl::get this function.
The regex Plugin
Definition lower_regex.h:5
void register_normalizers(Normalizers &normalizers)
Definition ast.h:16
ankerl::unordered_dense::map< flags_t, std::function< std::unique_ptr< Phase >(World &)> > Flags2Phases
Maps an axiom of a Phase to a function that creates one.
Definition plugin.h:30
One symbol a Plugin offers to other Plugins; see Driver::get_fun_ptr.
Definition plugin.h:48
#define MIM_PLUGIN_SYM(f)
Builds a PluginSym for f, so name and address cannot drift apart.
Definition plugin.h:54
#define MIM_PLUGIN_ENTRY(p)
Defines a Plugin's entry point; the body fills in the plugin handed to it, as in MIM_PLUGIN_ENTRY(dem...
Definition plugin.h:196
automaton::NFA * regex2nfa(const mim::Def *regex)
You can fe::dl::get this function.
static const PluginSym known_syms[]
Definition regex.cpp:15
static void reg_phases(Flags2Phases &phases)
Definition regex.cpp:13