expr

package
v4.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 4, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Notations

type Notations []*TokenNotation

func NewNotations

func NewNotations(src []byte) (output Notations, err error)

return reverse polish notation stack

func (Notations) Calc

func (rpn Notations) Calc(vars map[string][]*dataobj.MetricValue) (float64, error)

func (*Notations) Len

func (s *Notations) Len() int

func (*Notations) Pop

func (s *Notations) Pop() *TokenNotation

func (*Notations) Push

func (s *Notations) Push(tn *TokenNotation)

func (Notations) String

func (s Notations) String() string

func (*Notations) Top

func (s *Notations) Top() *TokenNotation

type StackFloat

type StackFloat []float64

func (*StackFloat) Len

func (s *StackFloat) Len() int

func (*StackFloat) Pop

func (s *StackFloat) Pop() float64

func (*StackFloat) Push

func (s *StackFloat) Push(f float64)

type StackOp

type StackOp []token.Token

func (*StackOp) Len

func (s *StackOp) Len() int

func (*StackOp) Pop

func (s *StackOp) Pop() token.Token

func (*StackOp) Push

func (s *StackOp) Push(t token.Token)

func (*StackOp) Top

func (s *StackOp) Top() token.Token

type TokenNotation

type TokenNotation struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL