ast

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2024 License: BSD-3-Clause Imports: 5 Imported by: 1

Documentation

Overview

Package ast declares the types used to represent syntax trees for Zed queries.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agg

type Agg struct {
	Kind    string `json:"kind" unpack:""`
	Name    string `json:"name"`
	NamePos int    `json:"name_pos"`
	Expr    Expr   `json:"expr"`
	Rparen  int    `json:"rparen"`
	Where   Expr   `json:"where"`
}

An Agg is an AST node that represents a aggregate function. The Name field indicates the aggregation method while the Expr field indicates an expression applied to the incoming records that is operated upon by them aggregate function. If Expr isn't present, then the aggregator doesn't act upon a function of the record, e.g., count() counts up records without looking into them.

func (*Agg) End added in v1.16.0

func (a *Agg) End() int

func (*Agg) ExprAST

func (*Agg) ExprAST()

func (*Agg) Pos added in v1.16.0

func (a *Agg) Pos() int

type ArrayExpr

type ArrayExpr struct {
	Kind   string       `json:"kind" unpack:""`
	Lbrack int          `json:"lbrack"`
	Elems  []VectorElem `json:"elems"`
	Rbrack int          `json:"rbrack"`
}

func (*ArrayExpr) End added in v1.16.0

func (a *ArrayExpr) End() int

func (*ArrayExpr) ExprAST

func (*ArrayExpr) ExprAST()

func (*ArrayExpr) Pos added in v1.16.0

func (a *ArrayExpr) Pos() int

type Assert added in v1.16.0

type Assert struct {
	Kind       string `json:"kind" unpack:""`
	KeywordPos int    `json:"keyword_pos"`
	Expr       Expr   `json:"expr"`
	Text       string `json:"text"`
}

An Op is a node in the flowgraph that takes Zed values in, operates upon them, and produces Zed values as output.

func (*Assert) End added in v1.16.0

func (x *Assert) End() int

func (*Assert) OpAST added in v1.16.0

func (*Assert) OpAST()

func (*Assert) Pos added in v1.16.0

func (x *Assert) Pos() int

type Assignment

type Assignment struct {
	Kind string `json:"kind" unpack:""`
	LHS  Expr   `json:"lhs"`
	RHS  Expr   `json:"rhs"`
}

func (*Assignment) End added in v1.16.0

func (a *Assignment) End() int

func (*Assignment) ExprAST

func (*Assignment) ExprAST()

func (*Assignment) Pos added in v1.16.0

func (a *Assignment) Pos() int

type Assignments added in v1.16.0

type Assignments []Assignment

func (Assignments) End added in v1.16.0

func (a Assignments) End() int

func (Assignments) Pos added in v1.16.0

func (a Assignments) Pos() int

type BinaryExpr

type BinaryExpr struct {
	Kind string `json:"kind" unpack:""`
	Op   string `json:"op"`
	LHS  Expr   `json:"lhs"`
	RHS  Expr   `json:"rhs"`
}

A BinaryExpr is any expression of the form "lhs kind rhs" including arithmetic (+, -, *, /), logical operators (and, or), comparisons (=, !=, <, <=, >, >=), and a dot expression (".") (on records).

func (*BinaryExpr) End added in v1.16.0

func (b *BinaryExpr) End() int

func (*BinaryExpr) ExprAST

func (*BinaryExpr) ExprAST()

func (*BinaryExpr) Pos added in v1.16.0

func (b *BinaryExpr) Pos() int

type Call

type Call struct {
	Kind   string `json:"kind" unpack:""`
	Name   *ID    `json:"name"`
	Args   []Expr `json:"args"`
	Rparen int    `json:"rparen"`
	Where  Expr   `json:"where"`
}

A Call represents different things dependending on its context. As a operator, it is either a group-by with no group-by keys and no duration, or a filter with a function that is boolean valued. This is determined by the compiler rather than the syntax tree based on the specific functions and aggregators that are defined at compile time. In expression context, a function call has the standard semantics where it takes one or more arguments and returns a result.

func (*Call) End added in v1.16.0

func (c *Call) End() int

func (*Call) ExprAST

func (*Call) ExprAST()

func (*Call) Pos added in v1.16.0

func (c *Call) Pos() int

type Case

type Case struct {
	Expr Expr `json:"expr"`
	Path Seq  `json:"path"`
}

type Cast

type Cast struct {
	Kind   string `json:"kind" unpack:""`
	Expr   Expr   `json:"expr"`
	Type   Expr   `json:"type"`
	Rparen int    `json:"rparen"`
}

func (*Cast) End added in v1.16.0

func (c *Cast) End() int

func (*Cast) ExprAST

func (*Cast) ExprAST()

func (*Cast) Pos added in v1.16.0

func (c *Cast) Pos() int

type Conditional

type Conditional struct {
	Kind string `json:"kind" unpack:""`
	Cond Expr   `json:"cond"`
	Then Expr   `json:"then"`
	Else Expr   `json:"else"`
}

func (*Conditional) End added in v1.16.0

func (c *Conditional) End() int

func (*Conditional) ExprAST

func (*Conditional) ExprAST()

func (*Conditional) Pos added in v1.16.0

func (c *Conditional) Pos() int

type ConstDecl added in v1.4.0

type ConstDecl struct {
	Kind       string `json:"kind" unpack:""`
	KeywordPos int    `json:"keyword_pos"`
	Name       *ID    `json:"name"`
	Expr       Expr   `json:"expr"`
}

func (*ConstDecl) DeclAST added in v1.4.0

func (*ConstDecl) DeclAST()

func (*ConstDecl) End added in v1.16.0

func (c *ConstDecl) End() int

func (*ConstDecl) Pos added in v1.16.0

func (c *ConstDecl) Pos() int

type Cut

type Cut struct {
	Kind       string      `json:"kind" unpack:""`
	KeywordPos int         `json:"keyword_pos"`
	Args       Assignments `json:"args"`
}

An Op is a node in the flowgraph that takes Zed values in, operates upon them, and produces Zed values as output.

func (*Cut) End added in v1.16.0

func (x *Cut) End() int

func (*Cut) OpAST added in v1.1.0

func (*Cut) OpAST()

func (*Cut) Pos added in v1.16.0

func (x *Cut) Pos() int

type Debug added in v1.18.0

type Debug struct {
	Kind       string `json:"kind" unpack:""`
	KeywordPos int    `json:"keyword_pos"`
	Expr       Expr   `json:"expr"`
}

An Op is a node in the flowgraph that takes Zed values in, operates upon them, and produces Zed values as output.

func (*Debug) End added in v1.18.0

func (x *Debug) End() int

func (*Debug) OpAST added in v1.18.0

func (*Debug) OpAST()

func (*Debug) Pos added in v1.18.0

func (x *Debug) Pos() int

type Decl added in v1.4.0

type Decl interface {
	Node
	DeclAST()
}

type Def added in v1.0.0

type Def struct {
	Name *ID  `json:"name"`
	Expr Expr `json:"expr"`
}

Def is like Assignment but the LHS is an identifier that may be later referenced. This is used for const blocks in Sequential and var blocks in a let scope.

func (Def) End added in v1.16.0

func (d Def) End() int

func (Def) Pos added in v1.16.0

func (d Def) Pos() int

type Drop

type Drop struct {
	Kind       string `json:"kind" unpack:""`
	KeywordPos int    `json:"keyword_pos"`
	Args       []Expr `json:"args"`
}

An Op is a node in the flowgraph that takes Zed values in, operates upon them, and produces Zed values as output.

func (*Drop) End added in v1.16.0

func (x *Drop) End() int

func (*Drop) OpAST added in v1.1.0

func (*Drop) OpAST()

func (*Drop) Pos added in v1.16.0

func (x *Drop) Pos() int

type EntryExpr

type EntryExpr struct {
	Key   Expr `json:"key"`
	Value Expr `json:"value"`
}

type Explode

type Explode struct {
	Kind       string      `json:"kind" unpack:""`
	KeywordPos int         `json:"keyword_pos"`
	Args       []Expr      `json:"args"`
	Type       astzed.Type `json:"type"`
	As         Expr        `json:"as"`
}

An Op is a node in the flowgraph that takes Zed values in, operates upon them, and produces Zed values as output.

func (*Explode) End added in v1.16.0

func (x *Explode) End() int

func (*Explode) OpAST added in v1.1.0

func (*Explode) OpAST()

func (*Explode) Pos added in v1.16.0

func (x *Explode) Pos() int

type Expr

type Expr interface {
	Node
	ExprAST()
}

type FString added in v1.16.0

type FString struct {
	Kind     string        `json:"kind" unpack:""`
	StartPos int           `json:"start_pos"`
	Elems    []FStringElem `json:"elems"`
}

func (*FString) End added in v1.16.0

func (f *FString) End() int

func (*FString) ExprAST added in v1.16.0

func (*FString) ExprAST()

func (*FString) Pos added in v1.16.0

func (f *FString) Pos() int

type FStringElem added in v1.16.0

type FStringElem interface {
	Node
	FStringElem()
}

type FStringExpr added in v1.16.0

type FStringExpr struct {
	Kind   string `json:"kind" unpack:""`
	Lbrace int    `json:"lbrace"`
	Expr   Expr   `json:"expr"`
	Rbrace int    `json:"rbrace"`
}

func (*FStringExpr) End added in v1.16.0

func (f *FStringExpr) End() int

func (*FStringExpr) FStringElem added in v1.16.0

func (*FStringExpr) FStringElem()

func (*FStringExpr) Pos added in v1.16.0

func (f *FStringExpr) Pos() int

type FStringText added in v1.16.0

