Documentation
¶
Index ¶
- type Attributes
- type Constraint
- type ConstraintList
- type Expr
- func NewBinary(token int, op string, od1 *Expr, od2 *Expr) (*Expr, error)
- func NewFuncall(token int, op string, oprd ExprList) (*Expr, error)
- func NewLiteral(token int, value string) (*Expr, error)
- func NewUnary(token int, op string, od1 *Expr) (*Expr, error)
- func NewVariadic(token int, op string, ods ExprList) (*Expr, error)
- type ExprList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attributes ¶
Attributes is a map from attribute name to the value expression.
func (Attributes) Union ¶
func (as1 Attributes) Union(as2 Attributes) (Attributes, error)
Union adds the parameter Attributes into the caller. It returns error if there is any duplicated attribute.
type Constraint ¶
Constraint represents a constraint in the description of a mathematical optimization problem. A constraint is an expression with an optional GroupBy name.
type ConstraintList ¶
type ConstraintList []*Constraint
ConstraintList is a list of constraints. The parser generates a ConstraintList from the TO MAXIMIZE/MINIMIZE clause.
type Expr ¶
type Expr struct {
// contains filtered or unexported fields
}
Expr defines an expression.
func NewFuncall ¶
NewFuncall returns an expression representing a function call.
func NewLiteral ¶
NewLiteral returns a literal expression.
func NewVariadic ¶
NewVariadic returns a variadic expression.
func (Expr) IsLiteral ¶
IsLiteral returns true if e is a literal value; otherwise, we say that e is a compound expression.
func (Expr) IsVariadic ¶
IsVariadic returns true if the expression is a list "[...]".