lexer_utils.hpp
A set of utilities to convert between NFAs and DFAs.
This file is part of Empirical, https://github.com/devosoft/Empirical Copyright (C) 2016-2024 Michigan State University MIT Software license; see doc/LICENSE.md
Note
Status: BETA
Defines
-
INCLUDE_EMP_COMPILER_LEXER_UTILS_HPP_GUARD
Functions
-
static inline DFA to_DFA(const NFA &nfa, int keep_invalid = false)
Systematic conversion of NFA to DFA…
-
template<typename T1>
static NFA MergeNFA(T1 &&in) Merge multiple automata into one NFA (base case; single conversion)
-
template<typename T1, typename T2, typename ...Ts>
static NFA MergeNFA(T1 &&in1, T2 &&in2, Ts&&... others) Merge multiple automata (DFA, NFA, RegEx) into one NFA.
-
struct DFAStatus
- #include <lexer_utils.hpp>
Structure to track the current status of a DFA.