Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidInstruction = errors.New("invalid instruction") ErrInvalidNodeName = errors.New("invalid node name") ErrNodeNotFound = errors.New("node not found") )
View Source
var (
InstructionLeft, _ = NewInstruction('L')
InstructionRight, _ = NewInstruction('R')
NodeIdAAA, _ = NewNodeId("AAA")
NodeIdZZZ, _ = NewNodeId("ZZZ")
)
Functions ¶
Types ¶
type Instruction ¶
type Instruction uint8
func NewInstruction ¶
func NewInstruction(instructionCode rune) (result Instruction, err error)
func (*Instruction) Capture ¶
func (instruction *Instruction) Capture(values []string) error
type Network ¶
type Network struct { Instructions []Instruction `parser:"@InstructionCode+ Whitespace"` Nodes []Node `parser:"@@+"` }
Click to show internal directories.
Click to hide internal directories.