class Pegasus::Dfa::Dfa

Overview

A deterministic finite automaton, whose dtransitions are marked by bytes and whose data is actually the collection of states this state represents in the source Pegasus::Nfa::Nfa.

Defined in:

pegasus/dfa.cr
pegasus/table.cr

Constructors

Instance Method Summary

Instance methods inherited from class Pegasus::Automata::UniqueAutomaton(Set(Pegasus::Automata::State(Int64?, Pegasus::Nfa::Transition)), UInt8)

state_for(*, data : V(Pegasus::Automata::State(Int64?, Pegasus::Nfa::Transition))) state_for

Constructor methods inherited from class Pegasus::Automata::UniqueAutomaton(Set(Pegasus::Automata::State(Int64?, Pegasus::Nfa::Transition)), UInt8)

new new

Instance methods inherited from class Pegasus::Automata::Automaton(Set(Pegasus::Automata::State(Int64?, Pegasus::Nfa::Transition)), UInt8)

last_id : Int64 last_id, start : State(V(Pegasus::Automata::State(Int64?, Pegasus::Nfa::Transition)), T) | Nil start, start=(start : State(V(Pegasus::Automata::State(Int64?, Pegasus::Nfa::Transition)), T) | Nil) start=, state_for(*, data : V(Pegasus::Automata::State(Int64?, Pegasus::Nfa::Transition))) state_for, states : Set(State(V(Pegasus::Automata::State(Int64?, Pegasus::Nfa::Transition)), T)) states

Constructor methods inherited from class Pegasus::Automata::Automaton(Set(Pegasus::Automata::State(Int64?, Pegasus::Nfa::Transition)), UInt8)

new new

Constructor Detail

def self.new #

Creates a new UniqueAutomaton.


[View source]

Instance Method Detail

def final_table #

Creates a final table, which is used to determine if a state matched a token.


[View source]
def state_table #

Creates a transition table given, see Pegasus::Language::LanguageData


[View source]