type FStringText struct {
	Kind    string `json:"kind" unpack:""`
	Text    string `json:"text"`
	TextPos int    `json:"text_pos"`
}

func (*FStringText) End added in v1.16.0

func (f *FStringText) End() int

func (*FStringText) FStringElem added in v1.16.0

func (*FStringText) FStringElem()

func (*FStringText) Pos added in v1.16.0

func (f *FStringText) Pos() int

type Field added in v1.0.0

type Field struct {
	Kind    string `json:"kind" unpack:""`
	Name    string `json:"name"`
	NamePos int    `json:"name_pos"`
	Value   Expr   `json:"value"`
}

func (*Field) End added in v1.16.0

func (f *Field) End() int

func (*Field) Pos added in v1.16.0

func (f *Field) Pos() int

type File

type File struct {
	Kind       string     `json:"kind" unpack:""`
	KeywordPos int        `json:"keyword_pos"`
	Path       Pattern    `json:"path"`
	Format     string     `json:"format"`
	SortKeys   []SortExpr `json:"sort_keys"`
	EndPos     int        `json:"end_pos"`
}

func (*File) End added in v1.16.0

func (x *File) End() int

func (*File) OpAST added in v1.16.0

func (*File) OpAST()

func (*File) Pos added in v1.16.0

func (x *File) Pos() int

func (*File) Source

func (*File) Source()

type From

type From struct {
	Kind       string  `json:"kind" unpack:""`
	KeywordPos int     `json:"keyword_pos"`
	Trunks     []Trunk `json:"trunks"`
	Rparen     int     `json:"rparen"`
}

An Op is a node in the flowgraph that takes Zed values in, operates upon them, and produces Zed values as output.

func (*From) End added in v1.16.0

func (x *From) End() int

func (*From) OpAST added in v1.1.0

func (*From) OpAST()

func (*From) Pos added in v1.16.0

func (x *From) Pos() int

type FuncDecl added in v1.4.0

type FuncDecl struct {
	Kind       string `json:"kind" unpack:""`
	KeywordPos int    `json:"keyword_pos"`
	Name       *ID    `json:"name"`
	Params     []*ID  `json:"params"`
	Expr       Expr   `json:"expr"`
	Rparen     int    `json:"rparen"`
}

func (*FuncDecl) DeclAST added in v1.4.0

func (*FuncDecl) DeclAST()

func (*FuncDecl) End added in v1.16.0

func (f *FuncDecl) End() int

func (*FuncDecl) Pos added in v1.16.0

func (f *FuncDecl) Pos() int

type Fuse

type Fuse struct {
	Kind       string `json:"kind" unpack:""`
	KeywordPos int    `json:"keyword_pos"`
}

An Op is a node in the flowgraph that takes Zed values in, operates upon them, and produces Zed values as output.

func (*Fuse) End added in v1.16.0

func (x *Fuse) End() int

func (*Fuse) OpAST added in v1.1.0

func (*Fuse) OpAST()

func (*Fuse) Pos added in v1.16.0

func (x *Fuse) Pos() int

type Glob added in v1.0.0

type Glob struct {
	Kind       string `json:"kind" unpack:""`
	Pattern    string `json:"pattern"`
	PatternPos int    `json:"pattern_pos"`
}

func (*Glob) End added in v1.16.0

func (g *Glob) End() int

func (*Glob) ExprAST added in v1.0.0

func (*Glob) ExprAST()

func (*Glob) PatternAST added in v1.0.0

func (*Glob) PatternAST()

func (*Glob) Pos added in v1.16.0

func (g *Glob) Pos() int

type Grep added in v1.0.0

type Grep struct {
	Kind       string `json:"kind" unpack:""`
	KeywordPos int    `json:"keyword_pos"`
	Pattern    Expr   `json:"pattern"`
	Expr       Expr   `json:"expr"`
	Rparen     int    `json:"rparen"`
}

func (*Grep) End added in v1.16.0

func (g *Grep) End() int

func (*Grep) ExprAST added in v1.0.0

func (*Grep) ExprAST()

func (*Grep) Pos added in v1.16.0

func (g *Grep) Pos() int

type HTTP

type HTTP struct {
	Kind       string      `json:"kind" unpack:""`
	KeywordPos int         `json:"keyword_pos"`
	URL        Pattern     `json:"url"`
	Format     string      `json:"format"`
	SortKeys   []SortExpr  `json:"sort_keys"`
	Method     string      `json:"method"`
	Headers    *RecordExpr `json:"headers"`
	Body       string      `json:"body"`
	EndPos     int         `json:"end_pos"`
}

func (*HTTP) End added in v1.16.0

func (x *HTTP) End() int

func (*HTTP) OpAST added in v1.16.0

func (*HTTP) OpAST()

func (*HTTP) Pos added in v1.16.0

func (x *HTTP) Pos() int

func (*HTTP) Source

func (*HTTP) Source()
type Head struct {
	Kind       string `json:"kind" unpack:""`
	KeywordPos int    `json:"keyword_pos"`
	Count      Expr   `json:"count"`
}

An Op is a node in the flowgraph that takes Zed values in, operates upon them, and produces Zed values as output.

func (*Head) End added in v1.16.0

func (x *Head) End() int

func (*Head) OpAST added in v1.1.0

func (*Head) OpAST()

func (*Head) Pos added in v1.16.0

func (x *Head) Pos() int

type ID

type ID struct {
	Kind    string `json:"kind" unpack:""`
	Name    string `json:"name"`
	NamePos int    `json:"name_pos"`
}

func (*ID) End added in v1.16.0

func (i *ID) End() int

func (*ID) ExprAST

func (*ID) ExprAST()

func (*ID) Pos added in v1.16.0

func (i *ID) Pos() int

type IndexExpr added in v1.16.0

type IndexExpr struct {
	Kind   string `json:"kind" unpack:""`
	Expr   Expr   `json:"expr"`
	Index  Expr   `json:"index"`
	Rbrack int    `json:"rbrack"`
}

func (*IndexExpr) End added in v1.16.0

func (i *IndexExpr) End() int

func (*IndexExpr) ExprAST added in v1.16.0

func (*IndexExpr) ExprAST()

func (*IndexExpr) Pos added in v1.16.0

func (i *IndexExpr) Pos() int

type Join

type Join struct {
	Kind       string      `json:"kind" unpack:""`
	KeywordPos int         `json:"keyword_pos"`
	Style      string      `json:"style"`
	RightInput Seq         `json:"right_input"`
	LeftKey    Expr        `json:"left_key"`
	RightKey   Expr        `json:"right_key"`
	Args       Assignments `json:"args"`
}

An Op is a node in the flowgraph that takes Zed values in, operates upon them, and produces Zed values as output.

func (*Join) End added in v1.16.0

func (x *Join) End() int

func (*Join) OpAST added in v1.1.0

func (*Join) OpAST()

func (*Join) Pos added in v1.16.0

func (x *Join) Pos() int

type Load added in v1.8.0

type Load struct {
	Kind       string `json:"kind" unpack:""`
	KeywordPos int    `json:"keyword_pos"`
	Pool       string `json:"pool"`
	Branch     string `json:"branch"`
	Author     string `json:"author"`
	Message    string `json:"message"`
	Meta       string `json:"meta"`
	// XXX This is super hacky but so is this Op. Fix this once we can get
	// positional information for the various options.
	EndPos int `json:"end_pos"` //
}

An Op is a node in the flowgraph that takes Zed values in, operates upon them, and produces Zed values as output.

func (*Load) End added in v1.16.0

func (x *Load) End() int

func (*Load) OpAST added in v1.8.0

func (*Load) OpAST()

func (*Load) Pos added in v1.16.0

func (x *Load) Pos() int

type MapExpr

type MapExpr struct {
	Kind    string      `json:"kind" unpack:""`
	Lpipe   int         `json:"lpipe"`
	Entries []EntryExpr `json:"entries"`
	Rpipe   int         `json:"rpipe"`
}

func (*MapExpr) End added in v1.16.0

func (m *MapExpr) End() int

func (*MapExpr) ExprAST

func (*MapExpr) ExprAST()

func (*MapExpr) Pos added in v1.16.0

func (m *MapExpr) Pos() int

type Merge added in v1.0.0

type Merge struct {
	Kind       string `json:"kind" unpack:""`
	KeywordPos int    `json:"keyword_pos"`
	Expr       Expr   `json:"expr"`
}

An Op is a node in the flowgraph that takes Zed values in, operates upon them, and produces Zed values as output.

func (*Merge) End added in v1.16.0

func (x *Merge) End() int

func (*Merge) OpAST added in v1.1.0

func (*Merge) OpAST()

func (*Merge) Pos added in v1.16.0

func (x *Merge) Pos() int

type Node added in v1.16.0

type Node interface {
	Pos() int // Position of first character belonging to the node.
	End() int // Position of first character immediately after the node.
}

type Op added in v1.1.0

type Op interface {
	Node
	OpAST()
}

Op is the interface implemented by all AST operator nodes.

func Copy

func Copy(in Op) Op

func UnmarshalOp added in v1.8.0

func UnmarshalOp(buf []byte) (Op, error)

UnmarshalOp transforms a JSON representation of an operator into an Op.

type OpAssignment

type OpAssignment struct {
	Kind        string      `json:"kind" unpack:""`
	Assignments Assignments `json:"assignments"`
}

An OpAssignment is a list of assignments whose parent operator is unknown: It could be a Summarize or Put operator. This will be determined in the semantic phase.

func (*OpAssignment) End added in v1.16.0

func (x *OpAssignment) End() int

func (*OpAssignment) OpAST added in v1.1.0

func (*OpAssignment) OpAST()

func (*OpAssignment) Pos added in v1.16.0

func (x *OpAssignment) Pos() int

type OpDecl added in v1.9.0

type OpDecl struct {
	Kind       string `json:"kind" unpack:""`
	KeywordPos int    `json:"keyword_pos"`
	Name       *ID    `json:"name"`
	Params     []*ID  `json:"params"`
	Body       Seq    `json:"body"`
	Rparen     int    `json:"rparen"`
}

func (*OpDecl) DeclAST added in v1.9.0

func (*OpDecl) DeclAST()

func (*OpDecl) End added in v1.16.0

func (o *OpDecl) End() int

func (*OpDecl) Pos added in v1.16.0

func (o *OpDecl) Pos() int

type OpExpr added in v1.0.0

type OpExpr struct {
	Kind string `json:"kind" unpack:""`
	Expr Expr   `json:"expr"`
}

An OpExpr operator is an expression that appears as an operator and requires semantic analysis to determine if it is a filter, a yield, or an aggregation.

func (*OpExpr) End added in v1.16.0

func (x *OpExpr) End() int

func (*OpExpr) OpAST added in v1.1.0

func (*OpExpr) OpAST()

func (*OpExpr) Pos added in v1.16.0

func (x *OpExpr) Pos() int

type Output added in v1.18.0

type Output struct {
	Kind       string `json:"kind" unpack:""`
	KeywordPos int    `json:"keyword_pos"`
	Name       *ID    `json:"name"`
}

An Op is a node in the flowgraph that takes Zed values in, operates upon them, and produces Zed values as output.

func (*Output) End added in v1.18.0

func (x *Output) End() int

func (*Output) OpAST added in v1.18.0

func (*Output) OpAST()

func (*Output) Pos added in v1.18.0

func (x *Output) Pos() int

type Over added in v1.0.0

type Over struct {
	Kind       string `json:"kind" unpack:""`
	KeywordPos int    `json:"keyword_pos"`
	Exprs      []Expr `json:"exprs"`
	Locals     []Def  `json:"locals"`
	Body       Seq    `json:"body"`
	Rparen     int    `json:"rparen"`
}

An Op is a node in the flowgraph that takes Zed values in, operates upon them, and produces Zed values as output.

func (*Over) End added in v1.16.0

func (x *Over) End() int

func (*Over) OpAST added in v1.1.0

func (*Over) OpAST()

func (*Over) Pos added in v1.16.0

func (x *Over) Pos() int

type OverExpr added in v1.1.0

type OverExpr struct {
	Kind       string `json:"kind" unpack:""`
	KeywordPos int    `json:"keyword"`
	Locals     []Def  `json:"locals"`
	Exprs      []Expr `json:"exprs"`
	Body       Seq    `json:"body"`
}

func (*OverExpr) End added in v1.16.0

func (o *OverExpr) End() int

func (*OverExpr) ExprAST added in v1.1.0

func (*OverExpr) ExprAST()

func (*OverExpr) Pos added in v1.16.0

func (o *OverExpr) Pos() int

type Parallel

type Parallel struct {
	Kind string `json:"kind" unpack:""`
	// If non-zero, MergeBy contains the field name on
	// which the branches of this parallel operator should be
	// merged in the order indicated by MergeReverse.
	// XXX merge_by should be a list of expressions
	KeywordPos   int        `json:"keyword_pos"`
	MergeBy      field.Path `json:"merge_by,omitempty"`
	MergeReverse bool       `json:"merge_reverse,omitempty"`
	Paths        []Seq      `json:"paths"`
	Rparen       int        `json:"rparen"`
}

A Parallel operator represents a set of operators that each get a stream of Zed values from their parent.

func (*Parallel) End added in v1.16.0

func (x *Parallel) End() int

func (*Parallel) OpAST added in v1.1.0

func (*Parallel) OpAST()

func (*Parallel) Pos added in v1.16.0

func (x *Parallel) Pos() int

type Pass

type Pass struct {
	Kind       string `json:"kind" unpack:""`
	KeywordPos int    `json:"keyword_pos"`
}

An Op is a node in the flowgraph that takes Zed values in, operates upon them, and produces Zed values as output.

func (*Pass) End added in v1.16.0

func (x *Pass) End() int

func (*Pass) OpAST added in v1.1.0

func (*Pass) OpAST()

func (*Pass) Pos added in v1.16.0

func (x *Pass) Pos() int

func (*Pass) Source

func (*Pass) Source()

type Pattern added in v1.0.0

type Pattern interface {
	Node
	PatternAST()
}

type Pool

type Pool struct {
	Kind       string   `json:"kind" unpack:""`
	KeywordPos int      `json:"keyword_pos"`
	Spec       PoolSpec `json:"spec"`
	Delete     bool     `json:"delete"`
	EndPos     int      `json:"end_pos"`
}

func (*Pool) End added in v1.16.0

func (x *Pool) End() int

func (*Pool) OpAST added in v1.16.0

func (*Pool) OpAST()

func (*Pool) Pos added in v1.16.0

