LLVM: llvm::Automaton< ActionT > Class Template Reference (original) (raw)

A deterministic finite-state automaton. More...

#include "[llvm/Support/Automaton.h](Automaton%5F8h%5Fsource.html)"

Public Member Functions
template
Automaton (ArrayRef< InfoT > Transitions, ArrayRef< NfaStatePair > TranscriptionTable={})
Create an automaton.
Automaton (const Automaton &Other)
void reset ()
Reset the automaton to its initial state.
void enableTranscription (bool Enable=true)
Enable or disable transcription.
bool add (const ActionT &A)
Transition the automaton based on input symbol A.
bool canAdd (const ActionT &A)
Return true if the automaton can be transitioned based on input symbol A.
ArrayRef< NfaPath > getNfaPaths ()
Obtain a set of possible paths through the input nondeterministic automaton that could be obtained from the sequence of input actions presented to this deterministic automaton.

template
class llvm::Automaton< ActionT >

A deterministic finite-state automaton.

The automaton is defined in TableGen; this object drives an automaton defined by tblgen-emitted tables.

An automaton accepts a sequence of input tokens ("actions"). This class is templated on the type of these actions.

Definition at line 160 of file Automaton.h.

template

template

Create an automaton.

Parameters

Transitions The Transitions table as created by TableGen. Note that because the action type differs per automaton, the table type is templated as ArrayRef.
TranscriptionTable The TransitionInfo table as created by TableGen.

Providing the TranscriptionTable argument as non-empty will enable the use of transcription, which analyzes the possible paths in the original NFA taken by the DFA. NOTE: This is substantially more work than simply driving the DFA, so unless you require the getPaths() method leave this empty.

Definition at line 191 of file Automaton.h.

Referenced by Automaton().

Automaton() [2/2]

template

add()

template

Transition the automaton based on input symbol A.

Return true if the automaton transitioned to a valid state, false if the automaton transitioned to an invalid state.

If this function returns false, all methods are undefined until reset() is called.

Definition at line 233 of file Automaton.h.

References A(), and I.

canAdd()

template

Return true if the automaton can be transitioned based on input symbol A.

Definition at line 244 of file Automaton.h.

References A(), and I.

enableTranscription()

template

Enable or disable transcription.

Transcription is only available if TranscriptionTable was provided to the constructor.

Definition at line 220 of file Automaton.h.

References assert(), and llvm::Enable.

getNfaPaths()

template

Obtain a set of possible paths through the input nondeterministic automaton that could be obtained from the sequence of input actions presented to this deterministic automaton.

Definition at line 252 of file Automaton.h.

References assert().

reset()

template

Reset the automaton to its initial state.

Definition at line 212 of file Automaton.h.


The documentation for this class was generated from the following file: