Documentation ¶
Index ¶
- type AddArithmetic
- func (e *AddArithmetic) Clone() token.Token
- func (e *AddArithmetic) Get(i int) (token.Token, error)
- func (e *AddArithmetic) InternalGet(i int) (token.Token, error)
- func (e *AddArithmetic) InternalLen() int
- func (e *AddArithmetic) InternalLogicalRemove(tok token.Token) token.Token
- func (e *AddArithmetic) InternalReplace(oldToken, newToken token.Token) error
- func (e *AddArithmetic) Len() int
- func (e *AddArithmetic) Parse(pars *token.InternalParser, cur int) (int, []error)
- func (e *AddArithmetic) Permutation(i uint) error
- func (e *AddArithmetic) Permutations() uint
- func (e *AddArithmetic) PermutationsAll() uint
- func (e *AddArithmetic) String() string
- type DivArithmetic
- func (e *DivArithmetic) Clone() token.Token
- func (e *DivArithmetic) Get(i int) (token.Token, error)
- func (e *DivArithmetic) InternalGet(i int) (token.Token, error)
- func (e *DivArithmetic) InternalLen() int
- func (e *DivArithmetic) InternalLogicalRemove(tok token.Token) token.Token
- func (e *DivArithmetic) InternalReplace(oldToken, newToken token.Token) error
- func (e *DivArithmetic) Len() int
- func (e *DivArithmetic) Parse(pars *token.InternalParser, cur int) (int, []error)
- func (e *DivArithmetic) Permutation(i uint) error
- func (e *DivArithmetic) Permutations() uint
- func (e *DivArithmetic) PermutationsAll() uint
- func (e *DivArithmetic) String() string
- type FuncExpression
- func (e *FuncExpression) Clone() token.Token
- func (e *FuncExpression) Parse(pars *token.InternalParser, cur int) (int, []error)
- func (e *FuncExpression) Permutation(i uint) error
- func (e *FuncExpression) Permutations() uint
- func (e *FuncExpression) PermutationsAll() uint
- func (e *FuncExpression) String() string
- type MulArithmetic
- func (e *MulArithmetic) Clone() token.Token
- func (e *MulArithmetic) Get(i int) (token.Token, error)
- func (e *MulArithmetic) InternalGet(i int) (token.Token, error)
- func (e *MulArithmetic) InternalLen() int
- func (e *MulArithmetic) InternalLogicalRemove(tok token.Token) token.Token
- func (e *MulArithmetic) InternalReplace(oldToken, newToken token.Token) error
- func (e *MulArithmetic) Len() int
- func (e *MulArithmetic) Parse(pars *token.InternalParser, cur int) (int, []error)
- func (e *MulArithmetic) Permutation(i uint) error
- func (e *MulArithmetic) Permutations() uint
- func (e *MulArithmetic) PermutationsAll() uint
- func (e *MulArithmetic) String() string
- type Path
- func (e *Path) Clone() token.Token
- func (e *Path) Get(i int) (token.Token, error)
- func (e *Path) InternalGet(i int) (token.Token, error)
- func (e *Path) InternalLen() int
- func (e *Path) InternalLogicalRemove(tok token.Token) token.Token
- func (e *Path) InternalReplace(oldToken, newToken token.Token) error
- func (e *Path) Len() int
- func (e *Path) Parse(pars *token.InternalParser, cur int) (int, []error)
- func (e *Path) Permutation(i uint) error
- func (e *Path) Permutations() uint
- func (e *Path) PermutationsAll() uint
- func (e *Path) SetScope(variableScope *token.VariableScope)
- func (e *Path) String() string
- type SubArithmetic
- func (e *SubArithmetic) Clone() token.Token
- func (e *SubArithmetic) Get(i int) (token.Token, error)
- func (e *SubArithmetic) InternalGet(i int) (token.Token, error)
- func (e *SubArithmetic) InternalLen() int
- func (e *SubArithmetic) InternalLogicalRemove(tok token.Token) token.Token
- func (e *SubArithmetic) InternalReplace(oldToken, newToken token.Token) error
- func (e *SubArithmetic) Len() int
- func (e *SubArithmetic) Parse(pars *token.InternalParser, cur int) (int, []error)
- func (e *SubArithmetic) Permutation(i uint) error
- func (e *SubArithmetic) Permutations() uint
- func (e *SubArithmetic) PermutationsAll() uint
- func (e *SubArithmetic) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddArithmetic ¶
type AddArithmetic struct {
// contains filtered or unexported fields
}
AddArithmetic implements an arithmetic token adding the values of two tokens
func NewAddArithmetic ¶
func NewAddArithmetic(a, b token.Token) *AddArithmetic
NewAddArithmetic returns a new instance of a AddArithmetic token
func (*AddArithmetic) Clone ¶
func (e *AddArithmetic) Clone() token.Token
Clone returns a copy of the token and all its children
func (*AddArithmetic) Get ¶
func (e *AddArithmetic) Get(i int) (token.Token, error)
Get returns the current referenced token at the given index. The error return argument is not nil, if the index is out of bound.
func (*AddArithmetic) InternalGet ¶
func (e *AddArithmetic) InternalGet(i int) (token.Token, error)
InternalGet returns the current referenced internal token at the given index. The error return argument is not nil, if the index is out of bound.
func (*AddArithmetic) InternalLen ¶
func (e *AddArithmetic) InternalLen() int
InternalLen returns the number of referenced internal tokens
func (*AddArithmetic) InternalLogicalRemove ¶
func (e *AddArithmetic) InternalLogicalRemove(tok token.Token) token.Token
InternalLogicalRemove removes the referenced internal token and returns the replacement for the current token or nil if the current token should be removed.
func (*AddArithmetic) InternalReplace ¶
func (e *AddArithmetic) InternalReplace(oldToken, newToken token.Token) error
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 (*AddArithmetic) Len ¶
func (e *AddArithmetic) Len() int
Len returns the number of the current referenced tokens
func (*AddArithmetic) Parse ¶
func (e *AddArithmetic) 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 (*AddArithmetic) Permutation ¶
func (e *AddArithmetic) Permutation(i uint) error
Permutation sets a specific permutation for this token
func (*AddArithmetic) Permutations ¶
func (e *AddArithmetic) Permutations() uint
Permutations returns the number of permutations for this token
func (*AddArithmetic) PermutationsAll ¶
func (e *AddArithmetic) PermutationsAll() uint
PermutationsAll returns the number of all possible permutations for this token including its children
func (*AddArithmetic) String ¶
func (e *AddArithmetic) String() string
type DivArithmetic ¶
type DivArithmetic struct {
// contains filtered or unexported fields
}
DivArithmetic implements an arithmetic token dividing the values of two tokens
func NewDivArithmetic ¶
func NewDivArithmetic(a, b token.Token) *DivArithmetic
NewDivArithmetic returns a new instance of a DivArithmetic token
func (*DivArithmetic) Clone ¶
func (e *DivArithmetic) Clone() token.Token
Clone returns a copy of the token and all its children
func (*DivArithmetic) Get ¶
func (e *DivArithmetic) Get(i int) (token.Token, error)
Get returns the current referenced token at the given index. The error return argument is not nil, if the index is out of bound.
func (*DivArithmetic) InternalGet ¶
func (e *DivArithmetic) InternalGet(i int) (token.Token, error)
InternalGet returns the current referenced internal token at the given index. The error return argument is not nil, if the index is out of bound.
func (*DivArithmetic) InternalLen ¶
func (e *DivArithmetic) InternalLen() int
InternalLen returns the number of referenced internal tokens
func (*DivArithmetic) InternalLogicalRemove ¶
func (e *DivArithmetic) InternalLogicalRemove(tok token.Token) token.Token
InternalLogicalRemove removes the referenced internal token and returns the replacement for the current token or nil if the current token should be removed.
func (*DivArithmetic) InternalReplace ¶
func (e *DivArithmetic) InternalReplace(oldToken, newToken token.Token) error
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 (*DivArithmetic) Len ¶
func (e *DivArithmetic) Len() int
Len returns the number of the current referenced tokens
func (*DivArithmetic) Parse ¶
func (e *DivArithmetic) 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 (*DivArithmetic) Permutation ¶
func (e *DivArithmetic) Permutation(i uint) error
Permutation sets a specific permutation for this token
func (*DivArithmetic) Permutations ¶
func (e *DivArithmetic) Permutations() uint
Permutations returns the number of permutations for this token
func (*DivArithmetic) PermutationsAll ¶
func (e *DivArithmetic) PermutationsAll() uint
PermutationsAll returns the number of all possible permutations for this token including its children
func (*DivArithmetic) String ¶
func (e *DivArithmetic) String() string
type FuncExpression ¶
type FuncExpression struct {
// contains filtered or unexported fields
}
FuncExpression implements a expression token which executes a given list on output
func NewFuncExpression ¶
func NewFuncExpression( state interface{}, permutationFunc func(state interface{}, i uint) interface{}, permutationsFunc func(state interface{}) uint, permutationsAllFunc func(state interface{}) uint, stringFunc func(state interface{}) string, ) *FuncExpression
NewFuncExpression returns a new instance of a FuncExpression token given the output function
func (*FuncExpression) Clone ¶
func (e *FuncExpression) Clone() token.Token
Clone returns a copy of the token and all its children
func (*FuncExpression) Parse ¶
func (e *FuncExpression) 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 (*FuncExpression) Permutation ¶
func (e *FuncExpression) Permutation(i uint) error
Permutation sets a specific permutation for this token
func (*FuncExpression) Permutations ¶
func (e *FuncExpression) Permutations() uint
Permutations returns the number of permutations for this token
func (*FuncExpression) PermutationsAll ¶
func (e *FuncExpression) PermutationsAll() uint
PermutationsAll returns the number of all possible permutations for this token including its children
func (*FuncExpression) String ¶
func (e *FuncExpression) String() string
type MulArithmetic ¶
type MulArithmetic struct {
// contains filtered or unexported fields
}
MulArithmetic implements an arithmetic token multiplying the values of two tokens
func NewMulArithmetic ¶
func NewMulArithmetic(a, b token.Token) *MulArithmetic
NewMulArithmetic returns a new instance of a MulArithmetic token
func (*MulArithmetic) Clone ¶
func (e *MulArithmetic) Clone() token.Token
Clone returns a copy of the token and all its children
func (*MulArithmetic) Get ¶
func (e *MulArithmetic) Get(i int) (token.Token, error)
Get returns the current referenced token at the given index. The error return argument is not nil, if the index is out of bound.
func (*MulArithmetic) InternalGet ¶
func (e *MulArithmetic) InternalGet(i int) (token.Token, error)
InternalGet returns the current referenced internal token at the given index. The error return argument is not nil, if the index is out of bound.
func (*MulArithmetic) InternalLen ¶
func (e *MulArithmetic) InternalLen() int
InternalLen returns the number of referenced internal tokens
func (*MulArithmetic) InternalLogicalRemove ¶
func (e *MulArithmetic) InternalLogicalRemove(tok token.Token) token.Token
InternalLogicalRemove removes the referenced internal token and returns the replacement for the current token or nil if the current token should be removed.
func (*MulArithmetic) InternalReplace ¶
func (e *MulArithmetic) InternalReplace(oldToken, newToken token.Token) error
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 (*MulArithmetic) Len ¶
func (e *MulArithmetic) Len() int
Len returns the number of the current referenced tokens
func (*MulArithmetic) Parse ¶
func (e *MulArithmetic) 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 (*MulArithmetic) Permutation ¶
func (e *MulArithmetic) Permutation(i uint) error
Permutation sets a specific permutation for this token
func (*MulArithmetic) Permutations ¶
func (e *MulArithmetic) Permutations() uint
Permutations returns the number of permutations for this token
func (*MulArithmetic) PermutationsAll ¶
func (e *MulArithmetic) PermutationsAll() uint
PermutationsAll returns the number of all possible permutations for this token including its children
func (*MulArithmetic) String ¶
func (e *MulArithmetic) String() string
type Path ¶
type Path struct {
// contains filtered or unexported fields
}
Path implements a path query
func NewPath ¶
func NewPath(list token.Token, from token.Token, over token.Token, connectBy []token.Token, without []token.Token) (*Path, error)
NewPath returns a new instance of a Path token given the set of tokens
func (*Path) Get ¶
Get returns the current referenced token at the given index. The error return argument is not nil, if the index is out of bound.
func (*Path) InternalGet ¶
InternalGet returns the current referenced internal token at the given index. The error return argument is not nil, if the index is out of bound.
func (*Path) InternalLen ¶
InternalLen returns the number of referenced internal tokens
func (*Path) 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 (*Path) 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 (*Path) 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 (*Path) Permutation ¶
Permutation sets a specific permutation for this token
func (*Path) Permutations ¶
Permutations returns the number of permutations for this token
func (*Path) PermutationsAll ¶
PermutationsAll returns the number of all possible permutations for this token including its children
func (*Path) SetScope ¶
func (e *Path) SetScope(variableScope *token.VariableScope)
SetScope sets the scope of the token
type SubArithmetic ¶
type SubArithmetic struct {
// contains filtered or unexported fields
}
SubArithmetic implements an arithmetic token subtracting the values of two tokens
func NewSubArithmetic ¶
func NewSubArithmetic(a, b token.Token) *SubArithmetic
NewSubArithmetic returns a new instance of a SubArithmetic token
func (*SubArithmetic) Clone ¶
func (e *SubArithmetic) Clone() token.Token
Clone returns a copy of the token and all its children
func (*SubArithmetic) Get ¶
func (e *SubArithmetic) Get(i int) (token.Token, error)
Get returns the current referenced token at the given index. The error return argument is not nil, if the index is out of bound.
func (*SubArithmetic) InternalGet ¶
func (e *SubArithmetic) InternalGet(i int) (token.Token, error)
InternalGet returns the current referenced internal token at the given index. The error return argument is not nil, if the index is out of bound.
func (*SubArithmetic) InternalLen ¶
func (e *SubArithmetic) InternalLen() int
InternalLen returns the number of referenced internal tokens
func (*SubArithmetic) InternalLogicalRemove ¶
func (e *SubArithmetic) InternalLogicalRemove(tok token.Token) token.Token
InternalLogicalRemove removes the referenced internal token and returns the replacement for the current token or nil if the current token should be removed.
func (*SubArithmetic) InternalReplace ¶
func (e *SubArithmetic) InternalReplace(oldToken, newToken token.Token) error
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 (*SubArithmetic) Len ¶
func (e *SubArithmetic) Len() int
Len returns the number of the current referenced tokens
func (*SubArithmetic) Parse ¶
func (e *SubArithmetic) 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 (*SubArithmetic) Permutation ¶
func (e *SubArithmetic) Permutation(i uint) error
Permutation sets a specific permutation for this token
func (*SubArithmetic) Permutations ¶
func (e *SubArithmetic) Permutations() uint
Permutations returns the number of permutations for this token
func (*SubArithmetic) PermutationsAll ¶
func (e *SubArithmetic) PermutationsAll() uint
PermutationsAll returns the number of all possible permutations for this token including its children
func (*SubArithmetic) String ¶
func (e *SubArithmetic) String() string