package states
import (
am "github.com/pancsta/asyncmachine-go/pkg/machine"
)
type NfaStatesDef struct {
*am .StatesBase
Start string
Ready string
Input0 string
Input0Done string
Input1 string
Input1Done string
StepX string
Step0 string
Step1 string
Step2 string
Step3 string
}
type NfaGroupsDef struct {
Steps S
}
var NfaSchema = am .Schema {
ssN .Start : {Add : S {ssN .StepX }},
ssN .Ready : {Require : S {ssN .Start }},
ssN .Input0 : {
Multi : true ,
Require : S {ssN .Start },
},
ssN .Input0Done : {
Multi : true ,
Require : S {ssN .Start },
},
ssN .Input1 : {
Multi : true ,
Require : S {ssN .Start },
},
ssN .Input1Done : {
Multi : true ,
Require : S {ssN .Start },
},
ssN .StepX : {Remove : sgN .Steps },
ssN .Step0 : {Remove : sgN .Steps },
ssN .Step1 : {Remove : sgN .Steps },
ssN .Step2 : {Remove : sgN .Steps },
ssN .Step3 : {Remove : sgN .Steps },
}
var (
ssN = am .NewStates (NfaStatesDef {})
sgN = am .NewStateGroups (NfaGroupsDef {
Steps : S {ssN .StepX , ssN .Step0 , ssN .Step1 , ssN .Step2 , ssN .Step3 },
})
NfaStates = ssN
NfaGroups = sgN
)
The pages are generated with Golds v0.8.2 . (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu .
PR and bug reports are welcome and can be submitted to the issue list .
Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds .