class Pegasus::Nfa::StateChain

Overview

A "unit" of one or more connected states.

Defined in:

pegasus/regex.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(start : Pegasus::Automata::State(Int64 | Nil, Pegasus::Nfa::Transition), final = nil) #

Creates a new chain with the given initial and final states.


[View source]

Instance Method Detail

def append!(other : StateChain) #

Appends another chain to this one, modifying the states' transition hashes, too.


[View source]
def append!(other : Nil) #

Appends nothing to this chain. This is a no-op.


[View source]
def final : NState #

The end of this chain.


[View source]
def final=(final : NState) #

The end of this chain.


[View source]
def start : NState #

The beginning of this chain.


[View source]
def start=(start : NState) #

The beginning of this chain.


[View source]