Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Automaton ¶
Automaton is a 3-Tuple representing a deterministic finite automaton.
func EncodeAutomaton ¶
EncodeAutomaton reads a yaml ByteStream definition of an automata and logically encodes it into an Automata interface.
type IntermediateAutomaton ¶
type IntermediateAutomaton struct { States *int `yaml:"states"` StartState *State `yaml:"initial"` AcceptStates []State `yaml:"finalstates"` Transitions []Transition `yaml:"transitions"` }
IntermediateAutomaton is a human accessible representation of a finite automaton.
func UnmarshalAutomaton ¶
func UnmarshalAutomaton(in []byte) (*IntermediateAutomaton, error)
UnmarshalAutomaton deserializes the YAML input stream into an automaton object. If an error occurs during deserialization, then returns the error.
type Transition ¶
Transition represents the set of state transitions a finite automaton can make given a specified input character.
func (*Transition) UnmarshalYAML ¶
func (t *Transition) UnmarshalYAML(value *yaml.Node) error
UnmarshalYAML overrides the default YAML unmarshaling logic for the Transition struct allowing it to unmarshal input into a rune slice This method implements the yaml.Unmarshaler (v3) interface.