func (x *Pool) Pos() int

func (*Pool) Source

func (*Pool) Source()

type PoolSpec

type PoolSpec struct {
	Pool   Pattern `json:"pool"`
	Commit string  `json:"commit"`
	Meta   string  `json:"meta"`
	Tap    bool    `json:"tap"`
}

type Put

type Put struct {
	Kind       string      `json:"kind" unpack:""`
	KeywordPos int         `json:"keyword_pos"`
	Args       Assignments `json:"args"`
}

An Op is a node in the flowgraph that takes Zed values in, operates upon them, and produces Zed values as output.

func (*Put) End added in v1.16.0

func (x *Put) End() int

func (*Put) OpAST added in v1.1.0

func (*Put) OpAST()

func (*Put) Pos added in v1.16.0

func (x *Put) Pos() int

type QuotedString added in v1.9.0

type QuotedString struct {
	Kind   string `json:"kind" unpack:""`
	Lquote int    `json:"lquote"`
	Text   string `json:"text"`
}

func (*QuotedString) End added in v1.16.0

func (q *QuotedString) End() int

func (*QuotedString) PatternAST added in v1.9.0

func (*QuotedString) PatternAST()

func (*QuotedString) Pos added in v1.16.0

func (q *QuotedString) Pos() int

type RecordElem added in v1.0.0

type RecordElem interface {
	Node
	// contains filtered or unexported methods
}

type RecordExpr

type RecordExpr struct {
	Kind   string       `json:"kind" unpack:""`
	Lbrace int          `json:"lbrace"`
	Elems  []RecordElem `json:"elems"`
	Rbrace int          `json:"rbrace"`
}

func (*RecordExpr) End added in v1.16.0

func (r *RecordExpr) End() int

func (*RecordExpr) ExprAST

func (*RecordExpr) ExprAST()

func (*RecordExpr) Pos added in v1.16.0

func (r *RecordExpr) Pos() int

type Regexp added in v1.0.0

type Regexp struct {
	Kind       string `json:"kind" unpack:""`
	Pattern    string `json:"pattern"`
	PatternPos int    `json:"pattern_pos"`
}

func (*Regexp) End added in v1.16.0

func (r *Regexp) End() int

func (*Regexp) ExprAST added in v1.0.0

func (*Regexp) ExprAST()

func (*Regexp) PatternAST added in v1.0.0

func (*Regexp) PatternAST()

func (*Regexp) Pos added in v1.16.0

func (r *Regexp) Pos() int

type Rename

type Rename struct {
	Kind       string      `json:"kind" unpack:""`
	KeywordPos int         `json:"keyword_pos"`
	Args       Assignments `json:"args"`
}

An Op is a node in the flowgraph that takes Zed values in, operates upon them, and produces Zed values as output.

func (*Rename) End added in v1.16.0

func (x *Rename) End() int

func (*Rename) OpAST added in v1.1.0

func (*Rename) OpAST()

func (*Rename) Pos added in v1.16.0

func (x *Rename) Pos() int

type Sample added in v1.8.0

type Sample struct {
	Kind       string `json:"kind" unpack:""`
	KeywordPos int    `json:"keyword_pos"`
	Expr       Expr   `json:"expr"`
}

An Op is a node in the flowgraph that takes Zed values in, operates upon them, and produces Zed values as output.

func (*Sample) End added in v1.16.0

func (x *Sample) End() int

func (*Sample) OpAST added in v1.8.0

func (*Sample) OpAST()

func (*Sample) Pos added in v1.16.0

func (x *Sample) Pos() int

type Scope added in v1.8.0

type Scope struct {
	Kind  string `json:"kind" unpack:""`
	Decls []Decl `json:"decls"`
	Body  Seq    `json:"body"`
}

An Op is a node in the flowgraph that takes Zed values in, operates upon them, and produces Zed values as output.

func (*Scope) End added in v1.16.0

func (x *Scope) End() int

func (*Scope) OpAST added in v1.8.0

func (*Scope) OpAST()

func (*Scope) Pos added in v1.16.0

func (x *Scope) Pos() int
type Search struct {
	Kind       string `json:"kind" unpack:""`
	KeywordPos int    `json:"keyword_pos"`
	Expr       Expr   `json:"expr"`
}

An Op is a node in the flowgraph that takes Zed values in, operates upon them, and produces Zed values as output.

func (*Search) End added in v1.16.0

func (x *Search) End() int

func (*Search) OpAST added in v1.1.0

func (*Search) OpAST()

func (*Search) Pos added in v1.16.0

func (x *Search) Pos() int

type Seq added in v1.8.0

type Seq []Op

A Seq represents a sequence of operators that receive a stream of Zed values from their parent into the first operator and each subsequent operator processes the output records from the previous operator.

func CopySeq added in v1.8.0

func CopySeq(in Seq) Seq

func UnmarshalObject added in v1.8.0

