moore

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 Moore

type Moore struct {
	CurrentState string
	States       []string
	Alphabet     []string
	Transitions  map[string]map[string]string
	Mapping      map[string]string
	Accept       bool
}

func (*Moore) AddLetter

func (m *Moore) AddLetter(letter string)

func (*Moore) AddMapping

func (m *Moore) AddMapping(state string, output string)

func (*Moore) AddState

func (m *Moore) AddState(state string)

func (*Moore) AddTransition

func (m *Moore) AddTransition(state string, input string, nextState string)

func (*Moore) CheckLetter

func (m *Moore) CheckLetter(letter string) bool

func (*Moore) CheckState

func (m *Moore) CheckState(state string) bool

func (*Moore) MapOutput

func (m *Moore) MapOutput() (string, error)

func (*Moore) NextState

func (m *Moore) NextState(input string) error

func (*Moore) StartState

func (m *Moore) StartState(state string) error

func (*Moore) Validate

func (m *Moore) Validate() bool

Jump to

Keyboard shortcuts

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