Documentation ¶
Index ¶
- type CharacterClass
- func (c *CharacterClass) Clone() token.Token
- func (c *CharacterClass) Parse(pars *token.InternalParser, cur int) (int, []error)
- func (c *CharacterClass) Permutation(i uint) error
- func (c *CharacterClass) Permutations() uint
- func (c *CharacterClass) PermutationsAll() uint
- func (c *CharacterClass) String() string
- type ConstantInt
- func (p *ConstantInt) Clone() token.Token
- func (p *ConstantInt) Parse(pars *token.InternalParser, cur int) (int, []error)
- func (p *ConstantInt) Permutation(i uint) error
- func (p *ConstantInt) Permutations() uint
- func (p *ConstantInt) PermutationsAll() uint
- func (p *ConstantInt) SetValue(v int)
- func (p *ConstantInt) String() string
- func (p *ConstantInt) Value() int
- type ConstantString
- func (p *ConstantString) Clone() token.Token
- func (p *ConstantString) Parse(pars *token.InternalParser, cur int) (int, []error)
- func (p *ConstantString) Permutation(i uint) error
- func (p *ConstantString) Permutations() uint
- func (p *ConstantString) PermutationsAll() uint
- func (p *ConstantString) String() string
- type Pointer
- func (p *Pointer) Clone() token.Token
- func (p *Pointer) Get() token.Token
- func (p *Pointer) InternalGet() token.Token
- func (p *Pointer) InternalLogicalRemove(tok token.Token) token.Token
- func (p *Pointer) InternalReplace(oldToken, newToken token.Token) error
- func (p *Pointer) Minimize() token.Token
- func (p *Pointer) Parse(pars *token.InternalParser, cur int) (int, []error)
- func (p *Pointer) Permutation(i uint) error
- func (p *Pointer) Permutations() uint
- func (p *Pointer) PermutationsAll() uint
- func (p *Pointer) Resolve() token.Token
- func (p *Pointer) Set(o token.Token) error
- func (p *Pointer) String() string
- type RangeInt
- func (p *RangeInt) Clone() token.Token
- func (p *RangeInt) From() int
- func (p *RangeInt) Parse(pars *token.InternalParser, cur int) (int, []error)
- func (p *RangeInt) Permutation(i uint) error
- func (p *RangeInt) Permutations() uint
- func (p *RangeInt) PermutationsAll() uint
- func (p *RangeInt) Step() int
- func (p *RangeInt) String() string
- func (p *RangeInt) To() int
- type Scope
- func (p *Scope) Clone() token.Token
- func (p *Scope) Get() token.Token
- func (p *Scope) InternalGet() token.Token
- func (p *Scope) InternalLogicalRemove(tok token.Token) token.Token
- func (p *Scope) InternalReplace(oldToken, newToken token.Token) error
- func (p *Scope) Minimize() token.Token
- func (p *Scope) Parse(pars *token.InternalParser, cur int) (int, []error)
- func (p *Scope) Permutation(i uint) error
- func (p *Scope) Permutations() uint
- func (p *Scope) PermutationsAll() uint
- func (p *Scope) Resolve() token.Token
- func (p *Scope) Scoping() bool
- func (p *Scope) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CharacterClass ¶
type CharacterClass struct {
// contains filtered or unexported fields
}
CharacterClass implements a char token which holds a pattern of characters and character classes Each character class characters is added to the set of characters of the token. Every permutations chooses one character out of the available set of characters as the current value of the token.
func NewCharacterClass ¶
func NewCharacterClass(pattern string) *CharacterClass
NewCharacterClass returns a new instance of a CharacterClass token
func (*CharacterClass) Clone ¶
func (c *CharacterClass) Clone() token.Token
Clone returns a copy of the token and all its children
func (*CharacterClass) Parse ¶
func (c *CharacterClass) Parse(pars *token.InternalParser, cur int) (int, []error)
Parse tries to parse the token beginning from the current position in the parser data. If the parsing is successful the error argument is nil and the next current position after the token is returned.
func (*CharacterClass) Permutation ¶
func (c *CharacterClass) Permutation(i uint) error
Permutation sets a specific permutation for this token
func (*CharacterClass) Permutations ¶
func (c *CharacterClass) Permutations() uint
Permutations returns the number of permutations for this token
func (*CharacterClass) PermutationsAll ¶
func (c *CharacterClass) PermutationsAll() uint
PermutationsAll returns the number of all possible permutations for this token including its children
func (*CharacterClass) String ¶
func (c *CharacterClass) String() string
type ConstantInt ¶
type ConstantInt struct {
// contains filtered or unexported fields
}
ConstantInt implements an integer token which holds a constant integer
func NewConstantInt ¶
func NewConstantInt(value int) *ConstantInt
NewConstantInt returns a new instance of a ConstantInt token
func (*ConstantInt) Clone ¶
func (p *ConstantInt) Clone() token.Token
Clone returns a copy of the token and all its children
func (*ConstantInt) Parse ¶
func (p *ConstantInt) Parse(pars *token.InternalParser, cur int) (int, []error)
Parse tries to parse the token beginning from the current position in the parser data. If the parsing is successful the error argument is nil and the next current position after the token is returned.
func (*ConstantInt) Permutation ¶
func (p *ConstantInt) Permutation(i uint) error
Permutation sets a specific permutation for this token
func (*ConstantInt) Permutations ¶
func (p *ConstantInt) Permutations() uint
Permutations returns the number of permutations for this token
func (*ConstantInt) PermutationsAll ¶
func (p *ConstantInt) PermutationsAll() uint
PermutationsAll returns the number of all possible permutations for this token including its children
func (*ConstantInt) SetValue ¶
func (p *ConstantInt) SetValue(v int)
SetValue sets the value of the token
func (*ConstantInt) String ¶
func (p *ConstantInt) String() string
type ConstantString ¶
type ConstantString struct {
// contains filtered or unexported fields
}
ConstantString implements a string token which holds a constant string
func NewConstantString ¶
func NewConstantString(value string) *ConstantString
NewConstantString returns a new instance of a ConstantString token
func (*ConstantString) Clone ¶
func (p *ConstantString) Clone() token.Token
Clone returns a copy of the token and all its children
func (*ConstantString) Parse ¶
func (p *ConstantString) Parse(pars *token.InternalParser, cur int) (int, []error)
Parse tries to parse the token beginning from the current position in the parser data. If the parsing is successful the error argument is nil and the next current position after the token is returned.
func (*ConstantString) Permutation ¶
func (p *ConstantString) Permutation(i uint) error
Permutation sets a specific permutation for this token
func (*ConstantString) Permutations ¶
func (p *ConstantString) Permutations() uint
Permutations returns the number of permutations for this token
func (*ConstantString) PermutationsAll ¶
func (p *ConstantString) PermutationsAll() uint
PermutationsAll returns the number of all possible permutations for this token including its children
func (*ConstantString) String ¶
func (p *ConstantString) String() string
type Pointer ¶
type Pointer struct {
// contains filtered or unexported fields
}
Pointer implements a general pointer token which references a token
func NewEmptyPointer ¶
func NewEmptyPointer(typ interface{}) *Pointer
NewEmptyPointer returns a new instance of a Pointer token with a token reference type but without a referenced token
func NewPointer ¶
NewPointer returns a new instance of a Pointer token and sets the token reference type to the token's type
func NewTokenPointer ¶
NewTokenPointer returns a new instance of a Pointer token with the token reference type Token but without a referenced token
func (*Pointer) InternalGet ¶
InternalGet returns the current referenced internal token
func (*Pointer) InternalLogicalRemove ¶
InternalLogicalRemove removes the referenced internal token and returns the replacement for the current token or nil if the current token should be removed.
func (*Pointer) InternalReplace ¶
InternalReplace replaces an old with a new internal token if it is referenced by this token. The error return argument is not nil, if the replacement is not suitable.
func (*Pointer) Minimize ¶
Minimize tries to minimize itself and returns a token if it was successful, or nil if there was nothing to minimize
func (*Pointer) Parse ¶
Parse tries to parse the token beginning from the current position in the parser data. If the parsing is successful the error argument is nil and the next current position after the token is returned.
func (*Pointer) Permutation ¶
Permutation sets a specific permutation for this token
func (*Pointer) Permutations ¶
Permutations returns the number of permutations for this token
func (*Pointer) PermutationsAll ¶
PermutationsAll returns the number of all possible permutations for this token including its children
func (*Pointer) Resolve ¶
Resolve returns the token which is referenced by the token, or a path of tokens
type RangeInt ¶
type RangeInt struct {
// contains filtered or unexported fields
}
RangeInt implements an integer token holding a range of integers Every permutation generates a new value within the defined range and step. For example the range 1 to 10 with step 2 can hold the integers 1, 3, 5, 7 and 9.
func NewRangeInt ¶
NewRangeInt returns a new instance of a RangeInt token with the given range and step value of 1
func NewRangeIntWithStep ¶
NewRangeIntWithStep returns a new instance of a RangeInt token with the given range and step value
func (*RangeInt) Parse ¶
Parse tries to parse the token beginning from the current position in the parser data. If the parsing is successful the error argument is nil and the next current position after the token is returned.
func (*RangeInt) Permutation ¶
Permutation sets a specific permutation for this token
func (*RangeInt) Permutations ¶
Permutations returns the number of permutations for this token
func (*RangeInt) PermutationsAll ¶
PermutationsAll returns the number of all possible permutations for this token including its children
type Scope ¶
type Scope struct {
// contains filtered or unexported fields
}
Scope implements a general scope token which references a token
func (*Scope) InternalGet ¶
InternalGet returns the current referenced internal token
func (*Scope) InternalLogicalRemove ¶
InternalLogicalRemove removes the referenced internal token and returns the replacement for the current token or nil if the current token should be removed.
func (*Scope) InternalReplace ¶
InternalReplace replaces an old with a new internal token if it is referenced by this token. The error return argument is not nil, if the replacement is not suitable.
func (*Scope) Minimize ¶
Minimize tries to minimize itself and returns a token if it was successful, or nil if there was nothing to minimize
func (*Scope) Parse ¶
Parse tries to parse the token beginning from the current position in the parser data. If the parsing is successful the error argument is nil and the next current position after the token is returned.
func (*Scope) Permutation ¶
Permutation sets a specific permutation for this token
func (*Scope) Permutations ¶
Permutations returns the number of permutations for this token
func (*Scope) PermutationsAll ¶
PermutationsAll returns the number of all possible permutations for this token including its children
func (*Scope) Resolve ¶
Resolve returns the token which is referenced by the token, or a path of tokens