func UnmarshalObject(anon interface{}) (Seq, error)

func (Seq) End added in v1.16.0

func (s Seq) End() int

func (Seq) Pos added in v1.16.0

func (s Seq) Pos() int

func (*Seq) Prepend added in v1.8.0

func (s *Seq) Prepend(front Op)

type SetExpr

type SetExpr struct {
	Kind  string       `json:"kind" unpack:""`
	Lpipe int          `json:"lpipe"`
	Elems []VectorElem `json:"elems"`
	Rpipe int          `json:"rpipe"`
}

func (*SetExpr) End added in v1.16.0

func (s *SetExpr) End() int

func (*SetExpr) ExprAST

func (*SetExpr) ExprAST()

func (*SetExpr) Pos added in v1.16.0

func (s *SetExpr) Pos() int

type Shape

type Shape struct {
	Kind       string `json:"kind" unpack:""`
	KeywordPos int    `json:"keyword_pos"`
}

An Op is a node in the flowgraph that takes Zed values in, operates upon them, and produces Zed values as output.

func (*Shape) End added in v1.16.0

func (x *Shape) End() int

func (*Shape) OpAST added in v1.1.0

func (*Shape) OpAST()

func (*Shape) Pos added in v1.16.0

func (x *Shape) Pos() int

type SliceExpr added in v1.16.0

type SliceExpr struct {
	Kind   string `json:"kind" unpack:""`
	Expr   Expr   `json:"expr"`
	From   Expr   `json:"from"`
	To     Expr   `json:"to"`
	Rbrack int    `json:"rbrack"`
}

func (*SliceExpr) End added in v1.16.0

func (s *SliceExpr) End() int

func (*SliceExpr) ExprAST added in v1.16.0

func (*SliceExpr) ExprAST()

func (*SliceExpr) Pos added in v1.16.0

func (s *SliceExpr) Pos() int

type Sort

type Sort struct {
	Kind       string     `json:"kind" unpack:""`
	KeywordPos int        `json:"keyword_pos"`
	Reverse    bool       `json:"reverse"`
	NullsFirst bool       `json:"nullsfirst"`
	Args       []SortExpr `json:"args"`
}

An Op is a node in the flowgraph that takes Zed values in, operates upon them, and produces Zed values as output.

func (*Sort) End added in v1.16.0

func (x *Sort) End() int

func (*Sort) OpAST added in v1.1.0

func (*Sort) OpAST()

func (*Sort) Pos added in v1.16.0

func (x *Sort) Pos() int

type SortExpr added in v1.18.0

type SortExpr struct {
	Kind  string `json:"kind" unpack:""`
	Expr  Expr   `json:"expr"`
	Order *ID    `json:"order"`
}

func (SortExpr) End added in v1.18.0

func (s SortExpr) End() int

func (SortExpr) Pos added in v1.18.0

func (s SortExpr) Pos() int

type Source

type Source interface {
	Node
	Source()
}

type Spread added in v1.0.0

type Spread struct {
	Kind     string `json:"kind" unpack:""`
	StartPos int    `json:"start_pos"`
	Expr     Expr   `json:"expr"`
}

func (*Spread) End added in v1.16.0

func (s *Spread) End() int

func (*Spread) Pos added in v1.16.0

func (s *Spread) Pos() int

type String added in v1.0.0

type String struct {
	Kind    string `json:"kind" unpack:""`
	Text    string `json:"text"`
	TextPos int    `json:"text_pos"`
}

func (*String) End added in v1.16.0

func (s *String) End() int

func (*String) PatternAST added in v1.0.0

func (*String) PatternAST()

func (*String) Pos added in v1.16.0

func (s *String) Pos() int

type Summarize

type Summarize struct {
	Kind string `json:"kind" unpack:""`
	// StartPos is not called KeywordPos for Summarize since the "summarize"
	// keyword is optional.
	StartPos int         `json:"start_pos"`
	Limit    int         `json:"limit"`
	Keys     Assignments `json:"keys"`
	Aggs     Assignments `json:"aggs"`
}

An Op is a node in the flowgraph that takes Zed values in, operates upon them, and produces Zed values as output.

func (*Summarize) End added in v1.16.0

func (x *Summarize) End() int

func (*Summarize) OpAST added in v1.1.0

func (*Summarize) OpAST()

func (*Summarize) Pos added in v1.16.0

func (x *Summarize) Pos() int

type Switch

type Switch struct {
	Kind       string `json:"kind" unpack:""`
	KeywordPos int    `json:"keyword_pos"`
	Expr       Expr   `json:"expr"`
	Cases      []Case `json:"cases"`
	Rparen     int    `json:"rparen"`
}

An Op is a node in the flowgraph that takes Zed values in, operates upon them, and produces Zed values as output.

func (*Switch) End added in v1.16.0

func (x *Switch) End() int

func (*Switch) OpAST added in v1.1.0

func (*Switch) OpAST()

func (*Switch) Pos added in v1.16.0

func (x *Switch) Pos() int

type Tail

type Tail struct {
	Kind       string `json:"kind" unpack:""`
	KeywordPos int    `json:"keyword_pos"`
	Count      Expr   `json:"count"`
}

An Op is a node in the flowgraph that takes Zed values in, operates upon them, and produces Zed values as output.

func (*Tail) End added in v1.16.0

func (x *Tail) End() int

func (*Tail) OpAST added in v1.1.0

func (*Tail) OpAST()

func (*Tail) Pos added in v1.16.0

func (x *Tail) Pos() int

type Term added in v1.0.0

type Term struct {
	Kind    string     `json:"kind" unpack:""`
	Text    string     `json:"text"`
	TextPos int        `json:"text_pos"`
	Value   astzed.Any `json:"value"`
}

func (*Term) End added in v1.16.0

func (t *Term) End() int

func (*Term) ExprAST added in v1.0.0

func (*Term) ExprAST()

func (*Term) Pos added in v1.16.0

func (t *Term) Pos() int

type Top

type Top struct {
	Kind       string `json:"kind" unpack:""`
	KeywordPos int    `json:"keyword_pos"`
	Limit      Expr   `json:"limit"`
	Args       []Expr `json:"args"`
	Flush      bool   `json:"flush"`
}

An Op is a node in the flowgraph that takes Zed values in, operates upon them, and produces Zed values as output.

func (*Top) End added in v1.16.0

func (x *Top) End() int

func (*Top) OpAST added in v1.1.0

func (*Top) OpAST()

func (*Top) Pos added in v1.16.0

func (x *Top) Pos() int

type Trunk

type Trunk struct {
	Kind   string `json:"kind" unpack:""`
	Source Source `json:"source"`
	Seq    Seq    `json:"seq"`
}

func (*Trunk) End added in v1.16.0

func (t *Trunk) End() int

func (*Trunk) Pos added in v1.16.0

func (t *Trunk) Pos() int

type TypeDecl added in v1.16.0

type TypeDecl struct {
	Kind       string      `json:"kind" unpack:""`
	KeywordPos int         `json:"keyword_pos"`
	Name       *ID         `json:"name"`
	Type       astzed.Type `json:"type"`
}

func (*TypeDecl) DeclAST added in v1.16.0

func (*TypeDecl) DeclAST()

func (*TypeDecl) End added in v1.16.0

func (t *TypeDecl) End() int

func (*TypeDecl) Pos added in v1.16.0

func (t *TypeDecl) Pos() int

type UnaryExpr

type UnaryExpr struct {
	Kind    string `json:"kind" unpack:""`
	Op      string `json:"op"`
	OpPos   int    `json:"op_pos"`
	Operand Expr   `json:"operand"`
}

func (*UnaryExpr) End added in v1.16.0

func (u *UnaryExpr) End() int

func (*UnaryExpr) ExprAST

func (*UnaryExpr) ExprAST()

func (*UnaryExpr) Pos added in v1.16.0

func (u *UnaryExpr) Pos() int

type Uniq

type Uniq struct {
	Kind       string `json:"kind" unpack:""`
	KeywordPos int    `json:"keyword_pos"`
	Cflag      bool   `json:"cflag"`
}

An Op is a node in the flowgraph that takes Zed values in, operates upon them, and produces Zed values as output.

func (*Uniq) End added in v1.16.0

func (x *Uniq) End() int

func (*Uniq) OpAST added in v1.1.0

func (*Uniq) OpAST()

func (*Uniq) Pos added in v1.16.0

func (x *Uniq) Pos() int

type VectorElem added in v1.2.0

type VectorElem interface {
	// contains filtered or unexported methods
}

type VectorValue added in v1.2.0

type VectorValue struct {
	Kind string `json:"kind" unpack:""`
	Expr Expr   `json:"expr"`
}

type Where added in v1.0.0

type Where struct {
	Kind       string `json:"kind" unpack:""`
	KeywordPos int    `json:"keyword_pos"`
	Expr       Expr   `json:"expr"`
}

An Op is a node in the flowgraph that takes Zed values in, operates upon them, and produces Zed values as output.

func (*Where) End added in v1.16.0

func (x *Where) End() int

func (*Where) OpAST added in v1.1.0

func (*Where) OpAST()

func (*Where) Pos added in v1.16.0

func (x *Where) Pos() int

type Yield added in v1.0.0

type Yield struct {
	Kind       string `json:"kind" unpack:""`
	KeywordPos int    `json:"keyword_pos"`
	Exprs      []Expr `json:"exprs"`
}

An Op is a node in the flowgraph that takes Zed values in, operates upon them, and produces Zed values as output.

func (*Yield) End added in v1.16.0

func (x *Yield) End() int

func (*Yield) OpAST added in v1.1.0

func (*Yield) OpAST()

func (*Yield) Pos added in v1.16.0

func (x *Yield) Pos() int

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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