Documentation ¶
Index ¶
Constants ¶
View Source
const OPERAND = "operand"
View Source
const OPERATOR = "operator"
Variables ¶
View Source
var ASSOC = map[string]string{
"or": "left",
"and": "left",
"not": "right",
}
View Source
var PREC = map[string]int{
"(": -2,
")": -1,
"or": 0,
"and": 1,
"not": 2,
}
Functions ¶
This section is empty.
Types ¶
type Evaluatable ¶
func Parse ¶
func Parse(infix string) (Evaluatable, error)
type EvaluatableStack ¶
type EvaluatableStack struct {
// contains filtered or unexported fields
}
func (*EvaluatableStack) Len ¶
func (e *EvaluatableStack) Len() int
func (*EvaluatableStack) Peek ¶
func (e *EvaluatableStack) Peek() Evaluatable
func (*EvaluatableStack) Pop ¶
func (e *EvaluatableStack) Pop() Evaluatable
func (*EvaluatableStack) Push ¶
func (e *EvaluatableStack) Push(value Evaluatable)
type InterfaceStack ¶
type InterfaceStack struct {
// contains filtered or unexported fields
}
func (*InterfaceStack) Len ¶
func (i *InterfaceStack) Len() int
func (*InterfaceStack) Peek ¶
func (i *InterfaceStack) Peek() interface{}
func (*InterfaceStack) Pop ¶
func (i *InterfaceStack) Pop() interface{}
func (*InterfaceStack) Push ¶
func (i *InterfaceStack) Push(value interface{})
type StringStack ¶
type StringStack struct {
// contains filtered or unexported fields
}
func (*StringStack) Len ¶
func (s *StringStack) Len() int
func (*StringStack) Peek ¶
func (s *StringStack) Peek() string
func (*StringStack) Pop ¶
func (s *StringStack) Pop() string
func (*StringStack) Push ¶
func (s *StringStack) Push(value string)
Click to show internal directories.
Click to hide internal directories.