smc

package module
v0.0.0-...-2fe2094 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Camel

func Camel(text string) string

func CheckWriteFile

func CheckWriteFile(filename string, text []byte)

func Main

func Main()

func MakeExit

func MakeExit(path []*State) []string

func PrintCpp

func PrintCpp(file io.Writer, root *State, source []string)

func PrintCs

func PrintCs(file io.Writer, root *State, source []string)

func PrintEvent

func PrintEvent(event *Event, indent string) (lines []string)

func PrintGo

func PrintGo(file io.Writer, root *State, source []string)

func PrintLmsCs

func PrintLmsCs(file io.Writer, root *State, source []string)

func PrintRoot

func PrintRoot(state *State, indent string) (lines []string)

func PrintState

func PrintState(state *State, indent string) (lines []string)

func ReadRoot

func ReadRoot(filename string) string

func SplitName

func SplitName(text string) (string, []string)

func StringSet

func StringSet(list []string) []string

Types

type Event

type Event struct {
	// contains filtered or unexported fields
}

func (*Event) Actions

func (event *Event) Actions() []string

func (*Event) Cond

func (event *Event) Cond() string

func (*Event) Dst

func (event *Event) Dst() *State

func (*Event) HasCond

func (event *Event) HasCond() bool

func (*Event) IsInternal

func (event *Event) IsInternal() bool

func (*Event) Name

func (event *Event) Name() string

func (*Event) Same

func (event *Event) Same(other *Event) bool

func (*Event) Src

func (event *Event) Src() *State

type Parser

type Parser struct {
	OnErrorUnexpected func()
	OnEventAct        func()
	OnEventBegin      func()
	OnEventCond       func()
	OnEventDst        func()
	OnEventEnd        func()
	OnEventName       func()
	OnRootBegin       func()
	OnRootName        func()
	OnStateBegin      func()
	OnStateEnd        func()
	OnStateEntry      func()
	OnStateExit       func()
	OnStateName       func()
	OnStateStart      func()
	CondAct           func() bool
	CondBra           func() bool
	CondComma         func() bool
	CondDot           func() bool
	CondDst           func() bool
	CondEntry         func() bool
	CondEvent         func() bool
	CondExit          func() bool
	CondIdent         func() bool
	CondIf            func() bool
	CondKet           func() bool
	CondSemi          func() bool
	CondStart         func() bool
	CondState         func() bool
	// contains filtered or unexported fields
}

func (*Parser) SendNext

func (this *Parser) SendNext()

func (*Parser) Start

func (this *Parser) Start()

type State

type State struct {
	// contains filtered or unexported fields
}

func MakeEntry

func MakeEntry(path []*State) ([]string, *State)

func MakeStart

func MakeStart(root *State) ([]string, *State)

func MakeTransition

func MakeTransition(event *Event) ([]string, *State)

func Scan

func Scan(file io.Reader) *State

func (*State) AddEvent

func (state *State) AddEvent(event *Event) bool

func (*State) AddState

func (state *State) AddState(other *State)

func (*State) AllActions

func (root *State) AllActions() []string

func (*State) AllConditions

func (root *State) AllConditions() []string

func (*State) AllDescendants

func (state *State) AllDescendants(states ...*State) []*State

func (*State) AllEvents

func (root *State) AllEvents() []string

func (*State) Children

func (state *State) Children() []*State

func (*State) Diff

func (state *State) Diff(other *State) ([]*State, []*State)

func (*State) Entry

func (state *State) Entry() []string

func (*State) Events

func (state *State) Events() []*Event

func (*State) EventsGrouped

func (state *State) EventsGrouped() map[string][]*Event

func (*State) Exit

func (state *State) Exit() []string

func (*State) FollowStart

func (state *State) FollowStart() *State

func (*State) IsDescendantOf

func (state *State) IsDescendantOf(other *State) bool

func (*State) IsLeaf

func (state *State) IsLeaf() bool

func (*State) IsNested

func (state *State) IsNested() bool

func (*State) Name

func (state *State) Name() string

func (*State) Parent

func (state *State) Parent() *State

func (*State) Path

func (state *State) Path() []*State

func (*State) PushEvents

func (state *State) PushEvents()

func (*State) Start

func (state *State) Start() *State

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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