Documentation
ΒΆ
Index ΒΆ
Constants ΒΆ
This section is empty.
Variables ΒΆ
This section is empty.
Functions ΒΆ
This section is empty.
Types ΒΆ
type BinaryFunctionParser ΒΆ
type OperatorParser ΒΆ
type ParseError ΒΆ added in v0.0.2
type ParseError struct {
Msg string
}
func (*ParseError) Error ΒΆ added in v0.0.2
func (p *ParseError) Error() string
type SyntaxTree ΒΆ
type SyntaxTree struct { // Root node of the tree Root *Node // List of all nodes of the tree Nodes []*Node // Precedence of the operators and functions in the syntax // Operators with a lower index in this array have a higher precedence over operators with a lower index OperatorPrecedence []string // Define the patterns of the syntax operators OperatorParsers []OperatorParser // Define the format of the syntax binary functions BinaryFunctionParsers []BinaryFunctionParser // Define the format of the syntax unary functions UnaryFunctionParsers []UnaryFunctionParser // Define a separator that can be used to separate the operators and operands during parsing // This is a string that cannot exist in the query character space Separator string }
SyntaxTree Construct a syntax tree based on a defined syntax containing of simple Operators, Binary Functions and Unary Functions with there mutual precedence The construction of the tree will also take into account grouping using brackets '()' in the precedence
func (*SyntaxTree) ConstructTree ΒΆ
func (t *SyntaxTree) ConstructTree(query string) error
func (*SyntaxTree) ParseQuery ΒΆ
func (t *SyntaxTree) ParseQuery(query string) (string, error)
func (SyntaxTree) String ΒΆ
func (t SyntaxTree) String() string
type UnaryFunctionParser ΒΆ
Click to show internal directories.
Click to hide internal directories.