machines

package
v0.0.0-...-0224eda Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 17, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	States      []string
	Letters     []string
	Transitions []Transition
	Mapping     []Mapping
	Start       string
	Accept      bool
}

func (*Config) SetupMooreMachine

func (c *Config) SetupMooreMachine() (*moore.Moore, error)

type Mapping

type Mapping struct {
	State  string
	Output string
}

type Result

type Result struct {
	Start         string
	Input         []string
	StateSequence []string
	Output        []string
}

func RunMooreMachine

func RunMooreMachine(machine *moore.Moore, input []string) (*Result, error)

type Transition

type Transition struct {
	State     string
	Input     string
	NextState string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL