//===--------------------- DfaEmitter.h -----------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // Defines a generic automaton builder. This takes a set of transitions and // states that represent a nondeterministic finite state automaton (NFA) and // emits a determinized DFA in a form that include/llvm/Support/Automaton.h can // drive. // // See file llvm/TableGen/Automaton.td for the TableGen API definition. // //===----------------------------------------------------------------------===// #ifndef LLVM_UTILS_TABLEGEN_DFAEMITTER_H #define LLVM_UTILS_TABLEGEN_DFAEMITTER_H #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/UniqueVector.h" #include <map> #include <set> #include <utility> #include <vector> namespace llvm { class raw_ostream; class StringRef; /// Construct a deterministic finite state automaton from possible /// nondeterministic state and transition data. /// /// The state type is a 64-bit unsigned integer. The generated automaton is /// invariant to the sparsity of the state representation - its size is only /// a function of the cardinality of the set of states. /// /// The inputs to this emitter are considered to define a nondeterministic /// finite state automaton (NFA). This is then converted to a DFA during /// emission. The emitted tables can be used to by /// include/llvm/Support/Automaton.h. class DfaEmitter { … }; } // namespace llvm #endif