nfarule

package
v0.0.0-...-d9f2893 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2019 License: MIT Imports: 4 Imported by: 2

Documentation

Overview

Package nfarule implements the transition function of NFA.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RuleArgs

type RuleArgs struct {
	From utils.State // from state
	C    rune        // input symbol
}

RuleArgs is a key for the map as transition function of NFA.

func NewRuleArgs

func NewRuleArgs(from utils.State, c rune) RuleArgs

NewRuleArgs returns a new RuleArgs.

type RuleMap

type RuleMap map[RuleArgs]mapset.Set

RuleMap represents a transition function of NFA. The key is a pair like "(from state, input symbol)". The value is a set of transition destination states when "input symbol" is received in "from state".

func (RuleMap) String

func (r RuleMap) String() string

Jump to

Keyboard shortcuts

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