diff options
author | Ting-Wei Lan <tingwei.lan@cobinhood.com> | 2019-01-22 11:26:45 +0800 |
---|---|---|
committer | Jhih-Ming Huang <jm.huang@cobinhood.com> | 2019-05-06 10:44:03 +0800 |
commit | d25ee5f726545b165dba6a45def0e55027b6941b (patch) | |
tree | 4464f182aba472a2e42be742dd73653a9a4485f2 | |
parent | 4d01db0522f7405981a1f18f4ee79a6d1aac067b (diff) | |
download | dexon-d25ee5f726545b165dba6a45def0e55027b6941b.tar.gz dexon-d25ee5f726545b165dba6a45def0e55027b6941b.tar.zst dexon-d25ee5f726545b165dba6a45def0e55027b6941b.zip |
core: vm: sqlvm: move AST and parser to their own packages
In order to avoid putting too many different things in single package
and allow other projects to reuse the syntax tree and the parser, these
two components are moved to different packages and all nodes used in AST
are now exported. A lot of comments are added in this commit to pass
golint checks.
-rw-r--r-- | core/vm/sqlvm/ast/ast.go | 490 | ||||
-rw-r--r-- | core/vm/sqlvm/ast/printer.go | 69 | ||||
-rw-r--r-- | core/vm/sqlvm/cmd/ast-printer/main.go | 7 | ||||
-rw-r--r-- | core/vm/sqlvm/parser/grammar.go (renamed from core/vm/sqlvm/grammar.go) | 2581 | ||||
-rw-r--r-- | core/vm/sqlvm/parser/grammar.peg (renamed from core/vm/sqlvm/grammar.peg) | 259 | ||||
-rw-r--r-- | core/vm/sqlvm/parser/parser.go (renamed from core/vm/sqlvm/parser.go) | 31 | ||||
-rw-r--r-- | core/vm/sqlvm/parser/parser_test.go (renamed from core/vm/sqlvm/parser_test.go) | 2 | ||||
-rw-r--r-- | core/vm/sqlvm/type.go | 408 |
8 files changed, 2010 insertions, 1837 deletions
diff --git a/core/vm/sqlvm/ast/ast.go b/core/vm/sqlvm/ast/ast.go new file mode 100644 index 000000000..61a990e20 --- /dev/null +++ b/core/vm/sqlvm/ast/ast.go @@ -0,0 +1,490 @@ +package ast + +import ( + "github.com/shopspring/decimal" +) + +// --------------------------------------------------------------------------- +// Identifiers +// --------------------------------------------------------------------------- + +// IdentifierNode references table, column, or function. +type IdentifierNode struct { + Name []byte +} + +// --------------------------------------------------------------------------- +// Values +// --------------------------------------------------------------------------- + +// Valuer defines the interface of a constant value. +type Valuer interface { + Value() interface{} +} + +// BoolValueNode is a boolean constant. +type BoolValueNode struct { + V bool +} + +// Value returns the value of BoolValueNode. +func (n BoolValueNode) Value() interface{} { return n.V } + +// IntegerValueNode is an integer constant. +type IntegerValueNode struct { + IsAddress bool + V decimal.Decimal +} + +// Value returns the value of IntegerValueNode. +func (n IntegerValueNode) Value() interface{} { return n.V } +func (n IntegerValueNode) String() string { return n.V.String() } + +// DecimalValueNode is a number constant. +type DecimalValueNode struct { + V decimal.Decimal +} + +// Value returns the value of DecimalValueNode. +func (n DecimalValueNode) Value() interface{} { return n.V } +func (n DecimalValueNode) String() string { return n.V.String() } + +// BytesValueNode is a dynamic or fixed bytes constant. +type BytesValueNode struct { + V []byte +} + +// Value returns the value of BytesValueNode. +func (n BytesValueNode) Value() interface{} { return n.V } +func (n BytesValueNode) String() string { return string(n.V) } + +// AnyValueNode is '*' used in SELECT and function call. +type AnyValueNode struct{} + +// Value returns itself. +func (n AnyValueNode) Value() interface{} { return n } + +// DefaultValueNode represents the default value used in INSERT and UPDATE. +type DefaultValueNode struct{} + +// Value returns itself. +func (n DefaultValueNode) Value() interface{} { return n } + +// NullValueNode is NULL. +type NullValueNode struct{} + +// Value returns itself. +func (n NullValueNode) Value() interface{} { return n } + +// --------------------------------------------------------------------------- +// Types +// --------------------------------------------------------------------------- + +// IntTypeNode represents solidity int{X} and uint{X} types. +type IntTypeNode struct { + Unsigned bool + Size uint32 +} + +// FixedTypeNode represents solidity fixed{M}x{N} and ufixed{M}x{N} types. +type FixedTypeNode struct { + Unsigned bool + Size uint32 + FractionalDigits uint32 +} + +// DynamicBytesTypeNode represents solidity bytes type. +type DynamicBytesTypeNode struct{} + +// FixedBytesTypeNode represents solidity bytes{X} type. +type FixedBytesTypeNode struct { + Size uint32 +} + +// AddressTypeNode represents solidity address type. +type AddressTypeNode struct{} + +// BoolTypeNode represents solidity bool type. +type BoolTypeNode struct{} + +// --------------------------------------------------------------------------- +// Operators +// --------------------------------------------------------------------------- + +// UnaryOperator defines the interface of a unary operator. +type UnaryOperator interface { + GetTarget() interface{} + SetTarget(interface{}) +} + +// BinaryOperator defines the interface of a binary operator. +type BinaryOperator interface { + GetObject() interface{} + GetSubject() interface{} + SetObject(interface{}) + SetSubject(interface{}) +} + +// UnaryOperatorNode is a base struct of unary operators. +type UnaryOperatorNode struct { + Target interface{} +} + +// GetTarget gets the target of the operation. +func (n UnaryOperatorNode) GetTarget() interface{} { + return n.Target +} + +// SetTarget sets the target of the operation. +func (n *UnaryOperatorNode) SetTarget(t interface{}) { + n.Target = t +} + +// BinaryOperatorNode is a base struct of binary operators. +type BinaryOperatorNode struct { + Object interface{} + Subject interface{} +} + +// GetObject gets the node on which the operation is applied. +func (n BinaryOperatorNode) GetObject() interface{} { + return n.Object +} + +// GetSubject gets the node whose value is applied on the object. +func (n BinaryOperatorNode) GetSubject() interface{} { + return n.Subject +} + +// SetObject sets the object of the operation. +func (n *BinaryOperatorNode) SetObject(o interface{}) { + n.Object = o +} + +// SetSubject sets the subject of the operation. +func (n *BinaryOperatorNode) SetSubject(s interface{}) { + n.Subject = s +} + +// PosOperatorNode is '+'. +type PosOperatorNode struct{ UnaryOperatorNode } + +// NegOperatorNode is '-'. +type NegOperatorNode struct{ UnaryOperatorNode } + +// NotOperatorNode is 'NOT'. +type NotOperatorNode struct{ UnaryOperatorNode } + +// AndOperatorNode is 'AND'. +type AndOperatorNode struct{ BinaryOperatorNode } + +// OrOperatorNode is 'OR'. +type OrOperatorNode struct{ BinaryOperatorNode } + +// GreaterOrEqualOperatorNode is '>='. +type GreaterOrEqualOperatorNode struct{ BinaryOperatorNode } + +// LessOrEqualOperatorNode is '<='. +type LessOrEqualOperatorNode struct{ BinaryOperatorNode } + +// NotEqualOperatorNode is '<>'. +type NotEqualOperatorNode struct{ BinaryOperatorNode } + +// EqualOperatorNode is '=' used in expressions. +type EqualOperatorNode struct{ BinaryOperatorNode } + +// GreaterOperatorNode is '>'. +type GreaterOperatorNode struct{ BinaryOperatorNode } + +// LessOperatorNode is '<'. +type LessOperatorNode struct{ BinaryOperatorNode } + +// ConcatOperatorNode is '||'. +type ConcatOperatorNode struct{ BinaryOperatorNode } + +// AddOperatorNode is '+'. +type AddOperatorNode struct{ BinaryOperatorNode } + +// SubOperatorNode is '-'. +type SubOperatorNode struct{ BinaryOperatorNode } + +// MulOperatorNode is '*'. +type MulOperatorNode struct{ BinaryOperatorNode } + +// DivOperatorNode is '/'. +type DivOperatorNode struct{ BinaryOperatorNode } + +// ModOperatorNode is '%'. +type ModOperatorNode struct{ BinaryOperatorNode } + +// InOperatorNode is 'IN'. +type InOperatorNode struct{ BinaryOperatorNode } + +// IsOperatorNode is 'IS NULL'. +type IsOperatorNode struct{ BinaryOperatorNode } + +// LikeOperatorNode is 'LIKE'. +type LikeOperatorNode struct{ BinaryOperatorNode } + +// CastOperatorNode is 'CAST(expr AS type)'. +type CastOperatorNode struct{ BinaryOperatorNode } + +// AssignOperatorNode is '=' used in UPDATE to set values. +type AssignOperatorNode struct{ BinaryOperatorNode } + +// FunctionOperatorNode is a function call. +type FunctionOperatorNode struct{ BinaryOperatorNode } + +// --------------------------------------------------------------------------- +// Options +// --------------------------------------------------------------------------- + +// Optional defines the interface for printing AST. +type Optional interface { + GetOption() map[string]interface{} +} + +// NilOptionNode is a base struct implementing Optional interface. +type NilOptionNode struct{} + +// GetOption returns a value for printing AST. +func (n NilOptionNode) GetOption() map[string]interface{} { return nil } + +// WhereOptionNode is 'WHERE' used in SELECT, UPDATE, DELETE. +type WhereOptionNode struct { + Condition interface{} +} + +// GetOption returns a value for printing AST. +func (n WhereOptionNode) GetOption() map[string]interface{} { + return map[string]interface{}{ + "Condition": n.Condition, + } +} + +// OrderOptionNode is an expression in 'ORDER BY' used in SELECT. +type OrderOptionNode struct { + Expr interface{} + Desc bool + NullsFirst bool +} + +// GetOption returns a value for printing AST. +func (n OrderOptionNode) GetOption() map[string]interface{} { + return map[string]interface{}{ + "Expr": n.Expr, + "Desc": n.Desc, + "NullsFirst": n.NullsFirst, + } +} + +// GroupOptionNode is 'GROUP BY' used in SELECT. +type GroupOptionNode struct { + Expr interface{} +} + +// GetOption returns a value for printing AST. +func (n GroupOptionNode) GetOption() map[string]interface{} { + return map[string]interface{}{ + "Expr": n.Expr, + } +} + +// OffsetOptionNode is 'OFFSET' used in SELECT. +type OffsetOptionNode struct { + Value IntegerValueNode +} + +// GetOption returns a value for printing AST. +func (n OffsetOptionNode) GetOption() map[string]interface{} { + return map[string]interface{}{ + "Value": n.Value, + } +} + +// LimitOptionNode is 'LIMIT' used in SELECT. +type LimitOptionNode struct { + Value IntegerValueNode +} + +// GetOption returns a value for printing AST. +func (n LimitOptionNode) GetOption() map[string]interface{} { + return map[string]interface{}{ + "Value": n.Value, + } +} + +// InsertWithColumnOptionNode stores columns and values used in INSERT. +type InsertWithColumnOptionNode struct { + Column []interface{} + Value []interface{} +} + +// GetOption returns a value for printing AST. +func (n InsertWithColumnOptionNode) GetOption() map[string]interface{} { + return map[string]interface{}{ + "Column": n.Column, + "Value": n.Value, + } +} + +// InsertWithDefaultOptionNode is 'DEFAULT VALUES' used in INSERT. +type InsertWithDefaultOptionNode struct{ NilOptionNode } + +// PrimaryOptionNode is 'PRIMARY KEY' used in CREATE TABLE. +type PrimaryOptionNode struct{ NilOptionNode } + +// NotNullOptionNode is 'NOT NULL' used in CREATE TABLE. +type NotNullOptionNode struct{ NilOptionNode } + +// UniqueOptionNode is 'UNIQUE' used in CREATE TABLE and CREATE INDEX. +type UniqueOptionNode struct{ NilOptionNode } + +// AutoIncrementOptionNode is 'AUTOINCREMENT' used in CREATE TABLE. +type AutoIncrementOptionNode struct{ NilOptionNode } + +// DefaultOptionNode is 'DEFAULT' used in CREATE TABLE. +type DefaultOptionNode struct { + Value interface{} +} + +// GetOption returns a value for printing AST. +func (n DefaultOptionNode) GetOption() map[string]interface{} { + return map[string]interface{}{ + "Value": n.Value, + } +} + +// ForeignOptionNode is 'REFERENCES' used in CREATE TABLE. +type ForeignOptionNode struct { + Table IdentifierNode + Column IdentifierNode +} + +// GetOption returns a value for printing AST. +func (n ForeignOptionNode) GetOption() map[string]interface{} { + return map[string]interface{}{ + "Table": n.Table, + "Column": n.Column, + } +} + +// --------------------------------------------------------------------------- +// Statements +// --------------------------------------------------------------------------- + +// SelectStmtNode is SELECT. +type SelectStmtNode struct { + Column []interface{} + Table *IdentifierNode + Where *WhereOptionNode + Group []interface{} + Order []interface{} + Limit *LimitOptionNode + Offset *OffsetOptionNode +} + +// GetOption returns a value for printing AST. +func (n SelectStmtNode) GetOption() map[string]interface{} { + return map[string]interface{}{ + "Column": n.Column, + "Table": n.Table, + "Where": n.Where, + "Group": n.Group, + "Order": n.Order, + "Limit": n.Limit, + "Offset": n.Offset, + } +} + +// UpdateStmtNode is UPDATE. +type UpdateStmtNode struct { + Table IdentifierNode + Assignment []interface{} + Where *WhereOptionNode +} + +// GetOption returns a value for printing AST. +func (n UpdateStmtNode) GetOption() map[string]interface{} { + return map[string]interface{}{ + "Table": n.Table, + "Assignment": n.Assignment, + "Where": n.Where, + } +} + +// DeleteStmtNode is DELETE. +type DeleteStmtNode struct { + Table IdentifierNode + Where *WhereOptionNode +} + +// GetOption returns a value for printing AST. +func (n DeleteStmtNode) GetOption() map[string]interface{} { + return map[string]interface{}{ + "Table": n.Table, + "Where": n.Where, + } +} + +// InsertStmtNode is INSERT. +type InsertStmtNode struct { + Table IdentifierNode + Insert interface{} +} + +// GetOption returns a value for printing AST. +func (n InsertStmtNode) GetOption() map[string]interface{} { + return map[string]interface{}{ + "Table": n.Table, + "Insert": n.Insert, + } +} + +// CreateTableStmtNode is CREATE TABLE. +type CreateTableStmtNode struct { + Table IdentifierNode + Column []interface{} +} + +// GetOption returns a value for printing AST. +func (n CreateTableStmtNode) GetOption() map[string]interface{} { + return map[string]interface{}{ + "Table": n.Table, + "Column": n.Column, + } +} + +// ColumnSchemaNode specifies a column in CREATE TABLE. +type ColumnSchemaNode struct { + Column IdentifierNode + DataType interface{} + Constraint []interface{} +} + +// GetOption returns a value for printing AST. +func (n ColumnSchemaNode) GetOption() map[string]interface{} { + return map[string]interface{}{ + "Column": n.Column, + "DataYype": n.DataType, + "Constraint": n.Constraint, + } +} + +// CreateIndexStmtNode is CREATE INDEX. +type CreateIndexStmtNode struct { + Index IdentifierNode + Table IdentifierNode + Column []interface{} + Unique *UniqueOptionNode +} + +// GetOption returns a value for printing AST. +func (n CreateIndexStmtNode) GetOption() map[string]interface{} { + return map[string]interface{}{ + "Index": n.Index, + "Table": n.Table, + "Column": n.Column, + "Unique": n.Unique, + } +} diff --git a/core/vm/sqlvm/ast/printer.go b/core/vm/sqlvm/ast/printer.go new file mode 100644 index 000000000..25f04e863 --- /dev/null +++ b/core/vm/sqlvm/ast/printer.go @@ -0,0 +1,69 @@ +package ast + +import ( + "fmt" + "reflect" +) + +// PrintAST prints ast to stdout. +func PrintAST(n interface{}, indent string) { + if n == nil { + fmt.Printf("%snil\n", indent) + return + } + typeOf := reflect.TypeOf(n) + valueOf := reflect.ValueOf(n) + name := "" + if typeOf.Kind() == reflect.Ptr { + if valueOf.IsNil() { + fmt.Printf("%snil\n", indent) + return + } + name = "*" + valueOf = valueOf.Elem() + typeOf = typeOf.Elem() + } + name = name + typeOf.Name() + + if op, ok := n.(Optional); ok { + fmt.Printf("%s%s", indent, name) + m := op.GetOption() + if m == nil { + fmt.Printf("\n") + return + } + fmt.Printf(":\n") + for k := range m { + fmt.Printf("%s %s:\n", indent, k) + PrintAST(m[k], indent+" ") + } + return + } + if op, ok := n.(UnaryOperator); ok { + fmt.Printf("%s%s:\n", indent, name) + fmt.Printf("%s Target:\n", indent) + PrintAST(op.GetTarget(), indent+" ") + return + } + if op, ok := n.(BinaryOperator); ok { + fmt.Printf("%s%s:\n", indent, name) + fmt.Printf("%s Object:\n", indent) + PrintAST(op.GetObject(), indent+" ") + fmt.Printf("%s Subject:\n", indent) + PrintAST(op.GetSubject(), indent+" ") + return + } + if arr, ok := n.([]interface{}); ok { + fmt.Printf("%s[\n", indent) + for idx := range arr { + PrintAST(arr[idx], indent+" ") + } + fmt.Printf("%s]\n", indent) + return + } + if stringer, ok := n.(fmt.Stringer); ok { + fmt.Printf("%s%s: %s\n", indent, name, stringer.String()) + return + } + fmt.Printf("%s%s: %+v\n", indent, name, valueOf.Interface()) +} diff --git a/core/vm/sqlvm/cmd/ast-printer/main.go b/core/vm/sqlvm/cmd/ast-printer/main.go index ad10a54ce..4911273c5 100644 --- a/core/vm/sqlvm/cmd/ast-printer/main.go +++ b/core/vm/sqlvm/cmd/ast-printer/main.go @@ -4,13 +4,14 @@ import ( "fmt" "os" - "github.com/dexon-foundation/dexon/core/vm/sqlvm" + "github.com/dexon-foundation/dexon/core/vm/sqlvm/ast" + "github.com/dexon-foundation/dexon/core/vm/sqlvm/parser" ) func main() { - n, err := sqlvm.ParseString(os.Args[1]) + n, err := parser.ParseString(os.Args[1]) fmt.Printf("err: %+v\n", err) if err == nil { - sqlvm.PrintAST(n, "") + ast.PrintAST(n, "") } } diff --git a/core/vm/sqlvm/grammar.go b/core/vm/sqlvm/parser/grammar.go index dad07b1eb..7dae2c977 100644 --- a/core/vm/sqlvm/grammar.go +++ b/core/vm/sqlvm/parser/grammar.go @@ -1,6 +1,6 @@ // Code generated by pigeon; DO NOT EDIT. -package sqlvm +package parser import ( "bytes" @@ -15,71 +15,73 @@ import ( "strings" "unicode" "unicode/utf8" + + "github.com/dexon-foundation/dexon/core/vm/sqlvm/ast" ) var g = &grammar{ rules: []*rule{ { name: "S", - pos: position{line: 5, col: 1, offset: 19}, + pos: position{line: 5, col: 1, offset: 20}, expr: &actionExpr{ - pos: position{line: 6, col: 5, offset: 25}, + pos: position{line: 6, col: 5, offset: 26}, run: (*parser).callonS1, expr: &seqExpr{ - pos: position{line: 6, col: 5, offset: 25}, + pos: position{line: 6, col: 5, offset: 26}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 6, col: 5, offset: 25}, + pos: position{line: 6, col: 5, offset: 26}, name: "_", }, &labeledExpr{ - pos: position{line: 6, col: 7, offset: 27}, + pos: position{line: 6, col: 7, offset: 28}, label: "x", expr: &zeroOrOneExpr{ - pos: position{line: 6, col: 9, offset: 29}, + pos: position{line: 6, col: 9, offset: 30}, expr: &ruleRefExpr{ - pos: position{line: 6, col: 9, offset: 29}, + pos: position{line: 6, col: 9, offset: 30}, name: "Stmt", }, }, }, &ruleRefExpr{ - pos: position{line: 6, col: 15, offset: 35}, + pos: position{line: 6, col: 15, offset: 36}, name: "_", }, &labeledExpr{ - pos: position{line: 6, col: 17, offset: 37}, + pos: position{line: 6, col: 17, offset: 38}, label: "xs", expr: &zeroOrMoreExpr{ - pos: position{line: 6, col: 20, offset: 40}, + pos: position{line: 6, col: 20, offset: 41}, expr: &actionExpr{ - pos: position{line: 6, col: 22, offset: 42}, + pos: position{line: 6, col: 22, offset: 43}, run: (*parser).callonS10, expr: &seqExpr{ - pos: position{line: 6, col: 22, offset: 42}, + pos: position{line: 6, col: 22, offset: 43}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 6, col: 22, offset: 42}, + pos: position{line: 6, col: 22, offset: 43}, val: ";", ignoreCase: false, }, &ruleRefExpr{ - pos: position{line: 6, col: 26, offset: 46}, + pos: position{line: 6, col: 26, offset: 47}, name: "_", }, &labeledExpr{ - pos: position{line: 6, col: 28, offset: 48}, + pos: position{line: 6, col: 28, offset: 49}, label: "s", expr: &zeroOrOneExpr{ - pos: position{line: 6, col: 30, offset: 50}, + pos: position{line: 6, col: 30, offset: 51}, expr: &ruleRefExpr{ - pos: position{line: 6, col: 30, offset: 50}, + pos: position{line: 6, col: 30, offset: 51}, name: "Stmt", }, }, }, &ruleRefExpr{ - pos: position{line: 6, col: 36, offset: 56}, + pos: position{line: 6, col: 36, offset: 57}, name: "_", }, }, @@ -88,7 +90,7 @@ var g = &grammar{ }, }, &ruleRefExpr{ - pos: position{line: 6, col: 59, offset: 79}, + pos: position{line: 6, col: 59, offset: 80}, name: "EOF", }, }, @@ -97,32 +99,32 @@ var g = &grammar{ }, { name: "Stmt", - pos: position{line: 10, col: 1, offset: 131}, + pos: position{line: 10, col: 1, offset: 133}, expr: &choiceExpr{ - pos: position{line: 11, col: 4, offset: 139}, + pos: position{line: 11, col: 4, offset: 141}, alternatives: []interface{}{ &ruleRefExpr{ - pos: position{line: 11, col: 4, offset: 139}, + pos: position{line: 11, col: 4, offset: 141}, name: "SelectStmt", }, &ruleRefExpr{ - pos: position{line: 12, col: 4, offset: 153}, + pos: position{line: 12, col: 4, offset: 155}, name: "UpdateStmt", }, &ruleRefExpr{ - pos: position{line: 13, col: 4, offset: 167}, + pos: position{line: 13, col: 4, offset: 169}, name: "DeleteStmt", }, &ruleRefExpr{ - pos: position{line: 14, col: 4, offset: 181}, + pos: position{line: 14, col: 4, offset: 183}, name: "InsertStmt", }, &ruleRefExpr{ - pos: position{line: 15, col: 4, offset: 195}, + pos: position{line: 15, col: 4, offset: 197}, name: "CreateTableStmt", }, &ruleRefExpr{ - pos: position{line: 16, col: 4, offset: 214}, + pos: position{line: 16, col: 4, offset: 216}, name: "CreateIndexStmt", }, }, @@ -130,57 +132,57 @@ var g = &grammar{ }, { name: "SelectStmt", - pos: position{line: 18, col: 1, offset: 231}, + pos: position{line: 18, col: 1, offset: 233}, expr: &actionExpr{ - pos: position{line: 19, col: 4, offset: 245}, + pos: position{line: 19, col: 4, offset: 247}, run: (*parser).callonSelectStmt1, expr: &seqExpr{ - pos: position{line: 19, col: 4, offset: 245}, + pos: position{line: 19, col: 4, offset: 247}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 19, col: 4, offset: 245}, + pos: position{line: 19, col: 4, offset: 247}, name: "SelectToken", }, &ruleRefExpr{ - pos: position{line: 20, col: 2, offset: 258}, + pos: position{line: 20, col: 2, offset: 260}, name: "_", }, &labeledExpr{ - pos: position{line: 20, col: 4, offset: 260}, + pos: position{line: 20, col: 4, offset: 262}, label: "f", expr: &ruleRefExpr{ - pos: position{line: 20, col: 6, offset: 262}, + pos: position{line: 20, col: 6, offset: 264}, name: "SelectColumn", }, }, &labeledExpr{ - pos: position{line: 20, col: 19, offset: 275}, + pos: position{line: 20, col: 19, offset: 277}, label: "fs", expr: &zeroOrMoreExpr{ - pos: position{line: 20, col: 22, offset: 278}, + pos: position{line: 20, col: 22, offset: 280}, expr: &actionExpr{ - pos: position{line: 20, col: 24, offset: 280}, + pos: position{line: 20, col: 24, offset: 282}, run: (*parser).callonSelectStmt9, expr: &seqExpr{ - pos: position{line: 20, col: 24, offset: 280}, + pos: position{line: 20, col: 24, offset: 282}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 20, col: 24, offset: 280}, + pos: position{line: 20, col: 24, offset: 282}, name: "_", }, &ruleRefExpr{ - pos: position{line: 20, col: 26, offset: 282}, + pos: position{line: 20, col: 26, offset: 284}, name: "SeparatorToken", }, &ruleRefExpr{ - pos: position{line: 20, col: 41, offset: 297}, + pos: position{line: 20, col: 41, offset: 299}, name: "_", }, &labeledExpr{ - pos: position{line: 20, col: 43, offset: 299}, + pos: position{line: 20, col: 43, offset: 301}, label: "s", expr: &ruleRefExpr{ - pos: position{line: 20, col: 45, offset: 301}, + pos: position{line: 20, col: 45, offset: 303}, name: "SelectColumn", }, }, @@ -190,33 +192,33 @@ var g = &grammar{ }, }, &labeledExpr{ - pos: position{line: 21, col: 2, offset: 336}, + pos: position{line: 21, col: 2, offset: 338}, label: "table", expr: &zeroOrOneExpr{ - pos: position{line: 21, col: 8, offset: 342}, + pos: position{line: 21, col: 8, offset: 344}, expr: &actionExpr{ - pos: position{line: 21, col: 10, offset: 344}, + pos: position{line: 21, col: 10, offset: 346}, run: (*parser).callonSelectStmt18, expr: &seqExpr{ - pos: position{line: 21, col: 10, offset: 344}, + pos: position{line: 21, col: 10, offset: 346}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 21, col: 10, offset: 344}, + pos: position{line: 21, col: 10, offset: 346}, name: "_", }, &ruleRefExpr{ - pos: position{line: 21, col: 12, offset: 346}, + pos: position{line: 21, col: 12, offset: 348}, name: "FromToken", }, &ruleRefExpr{ - pos: position{line: 21, col: 22, offset: 356}, + pos: position{line: 21, col: 22, offset: 358}, name: "_", }, &labeledExpr{ - pos: position{line: 21, col: 24, offset: 358}, + pos: position{line: 21, col: 24, offset: 360}, label: "i", expr: &ruleRefExpr{ - pos: position{line: 21, col: 26, offset: 360}, + pos: position{line: 21, col: 26, offset: 362}, name: "Identifier", }, }, @@ -226,25 +228,25 @@ var g = &grammar{ }, }, &labeledExpr{ - pos: position{line: 22, col: 2, offset: 393}, + pos: position{line: 22, col: 2, offset: 395}, label: "where", expr: &zeroOrOneExpr{ - pos: position{line: 22, col: 8, offset: 399}, + pos: position{line: 22, col: 8, offset: 401}, expr: &actionExpr{ - pos: position{line: 22, col: 10, offset: 401}, + pos: position{line: 22, col: 10, offset: 403}, run: (*parser).callonSelectStmt27, expr: &seqExpr{ - pos: position{line: 22, col: 10, offset: 401}, + pos: position{line: 22, col: 10, offset: 403}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 22, col: 10, offset: 401}, + pos: position{line: 22, col: 10, offset: 403}, name: "_", }, &labeledExpr{ - pos: position{line: 22, col: 12, offset: 403}, + pos: position{line: 22, col: 12, offset: 405}, label: "w", expr: &ruleRefExpr{ - pos: position{line: 22, col: 14, offset: 405}, + pos: position{line: 22, col: 14, offset: 407}, name: "WhereClause", }, }, @@ -254,25 +256,25 @@ var g = &grammar{ }, }, &labeledExpr{ - pos: position{line: 23, col: 2, offset: 439}, + pos: position{line: 23, col: 2, offset: 441}, label: "group", expr: &zeroOrOneExpr{ - pos: position{line: 23, col: 8, offset: 445}, + pos: position{line: 23, col: 8, offset: 447}, expr: &actionExpr{ - pos: position{line: 23, col: 10, offset: 447}, + pos: position{line: 23, col: 10, offset: 449}, run: (*parser).callonSelectStmt34, expr: &seqExpr{ - pos: position{line: 23, col: 10, offset: 447}, + pos: position{line: 23, col: 10, offset: 449}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 23, col: 10, offset: 447}, + pos: position{line: 23, col: 10, offset: 449}, name: "_", }, &labeledExpr{ - pos: position{line: 23, col: 12, offset: 449}, + pos: position{line: 23, col: 12, offset: 451}, label: "g", expr: &ruleRefExpr{ - pos: position{line: 23, col: 14, offset: 451}, + pos: position{line: 23, col: 14, offset: 453}, name: "GroupByClause", }, }, @@ -282,25 +284,25 @@ var g = &grammar{ }, }, &labeledExpr{ - pos: position{line: 24, col: 2, offset: 487}, + pos: position{line: 24, col: 2, offset: 489}, label: "order", expr: &zeroOrOneExpr{ - pos: position{line: 24, col: 8, offset: 493}, + pos: position{line: 24, col: 8, offset: 495}, expr: &actionExpr{ - pos: position{line: 24, col: 10, offset: 495}, + pos: position{line: 24, col: 10, offset: 497}, run: (*parser).callonSelectStmt41, expr: &seqExpr{ - pos: position{line: 24, col: 10, offset: 495}, + pos: position{line: 24, col: 10, offset: 497}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 24, col: 10, offset: 495}, + pos: position{line: 24, col: 10, offset: 497}, name: "_", }, &labeledExpr{ - pos: position{line: 24, col: 12, offset: 497}, + pos: position{line: 24, col: 12, offset: 499}, label: "or", expr: &ruleRefExpr{ - pos: position{line: 24, col: 15, offset: 500}, + pos: position{line: 24, col: 15, offset: 502}, name: "OrderByClause", }, }, @@ -310,25 +312,25 @@ var g = &grammar{ }, }, &labeledExpr{ - pos: position{line: 25, col: 2, offset: 537}, + pos: position{line: 25, col: 2, offset: 539}, label: "limit", expr: &zeroOrOneExpr{ - pos: position{line: 25, col: 8, offset: 543}, + pos: position{line: 25, col: 8, offset: 545}, expr: &actionExpr{ - pos: position{line: 25, col: 10, offset: 545}, + pos: position{line: 25, col: 10, offset: 547}, run: (*parser).callonSelectStmt48, expr: &seqExpr{ - pos: position{line: 25, col: 10, offset: 545}, + pos: position{line: 25, col: 10, offset: 547}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 25, col: 10, offset: 545}, + pos: position{line: 25, col: 10, offset: 547}, name: "_", }, &labeledExpr{ - pos: position{line: 25, col: 12, offset: 547}, + pos: position{line: 25, col: 12, offset: 549}, label: "l", expr: &ruleRefExpr{ - pos: position{line: 25, col: 14, offset: 549}, + pos: position{line: 25, col: 14, offset: 551}, name: "LimitClause", }, }, @@ -338,25 +340,25 @@ var g = &grammar{ }, }, &labeledExpr{ - pos: position{line: 26, col: 2, offset: 583}, + pos: position{line: 26, col: 2, offset: 585}, label: "offset", expr: &zeroOrOneExpr{ - pos: position{line: 26, col: 9, offset: 590}, + pos: position{line: 26, col: 9, offset: 592}, expr: &actionExpr{ - pos: position{line: 26, col: 11, offset: 592}, + pos: position{line: 26, col: 11, offset: 594}, run: (*parser).callonSelectStmt55, expr: &seqExpr{ - pos: position{line: 26, col: 11, offset: 592}, + pos: position{line: 26, col: 11, offset: 594}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 26, col: 11, offset: 592}, + pos: position{line: 26, col: 11, offset: 594}, name: "_", }, &labeledExpr{ - pos: position{line: 26, col: 13, offset: 594}, + pos: position{line: 26, col: 13, offset: 596}, label: "of", expr: &ruleRefExpr{ - pos: position{line: 26, col: 16, offset: 597}, + pos: position{line: 26, col: 16, offset: 599}, name: "OffsetClause", }, }, @@ -371,16 +373,16 @@ var g = &grammar{ }, { name: "SelectColumn", - pos: position{line: 61, col: 1, offset: 1247}, + pos: position{line: 61, col: 1, offset: 1283}, expr: &choiceExpr{ - pos: position{line: 62, col: 4, offset: 1263}, + pos: position{line: 62, col: 4, offset: 1299}, alternatives: []interface{}{ &ruleRefExpr{ - pos: position{line: 62, col: 4, offset: 1263}, + pos: position{line: 62, col: 4, offset: 1299}, name: "AnyLiteral", }, &ruleRefExpr{ - pos: position{line: 63, col: 4, offset: 1277}, + pos: position{line: 63, col: 4, offset: 1313}, name: "Expr", }, }, @@ -388,77 +390,77 @@ var g = &grammar{ }, { name: "UpdateStmt", - pos: position{line: 65, col: 1, offset: 1283}, + pos: position{line: 65, col: 1, offset: 1319}, expr: &actionExpr{ - pos: position{line: 66, col: 4, offset: 1297}, + pos: position{line: 66, col: 4, offset: 1333}, run: (*parser).callonUpdateStmt1, expr: &seqExpr{ - pos: position{line: 66, col: 4, offset: 1297}, + pos: position{line: 66, col: 4, offset: 1333}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 66, col: 4, offset: 1297}, + pos: position{line: 66, col: 4, offset: 1333}, name: "UpdateToken", }, &ruleRefExpr{ - pos: position{line: 67, col: 2, offset: 1310}, + pos: position{line: 67, col: 2, offset: 1346}, name: "_", }, &labeledExpr{ - pos: position{line: 67, col: 4, offset: 1312}, + pos: position{line: 67, col: 4, offset: 1348}, label: "table", expr: &ruleRefExpr{ - pos: position{line: 67, col: 10, offset: 1318}, + pos: position{line: 67, col: 10, offset: 1354}, name: "Identifier", }, }, &ruleRefExpr{ - pos: position{line: 68, col: 2, offset: 1330}, + pos: position{line: 68, col: 2, offset: 1366}, name: "_", }, &ruleRefExpr{ - pos: position{line: 68, col: 4, offset: 1332}, + pos: position{line: 68, col: 4, offset: 1368}, name: "SetToken", }, &ruleRefExpr{ - pos: position{line: 69, col: 2, offset: 1342}, + pos: position{line: 69, col: 2, offset: 1378}, name: "_", }, &labeledExpr{ - pos: position{line: 69, col: 4, offset: 1344}, + pos: position{line: 69, col: 4, offset: 1380}, label: "a", expr: &ruleRefExpr{ - pos: position{line: 69, col: 6, offset: 1346}, + pos: position{line: 69, col: 6, offset: 1382}, name: "Assignment", }, }, &labeledExpr{ - pos: position{line: 69, col: 17, offset: 1357}, + pos: position{line: 69, col: 17, offset: 1393}, label: "as", expr: &zeroOrMoreExpr{ - pos: position{line: 69, col: 20, offset: 1360}, + pos: position{line: 69, col: 20, offset: 1396}, expr: &actionExpr{ - pos: position{line: 69, col: 22, offset: 1362}, + pos: position{line: 69, col: 22, offset: 1398}, run: (*parser).callonUpdateStmt14, expr: &seqExpr{ - pos: position{line: 69, col: 22, offset: 1362}, + pos: position{line: 69, col: 22, offset: 1398}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 69, col: 22, offset: 1362}, + pos: position{line: 69, col: 22, offset: 1398}, name: "_", }, &ruleRefExpr{ - pos: position{line: 69, col: 24, offset: 1364}, + pos: position{line: 69, col: 24, offset: 1400}, name: "SeparatorToken", }, &ruleRefExpr{ - pos: position{line: 69, col: 39, offset: 1379}, + pos: position{line: 69, col: 39, offset: 1415}, name: "_", }, &labeledExpr{ - pos: position{line: 69, col: 41, offset: 1381}, + pos: position{line: 69, col: 41, offset: 1417}, label: "s", expr: &ruleRefExpr{ - pos: position{line: 69, col: 43, offset: 1383}, + pos: position{line: 69, col: 43, offset: 1419}, name: "Assignment", }, }, @@ -468,25 +470,25 @@ var g = &grammar{ }, }, &labeledExpr{ - pos: position{line: 70, col: 2, offset: 1416}, + pos: position{line: 70, col: 2, offset: 1452}, label: "where", expr: &zeroOrOneExpr{ - pos: position{line: 70, col: 8, offset: 1422}, + pos: position{line: 70, col: 8, offset: 1458}, expr: &actionExpr{ - pos: position{line: 70, col: 10, offset: 1424}, + pos: position{line: 70, col: 10, offset: 1460}, run: (*parser).callonUpdateStmt23, expr: &seqExpr{ - pos: position{line: 70, col: 10, offset: 1424}, + pos: position{line: 70, col: 10, offset: 1460}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 70, col: 10, offset: 1424}, + pos: position{line: 70, col: 10, offset: 1460}, name: "_", }, &labeledExpr{ - pos: position{line: 70, col: 12, offset: 1426}, + pos: position{line: 70, col: 12, offset: 1462}, label: "w", expr: &ruleRefExpr{ - pos: position{line: 70, col: 14, offset: 1428}, + pos: position{line: 70, col: 14, offset: 1464}, name: "WhereClause", }, }, @@ -501,57 +503,57 @@ var g = &grammar{ }, { name: "DeleteStmt", - pos: position{line: 86, col: 1, offset: 1700}, + pos: position{line: 86, col: 1, offset: 1752}, expr: &actionExpr{ - pos: position{line: 87, col: 4, offset: 1714}, + pos: position{line: 87, col: 4, offset: 1766}, run: (*parser).callonDeleteStmt1, expr: &seqExpr{ - pos: position{line: 87, col: 4, offset: 1714}, + pos: position{line: 87, col: 4, offset: 1766}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 87, col: 4, offset: 1714}, + pos: position{line: 87, col: 4, offset: 1766}, name: "DeleteToken", }, &ruleRefExpr{ - pos: position{line: 88, col: 2, offset: 1727}, + pos: position{line: 88, col: 2, offset: 1779}, name: "_", }, &ruleRefExpr{ - pos: position{line: 88, col: 4, offset: 1729}, + pos: position{line: 88, col: 4, offset: 1781}, name: "FromToken", }, &ruleRefExpr{ - pos: position{line: 89, col: 2, offset: 1740}, + pos: position{line: 89, col: 2, offset: 1792}, name: "_", }, &labeledExpr{ - pos: position{line: 89, col: 4, offset: 1742}, + pos: position{line: 89, col: 4, offset: 1794}, label: "table", expr: &ruleRefExpr{ - pos: position{line: 89, col: 10, offset: 1748}, + pos: position{line: 89, col: 10, offset: 1800}, name: "Identifier", }, }, &labeledExpr{ - pos: position{line: 90, col: 2, offset: 1760}, + pos: position{line: 90, col: 2, offset: 1812}, label: "where", expr: &zeroOrOneExpr{ - pos: position{line: 90, col: 8, offset: 1766}, + pos: position{line: 90, col: 8, offset: 1818}, expr: &actionExpr{ - pos: position{line: 90, col: 10, offset: 1768}, + pos: position{line: 90, col: 10, offset: 1820}, run: (*parser).callonDeleteStmt11, expr: &seqExpr{ - pos: position{line: 90, col: 10, offset: 1768}, + pos: position{line: 90, col: 10, offset: 1820}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 90, col: 10, offset: 1768}, + pos: position{line: 90, col: 10, offset: 1820}, name: "_", }, &labeledExpr{ - pos: position{line: 90, col: 12, offset: 1770}, + pos: position{line: 90, col: 12, offset: 1822}, label: "w", expr: &ruleRefExpr{ - pos: position{line: 90, col: 14, offset: 1772}, + pos: position{line: 90, col: 14, offset: 1824}, name: "WhereClause", }, }, @@ -566,53 +568,53 @@ var g = &grammar{ }, { name: "InsertStmt", - pos: position{line: 105, col: 1, offset: 2004}, + pos: position{line: 105, col: 1, offset: 2072}, expr: &actionExpr{ - pos: position{line: 106, col: 4, offset: 2018}, + pos: position{line: 106, col: 4, offset: 2086}, run: (*parser).callonInsertStmt1, expr: &seqExpr{ - pos: position{line: 106, col: 4, offset: 2018}, + pos: position{line: 106, col: 4, offset: 2086}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 106, col: 4, offset: 2018}, + pos: position{line: 106, col: 4, offset: 2086}, name: "InsertToken", }, &ruleRefExpr{ - pos: position{line: 107, col: 2, offset: 2031}, + pos: position{line: 107, col: 2, offset: 2099}, name: "_", }, &ruleRefExpr{ - pos: position{line: 107, col: 4, offset: 2033}, + pos: position{line: 107, col: 4, offset: 2101}, name: "IntoToken", }, &ruleRefExpr{ - pos: position{line: 108, col: 2, offset: 2044}, + pos: position{line: 108, col: 2, offset: 2112}, name: "_", }, &labeledExpr{ - pos: position{line: 108, col: 4, offset: 2046}, + pos: position{line: 108, col: 4, offset: 2114}, label: "table", expr: &ruleRefExpr{ - pos: position{line: 108, col: 10, offset: 2052}, + pos: position{line: 108, col: 10, offset: 2120}, name: "Identifier", }, }, &ruleRefExpr{ - pos: position{line: 109, col: 2, offset: 2064}, + pos: position{line: 109, col: 2, offset: 2132}, name: "_", }, &labeledExpr{ - pos: position{line: 109, col: 4, offset: 2066}, + pos: position{line: 109, col: 4, offset: 2134}, label: "insert", expr: &choiceExpr{ - pos: position{line: 109, col: 13, offset: 2075}, + pos: position{line: 109, col: 13, offset: 2143}, alternatives: []interface{}{ &ruleRefExpr{ - pos: position{line: 109, col: 13, offset: 2075}, + pos: position{line: 109, col: 13, offset: 2143}, name: "InsertWithColumnClause", }, &ruleRefExpr{ - pos: position{line: 109, col: 38, offset: 2100}, + pos: position{line: 109, col: 38, offset: 2168}, name: "InsertWithDefaultClause", }, }, @@ -624,36 +626,36 @@ var g = &grammar{ }, { name: "InsertValue", - pos: position{line: 117, col: 1, offset: 2215}, + pos: position{line: 117, col: 1, offset: 2291}, expr: &actionExpr{ - pos: position{line: 118, col: 4, offset: 2230}, + pos: position{line: 118, col: 4, offset: 2306}, run: (*parser).callonInsertValue1, expr: &seqExpr{ - pos: position{line: 118, col: 4, offset: 2230}, + pos: position{line: 118, col: 4, offset: 2306}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 118, col: 4, offset: 2230}, + pos: position{line: 118, col: 4, offset: 2306}, val: "(", ignoreCase: false, }, &ruleRefExpr{ - pos: position{line: 118, col: 8, offset: 2234}, + pos: position{line: 118, col: 8, offset: 2310}, name: "_", }, &labeledExpr{ - pos: position{line: 118, col: 10, offset: 2236}, + pos: position{line: 118, col: 10, offset: 2312}, label: "e", expr: &ruleRefExpr{ - pos: position{line: 118, col: 12, offset: 2238}, + pos: position{line: 118, col: 12, offset: 2314}, name: "MultiExprWithDefault", }, }, &ruleRefExpr{ - pos: position{line: 118, col: 33, offset: 2259}, + pos: position{line: 118, col: 33, offset: 2335}, name: "_", }, &litMatcher{ - pos: position{line: 118, col: 35, offset: 2261}, + pos: position{line: 118, col: 35, offset: 2337}, val: ")", ignoreCase: false, }, @@ -663,97 +665,97 @@ var g = &grammar{ }, { name: "CreateTableStmt", - pos: position{line: 121, col: 1, offset: 2284}, + pos: position{line: 121, col: 1, offset: 2360}, expr: &actionExpr{ - pos: position{line: 122, col: 4, offset: 2303}, + pos: position{line: 122, col: 4, offset: 2379}, run: (*parser).callonCreateTableStmt1, expr: &seqExpr{ - pos: position{line: 122, col: 4, offset: 2303}, + pos: position{line: 122, col: 4, offset: 2379}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 122, col: 4, offset: 2303}, + pos: position{line: 122, col: 4, offset: 2379}, name: "CreateToken", }, &ruleRefExpr{ - pos: position{line: 123, col: 2, offset: 2316}, + pos: position{line: 123, col: 2, offset: 2392}, name: "_", }, &ruleRefExpr{ - pos: position{line: 123, col: 4, offset: 2318}, + pos: position{line: 123, col: 4, offset: 2394}, name: "TableToken", }, &ruleRefExpr{ - pos: position{line: 124, col: 2, offset: 2330}, + pos: position{line: 124, col: 2, offset: 2406}, name: "_", }, &labeledExpr{ - pos: position{line: 124, col: 4, offset: 2332}, + pos: position{line: 124, col: 4, offset: 2408}, label: "table", expr: &ruleRefExpr{ - pos: position{line: 124, col: 10, offset: 2338}, + pos: position{line: 124, col: 10, offset: 2414}, name: "Identifier", }, }, &ruleRefExpr{ - pos: position{line: 125, col: 2, offset: 2350}, + pos: position{line: 125, col: 2, offset: 2426}, name: "_", }, &litMatcher{ - pos: position{line: 125, col: 4, offset: 2352}, + pos: position{line: 125, col: 4, offset: 2428}, val: "(", ignoreCase: false, }, &ruleRefExpr{ - pos: position{line: 126, col: 2, offset: 2357}, + pos: position{line: 126, col: 2, offset: 2433}, name: "_", }, &labeledExpr{ - pos: position{line: 126, col: 4, offset: 2359}, + pos: position{line: 126, col: 4, offset: 2435}, label: "column", expr: &zeroOrOneExpr{ - pos: position{line: 126, col: 11, offset: 2366}, + pos: position{line: 126, col: 11, offset: 2442}, expr: &actionExpr{ - pos: position{line: 127, col: 3, offset: 2370}, + pos: position{line: 127, col: 3, offset: 2446}, run: (*parser).callonCreateTableStmt14, expr: &seqExpr{ - pos: position{line: 127, col: 3, offset: 2370}, + pos: position{line: 127, col: 3, offset: 2446}, exprs: []interface{}{ &labeledExpr{ - pos: position{line: 127, col: 3, offset: 2370}, + pos: position{line: 127, col: 3, offset: 2446}, label: "s", expr: &ruleRefExpr{ - pos: position{line: 127, col: 5, offset: 2372}, + pos: position{line: 127, col: 5, offset: 2448}, name: "ColumnSchema", }, }, &labeledExpr{ - pos: position{line: 128, col: 3, offset: 2387}, + pos: position{line: 128, col: 3, offset: 2463}, label: "ss", expr: &zeroOrMoreExpr{ - pos: position{line: 128, col: 6, offset: 2390}, + pos: position{line: 128, col: 6, offset: 2466}, expr: &actionExpr{ - pos: position{line: 128, col: 8, offset: 2392}, + pos: position{line: 128, col: 8, offset: 2468}, run: (*parser).callonCreateTableStmt20, expr: &seqExpr{ - pos: position{line: 128, col: 8, offset: 2392}, + pos: position{line: 128, col: 8, offset: 2468}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 128, col: 8, offset: 2392}, + pos: position{line: 128, col: 8, offset: 2468}, name: "_", }, &ruleRefExpr{ - pos: position{line: 128, col: 10, offset: 2394}, + pos: position{line: 128, col: 10, offset: 2470}, name: "SeparatorToken", }, &ruleRefExpr{ - pos: position{line: 128, col: 25, offset: 2409}, + pos: position{line: 128, col: 25, offset: 2485}, name: "_", }, &labeledExpr{ - pos: position{line: 128, col: 27, offset: 2411}, + pos: position{line: 128, col: 27, offset: 2487}, label: "t", expr: &ruleRefExpr{ - pos: position{line: 128, col: 29, offset: 2413}, + pos: position{line: 128, col: 29, offset: 2489}, name: "ColumnSchema", }, }, @@ -768,11 +770,11 @@ var g = &grammar{ }, }, &ruleRefExpr{ - pos: position{line: 131, col: 2, offset: 2485}, + pos: position{line: 131, col: 2, offset: 2561}, name: "_", }, &litMatcher{ - pos: position{line: 131, col: 4, offset: 2487}, + pos: position{line: 131, col: 4, offset: 2563}, val: ")", ignoreCase: false, }, @@ -782,53 +784,53 @@ var g = &grammar{ }, { name: "ColumnSchema", - pos: position{line: 139, col: 1, offset: 2594}, + pos: position{line: 139, col: 1, offset: 2678}, expr: &actionExpr{ - pos: position{line: 140, col: 4, offset: 2610}, + pos: position{line: 140, col: 4, offset: 2694}, run: (*parser).callonColumnSchema1, expr: &seqExpr{ - pos: position{line: 140, col: 4, offset: 2610}, + pos: position{line: 140, col: 4, offset: 2694}, exprs: []interface{}{ &labeledExpr{ - pos: position{line: 140, col: 4, offset: 2610}, + pos: position{line: 140, col: 4, offset: 2694}, label: "i", expr: &ruleRefExpr{ - pos: position{line: 140, col: 6, offset: 2612}, + pos: position{line: 140, col: 6, offset: 2696}, name: "Identifier", }, }, &ruleRefExpr{ - pos: position{line: 141, col: 2, offset: 2624}, + pos: position{line: 141, col: 2, offset: 2708}, name: "_", }, &labeledExpr{ - pos: position{line: 141, col: 4, offset: 2626}, + pos: position{line: 141, col: 4, offset: 2710}, label: "t", expr: &ruleRefExpr{ - pos: position{line: 141, col: 6, offset: 2628}, + pos: position{line: 141, col: 6, offset: 2712}, name: "DataType", }, }, &labeledExpr{ - pos: position{line: 142, col: 2, offset: 2638}, + pos: position{line: 142, col: 2, offset: 2722}, label: "cs", expr: &zeroOrMoreExpr{ - pos: position{line: 142, col: 5, offset: 2641}, + pos: position{line: 142, col: 5, offset: 2725}, expr: &actionExpr{ - pos: position{line: 142, col: 7, offset: 2643}, + pos: position{line: 142, col: 7, offset: 2727}, run: (*parser).callonColumnSchema10, expr: &seqExpr{ - pos: position{line: 142, col: 7, offset: 2643}, + pos: position{line: 142, col: 7, offset: 2727}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 142, col: 7, offset: 2643}, + pos: position{line: 142, col: 7, offset: 2727}, name: "_", }, &labeledExpr{ - pos: position{line: 142, col: 9, offset: 2645}, + pos: position{line: 142, col: 9, offset: 2729}, label: "s", expr: &ruleRefExpr{ - pos: position{line: 142, col: 11, offset: 2647}, + pos: position{line: 142, col: 11, offset: 2731}, name: "ColumnConstraint", }, }, @@ -843,32 +845,32 @@ var g = &grammar{ }, { name: "ColumnConstraint", - pos: position{line: 151, col: 1, offset: 2802}, + pos: position{line: 151, col: 1, offset: 2894}, expr: &choiceExpr{ - pos: position{line: 152, col: 4, offset: 2822}, + pos: position{line: 152, col: 4, offset: 2914}, alternatives: []interface{}{ &ruleRefExpr{ - pos: position{line: 152, col: 4, offset: 2822}, + pos: position{line: 152, col: 4, offset: 2914}, name: "PrimaryKeyClause", }, &ruleRefExpr{ - pos: position{line: 153, col: 4, offset: 2842}, + pos: position{line: 153, col: 4, offset: 2934}, name: "NotNullClause", }, &ruleRefExpr{ - pos: position{line: 154, col: 4, offset: 2859}, + pos: position{line: 154, col: 4, offset: 2951}, name: "UniqueClause", }, &ruleRefExpr{ - pos: position{line: 155, col: 4, offset: 2875}, + pos: position{line: 155, col: 4, offset: 2967}, name: "DefaultClause", }, &ruleRefExpr{ - pos: position{line: 156, col: 4, offset: 2892}, + pos: position{line: 156, col: 4, offset: 2984}, name: "ForeignClause", }, &ruleRefExpr{ - pos: position{line: 157, col: 4, offset: 2909}, + pos: position{line: 157, col: 4, offset: 3001}, name: "AutoincrementClause", }, }, @@ -876,37 +878,37 @@ var g = &grammar{ }, { name: "CreateIndexStmt", - pos: position{line: 159, col: 1, offset: 2930}, + pos: position{line: 159, col: 1, offset: 3022}, expr: &actionExpr{ - pos: position{line: 160, col: 4, offset: 2949}, + pos: position{line: 160, col: 4, offset: 3041}, run: (*parser).callonCreateIndexStmt1, expr: &seqExpr{ - pos: position{line: 160, col: 4, offset: 2949}, + pos: position{line: 160, col: 4, offset: 3041}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 160, col: 4, offset: 2949}, + pos: position{line: 160, col: 4, offset: 3041}, name: "CreateToken", }, &labeledExpr{ - pos: position{line: 161, col: 2, offset: 2962}, + pos: position{line: 161, col: 2, offset: 3054}, label: "unique", expr: &zeroOrOneExpr{ - pos: position{line: 161, col: 9, offset: 2969}, + pos: position{line: 161, col: 9, offset: 3061}, expr: &actionExpr{ - pos: position{line: 161, col: 11, offset: 2971}, + pos: position{line: 161, col: 11, offset: 3063}, run: (*parser).callonCreateIndexStmt6, expr: &seqExpr{ - pos: position{line: 161, col: 11, offset: 2971}, + pos: position{line: 161, col: 11, offset: 3063}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 161, col: 11, offset: 2971}, + pos: position{line: 161, col: 11, offset: 3063}, name: "_", }, &labeledExpr{ - pos: position{line: 161, col: 13, offset: 2973}, + pos: position{line: 161, col: 13, offset: 3065}, label: "u", expr: &ruleRefExpr{ - pos: position{line: 161, col: 15, offset: 2975}, + pos: position{line: 161, col: 15, offset: 3067}, name: "UniqueClause", }, }, @@ -916,94 +918,94 @@ var g = &grammar{ }, }, &ruleRefExpr{ - pos: position{line: 162, col: 2, offset: 3010}, + pos: position{line: 162, col: 2, offset: 3102}, name: "_", }, &ruleRefExpr{ - pos: position{line: 162, col: 4, offset: 3012}, + pos: position{line: 162, col: 4, offset: 3104}, name: "IndexToken", }, &ruleRefExpr{ - pos: position{line: 163, col: 2, offset: 3024}, + pos: position{line: 163, col: 2, offset: 3116}, name: "_", }, &labeledExpr{ - pos: position{line: 163, col: 4, offset: 3026}, + pos: position{line: 163, col: 4, offset: 3118}, label: "index", expr: &ruleRefExpr{ - pos: position{line: 163, col: 10, offset: 3032}, + pos: position{line: 163, col: 10, offset: 3124}, name: "Identifier", }, }, &ruleRefExpr{ - pos: position{line: 164, col: 2, offset: 3044}, + pos: position{line: 164, col: 2, offset: 3136}, name: "_", }, &ruleRefExpr{ - pos: position{line: 164, col: 4, offset: 3046}, + pos: position{line: 164, col: 4, offset: 3138}, name: "OnToken", }, &ruleRefExpr{ - pos: position{line: 165, col: 2, offset: 3055}, + pos: position{line: 165, col: 2, offset: 3147}, name: "_", }, &labeledExpr{ - pos: position{line: 165, col: 4, offset: 3057}, + pos: position{line: 165, col: 4, offset: 3149}, label: "table", expr: &ruleRefExpr{ - pos: position{line: 165, col: 10, offset: 3063}, + pos: position{line: 165, col: 10, offset: 3155}, name: "Identifier", }, }, &ruleRefExpr{ - pos: position{line: 166, col: 2, offset: 3075}, + pos: position{line: 166, col: 2, offset: 3167}, name: "_", }, &litMatcher{ - pos: position{line: 166, col: 4, offset: 3077}, + pos: position{line: 166, col: 4, offset: 3169}, val: "(", ignoreCase: false, }, &ruleRefExpr{ - pos: position{line: 166, col: 8, offset: 3081}, + pos: position{line: 166, col: 8, offset: 3173}, name: "_", }, &labeledExpr{ - pos: position{line: 166, col: 10, offset: 3083}, + pos: position{line: 166, col: 10, offset: 3175}, label: "i", expr: &ruleRefExpr{ - pos: position{line: 166, col: 12, offset: 3085}, + pos: position{line: 166, col: 12, offset: 3177}, name: "Identifier", }, }, &labeledExpr{ - pos: position{line: 166, col: 23, offset: 3096}, + pos: position{line: 166, col: 23, offset: 3188}, label: "is", expr: &zeroOrMoreExpr{ - pos: position{line: 166, col: 26, offset: 3099}, + pos: position{line: 166, col: 26, offset: 3191}, expr: &actionExpr{ - pos: position{line: 166, col: 28, offset: 3101}, + pos: position{line: 166, col: 28, offset: 3193}, run: (*parser).callonCreateIndexStmt28, expr: &seqExpr{ - pos: position{line: 166, col: 28, offset: 3101}, + pos: position{line: 166, col: 28, offset: 3193}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 166, col: 28, offset: 3101}, + pos: position{line: 166, col: 28, offset: 3193}, name: "_", }, &ruleRefExpr{ - pos: position{line: 166, col: 30, offset: 3103}, + pos: position{line: 166, col: 30, offset: 3195}, name: "SeparatorToken", }, &ruleRefExpr{ - pos: position{line: 166, col: 45, offset: 3118}, + pos: position{line: 166, col: 45, offset: 3210}, name: "_", }, &labeledExpr{ - pos: position{line: 166, col: 47, offset: 3120}, + pos: position{line: 166, col: 47, offset: 3212}, label: "x", expr: &ruleRefExpr{ - pos: position{line: 166, col: 49, offset: 3122}, + pos: position{line: 166, col: 49, offset: 3214}, name: "Identifier", }, }, @@ -1013,11 +1015,11 @@ var g = &grammar{ }, }, &ruleRefExpr{ - pos: position{line: 166, col: 81, offset: 3154}, + pos: position{line: 166, col: 81, offset: 3246}, name: "_", }, &litMatcher{ - pos: position{line: 166, col: 83, offset: 3156}, + pos: position{line: 166, col: 83, offset: 3248}, val: ")", ignoreCase: false, }, @@ -1027,26 +1029,26 @@ var g = &grammar{ }, { name: "WhereClause", - pos: position{line: 184, col: 1, offset: 3446}, + pos: position{line: 184, col: 1, offset: 3559}, expr: &actionExpr{ - pos: position{line: 185, col: 4, offset: 3461}, + pos: position{line: 185, col: 4, offset: 3574}, run: (*parser).callonWhereClause1, expr: &seqExpr{ - pos: position{line: 185, col: 4, offset: 3461}, + pos: position{line: 185, col: 4, offset: 3574}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 185, col: 4, offset: 3461}, + pos: position{line: 185, col: 4, offset: 3574}, name: "WhereToken", }, &ruleRefExpr{ - pos: position{line: 185, col: 15, offset: 3472}, + pos: position{line: 185, col: 15, offset: 3585}, name: "_", }, &labeledExpr{ - pos: position{line: 185, col: 17, offset: 3474}, + pos: position{line: 185, col: 17, offset: 3587}, label: "e", expr: &ruleRefExpr{ - pos: position{line: 185, col: 19, offset: 3476}, + pos: position{line: 185, col: 19, offset: 3589}, name: "Expr", }, }, @@ -1056,65 +1058,65 @@ var g = &grammar{ }, { name: "OrderByClause", - pos: position{line: 188, col: 1, offset: 3528}, + pos: position{line: 188, col: 1, offset: 3645}, expr: &actionExpr{ - pos: position{line: 189, col: 4, offset: 3545}, + pos: position{line: 189, col: 4, offset: 3662}, run: (*parser).callonOrderByClause1, expr: &seqExpr{ - pos: position{line: 189, col: 4, offset: 3545}, + pos: position{line: 189, col: 4, offset: 3662}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 189, col: 4, offset: 3545}, + pos: position{line: 189, col: 4, offset: 3662}, name: "OrderToken", }, &ruleRefExpr{ - pos: position{line: 190, col: 2, offset: 3557}, + pos: position{line: 190, col: 2, offset: 3674}, name: "_", }, &ruleRefExpr{ - pos: position{line: 190, col: 4, offset: 3559}, + pos: position{line: 190, col: 4, offset: 3676}, name: "ByToken", }, &ruleRefExpr{ - pos: position{line: 191, col: 2, offset: 3568}, + pos: position{line: 191, col: 2, offset: 3685}, name: "_", }, &labeledExpr{ - pos: position{line: 191, col: 4, offset: 3570}, + pos: position{line: 191, col: 4, offset: 3687}, label: "f", expr: &ruleRefExpr{ - pos: position{line: 191, col: 6, offset: 3572}, + pos: position{line: 191, col: 6, offset: 3689}, name: "OrderColumn", }, }, &labeledExpr{ - pos: position{line: 192, col: 2, offset: 3585}, + pos: position{line: 192, col: 2, offset: 3702}, label: "fs", expr: &zeroOrMoreExpr{ - pos: position{line: 192, col: 5, offset: 3588}, + pos: position{line: 192, col: 5, offset: 3705}, expr: &actionExpr{ - pos: position{line: 192, col: 7, offset: 3590}, + pos: position{line: 192, col: 7, offset: 3707}, run: (*parser).callonOrderByClause11, expr: &seqExpr{ - pos: position{line: 192, col: 7, offset: 3590}, + pos: position{line: 192, col: 7, offset: 3707}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 192, col: 7, offset: 3590}, + pos: position{line: 192, col: 7, offset: 3707}, name: "_", }, &ruleRefExpr{ - pos: position{line: 192, col: 9, offset: 3592}, + pos: position{line: 192, col: 9, offset: 3709}, name: "SeparatorToken", }, &ruleRefExpr{ - pos: position{line: 192, col: 24, offset: 3607}, + pos: position{line: 192, col: 24, offset: 3724}, name: "_", }, &labeledExpr{ - pos: position{line: 192, col: 26, offset: 3609}, + pos: position{line: 192, col: 26, offset: 3726}, label: "s", expr: &ruleRefExpr{ - pos: position{line: 192, col: 28, offset: 3611}, + pos: position{line: 192, col: 28, offset: 3728}, name: "OrderColumn", }, }, @@ -1129,48 +1131,48 @@ var g = &grammar{ }, { name: "OrderColumn", - pos: position{line: 195, col: 1, offset: 3676}, + pos: position{line: 195, col: 1, offset: 3793}, expr: &actionExpr{ - pos: position{line: 196, col: 4, offset: 3691}, + pos: position{line: 196, col: 4, offset: 3808}, run: (*parser).callonOrderColumn1, expr: &seqExpr{ - pos: position{line: 196, col: 4, offset: 3691}, + pos: position{line: 196, col: 4, offset: 3808}, exprs: []interface{}{ &labeledExpr{ - pos: position{line: 196, col: 4, offset: 3691}, + pos: position{line: 196, col: 4, offset: 3808}, label: "i", expr: &ruleRefExpr{ - pos: position{line: 196, col: 6, offset: 3693}, + pos: position{line: 196, col: 6, offset: 3810}, name: "Expr", }, }, &labeledExpr{ - pos: position{line: 197, col: 2, offset: 3699}, + pos: position{line: 197, col: 2, offset: 3816}, label: "s", expr: &zeroOrOneExpr{ - pos: position{line: 197, col: 4, offset: 3701}, + pos: position{line: 197, col: 4, offset: 3818}, expr: &actionExpr{ - pos: position{line: 197, col: 6, offset: 3703}, + pos: position{line: 197, col: 6, offset: 3820}, run: (*parser).callonOrderColumn7, expr: &seqExpr{ - pos: position{line: 197, col: 6, offset: 3703}, + pos: position{line: 197, col: 6, offset: 3820}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 197, col: 6, offset: 3703}, + pos: position{line: 197, col: 6, offset: 3820}, name: "_", }, &labeledExpr{ - pos: position{line: 197, col: 8, offset: 3705}, + pos: position{line: 197, col: 8, offset: 3822}, label: "t", expr: &choiceExpr{ - pos: position{line: 197, col: 12, offset: 3709}, + pos: position{line: 197, col: 12, offset: 3826}, alternatives: []interface{}{ &ruleRefExpr{ - pos: position{line: 197, col: 12, offset: 3709}, + pos: position{line: 197, col: 12, offset: 3826}, name: "AscToken", }, &ruleRefExpr{ - pos: position{line: 197, col: 23, offset: 3720}, + pos: position{line: 197, col: 23, offset: 3837}, name: "DescToken", }, }, @@ -1182,40 +1184,40 @@ var g = &grammar{ }, }, &labeledExpr{ - pos: position{line: 198, col: 2, offset: 3754}, + pos: position{line: 198, col: 2, offset: 3871}, label: "n", expr: &zeroOrOneExpr{ - pos: position{line: 198, col: 4, offset: 3756}, + pos: position{line: 198, col: 4, offset: 3873}, expr: &actionExpr{ - pos: position{line: 198, col: 6, offset: 3758}, + pos: position{line: 198, col: 6, offset: 3875}, run: (*parser).callonOrderColumn16, expr: &seqExpr{ - pos: position{line: 198, col: 6, offset: 3758}, + pos: position{line: 198, col: 6, offset: 3875}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 198, col: 6, offset: 3758}, + pos: position{line: 198, col: 6, offset: 3875}, name: "_", }, &ruleRefExpr{ - pos: position{line: 198, col: 8, offset: 3760}, + pos: position{line: 198, col: 8, offset: 3877}, name: "NullsToken", }, &ruleRefExpr{ - pos: position{line: 198, col: 19, offset: 3771}, + pos: position{line: 198, col: 19, offset: 3888}, name: "_", }, &labeledExpr{ - pos: position{line: 198, col: 21, offset: 3773}, + pos: position{line: 198, col: 21, offset: 3890}, label: "l", expr: &choiceExpr{ - pos: position{line: 198, col: 25, offset: 3777}, + pos: position{line: 198, col: 25, offset: 3894}, alternatives: []interface{}{ &ruleRefExpr{ - pos: position{line: 198, col: 25, offset: 3777}, + pos: position{line: 198, col: 25, offset: 3894}, name: "LastToken", }, &ruleRefExpr{ - pos: position{line: 198, col: 37, offset: 3789}, + pos: position{line: 198, col: 37, offset: 3906}, name: "FirstToken", }, }, @@ -1232,65 +1234,65 @@ var g = &grammar{ }, { name: "GroupByClause", - pos: position{line: 207, col: 1, offset: 3988}, + pos: position{line: 207, col: 1, offset: 4112}, expr: &actionExpr{ - pos: position{line: 208, col: 4, offset: 4005}, + pos: position{line: 208, col: 4, offset: 4129}, run: (*parser).callonGroupByClause1, expr: &seqExpr{ - pos: position{line: 208, col: 4, offset: 4005}, + pos: position{line: 208, col: 4, offset: 4129}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 208, col: 4, offset: 4005}, + pos: position{line: 208, col: 4, offset: 4129}, name: "GroupToken", }, &ruleRefExpr{ - pos: position{line: 209, col: 2, offset: 4017}, + pos: position{line: 209, col: 2, offset: 4141}, name: "_", }, &ruleRefExpr{ - pos: position{line: 209, col: 4, offset: 4019}, + pos: position{line: 209, col: 4, offset: 4143}, name: "ByToken", }, &ruleRefExpr{ - pos: position{line: 210, col: 2, offset: 4028}, + pos: position{line: 210, col: 2, offset: 4152}, name: "_", }, &labeledExpr{ - pos: position{line: 210, col: 4, offset: 4030}, + pos: position{line: 210, col: 4, offset: 4154}, label: "i", expr: &ruleRefExpr{ - pos: position{line: 210, col: 6, offset: 4032}, + pos: position{line: 210, col: 6, offset: 4156}, name: "Expr", }, }, &labeledExpr{ - pos: position{line: 211, col: 2, offset: 4038}, + pos: position{line: 211, col: 2, offset: 4162}, label: "is", expr: &zeroOrMoreExpr{ - pos: position{line: 211, col: 5, offset: 4041}, + pos: position{line: 211, col: 5, offset: 4165}, expr: &actionExpr{ - pos: position{line: 211, col: 7, offset: 4043}, + pos: position{line: 211, col: 7, offset: 4167}, run: (*parser).callonGroupByClause11, expr: &seqExpr{ - pos: position{line: 211, col: 7, offset: 4043}, + pos: position{line: 211, col: 7, offset: 4167}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 211, col: 7, offset: 4043}, + pos: position{line: 211, col: 7, offset: 4167}, name: "_", }, &ruleRefExpr{ - pos: position{line: 211, col: 9, offset: 4045}, + pos: position{line: 211, col: 9, offset: 4169}, name: "SeparatorToken", }, &ruleRefExpr{ - pos: position{line: 211, col: 24, offset: 4060}, + pos: position{line: 211, col: 24, offset: 4184}, name: "_", }, &labeledExpr{ - pos: position{line: 211, col: 26, offset: 4062}, + pos: position{line: 211, col: 26, offset: 4186}, label: "s", expr: &ruleRefExpr{ - pos: position{line: 211, col: 28, offset: 4064}, + pos: position{line: 211, col: 28, offset: 4188}, name: "Expr", }, }, @@ -1305,26 +1307,26 @@ var g = &grammar{ }, { name: "OffsetClause", - pos: position{line: 214, col: 1, offset: 4168}, + pos: position{line: 214, col: 1, offset: 4300}, expr: &actionExpr{ - pos: position{line: 215, col: 4, offset: 4184}, + pos: position{line: 215, col: 4, offset: 4316}, run: (*parser).callonOffsetClause1, expr: &seqExpr{ - pos: position{line: 215, col: 4, offset: 4184}, + pos: position{line: 215, col: 4, offset: 4316}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 215, col: 4, offset: 4184}, + pos: position{line: 215, col: 4, offset: 4316}, name: "OffsetToken", }, &ruleRefExpr{ - pos: position{line: 215, col: 16, offset: 4196}, + pos: position{line: 215, col: 16, offset: 4328}, name: "_", }, &labeledExpr{ - pos: position{line: 215, col: 18, offset: 4198}, + pos: position{line: 215, col: 18, offset: 4330}, label: "i", expr: &ruleRefExpr{ - pos: position{line: 215, col: 20, offset: 4200}, + pos: position{line: 215, col: 20, offset: 4332}, name: "Integer", }, }, @@ -1334,26 +1336,26 @@ var g = &grammar{ }, { name: "LimitClause", - pos: position{line: 218, col: 1, offset: 4271}, + pos: position{line: 218, col: 1, offset: 4411}, expr: &actionExpr{ - pos: position{line: 219, col: 4, offset: 4286}, + pos: position{line: 219, col: 4, offset: 4426}, run: (*parser).callonLimitClause1, expr: &seqExpr{ - pos: position{line: 219, col: 4, offset: 4286}, + pos: position{line: 219, col: 4, offset: 4426}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 219, col: 4, offset: 4286}, + pos: position{line: 219, col: 4, offset: 4426}, name: "LimitToken", }, &ruleRefExpr{ - pos: position{line: 219, col: 15, offset: 4297}, + pos: position{line: 219, col: 15, offset: 4437}, name: "_", }, &labeledExpr{ - pos: position{line: 219, col: 17, offset: 4299}, + pos: position{line: 219, col: 17, offset: 4439}, label: "i", expr: &ruleRefExpr{ - pos: position{line: 219, col: 19, offset: 4301}, + pos: position{line: 219, col: 19, offset: 4441}, name: "Integer", }, }, @@ -1363,69 +1365,69 @@ var g = &grammar{ }, { name: "InsertWithColumnClause", - pos: position{line: 222, col: 1, offset: 4371}, + pos: position{line: 222, col: 1, offset: 4519}, expr: &actionExpr{ - pos: position{line: 223, col: 4, offset: 4397}, + pos: position{line: 223, col: 4, offset: 4545}, run: (*parser).callonInsertWithColumnClause1, expr: &seqExpr{ - pos: position{line: 223, col: 4, offset: 4397}, + pos: position{line: 223, col: 4, offset: 4545}, exprs: []interface{}{ &labeledExpr{ - pos: position{line: 223, col: 4, offset: 4397}, + pos: position{line: 223, col: 4, offset: 4545}, label: "cs", expr: &zeroOrOneExpr{ - pos: position{line: 223, col: 7, offset: 4400}, + pos: position{line: 223, col: 7, offset: 4548}, expr: &actionExpr{ - pos: position{line: 223, col: 9, offset: 4402}, + pos: position{line: 223, col: 9, offset: 4550}, run: (*parser).callonInsertWithColumnClause5, expr: &seqExpr{ - pos: position{line: 223, col: 9, offset: 4402}, + pos: position{line: 223, col: 9, offset: 4550}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 223, col: 9, offset: 4402}, + pos: position{line: 223, col: 9, offset: 4550}, val: "(", ignoreCase: false, }, &ruleRefExpr{ - pos: position{line: 224, col: 4, offset: 4409}, + pos: position{line: 224, col: 4, offset: 4557}, name: "_", }, &labeledExpr{ - pos: position{line: 224, col: 6, offset: 4411}, + pos: position{line: 224, col: 6, offset: 4559}, label: "f", expr: &ruleRefExpr{ - pos: position{line: 224, col: 8, offset: 4413}, + pos: position{line: 224, col: 8, offset: 4561}, name: "Identifier", }, }, &labeledExpr{ - pos: position{line: 225, col: 4, offset: 4427}, + pos: position{line: 225, col: 4, offset: 4575}, label: "fs", expr: &zeroOrMoreExpr{ - pos: position{line: 225, col: 7, offset: 4430}, + pos: position{line: 225, col: 7, offset: 4578}, expr: &actionExpr{ - pos: position{line: 225, col: 9, offset: 4432}, + pos: position{line: 225, col: 9, offset: 4580}, run: (*parser).callonInsertWithColumnClause13, expr: &seqExpr{ - pos: position{line: 225, col: 9, offset: 4432}, + pos: position{line: 225, col: 9, offset: 4580}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 225, col: 9, offset: 4432}, + pos: position{line: 225, col: 9, offset: 4580}, name: "_", }, &ruleRefExpr{ - pos: position{line: 225, col: 11, offset: 4434}, + pos: position{line: 225, col: 11, offset: 4582}, name: "SeparatorToken", }, &ruleRefExpr{ - pos: position{line: 225, col: 26, offset: 4449}, + pos: position{line: 225, col: 26, offset: 4597}, name: "_", }, &labeledExpr{ - pos: position{line: 225, col: 28, offset: 4451}, + pos: position{line: 225, col: 28, offset: 4599}, label: "x", expr: &ruleRefExpr{ - pos: position{line: 225, col: 30, offset: 4453}, + pos: position{line: 225, col: 30, offset: 4601}, name: "Identifier", }, }, @@ -1435,16 +1437,16 @@ var g = &grammar{ }, }, &ruleRefExpr{ - pos: position{line: 226, col: 4, offset: 4488}, + pos: position{line: 226, col: 4, offset: 4636}, name: "_", }, &litMatcher{ - pos: position{line: 226, col: 6, offset: 4490}, + pos: position{line: 226, col: 6, offset: 4638}, val: ")", ignoreCase: false, }, &ruleRefExpr{ - pos: position{line: 227, col: 4, offset: 4497}, + pos: position{line: 227, col: 4, offset: 4645}, name: "_", }, }, @@ -1453,49 +1455,49 @@ var g = &grammar{ }, }, &ruleRefExpr{ - pos: position{line: 229, col: 3, offset: 4537}, + pos: position{line: 229, col: 3, offset: 4685}, name: "ValuesToken", }, &ruleRefExpr{ - pos: position{line: 230, col: 2, offset: 4550}, + pos: position{line: 230, col: 2, offset: 4698}, name: "_", }, &labeledExpr{ - pos: position{line: 230, col: 4, offset: 4552}, + pos: position{line: 230, col: 4, offset: 4700}, label: "v", expr: &ruleRefExpr{ - pos: position{line: 230, col: 6, offset: 4554}, + pos: position{line: 230, col: 6, offset: 4702}, name: "InsertValue", }, }, &labeledExpr{ - pos: position{line: 231, col: 2, offset: 4567}, + pos: position{line: 231, col: 2, offset: 4715}, label: "vs", expr: &zeroOrMoreExpr{ - pos: position{line: 231, col: 5, offset: 4570}, + pos: position{line: 231, col: 5, offset: 4718}, expr: &actionExpr{ - pos: position{line: 231, col: 7, offset: 4572}, + pos: position{line: 231, col: 7, offset: 4720}, run: (*parser).callonInsertWithColumnClause29, expr: &seqExpr{ - pos: position{line: 231, col: 7, offset: 4572}, + pos: position{line: 231, col: 7, offset: 4720}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 231, col: 7, offset: 4572}, + pos: position{line: 231, col: 7, offset: 4720}, name: "_", }, &ruleRefExpr{ - pos: position{line: 231, col: 9, offset: 4574}, + pos: position{line: 231, col: 9, offset: 4722}, name: "SeparatorToken", }, &ruleRefExpr{ - pos: position{line: 231, col: 24, offset: 4589}, + pos: position{line: 231, col: 24, offset: 4737}, name: "_", }, &labeledExpr{ - pos: position{line: 231, col: 26, offset: 4591}, + pos: position{line: 231, col: 26, offset: 4739}, label: "y", expr: &ruleRefExpr{ - pos: position{line: 231, col: 28, offset: 4593}, + pos: position{line: 231, col: 28, offset: 4741}, name: "InsertValue", }, }, @@ -1510,23 +1512,23 @@ var g = &grammar{ }, { name: "InsertWithDefaultClause", - pos: position{line: 239, col: 1, offset: 4724}, + pos: position{line: 239, col: 1, offset: 4876}, expr: &actionExpr{ - pos: position{line: 240, col: 4, offset: 4751}, + pos: position{line: 240, col: 4, offset: 4903}, run: (*parser).callonInsertWithDefaultClause1, expr: &seqExpr{ - pos: position{line: 240, col: 4, offset: 4751}, + pos: position{line: 240, col: 4, offset: 4903}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 240, col: 4, offset: 4751}, + pos: position{line: 240, col: 4, offset: 4903}, name: "DefaultToken", }, &ruleRefExpr{ - pos: position{line: 240, col: 17, offset: 4764}, + pos: position{line: 240, col: 17, offset: 4916}, name: "_", }, &ruleRefExpr{ - pos: position{line: 240, col: 19, offset: 4766}, + pos: position{line: 240, col: 19, offset: 4918}, name: "ValuesToken", }, }, @@ -1535,23 +1537,23 @@ var g = &grammar{ }, { name: "PrimaryKeyClause", - pos: position{line: 243, col: 1, offset: 4825}, + pos: position{line: 243, col: 1, offset: 4981}, expr: &actionExpr{ - pos: position{line: 244, col: 4, offset: 4845}, + pos: position{line: 244, col: 4, offset: 5001}, run: (*parser).callonPrimaryKeyClause1, expr: &seqExpr{ - pos: position{line: 244, col: 4, offset: 4845}, + pos: position{line: 244, col: 4, offset: 5001}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 244, col: 4, offset: 4845}, + pos: position{line: 244, col: 4, offset: 5001}, name: "PrimaryToken", }, &ruleRefExpr{ - pos: position{line: 244, col: 17, offset: 4858}, + pos: position{line: 244, col: 17, offset: 5014}, name: "_", }, &ruleRefExpr{ - pos: position{line: 244, col: 19, offset: 4860}, + pos: position{line: 244, col: 19, offset: 5016}, name: "KeyToken", }, }, @@ -1560,23 +1562,23 @@ var g = &grammar{ }, { name: "NotNullClause", - pos: position{line: 247, col: 1, offset: 4906}, + pos: position{line: 247, col: 1, offset: 5066}, expr: &actionExpr{ - pos: position{line: 248, col: 4, offset: 4923}, + pos: position{line: 248, col: 4, offset: 5083}, run: (*parser).callonNotNullClause1, expr: &seqExpr{ - pos: position{line: 248, col: 4, offset: 4923}, + pos: position{line: 248, col: 4, offset: 5083}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 248, col: 4, offset: 4923}, + pos: position{line: 248, col: 4, offset: 5083}, name: "NotToken", }, &ruleRefExpr{ - pos: position{line: 248, col: 13, offset: 4932}, + pos: position{line: 248, col: 13, offset: 5092}, name: "_", }, &ruleRefExpr{ - pos: position{line: 248, col: 15, offset: 4934}, + pos: position{line: 248, col: 15, offset: 5094}, name: "NullToken", }, }, @@ -1585,38 +1587,38 @@ var g = &grammar{ }, { name: "UniqueClause", - pos: position{line: 251, col: 1, offset: 4981}, + pos: position{line: 251, col: 1, offset: 5145}, expr: &actionExpr{ - pos: position{line: 252, col: 4, offset: 4997}, + pos: position{line: 252, col: 4, offset: 5161}, run: (*parser).callonUniqueClause1, expr: &ruleRefExpr{ - pos: position{line: 252, col: 4, offset: 4997}, + pos: position{line: 252, col: 4, offset: 5161}, name: "UniqueToken", }, }, }, { name: "DefaultClause", - pos: position{line: 255, col: 1, offset: 5045}, + pos: position{line: 255, col: 1, offset: 5213}, expr: &actionExpr{ - pos: position{line: 256, col: 4, offset: 5062}, + pos: position{line: 256, col: 4, offset: 5230}, run: (*parser).callonDefaultClause1, expr: &seqExpr{ - pos: position{line: 256, col: 4, offset: 5062}, + pos: position{line: 256, col: 4, offset: 5230}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 256, col: 4, offset: 5062}, + pos: position{line: 256, col: 4, offset: 5230}, name: "DefaultToken", }, &ruleRefExpr{ - pos: position{line: 256, col: 17, offset: 5075}, + pos: position{line: 256, col: 17, offset: 5243}, name: "_", }, &labeledExpr{ - pos: position{line: 256, col: 19, offset: 5077}, + pos: position{line: 256, col: 19, offset: 5245}, label: "e", expr: &ruleRefExpr{ - pos: position{line: 256, col: 21, offset: 5079}, + pos: position{line: 256, col: 21, offset: 5247}, name: "Expr", }, }, @@ -1626,56 +1628,56 @@ var g = &grammar{ }, { name: "ForeignClause", - pos: position{line: 259, col: 1, offset: 5129}, + pos: position{line: 259, col: 1, offset: 5301}, expr: &actionExpr{ - pos: position{line: 260, col: 4, offset: 5146}, + pos: position{line: 260, col: 4, offset: 5318}, run: (*parser).callonForeignClause1, expr: &seqExpr{ - pos: position{line: 260, col: 4, offset: 5146}, + pos: position{line: 260, col: 4, offset: 5318}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 260, col: 4, offset: 5146}, + pos: position{line: 260, col: 4, offset: 5318}, name: "ReferencesToken", }, &ruleRefExpr{ - pos: position{line: 260, col: 20, offset: 5162}, + pos: position{line: 260, col: 20, offset: 5334}, name: "_", }, &labeledExpr{ - pos: position{line: 260, col: 22, offset: 5164}, + pos: position{line: 260, col: 22, offset: 5336}, label: "t", expr: &ruleRefExpr{ - pos: position{line: 260, col: 24, offset: 5166}, + pos: position{line: 260, col: 24, offset: 5338}, name: "Identifier", }, }, &ruleRefExpr{ - pos: position{line: 260, col: 35, offset: 5177}, + pos: position{line: 260, col: 35, offset: 5349}, name: "_", }, &litMatcher{ - pos: position{line: 260, col: 37, offset: 5179}, + pos: position{line: 260, col: 37, offset: 5351}, val: "(", ignoreCase: false, }, &ruleRefExpr{ - pos: position{line: 260, col: 41, offset: 5183}, + pos: position{line: 260, col: 41, offset: 5355}, name: "_", }, &labeledExpr{ - pos: position{line: 260, col: 43, offset: 5185}, + pos: position{line: 260, col: 43, offset: 5357}, label: "f", expr: &ruleRefExpr{ - pos: position{line: 260, col: 45, offset: 5187}, + pos: position{line: 260, col: 45, offset: 5359}, name: "Identifier", }, }, &ruleRefExpr{ - pos: position{line: 260, col: 56, offset: 5198}, + pos: position{line: 260, col: 56, offset: 5370}, name: "_", }, &litMatcher{ - pos: position{line: 260, col: 58, offset: 5200}, + pos: position{line: 260, col: 58, offset: 5372}, val: ")", ignoreCase: false, }, @@ -1685,48 +1687,48 @@ var g = &grammar{ }, { name: "AutoincrementClause", - pos: position{line: 268, col: 1, offset: 5304}, + pos: position{line: 268, col: 1, offset: 5488}, expr: &actionExpr{ - pos: position{line: 269, col: 4, offset: 5327}, + pos: position{line: 269, col: 4, offset: 5511}, run: (*parser).callonAutoincrementClause1, expr: &ruleRefExpr{ - pos: position{line: 269, col: 4, offset: 5327}, + pos: position{line: 269, col: 4, offset: 5511}, name: "AutoincrementToken", }, }, }, { name: "Expr", - pos: position{line: 273, col: 1, offset: 5406}, + pos: position{line: 273, col: 1, offset: 5595}, expr: &ruleRefExpr{ - pos: position{line: 274, col: 4, offset: 5414}, + pos: position{line: 274, col: 4, offset: 5603}, name: "LogicExpr", }, }, { name: "ExprWithDefault", - pos: position{line: 276, col: 1, offset: 5425}, + pos: position{line: 276, col: 1, offset: 5614}, expr: &choiceExpr{ - pos: position{line: 277, col: 4, offset: 5444}, + pos: position{line: 277, col: 4, offset: 5633}, alternatives: []interface{}{ &actionExpr{ - pos: position{line: 277, col: 4, offset: 5444}, + pos: position{line: 277, col: 4, offset: 5633}, run: (*parser).callonExprWithDefault2, expr: &seqExpr{ - pos: position{line: 277, col: 4, offset: 5444}, + pos: position{line: 277, col: 4, offset: 5633}, exprs: []interface{}{ &andExpr{ - pos: position{line: 277, col: 4, offset: 5444}, + pos: position{line: 277, col: 4, offset: 5633}, expr: &ruleRefExpr{ - pos: position{line: 277, col: 6, offset: 5446}, + pos: position{line: 277, col: 6, offset: 5635}, name: "DefaultLiteral", }, }, &labeledExpr{ - pos: position{line: 277, col: 22, offset: 5462}, + pos: position{line: 277, col: 22, offset: 5651}, label: "d", expr: &ruleRefExpr{ - pos: position{line: 277, col: 24, offset: 5464}, + pos: position{line: 277, col: 24, offset: 5653}, name: "DefaultLiteral", }, }, @@ -1734,7 +1736,7 @@ var g = &grammar{ }, }, &ruleRefExpr{ - pos: position{line: 278, col: 4, offset: 5500}, + pos: position{line: 278, col: 4, offset: 5689}, name: "Expr", }, }, @@ -1742,61 +1744,61 @@ var g = &grammar{ }, { name: "LogicExpr", - pos: position{line: 280, col: 1, offset: 5506}, + pos: position{line: 280, col: 1, offset: 5695}, expr: &ruleRefExpr{ - pos: position{line: 281, col: 4, offset: 5519}, + pos: position{line: 281, col: 4, offset: 5708}, name: "LogicExpr4", }, }, { name: "LogicExpr4", - pos: position{line: 283, col: 1, offset: 5531}, + pos: position{line: 283, col: 1, offset: 5720}, expr: &actionExpr{ - pos: position{line: 284, col: 4, offset: 5545}, + pos: position{line: 284, col: 4, offset: 5734}, run: (*parser).callonLogicExpr41, expr: &seqExpr{ - pos: position{line: 284, col: 4, offset: 5545}, + pos: position{line: 284, col: 4, offset: 5734}, exprs: []interface{}{ &labeledExpr{ - pos: position{line: 284, col: 4, offset: 5545}, + pos: position{line: 284, col: 4, offset: 5734}, label: "o", expr: &ruleRefExpr{ - pos: position{line: 284, col: 6, offset: 5547}, + pos: position{line: 284, col: 6, offset: 5736}, name: "LogicExpr3", }, }, &labeledExpr{ - pos: position{line: 285, col: 3, offset: 5560}, + pos: position{line: 285, col: 3, offset: 5749}, label: "os", expr: &zeroOrMoreExpr{ - pos: position{line: 285, col: 6, offset: 5563}, + pos: position{line: 285, col: 6, offset: 5752}, expr: &actionExpr{ - pos: position{line: 285, col: 8, offset: 5565}, + pos: position{line: 285, col: 8, offset: 5754}, run: (*parser).callonLogicExpr47, expr: &seqExpr{ - pos: position{line: 285, col: 8, offset: 5565}, + pos: position{line: 285, col: 8, offset: 5754}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 285, col: 8, offset: 5565}, + pos: position{line: 285, col: 8, offset: 5754}, name: "_", }, &labeledExpr{ - pos: position{line: 285, col: 10, offset: 5567}, + pos: position{line: 285, col: 10, offset: 5756}, label: "op", expr: &ruleRefExpr{ - pos: position{line: 285, col: 13, offset: 5570}, + pos: position{line: 285, col: 13, offset: 5759}, name: "OrOperator", }, }, &ruleRefExpr{ - pos: position{line: 285, col: 24, offset: 5581}, + pos: position{line: 285, col: 24, offset: 5770}, name: "_", }, &labeledExpr{ - pos: position{line: 285, col: 26, offset: 5583}, + pos: position{line: 285, col: 26, offset: 5772}, label: "s", expr: &ruleRefExpr{ - pos: position{line: 285, col: 28, offset: 5585}, + pos: position{line: 285, col: 28, offset: 5774}, name: "LogicExpr3", }, }, @@ -1811,53 +1813,53 @@ var g = &grammar{ }, { name: "LogicExpr3", - pos: position{line: 288, col: 1, offset: 5678}, + pos: position{line: 288, col: 1, offset: 5867}, expr: &actionExpr{ - pos: position{line: 289, col: 4, offset: 5692}, + pos: position{line: 289, col: 4, offset: 5881}, run: (*parser).callonLogicExpr31, expr: &seqExpr{ - pos: position{line: 289, col: 4, offset: 5692}, + pos: position{line: 289, col: 4, offset: 5881}, exprs: []interface{}{ &labeledExpr{ - pos: position{line: 289, col: 4, offset: 5692}, + pos: position{line: 289, col: 4, offset: 5881}, label: "o", expr: &ruleRefExpr{ - pos: position{line: 289, col: 6, offset: 5694}, + pos: position{line: 289, col: 6, offset: 5883}, name: "LogicExpr2", }, }, &labeledExpr{ - pos: position{line: 290, col: 3, offset: 5707}, + pos: position{line: 290, col: 3, offset: 5896}, label: "os", expr: &zeroOrMoreExpr{ - pos: position{line: 290, col: 6, offset: 5710}, + pos: position{line: 290, col: 6, offset: 5899}, expr: &actionExpr{ - pos: position{line: 290, col: 8, offset: 5712}, + pos: position{line: 290, col: 8, offset: 5901}, run: (*parser).callonLogicExpr37, expr: &seqExpr{ - pos: position{line: 290, col: 8, offset: 5712}, + pos: position{line: 290, col: 8, offset: 5901}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 290, col: 8, offset: 5712}, + pos: position{line: 290, col: 8, offset: 5901}, name: "_", }, &labeledExpr{ - pos: position{line: 290, col: 10, offset: 5714}, + pos: position{line: 290, col: 10, offset: 5903}, label: "op", expr: &ruleRefExpr{ - pos: position{line: 290, col: 13, offset: 5717}, + pos: position{line: 290, col: 13, offset: 5906}, name: "AndOperator", }, }, &ruleRefExpr{ - pos: position{line: 290, col: 25, offset: 5729}, + pos: position{line: 290, col: 25, offset: 5918}, name: "_", }, &labeledExpr{ - pos: position{line: 290, col: 27, offset: 5731}, + pos: position{line: 290, col: 27, offset: 5920}, label: "s", expr: &ruleRefExpr{ - pos: position{line: 290, col: 29, offset: 5733}, + pos: position{line: 290, col: 29, offset: 5922}, name: "LogicExpr2", }, }, @@ -1872,33 +1874,33 @@ var g = &grammar{ }, { name: "LogicExpr2", - pos: position{line: 293, col: 1, offset: 5826}, + pos: position{line: 293, col: 1, offset: 6015}, expr: &choiceExpr{ - pos: position{line: 294, col: 4, offset: 5840}, + pos: position{line: 294, col: 4, offset: 6029}, alternatives: []interface{}{ &actionExpr{ - pos: position{line: 294, col: 4, offset: 5840}, + pos: position{line: 294, col: 4, offset: 6029}, run: (*parser).callonLogicExpr22, expr: &seqExpr{ - pos: position{line: 294, col: 4, offset: 5840}, + pos: position{line: 294, col: 4, offset: 6029}, exprs: []interface{}{ &labeledExpr{ - pos: position{line: 294, col: 4, offset: 5840}, + pos: position{line: 294, col: 4, offset: 6029}, label: "op", expr: &ruleRefExpr{ - pos: position{line: 294, col: 7, offset: 5843}, + pos: position{line: 294, col: 7, offset: 6032}, name: "NotOperator", }, }, &ruleRefExpr{ - pos: position{line: 294, col: 19, offset: 5855}, + pos: position{line: 294, col: 19, offset: 6044}, name: "_", }, &labeledExpr{ - pos: position{line: 294, col: 21, offset: 5857}, + pos: position{line: 294, col: 21, offset: 6046}, label: "s", expr: &ruleRefExpr{ - pos: position{line: 294, col: 23, offset: 5859}, + pos: position{line: 294, col: 23, offset: 6048}, name: "LogicExpr2", }, }, @@ -1906,7 +1908,7 @@ var g = &grammar{ }, }, &ruleRefExpr{ - pos: position{line: 296, col: 4, offset: 5909}, + pos: position{line: 296, col: 4, offset: 6098}, name: "LogicExpr1", }, }, @@ -1914,41 +1916,41 @@ var g = &grammar{ }, { name: "LogicExpr1", - pos: position{line: 298, col: 1, offset: 5921}, + pos: position{line: 298, col: 1, offset: 6110}, expr: &actionExpr{ - pos: position{line: 299, col: 4, offset: 5935}, + pos: position{line: 299, col: 4, offset: 6124}, run: (*parser).callonLogicExpr11, expr: &seqExpr{ - pos: position{line: 299, col: 4, offset: 5935}, + pos: position{line: 299, col: 4, offset: 6124}, exprs: []interface{}{ &labeledExpr{ - pos: position{line: 299, col: 4, offset: 5935}, + pos: position{line: 299, col: 4, offset: 6124}, label: "o", expr: &ruleRefExpr{ - pos: position{line: 299, col: 6, offset: 5937}, + pos: position{line: 299, col: 6, offset: 6126}, name: "ArithmeticExpr", }, }, &labeledExpr{ - pos: position{line: 299, col: 21, offset: 5952}, + pos: position{line: 299, col: 21, offset: 6141}, label: "os", expr: &zeroOrMoreExpr{ - pos: position{line: 299, col: 24, offset: 5955}, + pos: position{line: 299, col: 24, offset: 6144}, expr: &actionExpr{ - pos: position{line: 299, col: 26, offset: 5957}, + pos: position{line: 299, col: 26, offset: 6146}, run: (*parser).callonLogicExpr17, expr: &seqExpr{ - pos: position{line: 299, col: 26, offset: 5957}, + pos: position{line: 299, col: 26, offset: 6146}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 299, col: 26, offset: 5957}, + pos: position{line: 299, col: 26, offset: 6146}, name: "_", }, &labeledExpr{ - pos: position{line: 299, col: 28, offset: 5959}, + pos: position{line: 299, col: 28, offset: 6148}, label: "l", expr: &ruleRefExpr{ - pos: position{line: 299, col: 30, offset: 5961}, + pos: position{line: 299, col: 30, offset: 6150}, name: "LogicExpr1Op", }, }, @@ -1963,24 +1965,24 @@ var g = &grammar{ }, { name: "LogicExpr1Op", - pos: position{line: 302, col: 1, offset: 6038}, + pos: position{line: 302, col: 1, offset: 6227}, expr: &choiceExpr{ - pos: position{line: 303, col: 4, offset: 6054}, + pos: position{line: 303, col: 4, offset: 6243}, alternatives: []interface{}{ &ruleRefExpr{ - pos: position{line: 303, col: 4, offset: 6054}, + pos: position{line: 303, col: 4, offset: 6243}, name: "LogicExpr1In", }, &ruleRefExpr{ - pos: position{line: 304, col: 4, offset: 6070}, + pos: position{line: 304, col: 4, offset: 6259}, name: "LogicExpr1Null", }, &ruleRefExpr{ - pos: position{line: 305, col: 4, offset: 6088}, + pos: position{line: 305, col: 4, offset: 6277}, name: "LogicExpr1Like", }, &ruleRefExpr{ - pos: position{line: 306, col: 4, offset: 6106}, + pos: position{line: 306, col: 4, offset: 6295}, name: "LogicExpr1Cmp", }, }, @@ -1988,34 +1990,34 @@ var g = &grammar{ }, { name: "LogicExpr1In", - pos: position{line: 308, col: 1, offset: 6121}, + pos: position{line: 308, col: 1, offset: 6310}, expr: &actionExpr{ - pos: position{line: 309, col: 4, offset: 6137}, + pos: position{line: 309, col: 4, offset: 6326}, run: (*parser).callonLogicExpr1In1, expr: &seqExpr{ - pos: position{line: 309, col: 4, offset: 6137}, + pos: position{line: 309, col: 4, offset: 6326}, exprs: []interface{}{ &labeledExpr{ - pos: position{line: 309, col: 4, offset: 6137}, + pos: position{line: 309, col: 4, offset: 6326}, label: "n", expr: &zeroOrOneExpr{ - pos: position{line: 309, col: 6, offset: 6139}, + pos: position{line: 309, col: 6, offset: 6328}, expr: &actionExpr{ - pos: position{line: 309, col: 8, offset: 6141}, + pos: position{line: 309, col: 8, offset: 6330}, run: (*parser).callonLogicExpr1In5, expr: &seqExpr{ - pos: position{line: 309, col: 8, offset: 6141}, + pos: position{line: 309, col: 8, offset: 6330}, exprs: []interface{}{ &labeledExpr{ - pos: position{line: 309, col: 8, offset: 6141}, + pos: position{line: 309, col: 8, offset: 6330}, label: "t", expr: &ruleRefExpr{ - pos: position{line: 309, col: 10, offset: 6143}, + pos: position{line: 309, col: 10, offset: 6332}, name: "NotOperator", }, }, &ruleRefExpr{ - pos: position{line: 309, col: 22, offset: 6155}, + pos: position{line: 309, col: 22, offset: 6344}, name: "_", }, }, @@ -2024,36 +2026,36 @@ var g = &grammar{ }, }, &ruleRefExpr{ - pos: position{line: 309, col: 45, offset: 6178}, + pos: position{line: 309, col: 45, offset: 6367}, name: "InToken", }, &ruleRefExpr{ - pos: position{line: 309, col: 53, offset: 6186}, + pos: position{line: 309, col: 53, offset: 6375}, name: "_", }, &litMatcher{ - pos: position{line: 309, col: 55, offset: 6188}, + pos: position{line: 309, col: 55, offset: 6377}, val: "(", ignoreCase: false, }, &ruleRefExpr{ - pos: position{line: 309, col: 59, offset: 6192}, + pos: position{line: 309, col: 59, offset: 6381}, name: "_", }, &labeledExpr{ - pos: position{line: 309, col: 61, offset: 6194}, + pos: position{line: 309, col: 61, offset: 6383}, label: "s", expr: &ruleRefExpr{ - pos: position{line: 309, col: 63, offset: 6196}, + pos: position{line: 309, col: 63, offset: 6385}, name: "MultiExpr", }, }, &ruleRefExpr{ - pos: position{line: 309, col: 73, offset: 6206}, + pos: position{line: 309, col: 73, offset: 6395}, name: "_", }, &litMatcher{ - pos: position{line: 309, col: 75, offset: 6208}, + pos: position{line: 309, col: 75, offset: 6397}, val: ")", ignoreCase: false, }, @@ -2063,37 +2065,37 @@ var g = &grammar{ }, { name: "LogicExpr1Null", - pos: position{line: 318, col: 1, offset: 6326}, + pos: position{line: 318, col: 1, offset: 6519}, expr: &actionExpr{ - pos: position{line: 319, col: 4, offset: 6344}, + pos: position{line: 319, col: 4, offset: 6537}, run: (*parser).callonLogicExpr1Null1, expr: &seqExpr{ - pos: position{line: 319, col: 4, offset: 6344}, + pos: position{line: 319, col: 4, offset: 6537}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 319, col: 4, offset: 6344}, + pos: position{line: 319, col: 4, offset: 6537}, name: "IsToken", }, &labeledExpr{ - pos: position{line: 319, col: 12, offset: 6352}, + pos: position{line: 319, col: 12, offset: 6545}, label: "n", expr: &zeroOrOneExpr{ - pos: position{line: 319, col: 14, offset: 6354}, + pos: position{line: 319, col: 14, offset: 6547}, expr: &actionExpr{ - pos: position{line: 319, col: 16, offset: 6356}, + pos: position{line: 319, col: 16, offset: 6549}, run: (*parser).callonLogicExpr1Null6, expr: &seqExpr{ - pos: position{line: 319, col: 16, offset: 6356}, + pos: position{line: 319, col: 16, offset: 6549}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 319, col: 16, offset: 6356}, + pos: position{line: 319, col: 16, offset: 6549}, name: "_", }, &labeledExpr{ - pos: position{line: 319, col: 18, offset: 6358}, + pos: position{line: 319, col: 18, offset: 6551}, label: "t", expr: &ruleRefExpr{ - pos: position{line: 319, col: 20, offset: 6360}, + pos: position{line: 319, col: 20, offset: 6553}, name: "NotOperator", }, }, @@ -2103,11 +2105,11 @@ var g = &grammar{ }, }, &ruleRefExpr{ - pos: position{line: 319, col: 53, offset: 6393}, + pos: position{line: 319, col: 53, offset: 6586}, name: "_", }, &ruleRefExpr{ - pos: position{line: 319, col: 55, offset: 6395}, + pos: position{line: 319, col: 55, offset: 6588}, name: "NullToken", }, }, @@ -2116,34 +2118,34 @@ var g = &grammar{ }, { name: "LogicExpr1Like", - pos: position{line: 328, col: 1, offset: 6533}, + pos: position{line: 328, col: 1, offset: 6734}, expr: &actionExpr{ - pos: position{line: 329, col: 4, offset: 6551}, + pos: position{line: 329, col: 4, offset: 6752}, run: (*parser).callonLogicExpr1Like1, expr: &seqExpr{ - pos: position{line: 329, col: 4, offset: 6551}, + pos: position{line: 329, col: 4, offset: 6752}, exprs: []interface{}{ &labeledExpr{ - pos: position{line: 329, col: 4, offset: 6551}, + pos: position{line: 329, col: 4, offset: 6752}, label: "n", expr: &zeroOrOneExpr{ - pos: position{line: 329, col: 6, offset: 6553}, + pos: position{line: 329, col: 6, offset: 6754}, expr: &actionExpr{ - pos: position{line: 329, col: 8, offset: 6555}, + pos: position{line: 329, col: 8, offset: 6756}, run: (*parser).callonLogicExpr1Like5, expr: &seqExpr{ - pos: position{line: 329, col: 8, offset: 6555}, + pos: position{line: 329, col: 8, offset: 6756}, exprs: []interface{}{ &labeledExpr{ - pos: position{line: 329, col: 8, offset: 6555}, + pos: position{line: 329, col: 8, offset: 6756}, label: "t", expr: &ruleRefExpr{ - pos: position{line: 329, col: 10, offset: 6557}, + pos: position{line: 329, col: 10, offset: 6758}, name: "NotOperator", }, }, &ruleRefExpr{ - pos: position{line: 329, col: 22, offset: 6569}, + pos: position{line: 329, col: 22, offset: 6770}, name: "_", }, }, @@ -2152,18 +2154,18 @@ var g = &grammar{ }, }, &ruleRefExpr{ - pos: position{line: 329, col: 45, offset: 6592}, + pos: position{line: 329, col: 45, offset: 6793}, name: "LikeToken", }, &ruleRefExpr{ - pos: position{line: 329, col: 55, offset: 6602}, + pos: position{line: 329, col: 55, offset: 6803}, name: "_", }, &labeledExpr{ - pos: position{line: 329, col: 57, offset: 6604}, + pos: position{line: 329, col: 57, offset: 6805}, label: "s", expr: &ruleRefExpr{ - pos: position{line: 329, col: 59, offset: 6606}, + pos: position{line: 329, col: 59, offset: 6807}, name: "Expr", }, }, @@ -2173,30 +2175,30 @@ var g = &grammar{ }, { name: "LogicExpr1Cmp", - pos: position{line: 338, col: 1, offset: 6727}, + pos: position{line: 338, col: 1, offset: 6932}, expr: &actionExpr{ - pos: position{line: 339, col: 4, offset: 6744}, + pos: position{line: 339, col: 4, offset: 6949}, run: (*parser).callonLogicExpr1Cmp1, expr: &seqExpr{ - pos: position{line: 339, col: 4, offset: 6744}, + pos: position{line: 339, col: 4, offset: 6949}, exprs: []interface{}{ &labeledExpr{ - pos: position{line: 339, col: 4, offset: 6744}, + pos: position{line: 339, col: 4, offset: 6949}, label: "op", expr: &ruleRefExpr{ - pos: position{line: 339, col: 7, offset: 6747}, + pos: position{line: 339, col: 7, offset: 6952}, name: "CmpOperator", }, }, &ruleRefExpr{ - pos: position{line: 339, col: 19, offset: 6759}, + pos: position{line: 339, col: 19, offset: 6964}, name: "_", }, &labeledExpr{ - pos: position{line: 339, col: 21, offset: 6761}, + pos: position{line: 339, col: 21, offset: 6966}, label: "s", expr: &ruleRefExpr{ - pos: position{line: 339, col: 23, offset: 6763}, + pos: position{line: 339, col: 23, offset: 6968}, name: "ArithmeticExpr", }, }, @@ -2206,61 +2208,61 @@ var g = &grammar{ }, { name: "ArithmeticExpr", - pos: position{line: 342, col: 1, offset: 6815}, + pos: position{line: 342, col: 1, offset: 7020}, expr: &ruleRefExpr{ - pos: position{line: 343, col: 4, offset: 6833}, + pos: position{line: 343, col: 4, offset: 7038}, name: "ArithmeticExpr3", }, }, { name: "ArithmeticExpr3", - pos: position{line: 345, col: 1, offset: 6850}, + pos: position{line: 345, col: 1, offset: 7055}, expr: &actionExpr{ - pos: position{line: 346, col: 4, offset: 6869}, + pos: position{line: 346, col: 4, offset: 7074}, run: (*parser).callonArithmeticExpr31, expr: &seqExpr{ - pos: position{line: 346, col: 4, offset: 6869}, + pos: position{line: 346, col: 4, offset: 7074}, exprs: []interface{}{ &labeledExpr{ - pos: position{line: 346, col: 4, offset: 6869}, + pos: position{line: 346, col: 4, offset: 7074}, label: "o", expr: &ruleRefExpr{ - pos: position{line: 346, col: 6, offset: 6871}, + pos: position{line: 346, col: 6, offset: 7076}, name: "ArithmeticExpr2", }, }, &labeledExpr{ - pos: position{line: 346, col: 22, offset: 6887}, + pos: position{line: 346, col: 22, offset: 7092}, label: "os", expr: &zeroOrMoreExpr{ - pos: position{line: 346, col: 25, offset: 6890}, + pos: position{line: 346, col: 25, offset: 7095}, expr: &actionExpr{ - pos: position{line: 346, col: 27, offset: 6892}, + pos: position{line: 346, col: 27, offset: 7097}, run: (*parser).callonArithmeticExpr37, expr: &seqExpr{ - pos: position{line: 346, col: 27, offset: 6892}, + pos: position{line: 346, col: 27, offset: 7097}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 346, col: 27, offset: 6892}, + pos: position{line: 346, col: 27, offset: 7097}, name: "_", }, &labeledExpr{ - pos: position{line: 346, col: 29, offset: 6894}, + pos: position{line: 346, col: 29, offset: 7099}, label: "op", expr: &ruleRefExpr{ - pos: position{line: 346, col: 32, offset: 6897}, + pos: position{line: 346, col: 32, offset: 7102}, name: "ConcatOperator", }, }, &ruleRefExpr{ - pos: position{line: 346, col: 47, offset: 6912}, + pos: position{line: 346, col: 47, offset: 7117}, name: "_", }, &labeledExpr{ - pos: position{line: 346, col: 49, offset: 6914}, + pos: position{line: 346, col: 49, offset: 7119}, label: "s", expr: &ruleRefExpr{ - pos: position{line: 346, col: 51, offset: 6916}, + pos: position{line: 346, col: 51, offset: 7121}, name: "ArithmeticExpr2", }, }, @@ -2275,53 +2277,53 @@ var g = &grammar{ }, { name: "ArithmeticExpr2", - pos: position{line: 349, col: 1, offset: 7014}, + pos: position{line: 349, col: 1, offset: 7219}, expr: &actionExpr{ - pos: position{line: 350, col: 4, offset: 7033}, + pos: position{line: 350, col: 4, offset: 7238}, run: (*parser).callonArithmeticExpr21, expr: &seqExpr{ - pos: position{line: 350, col: 4, offset: 7033}, + pos: position{line: 350, col: 4, offset: 7238}, exprs: []interface{}{ &labeledExpr{ - pos: position{line: 350, col: 4, offset: 7033}, + pos: position{line: 350, col: 4, offset: 7238}, label: "o", expr: &ruleRefExpr{ - pos: position{line: 350, col: 6, offset: 7035}, + pos: position{line: 350, col: 6, offset: 7240}, name: "ArithmeticExpr1", }, }, &labeledExpr{ - pos: position{line: 350, col: 22, offset: 7051}, + pos: position{line: 350, col: 22, offset: 7256}, label: "os", expr: &zeroOrMoreExpr{ - pos: position{line: 350, col: 25, offset: 7054}, + pos: position{line: 350, col: 25, offset: 7259}, expr: &actionExpr{ - pos: position{line: 350, col: 27, offset: 7056}, + pos: position{line: 350, col: 27, offset: 7261}, run: (*parser).callonArithmeticExpr27, expr: &seqExpr{ - pos: position{line: 350, col: 27, offset: 7056}, + pos: position{line: 350, col: 27, offset: 7261}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 350, col: 27, offset: 7056}, + pos: position{line: 350, col: 27, offset: 7261}, name: "_", }, &labeledExpr{ - pos: position{line: 350, col: 29, offset: 7058}, + pos: position{line: 350, col: 29, offset: 7263}, label: "op", expr: &ruleRefExpr{ - pos: position{line: 350, col: 32, offset: 7061}, + pos: position{line: 350, col: 32, offset: 7266}, name: "AddSubOperator", }, }, &ruleRefExpr{ - pos: position{line: 350, col: 47, offset: 7076}, + pos: position{line: 350, col: 47, offset: 7281}, name: "_", }, &labeledExpr{ - pos: position{line: 350, col: 49, offset: 7078}, + pos: position{line: 350, col: 49, offset: 7283}, label: "s", expr: &ruleRefExpr{ - pos: position{line: 350, col: 51, offset: 7080}, + pos: position{line: 350, col: 51, offset: 7285}, name: "ArithmeticExpr1", }, }, @@ -2336,53 +2338,53 @@ var g = &grammar{ }, { name: "ArithmeticExpr1", - pos: position{line: 353, col: 1, offset: 7178}, + pos: position{line: 353, col: 1, offset: 7383}, expr: &actionExpr{ - pos: position{line: 354, col: 4, offset: 7197}, + pos: position{line: 354, col: 4, offset: 7402}, run: (*parser).callonArithmeticExpr11, expr: &seqExpr{ - pos: position{line: 354, col: 4, offset: 7197}, + pos: position{line: 354, col: 4, offset: 7402}, exprs: []interface{}{ &labeledExpr{ - pos: position{line: 354, col: 4, offset: 7197}, + pos: position{line: 354, col: 4, offset: 7402}, label: "o", expr: &ruleRefExpr{ - pos: position{line: 354, col: 6, offset: 7199}, + pos: position{line: 354, col: 6, offset: 7404}, name: "Operand", }, }, &labeledExpr{ - pos: position{line: 354, col: 14, offset: 7207}, + pos: position{line: 354, col: 14, offset: 7412}, label: "os", expr: &zeroOrMoreExpr{ - pos: position{line: 354, col: 17, offset: 7210}, + pos: position{line: 354, col: 17, offset: 7415}, expr: &actionExpr{ - pos: position{line: 354, col: 19, offset: 7212}, + pos: position{line: 354, col: 19, offset: 7417}, run: (*parser).callonArithmeticExpr17, expr: &seqExpr{ - pos: position{line: 354, col: 19, offset: 7212}, + pos: position{line: 354, col: 19, offset: 7417}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 354, col: 19, offset: 7212}, + pos: position{line: 354, col: 19, offset: 7417}, name: "_", }, &labeledExpr{ - pos: position{line: 354, col: 21, offset: 7214}, + pos: position{line: 354, col: 21, offset: 7419}, label: "op", expr: &ruleRefExpr{ - pos: position{line: 354, col: 24, offset: 7217}, + pos: position{line: 354, col: 24, offset: 7422}, name: "MulDivModOperator", }, }, &ruleRefExpr{ - pos: position{line: 354, col: 42, offset: 7235}, + pos: position{line: 354, col: 42, offset: 7440}, name: "_", }, &labeledExpr{ - pos: position{line: 354, col: 44, offset: 7237}, + pos: position{line: 354, col: 44, offset: 7442}, label: "s", expr: &ruleRefExpr{ - pos: position{line: 354, col: 46, offset: 7239}, + pos: position{line: 354, col: 46, offset: 7444}, name: "Operand", }, }, @@ -2397,49 +2399,49 @@ var g = &grammar{ }, { name: "MultiExpr", - pos: position{line: 357, col: 1, offset: 7329}, + pos: position{line: 357, col: 1, offset: 7534}, expr: &actionExpr{ - pos: position{line: 358, col: 4, offset: 7342}, + pos: position{line: 358, col: 4, offset: 7547}, run: (*parser).callonMultiExpr1, expr: &seqExpr{ - pos: position{line: 358, col: 4, offset: 7342}, + pos: position{line: 358, col: 4, offset: 7547}, exprs: []interface{}{ &labeledExpr{ - pos: position{line: 358, col: 4, offset: 7342}, + pos: position{line: 358, col: 4, offset: 7547}, label: "x", expr: &ruleRefExpr{ - pos: position{line: 358, col: 6, offset: 7344}, + pos: position{line: 358, col: 6, offset: 7549}, name: "Expr", }, }, &labeledExpr{ - pos: position{line: 358, col: 11, offset: 7349}, + pos: position{line: 358, col: 11, offset: 7554}, label: "xs", expr: &zeroOrMoreExpr{ - pos: position{line: 358, col: 14, offset: 7352}, + pos: position{line: 358, col: 14, offset: 7557}, expr: &actionExpr{ - pos: position{line: 358, col: 16, offset: 7354}, + pos: position{line: 358, col: 16, offset: 7559}, run: (*parser).callonMultiExpr7, expr: &seqExpr{ - pos: position{line: 358, col: 16, offset: 7354}, + pos: position{line: 358, col: 16, offset: 7559}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 358, col: 16, offset: 7354}, + pos: position{line: 358, col: 16, offset: 7559}, name: "_", }, &ruleRefExpr{ - pos: position{line: 358, col: 18, offset: 7356}, + pos: position{line: 358, col: 18, offset: 7561}, name: "SeparatorToken", }, &ruleRefExpr{ - pos: position{line: 358, col: 33, offset: 7371}, + pos: position{line: 358, col: 33, offset: 7576}, name: "_", }, &labeledExpr{ - pos: position{line: 358, col: 35, offset: 7373}, + pos: position{line: 358, col: 35, offset: 7578}, label: "e", expr: &ruleRefExpr{ - pos: position{line: 358, col: 37, offset: 7375}, + pos: position{line: 358, col: 37, offset: 7580}, name: "Expr", }, }, @@ -2454,49 +2456,49 @@ var g = &grammar{ }, { name: "MultiExprWithDefault", - pos: position{line: 361, col: 1, offset: 7433}, + pos: position{line: 361, col: 1, offset: 7638}, expr: &actionExpr{ - pos: position{line: 362, col: 4, offset: 7457}, + pos: position{line: 362, col: 4, offset: 7662}, run: (*parser).callonMultiExprWithDefault1, expr: &seqExpr{ - pos: position{line: 362, col: 4, offset: 7457}, + pos: position{line: 362, col: 4, offset: 7662}, exprs: []interface{}{ &labeledExpr{ - pos: position{line: 362, col: 4, offset: 7457}, + pos: position{line: 362, col: 4, offset: 7662}, label: "x", expr: &ruleRefExpr{ - pos: position{line: 362, col: 6, offset: 7459}, + pos: position{line: 362, col: 6, offset: 7664}, name: "ExprWithDefault", }, }, &labeledExpr{ - pos: position{line: 362, col: 22, offset: 7475}, + pos: position{line: 362, col: 22, offset: 7680}, label: "xs", expr: &zeroOrMoreExpr{ - pos: position{line: 362, col: 25, offset: 7478}, + pos: position{line: 362, col: 25, offset: 7683}, expr: &actionExpr{ - pos: position{line: 362, col: 27, offset: 7480}, + pos: position{line: 362, col: 27, offset: 7685}, run: (*parser).callonMultiExprWithDefault7, expr: &seqExpr{ - pos: position{line: 362, col: 27, offset: 7480}, + pos: position{line: 362, col: 27, offset: 7685}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 362, col: 27, offset: 7480}, + pos: position{line: 362, col: 27, offset: 7685}, name: "_", }, &ruleRefExpr{ - pos: position{line: 362, col: 29, offset: 7482}, + pos: position{line: 362, col: 29, offset: 7687}, name: "SeparatorToken", }, &ruleRefExpr{ - pos: position{line: 362, col: 44, offset: 7497}, + pos: position{line: 362, col: 44, offset: 7702}, name: "_", }, &labeledExpr{ - pos: position{line: 362, col: 46, offset: 7499}, + pos: position{line: 362, col: 46, offset: 7704}, label: "e", expr: &ruleRefExpr{ - pos: position{line: 362, col: 48, offset: 7501}, + pos: position{line: 362, col: 48, offset: 7706}, name: "ExprWithDefault", }, }, @@ -2511,33 +2513,33 @@ var g = &grammar{ }, { name: "Operand", - pos: position{line: 365, col: 1, offset: 7570}, + pos: position{line: 365, col: 1, offset: 7775}, expr: &choiceExpr{ - pos: position{line: 366, col: 4, offset: 7581}, + pos: position{line: 366, col: 4, offset: 7786}, alternatives: []interface{}{ &actionExpr{ - pos: position{line: 366, col: 4, offset: 7581}, + pos: position{line: 366, col: 4, offset: 7786}, run: (*parser).callonOperand2, expr: &seqExpr{ - pos: position{line: 366, col: 4, offset: 7581}, + pos: position{line: 366, col: 4, offset: 7786}, exprs: []interface{}{ &labeledExpr{ - pos: position{line: 366, col: 4, offset: 7581}, + pos: position{line: 366, col: 4, offset: 7786}, label: "op", expr: &ruleRefExpr{ - pos: position{line: 366, col: 7, offset: 7584}, + pos: position{line: 366, col: 7, offset: 7789}, name: "UnaryOperator", }, }, &ruleRefExpr{ - pos: position{line: 366, col: 21, offset: 7598}, + pos: position{line: 366, col: 21, offset: 7803}, name: "_", }, &labeledExpr{ - pos: position{line: 366, col: 23, offset: 7600}, + pos: position{line: 366, col: 23, offset: 7805}, label: "s", expr: &ruleRefExpr{ - pos: position{line: 366, col: 25, offset: 7602}, + pos: position{line: 366, col: 25, offset: 7807}, name: "Operand", }, }, @@ -2545,34 +2547,34 @@ var g = &grammar{ }, }, &actionExpr{ - pos: position{line: 367, col: 4, offset: 7648}, + pos: position{line: 367, col: 4, offset: 7853}, run: (*parser).callonOperand9, expr: &seqExpr{ - pos: position{line: 367, col: 4, offset: 7648}, + pos: position{line: 367, col: 4, offset: 7853}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 367, col: 4, offset: 7648}, + pos: position{line: 367, col: 4, offset: 7853}, val: "(", ignoreCase: false, }, &ruleRefExpr{ - pos: position{line: 367, col: 8, offset: 7652}, + pos: position{line: 367, col: 8, offset: 7857}, name: "_", }, &labeledExpr{ - pos: position{line: 367, col: 10, offset: 7654}, + pos: position{line: 367, col: 10, offset: 7859}, label: "e", expr: &ruleRefExpr{ - pos: position{line: 367, col: 12, offset: 7656}, + pos: position{line: 367, col: 12, offset: 7861}, name: "Expr", }, }, &ruleRefExpr{ - pos: position{line: 367, col: 17, offset: 7661}, + pos: position{line: 367, col: 17, offset: 7866}, name: "_", }, &litMatcher{ - pos: position{line: 367, col: 19, offset: 7663}, + pos: position{line: 367, col: 19, offset: 7868}, val: ")", ignoreCase: false, }, @@ -2580,23 +2582,23 @@ var g = &grammar{ }, }, &actionExpr{ - pos: position{line: 368, col: 4, offset: 7688}, + pos: position{line: 368, col: 4, offset: 7893}, run: (*parser).callonOperand17, expr: &seqExpr{ - pos: position{line: 368, col: 4, offset: 7688}, + pos: position{line: 368, col: 4, offset: 7893}, exprs: []interface{}{ &andExpr{ - pos: position{line: 368, col: 4, offset: 7688}, + pos: position{line: 368, col: 4, offset: 7893}, expr: &ruleRefExpr{ - pos: position{line: 368, col: 6, offset: 7690}, + pos: position{line: 368, col: 6, offset: 7895}, name: "CastToken", }, }, &labeledExpr{ - pos: position{line: 368, col: 17, offset: 7701}, + pos: position{line: 368, col: 17, offset: 7906}, label: "t", expr: &ruleRefExpr{ - pos: position{line: 368, col: 19, offset: 7703}, + pos: position{line: 368, col: 19, offset: 7908}, name: "TypeCast", }, }, @@ -2604,15 +2606,15 @@ var g = &grammar{ }, }, &ruleRefExpr{ - pos: position{line: 369, col: 4, offset: 7733}, + pos: position{line: 369, col: 4, offset: 7938}, name: "FunctionCall", }, &ruleRefExpr{ - pos: position{line: 370, col: 4, offset: 7749}, + pos: position{line: 370, col: 4, offset: 7954}, name: "Value", }, &ruleRefExpr{ - pos: position{line: 371, col: 4, offset: 7758}, + pos: position{line: 371, col: 4, offset: 7963}, name: "Identifier", }, }, @@ -2620,64 +2622,64 @@ var g = &grammar{ }, { name: "TypeCast", - pos: position{line: 373, col: 1, offset: 7770}, + pos: position{line: 373, col: 1, offset: 7975}, expr: &actionExpr{ - pos: position{line: 374, col: 4, offset: 7782}, + pos: position{line: 374, col: 4, offset: 7987}, run: (*parser).callonTypeCast1, expr: &seqExpr{ - pos: position{line: 374, col: 4, offset: 7782}, + pos: position{line: 374, col: 4, offset: 7987}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 374, col: 4, offset: 7782}, + pos: position{line: 374, col: 4, offset: 7987}, name: "CastToken", }, &ruleRefExpr{ - pos: position{line: 374, col: 14, offset: 7792}, + pos: position{line: 374, col: 14, offset: 7997}, name: "_", }, &litMatcher{ - pos: position{line: 374, col: 16, offset: 7794}, + pos: position{line: 374, col: 16, offset: 7999}, val: "(", ignoreCase: false, }, &ruleRefExpr{ - pos: position{line: 374, col: 20, offset: 7798}, + pos: position{line: 374, col: 20, offset: 8003}, name: "_", }, &labeledExpr{ - pos: position{line: 374, col: 22, offset: 7800}, + pos: position{line: 374, col: 22, offset: 8005}, label: "o", expr: &ruleRefExpr{ - pos: position{line: 374, col: 24, offset: 7802}, + pos: position{line: 374, col: 24, offset: 8007}, name: "Expr", }, }, &ruleRefExpr{ - pos: position{line: 374, col: 29, offset: 7807}, + pos: position{line: 374, col: 29, offset: 8012}, name: "_", }, &ruleRefExpr{ - pos: position{line: 374, col: 31, offset: 7809}, + pos: position{line: 374, col: 31, offset: 8014}, name: "AsToken", }, &ruleRefExpr{ - pos: position{line: 374, col: 39, offset: 7817}, + pos: position{line: 374, col: 39, offset: 8022}, name: "_", }, &labeledExpr{ - pos: position{line: 374, col: 41, offset: 7819}, + pos: position{line: 374, col: 41, offset: 8024}, label: "s", expr: &ruleRefExpr{ - pos: position{line: 374, col: 43, offset: 7821}, + pos: position{line: 374, col: 43, offset: 8026}, name: "DataType", }, }, &ruleRefExpr{ - pos: position{line: 374, col: 52, offset: 7830}, + pos: position{line: 374, col: 52, offset: 8035}, name: "_", }, &litMatcher{ - pos: position{line: 374, col: 54, offset: 7832}, + pos: position{line: 374, col: 54, offset: 8037}, val: ")", ignoreCase: false, }, @@ -2687,51 +2689,51 @@ var g = &grammar{ }, { name: "FunctionCall", - pos: position{line: 377, col: 1, offset: 7906}, + pos: position{line: 377, col: 1, offset: 8115}, expr: &actionExpr{ - pos: position{line: 378, col: 4, offset: 7922}, + pos: position{line: 378, col: 4, offset: 8131}, run: (*parser).callonFunctionCall1, expr: &seqExpr{ - pos: position{line: 378, col: 4, offset: 7922}, + pos: position{line: 378, col: 4, offset: 8131}, exprs: []interface{}{ &labeledExpr{ - pos: position{line: 378, col: 4, offset: 7922}, + pos: position{line: 378, col: 4, offset: 8131}, label: "i", expr: &ruleRefExpr{ - pos: position{line: 378, col: 6, offset: 7924}, + pos: position{line: 378, col: 6, offset: 8133}, name: "Identifier", }, }, &ruleRefExpr{ - pos: position{line: 378, col: 17, offset: 7935}, + pos: position{line: 378, col: 17, offset: 8144}, name: "_", }, &litMatcher{ - pos: position{line: 378, col: 19, offset: 7937}, + pos: position{line: 378, col: 19, offset: 8146}, val: "(", ignoreCase: false, }, &ruleRefExpr{ - pos: position{line: 378, col: 23, offset: 7941}, + pos: position{line: 378, col: 23, offset: 8150}, name: "_", }, &labeledExpr{ - pos: position{line: 378, col: 25, offset: 7943}, + pos: position{line: 378, col: 25, offset: 8152}, label: "r", expr: &zeroOrOneExpr{ - pos: position{line: 378, col: 27, offset: 7945}, + pos: position{line: 378, col: 27, offset: 8154}, expr: &ruleRefExpr{ - pos: position{line: 378, col: 27, offset: 7945}, + pos: position{line: 378, col: 27, offset: 8154}, name: "FunctionArgs", }, }, }, &ruleRefExpr{ - pos: position{line: 378, col: 41, offset: 7959}, + pos: position{line: 378, col: 41, offset: 8168}, name: "_", }, &litMatcher{ - pos: position{line: 378, col: 43, offset: 7961}, + pos: position{line: 378, col: 43, offset: 8170}, val: ")", ignoreCase: false, }, @@ -2741,24 +2743,24 @@ var g = &grammar{ }, { name: "FunctionArgs", - pos: position{line: 381, col: 1, offset: 8039}, + pos: position{line: 381, col: 1, offset: 8252}, expr: &choiceExpr{ - pos: position{line: 382, col: 4, offset: 8055}, + pos: position{line: 382, col: 4, offset: 8268}, alternatives: []interface{}{ &actionExpr{ - pos: position{line: 382, col: 4, offset: 8055}, + pos: position{line: 382, col: 4, offset: 8268}, run: (*parser).callonFunctionArgs2, expr: &labeledExpr{ - pos: position{line: 382, col: 4, offset: 8055}, + pos: position{line: 382, col: 4, offset: 8268}, label: "a", expr: &ruleRefExpr{ - pos: position{line: 382, col: 6, offset: 8057}, + pos: position{line: 382, col: 6, offset: 8270}, name: "AnyLiteral", }, }, }, &ruleRefExpr{ - pos: position{line: 383, col: 4, offset: 8104}, + pos: position{line: 383, col: 4, offset: 8317}, name: "MultiExpr", }, }, @@ -2766,39 +2768,39 @@ var g = &grammar{ }, { name: "Assignment", - pos: position{line: 385, col: 1, offset: 8115}, + pos: position{line: 385, col: 1, offset: 8328}, expr: &actionExpr{ - pos: position{line: 386, col: 4, offset: 8129}, + pos: position{line: 386, col: 4, offset: 8342}, run: (*parser).callonAssignment1, expr: &seqExpr{ - pos: position{line: 386, col: 4, offset: 8129}, + pos: position{line: 386, col: 4, offset: 8342}, exprs: []interface{}{ &labeledExpr{ - pos: position{line: 386, col: 4, offset: 8129}, + pos: position{line: 386, col: 4, offset: 8342}, label: "i", expr: &ruleRefExpr{ - pos: position{line: 386, col: 6, offset: 8131}, + pos: position{line: 386, col: 6, offset: 8344}, name: "Identifier", }, }, &ruleRefExpr{ - pos: position{line: 386, col: 17, offset: 8142}, + pos: position{line: 386, col: 17, offset: 8355}, name: "_", }, &litMatcher{ - pos: position{line: 386, col: 19, offset: 8144}, + pos: position{line: 386, col: 19, offset: 8357}, val: "=", ignoreCase: false, }, &ruleRefExpr{ - pos: position{line: 386, col: 23, offset: 8148}, + pos: position{line: 386, col: 23, offset: 8361}, name: "_", }, &labeledExpr{ - pos: position{line: 386, col: 25, offset: 8150}, + pos: position{line: 386, col: 25, offset: 8363}, label: "e", expr: &ruleRefExpr{ - pos: position{line: 386, col: 27, offset: 8152}, + pos: position{line: 386, col: 27, offset: 8365}, name: "ExprWithDefault", }, }, @@ -2808,91 +2810,91 @@ var g = &grammar{ }, { name: "UnaryOperator", - pos: position{line: 390, col: 1, offset: 8255}, + pos: position{line: 390, col: 1, offset: 8473}, expr: &ruleRefExpr{ - pos: position{line: 391, col: 4, offset: 8272}, + pos: position{line: 391, col: 4, offset: 8490}, name: "SignOperator", }, }, { name: "SignOperator", - pos: position{line: 393, col: 1, offset: 8286}, + pos: position{line: 393, col: 1, offset: 8504}, expr: &actionExpr{ - pos: position{line: 394, col: 4, offset: 8302}, + pos: position{line: 394, col: 4, offset: 8520}, run: (*parser).callonSignOperator1, expr: &ruleRefExpr{ - pos: position{line: 394, col: 4, offset: 8302}, + pos: position{line: 394, col: 4, offset: 8520}, name: "Sign", }, }, }, { name: "NotOperator", - pos: position{line: 405, col: 1, offset: 8468}, + pos: position{line: 405, col: 1, offset: 8694}, expr: &actionExpr{ - pos: position{line: 406, col: 4, offset: 8483}, + pos: position{line: 406, col: 4, offset: 8709}, run: (*parser).callonNotOperator1, expr: &ruleRefExpr{ - pos: position{line: 406, col: 4, offset: 8483}, + pos: position{line: 406, col: 4, offset: 8709}, name: "NotToken", }, }, }, { name: "AndOperator", - pos: position{line: 409, col: 1, offset: 8528}, + pos: position{line: 409, col: 1, offset: 8758}, expr: &actionExpr{ - pos: position{line: 410, col: 4, offset: 8543}, + pos: position{line: 410, col: 4, offset: 8773}, run: (*parser).callonAndOperator1, expr: &ruleRefExpr{ - pos: position{line: 410, col: 4, offset: 8543}, + pos: position{line: 410, col: 4, offset: 8773}, name: "AndToken", }, }, }, { name: "OrOperator", - pos: position{line: 413, col: 1, offset: 8588}, + pos: position{line: 413, col: 1, offset: 8822}, expr: &actionExpr{ - pos: position{line: 414, col: 4, offset: 8602}, + pos: position{line: 414, col: 4, offset: 8836}, run: (*parser).callonOrOperator1, expr: &ruleRefExpr{ - pos: position{line: 414, col: 4, offset: 8602}, + pos: position{line: 414, col: 4, offset: 8836}, name: "OrToken", }, }, }, { name: "CmpOperator", - pos: position{line: 417, col: 1, offset: 8645}, + pos: position{line: 417, col: 1, offset: 8883}, expr: &actionExpr{ - pos: position{line: 418, col: 4, offset: 8660}, + pos: position{line: 418, col: 4, offset: 8898}, run: (*parser).callonCmpOperator1, expr: &choiceExpr{ - pos: position{line: 418, col: 6, offset: 8662}, + pos: position{line: 418, col: 6, offset: 8900}, alternatives: []interface{}{ &litMatcher{ - pos: position{line: 418, col: 6, offset: 8662}, + pos: position{line: 418, col: 6, offset: 8900}, val: "<=", ignoreCase: false, }, &litMatcher{ - pos: position{line: 418, col: 13, offset: 8669}, + pos: position{line: 418, col: 13, offset: 8907}, val: ">=", ignoreCase: false, }, &litMatcher{ - pos: position{line: 418, col: 20, offset: 8676}, + pos: position{line: 418, col: 20, offset: 8914}, val: "<>", ignoreCase: false, }, &litMatcher{ - pos: position{line: 418, col: 27, offset: 8683}, + pos: position{line: 418, col: 27, offset: 8921}, val: "!=", ignoreCase: false, }, &charClassMatcher{ - pos: position{line: 418, col: 34, offset: 8690}, + pos: position{line: 418, col: 34, offset: 8928}, val: "[<>=]", chars: []rune{'<', '>', '='}, ignoreCase: false, @@ -2904,12 +2906,12 @@ var g = &grammar{ }, { name: "ConcatOperator", - pos: position{line: 439, col: 1, offset: 9118}, + pos: position{line: 439, col: 1, offset: 9384}, expr: &actionExpr{ - pos: position{line: 440, col: 4, offset: 9136}, + pos: position{line: 440, col: 4, offset: 9402}, run: (*parser).callonConcatOperator1, expr: &litMatcher{ - pos: position{line: 440, col: 4, offset: 9136}, + pos: position{line: 440, col: 4, offset: 9402}, val: "||", ignoreCase: false, }, @@ -2917,12 +2919,12 @@ var g = &grammar{ }, { name: "AddSubOperator", - pos: position{line: 443, col: 1, offset: 9180}, + pos: position{line: 443, col: 1, offset: 9450}, expr: &actionExpr{ - pos: position{line: 444, col: 4, offset: 9198}, + pos: position{line: 444, col: 4, offset: 9468}, run: (*parser).callonAddSubOperator1, expr: &charClassMatcher{ - pos: position{line: 444, col: 4, offset: 9198}, + pos: position{line: 444, col: 4, offset: 9468}, val: "[+-]", chars: []rune{'+', '-'}, ignoreCase: false, @@ -2932,12 +2934,12 @@ var g = &grammar{ }, { name: "MulDivModOperator", - pos: position{line: 455, col: 1, offset: 9367}, + pos: position{line: 455, col: 1, offset: 9645}, expr: &actionExpr{ - pos: position{line: 456, col: 4, offset: 9388}, + pos: position{line: 456, col: 4, offset: 9666}, run: (*parser).callonMulDivModOperator1, expr: &charClassMatcher{ - pos: position{line: 456, col: 4, offset: 9388}, + pos: position{line: 456, col: 4, offset: 9666}, val: "[*/%]", chars: []rune{'*', '/', '%'}, ignoreCase: false, @@ -2947,40 +2949,40 @@ var g = &grammar{ }, { name: "DataType", - pos: position{line: 470, col: 1, offset: 9617}, + pos: position{line: 470, col: 1, offset: 9908}, expr: &choiceExpr{ - pos: position{line: 471, col: 4, offset: 9629}, + pos: position{line: 471, col: 4, offset: 9920}, alternatives: []interface{}{ &ruleRefExpr{ - pos: position{line: 471, col: 4, offset: 9629}, + pos: position{line: 471, col: 4, offset: 9920}, name: "UIntType", }, &ruleRefExpr{ - pos: position{line: 472, col: 4, offset: 9641}, + pos: position{line: 472, col: 4, offset: 9932}, name: "IntType", }, &ruleRefExpr{ - pos: position{line: 473, col: 4, offset: 9652}, + pos: position{line: 473, col: 4, offset: 9943}, name: "UFixedType", }, &ruleRefExpr{ - pos: position{line: 474, col: 4, offset: 9666}, + pos: position{line: 474, col: 4, offset: 9957}, name: "FixedType", }, &ruleRefExpr{ - pos: position{line: 475, col: 4, offset: 9679}, + pos: position{line: 475, col: 4, offset: 9970}, name: "FixedBytesType", }, &ruleRefExpr{ - pos: position{line: 476, col: 4, offset: 9697}, + pos: position{line: 476, col: 4, offset: 9988}, name: "DynamicBytesType", }, &ruleRefExpr{ - pos: position{line: 477, col: 4, offset: 9717}, + pos: position{line: 477, col: 4, offset: 10008}, name: "BoolType", }, &ruleRefExpr{ - pos: position{line: 478, col: 4, offset: 9729}, + pos: position{line: 478, col: 4, offset: 10020}, name: "AddressType", }, }, @@ -2988,30 +2990,30 @@ var g = &grammar{ }, { name: "UIntType", - pos: position{line: 480, col: 1, offset: 9742}, + pos: position{line: 480, col: 1, offset: 10033}, expr: &actionExpr{ - pos: position{line: 481, col: 4, offset: 9754}, + pos: position{line: 481, col: 4, offset: 10045}, run: (*parser).callonUIntType1, expr: &seqExpr{ - pos: position{line: 481, col: 4, offset: 9754}, + pos: position{line: 481, col: 4, offset: 10045}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 481, col: 4, offset: 9754}, + pos: position{line: 481, col: 4, offset: 10045}, val: "uint", ignoreCase: true, }, &labeledExpr{ - pos: position{line: 481, col: 12, offset: 9762}, + pos: position{line: 481, col: 12, offset: 10053}, label: "s", expr: &ruleRefExpr{ - pos: position{line: 481, col: 14, offset: 9764}, + pos: position{line: 481, col: 14, offset: 10055}, name: "NonZeroLeadingInteger", }, }, ¬Expr{ - pos: position{line: 481, col: 36, offset: 9786}, + pos: position{line: 481, col: 36, offset: 10077}, expr: &ruleRefExpr{ - pos: position{line: 481, col: 37, offset: 9787}, + pos: position{line: 481, col: 37, offset: 10078}, name: "NormalIdentifierRest", }, }, @@ -3021,30 +3023,30 @@ var g = &grammar{ }, { name: "IntType", - pos: position{line: 484, col: 1, offset: 9878}, + pos: position{line: 489, col: 1, offset: 10187}, expr: &actionExpr{ - pos: position{line: 485, col: 4, offset: 9889}, + pos: position{line: 490, col: 4, offset: 10198}, run: (*parser).callonIntType1, expr: &seqExpr{ - pos: position{line: 485, col: 4, offset: 9889}, + pos: position{line: 490, col: 4, offset: 10198}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 485, col: 4, offset: 9889}, + pos: position{line: 490, col: 4, offset: 10198}, val: "int", ignoreCase: true, }, &labeledExpr{ - pos: position{line: 485, col: 11, offset: 9896}, + pos: position{line: 490, col: 11, offset: 10205}, label: "s", expr: &ruleRefExpr{ - pos: position{line: 485, col: 13, offset: 9898}, + pos: position{line: 490, col: 13, offset: 10207}, name: "NonZeroLeadingInteger", }, }, ¬Expr{ - pos: position{line: 485, col: 35, offset: 9920}, + pos: position{line: 490, col: 35, offset: 10229}, expr: &ruleRefExpr{ - pos: position{line: 485, col: 36, offset: 9921}, + pos: position{line: 490, col: 36, offset: 10230}, name: "NormalIdentifierRest", }, }, @@ -3054,43 +3056,43 @@ var g = &grammar{ }, { name: "UFixedType", - pos: position{line: 488, col: 1, offset: 9996}, + pos: position{line: 498, col: 1, offset: 10340}, expr: &actionExpr{ - pos: position{line: 489, col: 4, offset: 10010}, + pos: position{line: 499, col: 4, offset: 10354}, run: (*parser).callonUFixedType1, expr: &seqExpr{ - pos: position{line: 489, col: 4, offset: 10010}, + pos: position{line: 499, col: 4, offset: 10354}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 489, col: 4, offset: 10010}, + pos: position{line: 499, col: 4, offset: 10354}, val: "ufixed", ignoreCase: true, }, &labeledExpr{ - pos: position{line: 489, col: 14, offset: 10020}, + pos: position{line: 499, col: 14, offset: 10364}, label: "s", expr: &ruleRefExpr{ - pos: position{line: 489, col: 16, offset: 10022}, + pos: position{line: 499, col: 16, offset: 10366}, name: "NonZeroLeadingInteger", }, }, &litMatcher{ - pos: position{line: 489, col: 38, offset: 10044}, + pos: position{line: 499, col: 38, offset: 10388}, val: "x", ignoreCase: true, }, &labeledExpr{ - pos: position{line: 489, col: 43, offset: 10049}, + pos: position{line: 499, col: 43, offset: 10393}, label: "t", expr: &ruleRefExpr{ - pos: position{line: 489, col: 45, offset: 10051}, + pos: position{line: 499, col: 45, offset: 10395}, name: "NonZeroLeadingInteger", }, }, ¬Expr{ - pos: position{line: 489, col: 67, offset: 10073}, + pos: position{line: 499, col: 67, offset: 10417}, expr: &ruleRefExpr{ - pos: position{line: 489, col: 68, offset: 10074}, + pos: position{line: 499, col: 68, offset: 10418}, name: "NormalIdentifierRest", }, }, @@ -3100,43 +3102,43 @@ var g = &grammar{ }, { name: "FixedType", - pos: position{line: 498, col: 1, offset: 10229}, + pos: position{line: 508, col: 1, offset: 10585}, expr: &actionExpr{ - pos: position{line: 499, col: 4, offset: 10242}, + pos: position{line: 509, col: 4, offset: 10598}, run: (*parser).callonFixedType1, expr: &seqExpr{ - pos: position{line: 499, col: 4, offset: 10242}, + pos: position{line: 509, col: 4, offset: 10598}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 499, col: 4, offset: 10242}, + pos: position{line: 509, col: 4, offset: 10598}, val: "fixed", ignoreCase: true, }, &labeledExpr{ - pos: position{line: 499, col: 13, offset: 10251}, + pos: position{line: 509, col: 13, offset: 10607}, label: "s", expr: &ruleRefExpr{ - pos: position{line: 499, col: 15, offset: 10253}, + pos: position{line: 509, col: 15, offset: 10609}, name: "NonZeroLeadingInteger", }, }, &litMatcher{ - pos: position{line: 499, col: 37, offset: 10275}, + pos: position{line: 509, col: 37, offset: 10631}, val: "x", ignoreCase: true, }, &labeledExpr{ - pos: position{line: 499, col: 42, offset: 10280}, + pos: position{line: 509, col: 42, offset: 10636}, label: "t", expr: &ruleRefExpr{ - pos: position{line: 499, col: 44, offset: 10282}, + pos: position{line: 509, col: 44, offset: 10638}, name: "NonZeroLeadingInteger", }, }, ¬Expr{ - pos: position{line: 499, col: 66, offset: 10304}, + pos: position{line: 509, col: 66, offset: 10660}, expr: &ruleRefExpr{ - pos: position{line: 499, col: 67, offset: 10305}, + pos: position{line: 509, col: 67, offset: 10661}, name: "NormalIdentifierRest", }, }, @@ -3146,33 +3148,33 @@ var g = &grammar{ }, { name: "FixedBytesType", - pos: position{line: 507, col: 1, offset: 10436}, + pos: position{line: 518, col: 1, offset: 10829}, expr: &choiceExpr{ - pos: position{line: 508, col: 4, offset: 10454}, + pos: position{line: 519, col: 4, offset: 10847}, alternatives: []interface{}{ &actionExpr{ - pos: position{line: 508, col: 4, offset: 10454}, + pos: position{line: 519, col: 4, offset: 10847}, run: (*parser).callonFixedBytesType2, expr: &seqExpr{ - pos: position{line: 508, col: 4, offset: 10454}, + pos: position{line: 519, col: 4, offset: 10847}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 508, col: 4, offset: 10454}, + pos: position{line: 519, col: 4, offset: 10847}, val: "bytes", ignoreCase: true, }, &labeledExpr{ - pos: position{line: 508, col: 13, offset: 10463}, + pos: position{line: 519, col: 13, offset: 10856}, label: "s", expr: &ruleRefExpr{ - pos: position{line: 508, col: 15, offset: 10465}, + pos: position{line: 519, col: 15, offset: 10858}, name: "NonZeroLeadingInteger", }, }, ¬Expr{ - pos: position{line: 508, col: 37, offset: 10487}, + pos: position{line: 519, col: 37, offset: 10880}, expr: &ruleRefExpr{ - pos: position{line: 508, col: 38, offset: 10488}, + pos: position{line: 519, col: 38, offset: 10881}, name: "NormalIdentifierRest", }, }, @@ -3180,20 +3182,20 @@ var g = &grammar{ }, }, &actionExpr{ - pos: position{line: 510, col: 4, offset: 10572}, + pos: position{line: 521, col: 4, offset: 10970}, run: (*parser).callonFixedBytesType9, expr: &seqExpr{ - pos: position{line: 510, col: 4, offset: 10572}, + pos: position{line: 521, col: 4, offset: 10970}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 510, col: 4, offset: 10572}, + pos: position{line: 521, col: 4, offset: 10970}, val: "byte", ignoreCase: true, }, ¬Expr{ - pos: position{line: 510, col: 12, offset: 10580}, + pos: position{line: 521, col: 12, offset: 10978}, expr: &ruleRefExpr{ - pos: position{line: 510, col: 13, offset: 10581}, + pos: position{line: 521, col: 13, offset: 10979}, name: "NormalIdentifierRest", }, }, @@ -3205,59 +3207,59 @@ var g = &grammar{ }, { name: "DynamicBytesType", - pos: position{line: 513, col: 1, offset: 10647}, + pos: position{line: 524, col: 1, offset: 11049}, expr: &actionExpr{ - pos: position{line: 514, col: 4, offset: 10667}, + pos: position{line: 525, col: 4, offset: 11069}, run: (*parser).callonDynamicBytesType1, expr: &choiceExpr{ - pos: position{line: 514, col: 6, offset: 10669}, + pos: position{line: 525, col: 6, offset: 11071}, alternatives: []interface{}{ &seqExpr{ - pos: position{line: 514, col: 6, offset: 10669}, + pos: position{line: 525, col: 6, offset: 11071}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 514, col: 6, offset: 10669}, + pos: position{line: 525, col: 6, offset: 11071}, val: "bytes", ignoreCase: true, }, ¬Expr{ - pos: position{line: 514, col: 15, offset: 10678}, + pos: position{line: 525, col: 15, offset: 11080}, expr: &ruleRefExpr{ - pos: position{line: 514, col: 16, offset: 10679}, + pos: position{line: 525, col: 16, offset: 11081}, name: "NormalIdentifierRest", }, }, }, }, &seqExpr{ - pos: position{line: 515, col: 5, offset: 10704}, + pos: position{line: 526, col: 5, offset: 11106}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 515, col: 5, offset: 10704}, + pos: position{line: 526, col: 5, offset: 11106}, val: "string", ignoreCase: true, }, ¬Expr{ - pos: position{line: 515, col: 15, offset: 10714}, + pos: position{line: 526, col: 15, offset: 11116}, expr: &ruleRefExpr{ - pos: position{line: 515, col: 16, offset: 10715}, + pos: position{line: 526, col: 16, offset: 11117}, name: "NormalIdentifierRest", }, }, }, }, &seqExpr{ - pos: position{line: 516, col: 5, offset: 10740}, + pos: position{line: 527, col: 5, offset: 11142}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 516, col: 5, offset: 10740}, + pos: position{line: 527, col: 5, offset: 11142}, val: "text", ignoreCase: true, }, ¬Expr{ - pos: position{line: 516, col: 13, offset: 10748}, + pos: position{line: 527, col: 13, offset: 11150}, expr: &ruleRefExpr{ - pos: position{line: 516, col: 14, offset: 10749}, + pos: position{line: 527, col: 14, offset: 11151}, name: "NormalIdentifierRest", }, }, @@ -3269,22 +3271,22 @@ var g = &grammar{ }, { name: "AddressType", - pos: position{line: 520, col: 1, offset: 10813}, + pos: position{line: 531, col: 1, offset: 11219}, expr: &actionExpr{ - pos: position{line: 521, col: 4, offset: 10828}, + pos: position{line: 532, col: 4, offset: 11234}, run: (*parser).callonAddressType1, expr: &seqExpr{ - pos: position{line: 521, col: 4, offset: 10828}, + pos: position{line: 532, col: 4, offset: 11234}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 521, col: 4, offset: 10828}, + pos: position{line: 532, col: 4, offset: 11234}, val: "address", ignoreCase: true, }, ¬Expr{ - pos: position{line: 521, col: 15, offset: 10839}, + pos: position{line: 532, col: 15, offset: 11245}, expr: &ruleRefExpr{ - pos: position{line: 521, col: 16, offset: 10840}, + pos: position{line: 532, col: 16, offset: 11246}, name: "NormalIdentifierRest", }, }, @@ -3294,42 +3296,42 @@ var g = &grammar{ }, { name: "BoolType", - pos: position{line: 524, col: 1, offset: 10896}, + pos: position{line: 535, col: 1, offset: 11306}, expr: &actionExpr{ - pos: position{line: 525, col: 4, offset: 10908}, + pos: position{line: 536, col: 4, offset: 11318}, run: (*parser).callonBoolType1, expr: &choiceExpr{ - pos: position{line: 525, col: 6, offset: 10910}, + pos: position{line: 536, col: 6, offset: 11320}, alternatives: []interface{}{ &seqExpr{ - pos: position{line: 525, col: 6, offset: 10910}, + pos: position{line: 536, col: 6, offset: 11320}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 525, col: 6, offset: 10910}, + pos: position{line: 536, col: 6, offset: 11320}, val: "bool", ignoreCase: true, }, ¬Expr{ - pos: position{line: 525, col: 14, offset: 10918}, + pos: position{line: 536, col: 14, offset: 11328}, expr: &ruleRefExpr{ - pos: position{line: 525, col: 15, offset: 10919}, + pos: position{line: 536, col: 15, offset: 11329}, name: "NormalIdentifierRest", }, }, }, }, &seqExpr{ - pos: position{line: 526, col: 5, offset: 10944}, + pos: position{line: 537, col: 5, offset: 11354}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 526, col: 5, offset: 10944}, + pos: position{line: 537, col: 5, offset: 11354}, val: "boolean", ignoreCase: true, }, ¬Expr{ - pos: position{line: 526, col: 16, offset: 10955}, + pos: position{line: 537, col: 16, offset: 11365}, expr: &ruleRefExpr{ - pos: position{line: 526, col: 17, offset: 10956}, + pos: position{line: 537, col: 17, offset: 11366}, name: "NormalIdentifierRest", }, }, @@ -3341,24 +3343,24 @@ var g = &grammar{ }, { name: "Value", - pos: position{line: 531, col: 1, offset: 11024}, + pos: position{line: 542, col: 1, offset: 11439}, expr: &choiceExpr{ - pos: position{line: 532, col: 4, offset: 11033}, + pos: position{line: 543, col: 4, offset: 11448}, alternatives: []interface{}{ &ruleRefExpr{ - pos: position{line: 532, col: 4, offset: 11033}, + pos: position{line: 543, col: 4, offset: 11448}, name: "NumberLiteral", }, &ruleRefExpr{ - pos: position{line: 533, col: 4, offset: 11050}, + pos: position{line: 544, col: 4, offset: 11465}, name: "StringLiteral", }, &ruleRefExpr{ - pos: position{line: 534, col: 4, offset: 11067}, + pos: position{line: 545, col: 4, offset: 11482}, name: "BoolLiteral", }, &ruleRefExpr{ - pos: position{line: 535, col: 4, offset: 11082}, + pos: position{line: 546, col: 4, offset: 11497}, name: "NullLiteral", }, }, @@ -3366,46 +3368,46 @@ var g = &grammar{ }, { name: "AnyLiteral", - pos: position{line: 537, col: 1, offset: 11095}, + pos: position{line: 548, col: 1, offset: 11510}, expr: &actionExpr{ - pos: position{line: 538, col: 4, offset: 11109}, + pos: position{line: 549, col: 4, offset: 11524}, run: (*parser).callonAnyLiteral1, expr: &ruleRefExpr{ - pos: position{line: 538, col: 4, offset: 11109}, + pos: position{line: 549, col: 4, offset: 11524}, name: "AnyToken", }, }, }, { name: "DefaultLiteral", - pos: position{line: 541, col: 1, offset: 11150}, + pos: position{line: 552, col: 1, offset: 11569}, expr: &actionExpr{ - pos: position{line: 542, col: 4, offset: 11168}, + pos: position{line: 553, col: 4, offset: 11587}, run: (*parser).callonDefaultLiteral1, expr: &ruleRefExpr{ - pos: position{line: 542, col: 4, offset: 11168}, + pos: position{line: 553, col: 4, offset: 11587}, name: "DefaultToken", }, }, }, { name: "BoolLiteral", - pos: position{line: 545, col: 1, offset: 11217}, + pos: position{line: 556, col: 1, offset: 11640}, expr: &actionExpr{ - pos: position{line: 546, col: 4, offset: 11232}, + pos: position{line: 557, col: 4, offset: 11655}, run: (*parser).callonBoolLiteral1, expr: &labeledExpr{ - pos: position{line: 546, col: 4, offset: 11232}, + pos: position{line: 557, col: 4, offset: 11655}, label: "b", expr: &choiceExpr{ - pos: position{line: 546, col: 8, offset: 11236}, + pos: position{line: 557, col: 8, offset: 11659}, alternatives: []interface{}{ &ruleRefExpr{ - pos: position{line: 546, col: 8, offset: 11236}, + pos: position{line: 557, col: 8, offset: 11659}, name: "TrueToken", }, &ruleRefExpr{ - pos: position{line: 546, col: 20, offset: 11248}, + pos: position{line: 557, col: 20, offset: 11671}, name: "FalseToken", }, }, @@ -3415,40 +3417,40 @@ var g = &grammar{ }, { name: "NullLiteral", - pos: position{line: 549, col: 1, offset: 11322}, + pos: position{line: 560, col: 1, offset: 11752}, expr: &actionExpr{ - pos: position{line: 550, col: 4, offset: 11337}, + pos: position{line: 561, col: 4, offset: 11767}, run: (*parser).callonNullLiteral1, expr: &ruleRefExpr{ - pos: position{line: 550, col: 4, offset: 11337}, + pos: position{line: 561, col: 4, offset: 11767}, name: "NullToken", }, }, }, { name: "NumberLiteral", - pos: position{line: 553, col: 1, offset: 11380}, + pos: position{line: 564, col: 1, offset: 11814}, expr: &choiceExpr{ - pos: position{line: 554, col: 4, offset: 11397}, + pos: position{line: 565, col: 4, offset: 11831}, alternatives: []interface{}{ &actionExpr{ - pos: position{line: 554, col: 4, offset: 11397}, + pos: position{line: 565, col: 4, offset: 11831}, run: (*parser).callonNumberLiteral2, expr: &seqExpr{ - pos: position{line: 554, col: 4, offset: 11397}, + pos: position{line: 565, col: 4, offset: 11831}, exprs: []interface{}{ &andExpr{ - pos: position{line: 554, col: 4, offset: 11397}, + pos: position{line: 565, col: 4, offset: 11831}, expr: &seqExpr{ - pos: position{line: 554, col: 6, offset: 11399}, + pos: position{line: 565, col: 6, offset: 11833}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 554, col: 6, offset: 11399}, + pos: position{line: 565, col: 6, offset: 11833}, val: "0", ignoreCase: false, }, &litMatcher{ - pos: position{line: 554, col: 10, offset: 11403}, + pos: position{line: 565, col: 10, offset: 11837}, val: "x", ignoreCase: true, }, @@ -3456,10 +3458,10 @@ var g = &grammar{ }, }, &labeledExpr{ - pos: position{line: 554, col: 16, offset: 11409}, + pos: position{line: 565, col: 16, offset: 11843}, label: "h", expr: &ruleRefExpr{ - pos: position{line: 554, col: 18, offset: 11411}, + pos: position{line: 565, col: 18, offset: 11845}, name: "Hex", }, }, @@ -3467,7 +3469,7 @@ var g = &grammar{ }, }, &ruleRefExpr{ - pos: position{line: 555, col: 4, offset: 11436}, + pos: position{line: 566, col: 4, offset: 11870}, name: "Decimal", }, }, @@ -3475,9 +3477,9 @@ var g = &grammar{ }, { name: "Sign", - pos: position{line: 557, col: 1, offset: 11445}, + pos: position{line: 568, col: 1, offset: 11879}, expr: &charClassMatcher{ - pos: position{line: 558, col: 4, offset: 11453}, + pos: position{line: 569, col: 4, offset: 11887}, val: "[-+]", chars: []rune{'-', '+'}, ignoreCase: false, @@ -3486,14 +3488,14 @@ var g = &grammar{ }, { name: "Integer", - pos: position{line: 560, col: 1, offset: 11459}, + pos: position{line: 571, col: 1, offset: 11893}, expr: &actionExpr{ - pos: position{line: 561, col: 4, offset: 11470}, + pos: position{line: 572, col: 4, offset: 11904}, run: (*parser).callonInteger1, expr: &oneOrMoreExpr{ - pos: position{line: 561, col: 4, offset: 11470}, + pos: position{line: 572, col: 4, offset: 11904}, expr: &charClassMatcher{ - pos: position{line: 561, col: 4, offset: 11470}, + pos: position{line: 572, col: 4, offset: 11904}, val: "[0-9]", ranges: []rune{'0', '9'}, ignoreCase: false, @@ -3504,32 +3506,32 @@ var g = &grammar{ }, { name: "NonZeroLeadingInteger", - pos: position{line: 564, col: 1, offset: 11533}, + pos: position{line: 575, col: 1, offset: 11971}, expr: &actionExpr{ - pos: position{line: 565, col: 4, offset: 11558}, + pos: position{line: 576, col: 4, offset: 11996}, run: (*parser).callonNonZeroLeadingInteger1, expr: &choiceExpr{ - pos: position{line: 565, col: 6, offset: 11560}, + pos: position{line: 576, col: 6, offset: 11998}, alternatives: []interface{}{ &litMatcher{ - pos: position{line: 565, col: 6, offset: 11560}, + pos: position{line: 576, col: 6, offset: 11998}, val: "0", ignoreCase: false, }, &seqExpr{ - pos: position{line: 565, col: 12, offset: 11566}, + pos: position{line: 576, col: 12, offset: 12004}, exprs: []interface{}{ &charClassMatcher{ - pos: position{line: 565, col: 12, offset: 11566}, + pos: position{line: 576, col: 12, offset: 12004}, val: "[1-9]", ranges: []rune{'1', '9'}, ignoreCase: false, inverted: false, }, &zeroOrMoreExpr{ - pos: position{line: 565, col: 17, offset: 11571}, + pos: position{line: 576, col: 17, offset: 12009}, expr: &charClassMatcher{ - pos: position{line: 565, col: 17, offset: 11571}, + pos: position{line: 576, col: 17, offset: 12009}, val: "[0-9]", ranges: []rune{'0', '9'}, ignoreCase: false, @@ -3544,39 +3546,39 @@ var g = &grammar{ }, { name: "Fixnum", - pos: position{line: 568, col: 1, offset: 11604}, + pos: position{line: 579, col: 1, offset: 12042}, expr: &choiceExpr{ - pos: position{line: 569, col: 4, offset: 11614}, + pos: position{line: 580, col: 4, offset: 12052}, alternatives: []interface{}{ &seqExpr{ - pos: position{line: 569, col: 4, offset: 11614}, + pos: position{line: 580, col: 4, offset: 12052}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 569, col: 4, offset: 11614}, + pos: position{line: 580, col: 4, offset: 12052}, name: "Integer", }, &litMatcher{ - pos: position{line: 569, col: 12, offset: 11622}, + pos: position{line: 580, col: 12, offset: 12060}, val: ".", ignoreCase: false, }, &ruleRefExpr{ - pos: position{line: 569, col: 16, offset: 11626}, + pos: position{line: 580, col: 16, offset: 12064}, name: "Integer", }, }, }, &seqExpr{ - pos: position{line: 570, col: 4, offset: 11637}, + pos: position{line: 581, col: 4, offset: 12075}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 570, col: 4, offset: 11637}, + pos: position{line: 581, col: 4, offset: 12075}, name: "Integer", }, &zeroOrOneExpr{ - pos: position{line: 570, col: 12, offset: 11645}, + pos: position{line: 581, col: 12, offset: 12083}, expr: &litMatcher{ - pos: position{line: 570, col: 12, offset: 11645}, + pos: position{line: 581, col: 12, offset: 12083}, val: ".", ignoreCase: false, }, @@ -3584,15 +3586,15 @@ var g = &grammar{ }, }, &seqExpr{ - pos: position{line: 571, col: 4, offset: 11653}, + pos: position{line: 582, col: 4, offset: 12091}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 571, col: 4, offset: 11653}, + pos: position{line: 582, col: 4, offset: 12091}, val: ".", ignoreCase: false, }, &ruleRefExpr{ - pos: position{line: 571, col: 8, offset: 11657}, + pos: position{line: 582, col: 8, offset: 12095}, name: "Integer", }, }, @@ -3602,36 +3604,36 @@ var g = &grammar{ }, { name: "Decimal", - pos: position{line: 573, col: 1, offset: 11666}, + pos: position{line: 584, col: 1, offset: 12104}, expr: &actionExpr{ - pos: position{line: 574, col: 4, offset: 11677}, + pos: position{line: 585, col: 4, offset: 12115}, run: (*parser).callonDecimal1, expr: &seqExpr{ - pos: position{line: 574, col: 4, offset: 11677}, + pos: position{line: 585, col: 4, offset: 12115}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 574, col: 4, offset: 11677}, + pos: position{line: 585, col: 4, offset: 12115}, name: "Fixnum", }, &zeroOrOneExpr{ - pos: position{line: 574, col: 11, offset: 11684}, + pos: position{line: 585, col: 11, offset: 12122}, expr: &seqExpr{ - pos: position{line: 574, col: 13, offset: 11686}, + pos: position{line: 585, col: 13, offset: 12124}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 574, col: 13, offset: 11686}, + pos: position{line: 585, col: 13, offset: 12124}, val: "e", ignoreCase: true, }, &zeroOrOneExpr{ - pos: position{line: 574, col: 18, offset: 11691}, + pos: position{line: 585, col: 18, offset: 12129}, expr: &ruleRefExpr{ - pos: position{line: 574, col: 18, offset: 11691}, + pos: position{line: 585, col: 18, offset: 12129}, name: "Sign", }, }, &ruleRefExpr{ - pos: position{line: 574, col: 24, offset: 11697}, + pos: position{line: 585, col: 24, offset: 12135}, name: "Integer", }, }, @@ -3643,30 +3645,30 @@ var g = &grammar{ }, { name: "Hex", - pos: position{line: 577, col: 1, offset: 11761}, + pos: position{line: 588, col: 1, offset: 12206}, expr: &actionExpr{ - pos: position{line: 578, col: 4, offset: 11768}, + pos: position{line: 589, col: 4, offset: 12213}, run: (*parser).callonHex1, expr: &seqExpr{ - pos: position{line: 578, col: 4, offset: 11768}, + pos: position{line: 589, col: 4, offset: 12213}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 578, col: 4, offset: 11768}, + pos: position{line: 589, col: 4, offset: 12213}, val: "0", ignoreCase: false, }, &litMatcher{ - pos: position{line: 578, col: 8, offset: 11772}, + pos: position{line: 589, col: 8, offset: 12217}, val: "x", ignoreCase: true, }, &labeledExpr{ - pos: position{line: 578, col: 13, offset: 11777}, + pos: position{line: 589, col: 13, offset: 12222}, label: "s", expr: &oneOrMoreExpr{ - pos: position{line: 578, col: 15, offset: 11779}, + pos: position{line: 589, col: 15, offset: 12224}, expr: &charClassMatcher{ - pos: position{line: 578, col: 17, offset: 11781}, + pos: position{line: 589, col: 17, offset: 12226}, val: "[0-9A-Fa-f]", ranges: []rune{'0', '9', 'A', 'F', 'a', 'f'}, ignoreCase: false, @@ -3675,9 +3677,9 @@ var g = &grammar{ }, }, ¬Expr{ - pos: position{line: 578, col: 32, offset: 11796}, + pos: position{line: 589, col: 32, offset: 12241}, expr: &ruleRefExpr{ - pos: position{line: 578, col: 33, offset: 11797}, + pos: position{line: 589, col: 33, offset: 12242}, name: "NormalIdentifierRest", }, }, @@ -3687,16 +3689,16 @@ var g = &grammar{ }, { name: "StringLiteral", - pos: position{line: 581, col: 1, offset: 11862}, + pos: position{line: 592, col: 1, offset: 12307}, expr: &choiceExpr{ - pos: position{line: 582, col: 4, offset: 11879}, + pos: position{line: 593, col: 4, offset: 12324}, alternatives: []interface{}{ &ruleRefExpr{ - pos: position{line: 582, col: 4, offset: 11879}, + pos: position{line: 593, col: 4, offset: 12324}, name: "HexString", }, &ruleRefExpr{ - pos: position{line: 583, col: 4, offset: 11892}, + pos: position{line: 594, col: 4, offset: 12337}, name: "NormalString", }, }, @@ -3704,53 +3706,53 @@ var g = &grammar{ }, { name: "HexString", - pos: position{line: 585, col: 1, offset: 11906}, + pos: position{line: 596, col: 1, offset: 12351}, expr: &actionExpr{ - pos: position{line: 586, col: 4, offset: 11919}, + pos: position{line: 597, col: 4, offset: 12364}, run: (*parser).callonHexString1, expr: &seqExpr{ - pos: position{line: 586, col: 4, offset: 11919}, + pos: position{line: 597, col: 4, offset: 12364}, exprs: []interface{}{ &choiceExpr{ - pos: position{line: 586, col: 6, offset: 11921}, + pos: position{line: 597, col: 6, offset: 12366}, alternatives: []interface{}{ &litMatcher{ - pos: position{line: 586, col: 6, offset: 11921}, + pos: position{line: 597, col: 6, offset: 12366}, val: "hex", ignoreCase: true, }, &litMatcher{ - pos: position{line: 586, col: 15, offset: 11930}, + pos: position{line: 597, col: 15, offset: 12375}, val: "x", ignoreCase: true, }, }, }, &litMatcher{ - pos: position{line: 586, col: 22, offset: 11937}, + pos: position{line: 597, col: 22, offset: 12382}, val: "'", ignoreCase: false, }, &labeledExpr{ - pos: position{line: 586, col: 26, offset: 11941}, + pos: position{line: 597, col: 26, offset: 12386}, label: "s", expr: &zeroOrMoreExpr{ - pos: position{line: 586, col: 28, offset: 11943}, + pos: position{line: 597, col: 28, offset: 12388}, expr: &actionExpr{ - pos: position{line: 586, col: 29, offset: 11944}, + pos: position{line: 597, col: 29, offset: 12389}, run: (*parser).callonHexString9, expr: &seqExpr{ - pos: position{line: 586, col: 29, offset: 11944}, + pos: position{line: 597, col: 29, offset: 12389}, exprs: []interface{}{ &charClassMatcher{ - pos: position{line: 586, col: 29, offset: 11944}, + pos: position{line: 597, col: 29, offset: 12389}, val: "[0-9a-fA-F]", ranges: []rune{'0', '9', 'a', 'f', 'A', 'F'}, ignoreCase: false, inverted: false, }, &charClassMatcher{ - pos: position{line: 586, col: 40, offset: 11955}, + pos: position{line: 597, col: 40, offset: 12400}, val: "[0-9a-fA-F]", ranges: []rune{'0', '9', 'a', 'f', 'A', 'F'}, ignoreCase: false, @@ -3762,7 +3764,7 @@ var g = &grammar{ }, }, &litMatcher{ - pos: position{line: 586, col: 78, offset: 11993}, + pos: position{line: 597, col: 78, offset: 12438}, val: "'", ignoreCase: false, }, @@ -3772,46 +3774,46 @@ var g = &grammar{ }, { name: "NormalString", - pos: position{line: 589, col: 1, offset: 12055}, + pos: position{line: 600, col: 1, offset: 12507}, expr: &actionExpr{ - pos: position{line: 590, col: 4, offset: 12071}, + pos: position{line: 601, col: 4, offset: 12523}, run: (*parser).callonNormalString1, expr: &seqExpr{ - pos: position{line: 590, col: 4, offset: 12071}, + pos: position{line: 601, col: 4, offset: 12523}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 590, col: 4, offset: 12071}, + pos: position{line: 601, col: 4, offset: 12523}, val: "'", ignoreCase: false, }, &labeledExpr{ - pos: position{line: 590, col: 8, offset: 12075}, + pos: position{line: 601, col: 8, offset: 12527}, label: "s", expr: &zeroOrMoreExpr{ - pos: position{line: 590, col: 10, offset: 12077}, + pos: position{line: 601, col: 10, offset: 12529}, expr: &actionExpr{ - pos: position{line: 590, col: 12, offset: 12079}, + pos: position{line: 601, col: 12, offset: 12531}, run: (*parser).callonNormalString6, expr: &choiceExpr{ - pos: position{line: 590, col: 14, offset: 12081}, + pos: position{line: 601, col: 14, offset: 12533}, alternatives: []interface{}{ &charClassMatcher{ - pos: position{line: 590, col: 14, offset: 12081}, + pos: position{line: 601, col: 14, offset: 12533}, val: "[^'\\r\\n\\\\]", chars: []rune{'\'', '\r', '\n', '\\'}, ignoreCase: false, inverted: true, }, &seqExpr{ - pos: position{line: 590, col: 27, offset: 12094}, + pos: position{line: 601, col: 27, offset: 12546}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 590, col: 27, offset: 12094}, + pos: position{line: 601, col: 27, offset: 12546}, val: "\\", ignoreCase: false, }, &anyMatcher{ - line: 590, col: 32, offset: 12099, + line: 601, col: 32, offset: 12551, }, }, }, @@ -3821,7 +3823,7 @@ var g = &grammar{ }, }, &litMatcher{ - pos: position{line: 590, col: 62, offset: 12129}, + pos: position{line: 601, col: 62, offset: 12581}, val: "'", ignoreCase: false, }, @@ -3831,19 +3833,19 @@ var g = &grammar{ }, { name: "SelectToken", - pos: position{line: 594, col: 1, offset: 12206}, + pos: position{line: 605, col: 1, offset: 12666}, expr: &seqExpr{ - pos: position{line: 595, col: 4, offset: 12221}, + pos: position{line: 606, col: 4, offset: 12681}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 595, col: 4, offset: 12221}, + pos: position{line: 606, col: 4, offset: 12681}, val: "select", ignoreCase: true, }, ¬Expr{ - pos: position{line: 595, col: 14, offset: 12231}, + pos: position{line: 606, col: 14, offset: 12691}, expr: &ruleRefExpr{ - pos: position{line: 595, col: 15, offset: 12232}, + pos: position{line: 606, col: 15, offset: 12692}, name: "NormalIdentifierRest", }, }, @@ -3852,19 +3854,19 @@ var g = &grammar{ }, { name: "FromToken", - pos: position{line: 597, col: 1, offset: 12254}, + pos: position{line: 608, col: 1, offset: 12714}, expr: &seqExpr{ - pos: position{line: 598, col: 4, offset: 12267}, + pos: position{line: 609, col: 4, offset: 12727}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 598, col: 4, offset: 12267}, + pos: position{line: 609, col: 4, offset: 12727}, val: "from", ignoreCase: true, }, ¬Expr{ - pos: position{line: 598, col: 12, offset: 12275}, + pos: position{line: 609, col: 12, offset: 12735}, expr: &ruleRefExpr{ - pos: position{line: 598, col: 13, offset: 12276}, + pos: position{line: 609, col: 13, offset: 12736}, name: "NormalIdentifierRest", }, }, @@ -3873,19 +3875,19 @@ var g = &grammar{ }, { name: "WhereToken", - pos: position{line: 600, col: 1, offset: 12298}, + pos: position{line: 611, col: 1, offset: 12758}, expr: &seqExpr{ - pos: position{line: 601, col: 4, offset: 12312}, + pos: position{line: 612, col: 4, offset: 12772}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 601, col: 4, offset: 12312}, + pos: position{line: 612, col: 4, offset: 12772}, val: "where", ignoreCase: true, }, ¬Expr{ - pos: position{line: 601, col: 13, offset: 12321}, + pos: position{line: 612, col: 13, offset: 12781}, expr: &ruleRefExpr{ - pos: position{line: 601, col: 14, offset: 12322}, + pos: position{line: 612, col: 14, offset: 12782}, name: "NormalIdentifierRest", }, }, @@ -3894,19 +3896,19 @@ var g = &grammar{ }, { name: "OrderToken", - pos: position{line: 603, col: 1, offset: 12344}, + pos: position{line: 614, col: 1, offset: 12804}, expr: &seqExpr{ - pos: position{line: 604, col: 4, offset: 12358}, + pos: position{line: 615, col: 4, offset: 12818}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 604, col: 4, offset: 12358}, + pos: position{line: 615, col: 4, offset: 12818}, val: "order", ignoreCase: true, }, ¬Expr{ - pos: position{line: 604, col: 13, offset: 12367}, + pos: position{line: 615, col: 13, offset: 12827}, expr: &ruleRefExpr{ - pos: position{line: 604, col: 14, offset: 12368}, + pos: position{line: 615, col: 14, offset: 12828}, name: "NormalIdentifierRest", }, }, @@ -3915,19 +3917,19 @@ var g = &grammar{ }, { name: "ByToken", - pos: position{line: 606, col: 1, offset: 12390}, + pos: position{line: 617, col: 1, offset: 12850}, expr: &seqExpr{ - pos: position{line: 607, col: 4, offset: 12401}, + pos: position{line: 618, col: 4, offset: 12861}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 607, col: 4, offset: 12401}, + pos: position{line: 618, col: 4, offset: 12861}, val: "by", ignoreCase: true, }, ¬Expr{ - pos: position{line: 607, col: 10, offset: 12407}, + pos: position{line: 618, col: 10, offset: 12867}, expr: &ruleRefExpr{ - pos: position{line: 607, col: 11, offset: 12408}, + pos: position{line: 618, col: 11, offset: 12868}, name: "NormalIdentifierRest", }, }, @@ -3936,19 +3938,19 @@ var g = &grammar{ }, { name: "GroupToken", - pos: position{line: 609, col: 1, offset: 12430}, + pos: position{line: 620, col: 1, offset: 12890}, expr: &seqExpr{ - pos: position{line: 610, col: 4, offset: 12444}, + pos: position{line: 621, col: 4, offset: 12904}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 610, col: 4, offset: 12444}, + pos: position{line: 621, col: 4, offset: 12904}, val: "group", ignoreCase: true, }, ¬Expr{ - pos: position{line: 610, col: 13, offset: 12453}, + pos: position{line: 621, col: 13, offset: 12913}, expr: &ruleRefExpr{ - pos: position{line: 610, col: 14, offset: 12454}, + pos: position{line: 621, col: 14, offset: 12914}, name: "NormalIdentifierRest", }, }, @@ -3957,19 +3959,19 @@ var g = &grammar{ }, { name: "LimitToken", - pos: position{line: 612, col: 1, offset: 12476}, + pos: position{line: 623, col: 1, offset: 12936}, expr: &seqExpr{ - pos: position{line: 613, col: 4, offset: 12490}, + pos: position{line: 624, col: 4, offset: 12950}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 613, col: 4, offset: 12490}, + pos: position{line: 624, col: 4, offset: 12950}, val: "limit", ignoreCase: true, }, ¬Expr{ - pos: position{line: 613, col: 13, offset: 12499}, + pos: position{line: 624, col: 13, offset: 12959}, expr: &ruleRefExpr{ - pos: position{line: 613, col: 14, offset: 12500}, + pos: position{line: 624, col: 14, offset: 12960}, name: "NormalIdentifierRest", }, }, @@ -3978,19 +3980,19 @@ var g = &grammar{ }, { name: "OffsetToken", - pos: position{line: 615, col: 1, offset: 12522}, + pos: position{line: 626, col: 1, offset: 12982}, expr: &seqExpr{ - pos: position{line: 616, col: 4, offset: 12537}, + pos: position{line: 627, col: 4, offset: 12997}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 616, col: 4, offset: 12537}, + pos: position{line: 627, col: 4, offset: 12997}, val: "offset", ignoreCase: true, }, ¬Expr{ - pos: position{line: 616, col: 14, offset: 12547}, + pos: position{line: 627, col: 14, offset: 13007}, expr: &ruleRefExpr{ - pos: position{line: 616, col: 15, offset: 12548}, + pos: position{line: 627, col: 15, offset: 13008}, name: "NormalIdentifierRest", }, }, @@ -3999,19 +4001,19 @@ var g = &grammar{ }, { name: "UpdateToken", - pos: position{line: 618, col: 1, offset: 12570}, + pos: position{line: 629, col: 1, offset: 13030}, expr: &seqExpr{ - pos: position{line: 619, col: 4, offset: 12585}, + pos: position{line: 630, col: 4, offset: 13045}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 619, col: 4, offset: 12585}, + pos: position{line: 630, col: 4, offset: 13045}, val: "update", ignoreCase: true, }, ¬Expr{ - pos: position{line: 619, col: 14, offset: 12595}, + pos: position{line: 630, col: 14, offset: 13055}, expr: &ruleRefExpr{ - pos: position{line: 619, col: 15, offset: 12596}, + pos: position{line: 630, col: 15, offset: 13056}, name: "NormalIdentifierRest", }, }, @@ -4020,19 +4022,19 @@ var g = &grammar{ }, { name: "SetToken", - pos: position{line: 621, col: 1, offset: 12618}, + pos: position{line: 632, col: 1, offset: 13078}, expr: &seqExpr{ - pos: position{line: 622, col: 4, offset: 12630}, + pos: position{line: 633, col: 4, offset: 13090}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 622, col: 4, offset: 12630}, + pos: position{line: 633, col: 4, offset: 13090}, val: "set", ignoreCase: true, }, ¬Expr{ - pos: position{line: 622, col: 11, offset: 12637}, + pos: position{line: 633, col: 11, offset: 13097}, expr: &ruleRefExpr{ - pos: position{line: 622, col: 12, offset: 12638}, + pos: position{line: 633, col: 12, offset: 13098}, name: "NormalIdentifierRest", }, }, @@ -4041,19 +4043,19 @@ var g = &grammar{ }, { name: "DeleteToken", - pos: position{line: 624, col: 1, offset: 12660}, + pos: position{line: 635, col: 1, offset: 13120}, expr: &seqExpr{ - pos: position{line: 625, col: 4, offset: 12675}, + pos: position{line: 636, col: 4, offset: 13135}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 625, col: 4, offset: 12675}, + pos: position{line: 636, col: 4, offset: 13135}, val: "delete", ignoreCase: true, }, ¬Expr{ - pos: position{line: 625, col: 14, offset: 12685}, + pos: position{line: 636, col: 14, offset: 13145}, expr: &ruleRefExpr{ - pos: position{line: 625, col: 15, offset: 12686}, + pos: position{line: 636, col: 15, offset: 13146}, name: "NormalIdentifierRest", }, }, @@ -4062,19 +4064,19 @@ var g = &grammar{ }, { name: "InsertToken", - pos: position{line: 627, col: 1, offset: 12708}, + pos: position{line: 638, col: 1, offset: 13168}, expr: &seqExpr{ - pos: position{line: 628, col: 4, offset: 12723}, + pos: position{line: 639, col: 4, offset: 13183}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 628, col: 4, offset: 12723}, + pos: position{line: 639, col: 4, offset: 13183}, val: "insert", ignoreCase: true, }, ¬Expr{ - pos: position{line: 628, col: 14, offset: 12733}, + pos: position{line: 639, col: 14, offset: 13193}, expr: &ruleRefExpr{ - pos: position{line: 628, col: 15, offset: 12734}, + pos: position{line: 639, col: 15, offset: 13194}, name: "NormalIdentifierRest", }, }, @@ -4083,19 +4085,19 @@ var g = &grammar{ }, { name: "IntoToken", - pos: position{line: 630, col: 1, offset: 12756}, + pos: position{line: 641, col: 1, offset: 13216}, expr: &seqExpr{ - pos: position{line: 631, col: 4, offset: 12769}, + pos: position{line: 642, col: 4, offset: 13229}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 631, col: 4, offset: 12769}, + pos: position{line: 642, col: 4, offset: 13229}, val: "into", ignoreCase: true, }, ¬Expr{ - pos: position{line: 631, col: 12, offset: 12777}, + pos: position{line: 642, col: 12, offset: 13237}, expr: &ruleRefExpr{ - pos: position{line: 631, col: 13, offset: 12778}, + pos: position{line: 642, col: 13, offset: 13238}, name: "NormalIdentifierRest", }, }, @@ -4104,19 +4106,19 @@ var g = &grammar{ }, { name: "ValuesToken", - pos: position{line: 633, col: 1, offset: 12800}, + pos: position{line: 644, col: 1, offset: 13260}, expr: &seqExpr{ - pos: position{line: 634, col: 4, offset: 12815}, + pos: position{line: 645, col: 4, offset: 13275}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 634, col: 4, offset: 12815}, + pos: position{line: 645, col: 4, offset: 13275}, val: "values", ignoreCase: true, }, ¬Expr{ - pos: position{line: 634, col: 14, offset: 12825}, + pos: position{line: 645, col: 14, offset: 13285}, expr: &ruleRefExpr{ - pos: position{line: 634, col: 15, offset: 12826}, + pos: position{line: 645, col: 15, offset: 13286}, name: "NormalIdentifierRest", }, }, @@ -4125,19 +4127,19 @@ var g = &grammar{ }, { name: "CreateToken", - pos: position{line: 636, col: 1, offset: 12848}, + pos: position{line: 647, col: 1, offset: 13308}, expr: &seqExpr{ - pos: position{line: 637, col: 4, offset: 12863}, + pos: position{line: 648, col: 4, offset: 13323}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 637, col: 4, offset: 12863}, + pos: position{line: 648, col: 4, offset: 13323}, val: "create", ignoreCase: true, }, ¬Expr{ - pos: position{line: 637, col: 14, offset: 12873}, + pos: position{line: 648, col: 14, offset: 13333}, expr: &ruleRefExpr{ - pos: position{line: 637, col: 15, offset: 12874}, + pos: position{line: 648, col: 15, offset: 13334}, name: "NormalIdentifierRest", }, }, @@ -4146,19 +4148,19 @@ var g = &grammar{ }, { name: "TableToken", - pos: position{line: 639, col: 1, offset: 12896}, + pos: position{line: 650, col: 1, offset: 13356}, expr: &seqExpr{ - pos: position{line: 640, col: 4, offset: 12910}, + pos: position{line: 651, col: 4, offset: 13370}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 640, col: 4, offset: 12910}, + pos: position{line: 651, col: 4, offset: 13370}, val: "table", ignoreCase: true, }, ¬Expr{ - pos: position{line: 640, col: 13, offset: 12919}, + pos: position{line: 651, col: 13, offset: 13379}, expr: &ruleRefExpr{ - pos: position{line: 640, col: 14, offset: 12920}, + pos: position{line: 651, col: 14, offset: 13380}, name: "NormalIdentifierRest", }, }, @@ -4167,19 +4169,19 @@ var g = &grammar{ }, { name: "IndexToken", - pos: position{line: 642, col: 1, offset: 12942}, + pos: position{line: 653, col: 1, offset: 13402}, expr: &seqExpr{ - pos: position{line: 643, col: 4, offset: 12956}, + pos: position{line: 654, col: 4, offset: 13416}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 643, col: 4, offset: 12956}, + pos: position{line: 654, col: 4, offset: 13416}, val: "index", ignoreCase: true, }, ¬Expr{ - pos: position{line: 643, col: 13, offset: 12965}, + pos: position{line: 654, col: 13, offset: 13425}, expr: &ruleRefExpr{ - pos: position{line: 643, col: 14, offset: 12966}, + pos: position{line: 654, col: 14, offset: 13426}, name: "NormalIdentifierRest", }, }, @@ -4188,19 +4190,19 @@ var g = &grammar{ }, { name: "UniqueToken", - pos: position{line: 645, col: 1, offset: 12988}, + pos: position{line: 656, col: 1, offset: 13448}, expr: &seqExpr{ - pos: position{line: 646, col: 4, offset: 13003}, + pos: position{line: 657, col: 4, offset: 13463}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 646, col: 4, offset: 13003}, + pos: position{line: 657, col: 4, offset: 13463}, val: "unique", ignoreCase: true, }, ¬Expr{ - pos: position{line: 646, col: 14, offset: 13013}, + pos: position{line: 657, col: 14, offset: 13473}, expr: &ruleRefExpr{ - pos: position{line: 646, col: 15, offset: 13014}, + pos: position{line: 657, col: 15, offset: 13474}, name: "NormalIdentifierRest", }, }, @@ -4209,19 +4211,19 @@ var g = &grammar{ }, { name: "DefaultToken", - pos: position{line: 648, col: 1, offset: 13036}, + pos: position{line: 659, col: 1, offset: 13496}, expr: &seqExpr{ - pos: position{line: 649, col: 4, offset: 13052}, + pos: position{line: 660, col: 4, offset: 13512}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 649, col: 4, offset: 13052}, + pos: position{line: 660, col: 4, offset: 13512}, val: "default", ignoreCase: true, }, ¬Expr{ - pos: position{line: 649, col: 15, offset: 13063}, + pos: position{line: 660, col: 15, offset: 13523}, expr: &ruleRefExpr{ - pos: position{line: 649, col: 16, offset: 13064}, + pos: position{line: 660, col: 16, offset: 13524}, name: "NormalIdentifierRest", }, }, @@ -4230,19 +4232,19 @@ var g = &grammar{ }, { name: "PrimaryToken", - pos: position{line: 651, col: 1, offset: 13086}, + pos: position{line: 662, col: 1, offset: 13546}, expr: &seqExpr{ - pos: position{line: 652, col: 4, offset: 13102}, + pos: position{line: 663, col: 4, offset: 13562}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 652, col: 4, offset: 13102}, + pos: position{line: 663, col: 4, offset: 13562}, val: "primary", ignoreCase: true, }, ¬Expr{ - pos: position{line: 652, col: 15, offset: 13113}, + pos: position{line: 663, col: 15, offset: 13573}, expr: &ruleRefExpr{ - pos: position{line: 652, col: 16, offset: 13114}, + pos: position{line: 663, col: 16, offset: 13574}, name: "NormalIdentifierRest", }, }, @@ -4251,19 +4253,19 @@ var g = &grammar{ }, { name: "KeyToken", - pos: position{line: 654, col: 1, offset: 13136}, + pos: position{line: 665, col: 1, offset: 13596}, expr: &seqExpr{ - pos: position{line: 655, col: 4, offset: 13148}, + pos: position{line: 666, col: 4, offset: 13608}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 655, col: 4, offset: 13148}, + pos: position{line: 666, col: 4, offset: 13608}, val: "key", ignoreCase: true, }, ¬Expr{ - pos: position{line: 655, col: 11, offset: 13155}, + pos: position{line: 666, col: 11, offset: 13615}, expr: &ruleRefExpr{ - pos: position{line: 655, col: 12, offset: 13156}, + pos: position{line: 666, col: 12, offset: 13616}, name: "NormalIdentifierRest", }, }, @@ -4272,19 +4274,19 @@ var g = &grammar{ }, { name: "ReferencesToken", - pos: position{line: 657, col: 1, offset: 13178}, + pos: position{line: 668, col: 1, offset: 13638}, expr: &seqExpr{ - pos: position{line: 658, col: 4, offset: 13197}, + pos: position{line: 669, col: 4, offset: 13657}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 658, col: 4, offset: 13197}, + pos: position{line: 669, col: 4, offset: 13657}, val: "references", ignoreCase: true, }, ¬Expr{ - pos: position{line: 658, col: 18, offset: 13211}, + pos: position{line: 669, col: 18, offset: 13671}, expr: &ruleRefExpr{ - pos: position{line: 658, col: 19, offset: 13212}, + pos: position{line: 669, col: 19, offset: 13672}, name: "NormalIdentifierRest", }, }, @@ -4293,19 +4295,19 @@ var g = &grammar{ }, { name: "AutoincrementToken", - pos: position{line: 660, col: 1, offset: 13234}, + pos: position{line: 671, col: 1, offset: 13694}, expr: &seqExpr{ - pos: position{line: 661, col: 4, offset: 13256}, + pos: position{line: 672, col: 4, offset: 13716}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 661, col: 4, offset: 13256}, + pos: position{line: 672, col: 4, offset: 13716}, val: "autoincrement", ignoreCase: true, }, ¬Expr{ - pos: position{line: 661, col: 21, offset: 13273}, + pos: position{line: 672, col: 21, offset: 13733}, expr: &ruleRefExpr{ - pos: position{line: 661, col: 22, offset: 13274}, + pos: position{line: 672, col: 22, offset: 13734}, name: "NormalIdentifierRest", }, }, @@ -4314,19 +4316,19 @@ var g = &grammar{ }, { name: "OnToken", - pos: position{line: 663, col: 1, offset: 13296}, + pos: position{line: 674, col: 1, offset: 13756}, expr: &seqExpr{ - pos: position{line: 664, col: 4, offset: 13307}, + pos: position{line: 675, col: 4, offset: 13767}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 664, col: 4, offset: 13307}, + pos: position{line: 675, col: 4, offset: 13767}, val: "on", ignoreCase: true, }, ¬Expr{ - pos: position{line: 664, col: 10, offset: 13313}, + pos: position{line: 675, col: 10, offset: 13773}, expr: &ruleRefExpr{ - pos: position{line: 664, col: 11, offset: 13314}, + pos: position{line: 675, col: 11, offset: 13774}, name: "NormalIdentifierRest", }, }, @@ -4335,22 +4337,22 @@ var g = &grammar{ }, { name: "TrueToken", - pos: position{line: 666, col: 1, offset: 13336}, + pos: position{line: 677, col: 1, offset: 13796}, expr: &actionExpr{ - pos: position{line: 667, col: 4, offset: 13349}, + pos: position{line: 678, col: 4, offset: 13809}, run: (*parser).callonTrueToken1, expr: &seqExpr{ - pos: position{line: 667, col: 4, offset: 13349}, + pos: position{line: 678, col: 4, offset: 13809}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 667, col: 4, offset: 13349}, + pos: position{line: 678, col: 4, offset: 13809}, val: "true", ignoreCase: true, }, ¬Expr{ - pos: position{line: 667, col: 12, offset: 13357}, + pos: position{line: 678, col: 12, offset: 13817}, expr: &ruleRefExpr{ - pos: position{line: 667, col: 13, offset: 13358}, + pos: position{line: 678, col: 13, offset: 13818}, name: "NormalIdentifierRest", }, }, @@ -4360,22 +4362,22 @@ var g = &grammar{ }, { name: "FalseToken", - pos: position{line: 670, col: 1, offset: 13412}, + pos: position{line: 681, col: 1, offset: 13872}, expr: &actionExpr{ - pos: position{line: 671, col: 4, offset: 13426}, + pos: position{line: 682, col: 4, offset: 13886}, run: (*parser).callonFalseToken1, expr: &seqExpr{ - pos: position{line: 671, col: 4, offset: 13426}, + pos: position{line: 682, col: 4, offset: 13886}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 671, col: 4, offset: 13426}, + pos: position{line: 682, col: 4, offset: 13886}, val: "false", ignoreCase: true, }, ¬Expr{ - pos: position{line: 671, col: 13, offset: 13435}, + pos: position{line: 682, col: 13, offset: 13895}, expr: &ruleRefExpr{ - pos: position{line: 671, col: 14, offset: 13436}, + pos: position{line: 682, col: 14, offset: 13896}, name: "NormalIdentifierRest", }, }, @@ -4385,19 +4387,19 @@ var g = &grammar{ }, { name: "NullToken", - pos: position{line: 674, col: 1, offset: 13490}, + pos: position{line: 685, col: 1, offset: 13950}, expr: &seqExpr{ - pos: position{line: 675, col: 4, offset: 13503}, + pos: position{line: 686, col: 4, offset: 13963}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 675, col: 4, offset: 13503}, + pos: position{line: 686, col: 4, offset: 13963}, val: "null", ignoreCase: true, }, ¬Expr{ - pos: position{line: 675, col: 12, offset: 13511}, + pos: position{line: 686, col: 12, offset: 13971}, expr: &ruleRefExpr{ - pos: position{line: 675, col: 13, offset: 13512}, + pos: position{line: 686, col: 13, offset: 13972}, name: "NormalIdentifierRest", }, }, @@ -4406,19 +4408,19 @@ var g = &grammar{ }, { name: "IsToken", - pos: position{line: 677, col: 1, offset: 13534}, + pos: position{line: 688, col: 1, offset: 13994}, expr: &seqExpr{ - pos: position{line: 678, col: 4, offset: 13545}, + pos: position{line: 689, col: 4, offset: 14005}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 678, col: 4, offset: 13545}, + pos: position{line: 689, col: 4, offset: 14005}, val: "is", ignoreCase: true, }, ¬Expr{ - pos: position{line: 678, col: 10, offset: 13551}, + pos: position{line: 689, col: 10, offset: 14011}, expr: &ruleRefExpr{ - pos: position{line: 678, col: 11, offset: 13552}, + pos: position{line: 689, col: 11, offset: 14012}, name: "NormalIdentifierRest", }, }, @@ -4427,19 +4429,19 @@ var g = &grammar{ }, { name: "NullsToken", - pos: position{line: 680, col: 1, offset: 13574}, + pos: position{line: 691, col: 1, offset: 14034}, expr: &seqExpr{ - pos: position{line: 681, col: 4, offset: 13588}, + pos: position{line: 692, col: 4, offset: 14048}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 681, col: 4, offset: 13588}, + pos: position{line: 692, col: 4, offset: 14048}, val: "nulls", ignoreCase: true, }, ¬Expr{ - pos: position{line: 681, col: 13, offset: 13597}, + pos: position{line: 692, col: 13, offset: 14057}, expr: &ruleRefExpr{ - pos: position{line: 681, col: 14, offset: 13598}, + pos: position{line: 692, col: 14, offset: 14058}, name: "NormalIdentifierRest", }, }, @@ -4448,22 +4450,22 @@ var g = &grammar{ }, { name: "LastToken", - pos: position{line: 683, col: 1, offset: 13620}, + pos: position{line: 694, col: 1, offset: 14080}, expr: &actionExpr{ - pos: position{line: 684, col: 4, offset: 13633}, + pos: position{line: 695, col: 4, offset: 14093}, run: (*parser).callonLastToken1, expr: &seqExpr{ - pos: position{line: 684, col: 4, offset: 13633}, + pos: position{line: 695, col: 4, offset: 14093}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 684, col: 4, offset: 13633}, + pos: position{line: 695, col: 4, offset: 14093}, val: "last", ignoreCase: true, }, ¬Expr{ - pos: position{line: 684, col: 12, offset: 13641}, + pos: position{line: 695, col: 12, offset: 14101}, expr: &ruleRefExpr{ - pos: position{line: 684, col: 13, offset: 13642}, + pos: position{line: 695, col: 13, offset: 14102}, name: "NormalIdentifierRest", }, }, @@ -4473,22 +4475,22 @@ var g = &grammar{ }, { name: "FirstToken", - pos: position{line: 687, col: 1, offset: 13696}, + pos: position{line: 698, col: 1, offset: 14156}, expr: &actionExpr{ - pos: position{line: 688, col: 4, offset: 13710}, + pos: position{line: 699, col: 4, offset: 14170}, run: (*parser).callonFirstToken1, expr: &seqExpr{ - pos: position{line: 688, col: 4, offset: 13710}, + pos: position{line: 699, col: 4, offset: 14170}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 688, col: 4, offset: 13710}, + pos: position{line: 699, col: 4, offset: 14170}, val: "first", ignoreCase: true, }, ¬Expr{ - pos: position{line: 688, col: 13, offset: 13719}, + pos: position{line: 699, col: 13, offset: 14179}, expr: &ruleRefExpr{ - pos: position{line: 688, col: 14, offset: 13720}, + pos: position{line: 699, col: 14, offset: 14180}, name: "NormalIdentifierRest", }, }, @@ -4498,19 +4500,19 @@ var g = &grammar{ }, { name: "AndToken", - pos: position{line: 691, col: 1, offset: 13774}, + pos: position{line: 702, col: 1, offset: 14234}, expr: &seqExpr{ - pos: position{line: 692, col: 4, offset: 13786}, + pos: position{line: 703, col: 4, offset: 14246}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 692, col: 4, offset: 13786}, + pos: position{line: 703, col: 4, offset: 14246}, val: "and", ignoreCase: true, }, ¬Expr{ - pos: position{line: 692, col: 11, offset: 13793}, + pos: position{line: 703, col: 11, offset: 14253}, expr: &ruleRefExpr{ - pos: position{line: 692, col: 12, offset: 13794}, + pos: position{line: 703, col: 12, offset: 14254}, name: "NormalIdentifierRest", }, }, @@ -4519,19 +4521,19 @@ var g = &grammar{ }, { name: "OrToken", - pos: position{line: 694, col: 1, offset: 13816}, + pos: position{line: 705, col: 1, offset: 14276}, expr: &seqExpr{ - pos: position{line: 695, col: 4, offset: 13827}, + pos: position{line: 706, col: 4, offset: 14287}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 695, col: 4, offset: 13827}, + pos: position{line: 706, col: 4, offset: 14287}, val: "or", ignoreCase: true, }, ¬Expr{ - pos: position{line: 695, col: 10, offset: 13833}, + pos: position{line: 706, col: 10, offset: 14293}, expr: &ruleRefExpr{ - pos: position{line: 695, col: 11, offset: 13834}, + pos: position{line: 706, col: 11, offset: 14294}, name: "NormalIdentifierRest", }, }, @@ -4540,19 +4542,19 @@ var g = &grammar{ }, { name: "NotToken", - pos: position{line: 697, col: 1, offset: 13856}, + pos: position{line: 708, col: 1, offset: 14316}, expr: &seqExpr{ - pos: position{line: 698, col: 4, offset: 13868}, + pos: position{line: 709, col: 4, offset: 14328}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 698, col: 4, offset: 13868}, + pos: position{line: 709, col: 4, offset: 14328}, val: "not", ignoreCase: true, }, ¬Expr{ - pos: position{line: 698, col: 11, offset: 13875}, + pos: position{line: 709, col: 11, offset: 14335}, expr: &ruleRefExpr{ - pos: position{line: 698, col: 12, offset: 13876}, + pos: position{line: 709, col: 12, offset: 14336}, name: "NormalIdentifierRest", }, }, @@ -4561,19 +4563,19 @@ var g = &grammar{ }, { name: "InToken", - pos: position{line: 700, col: 1, offset: 13898}, + pos: position{line: 711, col: 1, offset: 14358}, expr: &seqExpr{ - pos: position{line: 701, col: 4, offset: 13909}, + pos: position{line: 712, col: 4, offset: 14369}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 701, col: 4, offset: 13909}, + pos: position{line: 712, col: 4, offset: 14369}, val: "in", ignoreCase: true, }, ¬Expr{ - pos: position{line: 701, col: 10, offset: 13915}, + pos: position{line: 712, col: 10, offset: 14375}, expr: &ruleRefExpr{ - pos: position{line: 701, col: 11, offset: 13916}, + pos: position{line: 712, col: 11, offset: 14376}, name: "NormalIdentifierRest", }, }, @@ -4582,19 +4584,19 @@ var g = &grammar{ }, { name: "LikeToken", - pos: position{line: 703, col: 1, offset: 13938}, + pos: position{line: 714, col: 1, offset: 14398}, expr: &seqExpr{ - pos: position{line: 704, col: 4, offset: 13951}, + pos: position{line: 715, col: 4, offset: 14411}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 704, col: 4, offset: 13951}, + pos: position{line: 715, col: 4, offset: 14411}, val: "like", ignoreCase: true, }, ¬Expr{ - pos: position{line: 704, col: 12, offset: 13959}, + pos: position{line: 715, col: 12, offset: 14419}, expr: &ruleRefExpr{ - pos: position{line: 704, col: 13, offset: 13960}, + pos: position{line: 715, col: 13, offset: 14420}, name: "NormalIdentifierRest", }, }, @@ -4603,22 +4605,22 @@ var g = &grammar{ }, { name: "AscToken", - pos: position{line: 706, col: 1, offset: 13982}, + pos: position{line: 717, col: 1, offset: 14442}, expr: &actionExpr{ - pos: position{line: 707, col: 4, offset: 13994}, + pos: position{line: 718, col: 4, offset: 14454}, run: (*parser).callonAscToken1, expr: &seqExpr{ - pos: position{line: 707, col: 4, offset: 13994}, + pos: position{line: 718, col: 4, offset: 14454}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 707, col: 4, offset: 13994}, + pos: position{line: 718, col: 4, offset: 14454}, val: "asc", ignoreCase: true, }, ¬Expr{ - pos: position{line: 707, col: 11, offset: 14001}, + pos: position{line: 718, col: 11, offset: 14461}, expr: &ruleRefExpr{ - pos: position{line: 707, col: 12, offset: 14002}, + pos: position{line: 718, col: 12, offset: 14462}, name: "NormalIdentifierRest", }, }, @@ -4628,22 +4630,22 @@ var g = &grammar{ }, { name: "DescToken", - pos: position{line: 710, col: 1, offset: 14056}, + pos: position{line: 721, col: 1, offset: 14516}, expr: &actionExpr{ - pos: position{line: 711, col: 4, offset: 14069}, + pos: position{line: 722, col: 4, offset: 14529}, run: (*parser).callonDescToken1, expr: &seqExpr{ - pos: position{line: 711, col: 4, offset: 14069}, + pos: position{line: 722, col: 4, offset: 14529}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 711, col: 4, offset: 14069}, + pos: position{line: 722, col: 4, offset: 14529}, val: "desc", ignoreCase: true, }, ¬Expr{ - pos: position{line: 711, col: 12, offset: 14077}, + pos: position{line: 722, col: 12, offset: 14537}, expr: &ruleRefExpr{ - pos: position{line: 711, col: 13, offset: 14078}, + pos: position{line: 722, col: 13, offset: 14538}, name: "NormalIdentifierRest", }, }, @@ -4653,19 +4655,19 @@ var g = &grammar{ }, { name: "CastToken", - pos: position{line: 714, col: 1, offset: 14132}, + pos: position{line: 725, col: 1, offset: 14592}, expr: &seqExpr{ - pos: position{line: 715, col: 4, offset: 14145}, + pos: position{line: 726, col: 4, offset: 14605}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 715, col: 4, offset: 14145}, + pos: position{line: 726, col: 4, offset: 14605}, val: "cast", ignoreCase: true, }, ¬Expr{ - pos: position{line: 715, col: 12, offset: 14153}, + pos: position{line: 726, col: 12, offset: 14613}, expr: &ruleRefExpr{ - pos: position{line: 715, col: 13, offset: 14154}, + pos: position{line: 726, col: 13, offset: 14614}, name: "NormalIdentifierRest", }, }, @@ -4674,19 +4676,19 @@ var g = &grammar{ }, { name: "AsToken", - pos: position{line: 717, col: 1, offset: 14176}, + pos: position{line: 728, col: 1, offset: 14636}, expr: &seqExpr{ - pos: position{line: 718, col: 4, offset: 14187}, + pos: position{line: 729, col: 4, offset: 14647}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 718, col: 4, offset: 14187}, + pos: position{line: 729, col: 4, offset: 14647}, val: "as", ignoreCase: true, }, ¬Expr{ - pos: position{line: 718, col: 10, offset: 14193}, + pos: position{line: 729, col: 10, offset: 14653}, expr: &ruleRefExpr{ - pos: position{line: 718, col: 11, offset: 14194}, + pos: position{line: 729, col: 11, offset: 14654}, name: "NormalIdentifierRest", }, }, @@ -4695,34 +4697,34 @@ var g = &grammar{ }, { name: "SeparatorToken", - pos: position{line: 720, col: 1, offset: 14216}, + pos: position{line: 731, col: 1, offset: 14676}, expr: &litMatcher{ - pos: position{line: 721, col: 4, offset: 14234}, + pos: position{line: 732, col: 4, offset: 14694}, val: ",", ignoreCase: false, }, }, { name: "AnyToken", - pos: position{line: 723, col: 1, offset: 14239}, + pos: position{line: 734, col: 1, offset: 14699}, expr: &litMatcher{ - pos: position{line: 724, col: 4, offset: 14251}, + pos: position{line: 735, col: 4, offset: 14711}, val: "*", ignoreCase: false, }, }, { name: "Identifier", - pos: position{line: 727, col: 1, offset: 14273}, + pos: position{line: 738, col: 1, offset: 14734}, expr: &choiceExpr{ - pos: position{line: 728, col: 4, offset: 14287}, + pos: position{line: 739, col: 4, offset: 14748}, alternatives: []interface{}{ &ruleRefExpr{ - pos: position{line: 728, col: 4, offset: 14287}, + pos: position{line: 739, col: 4, offset: 14748}, name: "NormalIdentifier", }, &ruleRefExpr{ - pos: position{line: 729, col: 4, offset: 14307}, + pos: position{line: 740, col: 4, offset: 14768}, name: "StringIdentifier", }, }, @@ -4730,21 +4732,21 @@ var g = &grammar{ }, { name: "NormalIdentifier", - pos: position{line: 731, col: 1, offset: 14325}, + pos: position{line: 742, col: 1, offset: 14786}, expr: &actionExpr{ - pos: position{line: 732, col: 4, offset: 14345}, + pos: position{line: 743, col: 4, offset: 14806}, run: (*parser).callonNormalIdentifier1, expr: &seqExpr{ - pos: position{line: 732, col: 4, offset: 14345}, + pos: position{line: 743, col: 4, offset: 14806}, exprs: []interface{}{ &ruleRefExpr{ - pos: position{line: 732, col: 4, offset: 14345}, + pos: position{line: 743, col: 4, offset: 14806}, name: "NormalIdentifierStart", }, &zeroOrMoreExpr{ - pos: position{line: 732, col: 26, offset: 14367}, + pos: position{line: 743, col: 26, offset: 14828}, expr: &ruleRefExpr{ - pos: position{line: 732, col: 26, offset: 14367}, + pos: position{line: 743, col: 26, offset: 14828}, name: "NormalIdentifierRest", }, }, @@ -4754,9 +4756,9 @@ var g = &grammar{ }, { name: "NormalIdentifierStart", - pos: position{line: 735, col: 1, offset: 14429}, + pos: position{line: 746, col: 1, offset: 14900}, expr: &charClassMatcher{ - pos: position{line: 736, col: 4, offset: 14454}, + pos: position{line: 747, col: 4, offset: 14925}, val: "[a-zA-Z@#_\\u0080-\\uffff]", chars: []rune{'@', '#', '_'}, ranges: []rune{'a', 'z', 'A', 'Z', '\u0080', '\uffff'}, @@ -4766,9 +4768,9 @@ var g = &grammar{ }, { name: "NormalIdentifierRest", - pos: position{line: 738, col: 1, offset: 14480}, + pos: position{line: 749, col: 1, offset: 14951}, expr: &charClassMatcher{ - pos: position{line: 739, col: 4, offset: 14504}, + pos: position{line: 750, col: 4, offset: 14975}, val: "[a-zA-Z0-9@#$_\\u0080-\\uffff]", chars: []rune{'@', '#', '$', '_'}, ranges: []rune{'a', 'z', 'A', 'Z', '0', '9', '\u0080', '\uffff'}, @@ -4778,46 +4780,46 @@ var g = &grammar{ }, { name: "StringIdentifier", - pos: position{line: 741, col: 1, offset: 14534}, + pos: position{line: 752, col: 1, offset: 15005}, expr: &actionExpr{ - pos: position{line: 742, col: 4, offset: 14554}, + pos: position{line: 753, col: 4, offset: 15025}, run: (*parser).callonStringIdentifier1, expr: &seqExpr{ - pos: position{line: 742, col: 4, offset: 14554}, + pos: position{line: 753, col: 4, offset: 15025}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 742, col: 4, offset: 14554}, + pos: position{line: 753, col: 4, offset: 15025}, val: "\"", ignoreCase: false, }, &labeledExpr{ - pos: position{line: 742, col: 9, offset: 14559}, + pos: position{line: 753, col: 9, offset: 15030}, label: "s", expr: &zeroOrMoreExpr{ - pos: position{line: 742, col: 11, offset: 14561}, + pos: position{line: 753, col: 11, offset: 15032}, expr: &actionExpr{ - pos: position{line: 742, col: 13, offset: 14563}, + pos: position{line: 753, col: 13, offset: 15034}, run: (*parser).callonStringIdentifier6, expr: &choiceExpr{ - pos: position{line: 742, col: 15, offset: 14565}, + pos: position{line: 753, col: 15, offset: 15036}, alternatives: []interface{}{ &charClassMatcher{ - pos: position{line: 742, col: 15, offset: 14565}, + pos: position{line: 753, col: 15, offset: 15036}, val: "[^\"\\r\\n\\\\]", chars: []rune{'"', '\r', '\n', '\\'}, ignoreCase: false, inverted: true, }, &seqExpr{ - pos: position{line: 742, col: 28, offset: 14578}, + pos: position{line: 753, col: 28, offset: 15049}, exprs: []interface{}{ &litMatcher{ - pos: position{line: 742, col: 28, offset: 14578}, + pos: position{line: 753, col: 28, offset: 15049}, val: "\\", ignoreCase: false, }, &anyMatcher{ - line: 742, col: 33, offset: 14583, + line: 753, col: 33, offset: 15054, }, }, }, @@ -4827,7 +4829,7 @@ var g = &grammar{ }, }, &litMatcher{ - pos: position{line: 742, col: 63, offset: 14613}, + pos: position{line: 753, col: 63, offset: 15084}, val: "\"", ignoreCase: false, }, @@ -4837,18 +4839,18 @@ var g = &grammar{ }, { name: "_", - pos: position{line: 748, col: 1, offset: 14691}, + pos: position{line: 759, col: 1, offset: 15172}, expr: &zeroOrMoreExpr{ - pos: position{line: 749, col: 4, offset: 14696}, + pos: position{line: 760, col: 4, offset: 15177}, expr: &choiceExpr{ - pos: position{line: 749, col: 6, offset: 14698}, + pos: position{line: 760, col: 6, offset: 15179}, alternatives: []interface{}{ &ruleRefExpr{ - pos: position{line: 749, col: 6, offset: 14698}, + pos: position{line: 760, col: 6, offset: 15179}, name: "Whitespace", }, &ruleRefExpr{ - pos: position{line: 749, col: 19, offset: 14711}, + pos: position{line: 760, col: 19, offset: 15192}, name: "Newline", }, }, @@ -4857,22 +4859,22 @@ var g = &grammar{ }, { name: "Newline", - pos: position{line: 751, col: 1, offset: 14723}, + pos: position{line: 762, col: 1, offset: 15204}, expr: &choiceExpr{ - pos: position{line: 752, col: 4, offset: 14734}, + pos: position{line: 763, col: 4, offset: 15215}, alternatives: []interface{}{ &litMatcher{ - pos: position{line: 752, col: 4, offset: 14734}, + pos: position{line: 763, col: 4, offset: 15215}, val: "\r\n", ignoreCase: false, }, &litMatcher{ - pos: position{line: 753, col: 4, offset: 14744}, + pos: position{line: 764, col: 4, offset: 15225}, val: "\r", ignoreCase: false, }, &litMatcher{ - pos: position{line: 754, col: 4, offset: 14752}, + pos: position{line: 765, col: 4, offset: 15233}, val: "\n", ignoreCase: false, }, @@ -4881,27 +4883,27 @@ var g = &grammar{ }, { name: "Whitespace", - pos: position{line: 756, col: 1, offset: 14758}, + pos: position{line: 767, col: 1, offset: 15239}, expr: &choiceExpr{ - pos: position{line: 757, col: 4, offset: 14772}, + pos: position{line: 768, col: 4, offset: 15253}, alternatives: []interface{}{ &litMatcher{ - pos: position{line: 757, col: 4, offset: 14772}, + pos: position{line: 768, col: 4, offset: 15253}, val: " ", ignoreCase: false, }, &litMatcher{ - pos: position{line: 758, col: 4, offset: 14779}, + pos: position{line: 769, col: 4, offset: 15260}, val: "\t", ignoreCase: false, }, &litMatcher{ - pos: position{line: 759, col: 4, offset: 14787}, + pos: position{line: 770, col: 4, offset: 15268}, val: "\v", ignoreCase: false, }, &litMatcher{ - pos: position{line: 760, col: 4, offset: 14795}, + pos: position{line: 771, col: 4, offset: 15276}, val: "\f", ignoreCase: false, }, @@ -4910,11 +4912,11 @@ var g = &grammar{ }, { name: "EOF", - pos: position{line: 762, col: 1, offset: 14801}, + pos: position{line: 773, col: 1, offset: 15282}, expr: ¬Expr{ - pos: position{line: 763, col: 4, offset: 14808}, + pos: position{line: 774, col: 4, offset: 15289}, expr: &anyMatcher{ - line: 763, col: 5, offset: 14809, + line: 774, col: 5, offset: 15290, }, }, }, @@ -5013,35 +5015,35 @@ func (p *parser) callonSelectStmt55() (interface{}, error) { func (c *current) onSelectStmt1(f, fs, table, where, group, order, limit, offset interface{}) (interface{}, error) { var ( - tableNode *identifierNode - whereNode *whereOptionNode - limitNode *limitOptionNode - offsetNode *offsetOptionNode + tableNode *ast.IdentifierNode + whereNode *ast.WhereOptionNode + limitNode *ast.LimitOptionNode + offsetNode *ast.OffsetOptionNode ) if table != nil { - t := table.(identifierNode) + t := table.(ast.IdentifierNode) tableNode = &t } if where != nil { - w := where.(whereOptionNode) + w := where.(ast.WhereOptionNode) whereNode = &w } if limit != nil { - l := limit.(limitOptionNode) + l := limit.(ast.LimitOptionNode) limitNode = &l } if offset != nil { - of := offset.(offsetOptionNode) - offsetNode = &of + o := offset.(ast.OffsetOptionNode) + offsetNode = &o } - return selectStmtNode{ - column: prepend(f, fs), - table: tableNode, - where: whereNode, - group: toSlice(group), - order: toSlice(order), - limit: limitNode, - offset: offsetNode, + return ast.SelectStmtNode{ + Column: prepend(f, fs), + Table: tableNode, + Where: whereNode, + Group: toSlice(group), + Order: toSlice(order), + Limit: limitNode, + Offset: offsetNode, }, nil } @@ -5073,16 +5075,16 @@ func (p *parser) callonUpdateStmt23() (interface{}, error) { func (c *current) onUpdateStmt1(table, a, as, where interface{}) (interface{}, error) { var ( - whereNode *whereOptionNode + whereNode *ast.WhereOptionNode ) if where != nil { - w := where.(whereOptionNode) + w := where.(ast.WhereOptionNode) whereNode = &w } - return updateStmtNode{ - table: table.(identifierNode), - assignment: prepend(a, as), - where: whereNode, + return ast.UpdateStmtNode{ + Table: table.(ast.IdentifierNode), + Assignment: prepend(a, as), + Where: whereNode, }, nil } @@ -5104,15 +5106,15 @@ func (p *parser) callonDeleteStmt11() (interface{}, error) { func (c *current) onDeleteStmt1(table, where interface{}) (interface{}, error) { var ( - whereNode *whereOptionNode + whereNode *ast.WhereOptionNode ) if where != nil { - w := where.(whereOptionNode) + w := where.(ast.WhereOptionNode) whereNode = &w } - return deleteStmtNode{ - table: table.(identifierNode), - where: whereNode, + return ast.DeleteStmtNode{ + Table: table.(ast.IdentifierNode), + Where: whereNode, }, nil } @@ -5123,9 +5125,9 @@ func (p *parser) callonDeleteStmt1() (interface{}, error) { } func (c *current) onInsertStmt1(table, insert interface{}) (interface{}, error) { - return insertStmtNode{ - table: table.(identifierNode), - insert: insert, + return ast.InsertStmtNode{ + Table: table.(ast.IdentifierNode), + Insert: insert, }, nil } @@ -5166,9 +5168,9 @@ func (p *parser) callonCreateTableStmt14() (interface{}, error) { } func (c *current) onCreateTableStmt1(table, column interface{}) (interface{}, error) { - return createTableStmtNode{ - table: table.(identifierNode), - column: toSlice(column), + return ast.CreateTableStmtNode{ + Table: table.(ast.IdentifierNode), + Column: toSlice(column), }, nil } @@ -5189,10 +5191,10 @@ func (p *parser) callonColumnSchema10() (interface{}, error) { } func (c *current) onColumnSchema1(i, t, cs interface{}) (interface{}, error) { - return columnSchemaNode{ - column: i.(identifierNode), - dataType: t, - constraint: toSlice(cs), + return ast.ColumnSchemaNode{ + Column: i.(ast.IdentifierNode), + DataType: t, + Constraint: toSlice(cs), }, nil } @@ -5224,17 +5226,17 @@ func (p *parser) callonCreateIndexStmt28() (interface{}, error) { func (c *current) onCreateIndexStmt1(unique, index, table, i, is interface{}) (interface{}, error) { var ( - uniqueNode *uniqueOptionNode + uniqueNode *ast.UniqueOptionNode ) if unique != nil { - u := unique.(uniqueOptionNode) + u := unique.(ast.UniqueOptionNode) uniqueNode = &u } - return createIndexStmtNode{ - index: index.(identifierNode), - table: table.(identifierNode), - column: prepend(i, is), - unique: uniqueNode, + return ast.CreateIndexStmtNode{ + Index: index.(ast.IdentifierNode), + Table: table.(ast.IdentifierNode), + Column: prepend(i, is), + Unique: uniqueNode, }, nil } @@ -5245,7 +5247,7 @@ func (p *parser) callonCreateIndexStmt1() (interface{}, error) { } func (c *current) onWhereClause1(e interface{}) (interface{}, error) { - return whereOptionNode{condition: e}, nil + return ast.WhereOptionNode{Condition: e}, nil } func (p *parser) callonWhereClause1() (interface{}, error) { @@ -5295,10 +5297,10 @@ func (p *parser) callonOrderColumn16() (interface{}, error) { } func (c *current) onOrderColumn1(i, s, n interface{}) (interface{}, error) { - return orderOptionNode{ - expr: i, - desc: s != nil && string(s.([]byte)) == "desc", - nullfirst: n != nil && string(n.([]byte)) == "first", + return ast.OrderOptionNode{ + Expr: i, + Desc: s != nil && string(s.([]byte)) == "desc", + NullsFirst: n != nil && string(n.([]byte)) == "first", }, nil } @@ -5309,7 +5311,7 @@ func (p *parser) callonOrderColumn1() (interface{}, error) { } func (c *current) onGroupByClause11(s interface{}) (interface{}, error) { - return groupOptionNode{expr: s}, nil + return ast.GroupOptionNode{Expr: s}, nil } func (p *parser) callonGroupByClause11() (interface{}, error) { @@ -5319,7 +5321,7 @@ func (p *parser) callonGroupByClause11() (interface{}, error) { } func (c *current) onGroupByClause1(i, is interface{}) (interface{}, error) { - return prepend(groupOptionNode{expr: i}, is), nil + return prepend(ast.GroupOptionNode{Expr: i}, is), nil } func (p *parser) callonGroupByClause1() (interface{}, error) { @@ -5329,7 +5331,7 @@ func (p *parser) callonGroupByClause1() (interface{}, error) { } func (c *current) onOffsetClause1(i interface{}) (interface{}, error) { - return offsetOptionNode{value: i.(integerValueNode)}, nil + return ast.OffsetOptionNode{Value: i.(ast.IntegerValueNode)}, nil } func (p *parser) callonOffsetClause1() (interface{}, error) { @@ -5339,7 +5341,7 @@ func (p *parser) callonOffsetClause1() (interface{}, error) { } func (c *current) onLimitClause1(i interface{}) (interface{}, error) { - return limitOptionNode{value: i.(integerValueNode)}, nil + return ast.LimitOptionNode{Value: i.(ast.IntegerValueNode)}, nil } func (p *parser) callonLimitClause1() (interface{}, error) { @@ -5379,9 +5381,9 @@ func (p *parser) callonInsertWithColumnClause29() (interface{}, error) { } func (c *current) onInsertWithColumnClause1(cs, v, vs interface{}) (interface{}, error) { - return insertWithColumnOptionNode{ - column: toSlice(cs), - value: prepend(v, vs), + return ast.InsertWithColumnOptionNode{ + Column: toSlice(cs), + Value: prepend(v, vs), }, nil } @@ -5392,7 +5394,7 @@ func (p *parser) callonInsertWithColumnClause1() (interface{}, error) { } func (c *current) onInsertWithDefaultClause1() (interface{}, error) { - return insertWithDefaultOptionNode{}, nil + return ast.InsertWithDefaultOptionNode{}, nil } func (p *parser) callonInsertWithDefaultClause1() (interface{}, error) { @@ -5402,7 +5404,7 @@ func (p *parser) callonInsertWithDefaultClause1() (interface{}, error) { } func (c *current) onPrimaryKeyClause1() (interface{}, error) { - return primaryOptionNode{}, nil + return ast.PrimaryOptionNode{}, nil } func (p *parser) callonPrimaryKeyClause1() (interface{}, error) { @@ -5412,7 +5414,7 @@ func (p *parser) callonPrimaryKeyClause1() (interface{}, error) { } func (c *current) onNotNullClause1() (interface{}, error) { - return notNullOptionNode{}, nil + return ast.NotNullOptionNode{}, nil } func (p *parser) callonNotNullClause1() (interface{}, error) { @@ -5422,7 +5424,7 @@ func (p *parser) callonNotNullClause1() (interface{}, error) { } func (c *current) onUniqueClause1() (interface{}, error) { - return uniqueOptionNode{}, nil + return ast.UniqueOptionNode{}, nil } func (p *parser) callonUniqueClause1() (interface{}, error) { @@ -5432,7 +5434,7 @@ func (p *parser) callonUniqueClause1() (interface{}, error) { } func (c *current) onDefaultClause1(e interface{}) (interface{}, error) { - return defaultOptionNode{value: e}, nil + return ast.DefaultOptionNode{Value: e}, nil } func (p *parser) callonDefaultClause1() (interface{}, error) { @@ -5442,9 +5444,9 @@ func (p *parser) callonDefaultClause1() (interface{}, error) { } func (c *current) onForeignClause1(t, f interface{}) (interface{}, error) { - return foreignOptionNode{ - table: t.(identifierNode), - column: f.(identifierNode), + return ast.ForeignOptionNode{ + Table: t.(ast.IdentifierNode), + Column: f.(ast.IdentifierNode), }, nil } @@ -5455,7 +5457,7 @@ func (p *parser) callonForeignClause1() (interface{}, error) { } func (c *current) onAutoincrementClause1() (interface{}, error) { - return autoincrementOptionNode{}, nil + return ast.AutoIncrementOptionNode{}, nil } func (p *parser) callonAutoincrementClause1() (interface{}, error) { @@ -5555,7 +5557,7 @@ func (p *parser) callonLogicExpr1In5() (interface{}, error) { } func (c *current) onLogicExpr1In1(n, s interface{}) (interface{}, error) { - op := opSetSubject(&inOperatorNode{}, s) + op := opSetSubject(&ast.InOperatorNode{}, s) if n != nil { return opSetTarget(n, op), nil } @@ -5579,7 +5581,7 @@ func (p *parser) callonLogicExpr1Null6() (interface{}, error) { } func (c *current) onLogicExpr1Null1(n interface{}) (interface{}, error) { - op := opSetSubject(&isOperatorNode{}, nullValueNode{}) + op := opSetSubject(&ast.IsOperatorNode{}, ast.NullValueNode{}) if n != nil { return opSetTarget(n, op), nil } @@ -5603,7 +5605,7 @@ func (p *parser) callonLogicExpr1Like5() (interface{}, error) { } func (c *current) onLogicExpr1Like1(n, s interface{}) (interface{}, error) { - op := opSetSubject(&likeOperatorNode{}, s) + op := opSetSubject(&ast.LikeOperatorNode{}, s) if n != nil { return opSetTarget(n, op), nil } @@ -5757,7 +5759,7 @@ func (p *parser) callonOperand17() (interface{}, error) { } func (c *current) onTypeCast1(o, s interface{}) (interface{}, error) { - return opSetSubject(opSetObject(&castOperatorNode{}, o), s), nil + return opSetSubject(opSetObject(&ast.CastOperatorNode{}, o), s), nil } func (p *parser) callonTypeCast1() (interface{}, error) { @@ -5767,7 +5769,7 @@ func (p *parser) callonTypeCast1() (interface{}, error) { } func (c *current) onFunctionCall1(i, r interface{}) (interface{}, error) { - return opSetSubject(opSetObject(&functionOperatorNode{}, i), r), nil + return opSetSubject(opSetObject(&ast.FunctionOperatorNode{}, i), r), nil } func (p *parser) callonFunctionCall1() (interface{}, error) { @@ -5787,7 +5789,7 @@ func (p *parser) callonFunctionArgs2() (interface{}, error) { } func (c *current) onAssignment1(i, e interface{}) (interface{}, error) { - return opSetSubject(opSetObject(&assignOperatorNode{}, i), e), nil + return opSetSubject(opSetObject(&ast.AssignOperatorNode{}, i), e), nil } func (p *parser) callonAssignment1() (interface{}, error) { @@ -5799,9 +5801,9 @@ func (p *parser) callonAssignment1() (interface{}, error) { func (c *current) onSignOperator1() (interface{}, error) { switch string(c.text) { case "+": - return &posOperatorNode{}, nil + return &ast.PosOperatorNode{}, nil case "-": - return &negOperatorNode{}, nil + return &ast.NegOperatorNode{}, nil } return nil, errors.New("unknown sign") } @@ -5813,7 +5815,7 @@ func (p *parser) callonSignOperator1() (interface{}, error) { } func (c *current) onNotOperator1() (interface{}, error) { - return ¬OperatorNode{}, nil + return &ast.NotOperatorNode{}, nil } func (p *parser) callonNotOperator1() (interface{}, error) { @@ -5823,7 +5825,7 @@ func (p *parser) callonNotOperator1() (interface{}, error) { } func (c *current) onAndOperator1() (interface{}, error) { - return &andOperatorNode{}, nil + return &ast.AndOperatorNode{}, nil } func (p *parser) callonAndOperator1() (interface{}, error) { @@ -5833,7 +5835,7 @@ func (p *parser) callonAndOperator1() (interface{}, error) { } func (c *current) onOrOperator1() (interface{}, error) { - return &orOperatorNode{}, nil + return &ast.OrOperatorNode{}, nil } func (p *parser) callonOrOperator1() (interface{}, error) { @@ -5845,19 +5847,19 @@ func (p *parser) callonOrOperator1() (interface{}, error) { func (c *current) onCmpOperator1() (interface{}, error) { switch string(c.text) { case "<=": - return &lessOrEqualOperatorNode{}, nil + return &ast.LessOrEqualOperatorNode{}, nil case ">=": - return &greaterOrEqualOperatorNode{}, nil + return &ast.GreaterOrEqualOperatorNode{}, nil case "<>": - return ¬EqualOperatorNode{}, nil + return &ast.NotEqualOperatorNode{}, nil case "!=": - return ¬EqualOperatorNode{}, nil + return &ast.NotEqualOperatorNode{}, nil case "<": - return &lessOperatorNode{}, nil + return &ast.LessOperatorNode{}, nil case ">": - return &greaterOperatorNode{}, nil + return &ast.GreaterOperatorNode{}, nil case "=": - return &equalOperatorNode{}, nil + return &ast.EqualOperatorNode{}, nil } return nil, errors.New("unknown cmp") } @@ -5869,7 +5871,7 @@ func (p *parser) callonCmpOperator1() (interface{}, error) { } func (c *current) onConcatOperator1() (interface{}, error) { - return &concatOperatorNode{}, nil + return &ast.ConcatOperatorNode{}, nil } func (p *parser) callonConcatOperator1() (interface{}, error) { @@ -5881,9 +5883,9 @@ func (p *parser) callonConcatOperator1() (interface{}, error) { func (c *current) onAddSubOperator1() (interface{}, error) { switch string(c.text) { case "+": - return &addOperatorNode{}, nil + return &ast.AddOperatorNode{}, nil case "-": - return &subOperatorNode{}, nil + return &ast.SubOperatorNode{}, nil } return nil, errors.New("unknown add sub") } @@ -5897,11 +5899,11 @@ func (p *parser) callonAddSubOperator1() (interface{}, error) { func (c *current) onMulDivModOperator1() (interface{}, error) { switch string(c.text) { case "*": - return &mulOperatorNode{}, nil + return &ast.MulOperatorNode{}, nil case "/": - return &divOperatorNode{}, nil + return &ast.DivOperatorNode{}, nil case "%": - return &modOperatorNode{}, nil + return &ast.ModOperatorNode{}, nil } return nil, errors.New("unknown mul div mod") } @@ -5913,7 +5915,10 @@ func (p *parser) callonMulDivModOperator1() (interface{}, error) { } func (c *current) onUIntType1(s interface{}) (interface{}, error) { - return intTypeNode{size: toInt(s.([]byte)), unsigned: true}, nil + return ast.IntTypeNode{ + Unsigned: true, + Size: toUint(s.([]byte)), + }, nil } func (p *parser) callonUIntType1() (interface{}, error) { @@ -5923,7 +5928,10 @@ func (p *parser) callonUIntType1() (interface{}, error) { } func (c *current) onIntType1(s interface{}) (interface{}, error) { - return intTypeNode{size: toInt(s.([]byte))}, nil + return ast.IntTypeNode{ + Unsigned: false, + Size: toUint(s.([]byte)), + }, nil } func (p *parser) callonIntType1() (interface{}, error) { @@ -5933,10 +5941,10 @@ func (p *parser) callonIntType1() (interface{}, error) { } func (c *current) onUFixedType1(s, t interface{}) (interface{}, error) { - return fixedTypeNode{ - integerSize: toInt(s.([]byte)), - fractionalSize: toInt(t.([]byte)), - unsigned: true, + return ast.FixedTypeNode{ + Unsigned: true, + Size: toUint(s.([]byte)), + FractionalDigits: toUint(t.([]byte)), }, nil } @@ -5947,9 +5955,10 @@ func (p *parser) callonUFixedType1() (interface{}, error) { } func (c *current) onFixedType1(s, t interface{}) (interface{}, error) { - return fixedTypeNode{ - integerSize: toInt(s.([]byte)), - fractionalSize: toInt(t.([]byte)), + return ast.FixedTypeNode{ + Unsigned: false, + Size: toUint(s.([]byte)), + FractionalDigits: toUint(t.([]byte)), }, nil } @@ -5960,7 +5969,7 @@ func (p *parser) callonFixedType1() (interface{}, error) { } func (c *current) onFixedBytesType2(s interface{}) (interface{}, error) { - return fixedBytesTypeNode{size: toInt(s.([]byte))}, nil + return ast.FixedBytesTypeNode{Size: toUint(s.([]byte))}, nil } func (p *parser) callonFixedBytesType2() (interface{}, error) { @@ -5970,7 +5979,7 @@ func (p *parser) callonFixedBytesType2() (interface{}, error) { } func (c *current) onFixedBytesType9() (interface{}, error) { - return fixedBytesTypeNode{size: 1}, nil + return ast.FixedBytesTypeNode{Size: 1}, nil } func (p *parser) callonFixedBytesType9() (interface{}, error) { @@ -5980,7 +5989,7 @@ func (p *parser) callonFixedBytesType9() (interface{}, error) { } func (c *current) onDynamicBytesType1() (interface{}, error) { - return dynamicBytesTypeNode{}, nil + return ast.DynamicBytesTypeNode{}, nil } func (p *parser) callonDynamicBytesType1() (interface{}, error) { @@ -5990,7 +5999,7 @@ func (p *parser) callonDynamicBytesType1() (interface{}, error) { } func (c *current) onAddressType1() (interface{}, error) { - return addressTypeNode{}, nil + return ast.AddressTypeNode{}, nil } func (p *parser) callonAddressType1() (interface{}, error) { @@ -6000,7 +6009,7 @@ func (p *parser) callonAddressType1() (interface{}, error) { } func (c *current) onBoolType1() (interface{}, error) { - return boolTypeNode{}, nil + return ast.BoolTypeNode{}, nil } func (p *parser) callonBoolType1() (interface{}, error) { @@ -6010,7 +6019,7 @@ func (p *parser) callonBoolType1() (interface{}, error) { } func (c *current) onAnyLiteral1() (interface{}, error) { - return anyValueNode{}, nil + return ast.AnyValueNode{}, nil } func (p *parser) callonAnyLiteral1() (interface{}, error) { @@ -6020,7 +6029,7 @@ func (p *parser) callonAnyLiteral1() (interface{}, error) { } func (c *current) onDefaultLiteral1() (interface{}, error) { - return defaultValueNode{}, nil + return ast.DefaultValueNode{}, nil } func (p *parser) callonDefaultLiteral1() (interface{}, error) { @@ -6030,7 +6039,7 @@ func (p *parser) callonDefaultLiteral1() (interface{}, error) { } func (c *current) onBoolLiteral1(b interface{}) (interface{}, error) { - return boolValueNode(string(b.([]byte)) == "true"), nil + return ast.BoolValueNode{V: string(b.([]byte)) == "true"}, nil } func (p *parser) callonBoolLiteral1() (interface{}, error) { @@ -6040,7 +6049,7 @@ func (p *parser) callonBoolLiteral1() (interface{}, error) { } func (c *current) onNullLiteral1() (interface{}, error) { - return nullValueNode{}, nil + return ast.NullValueNode{}, nil } func (p *parser) callonNullLiteral1() (interface{}, error) { @@ -6060,7 +6069,7 @@ func (p *parser) callonNumberLiteral2() (interface{}, error) { } func (c *current) onInteger1() (interface{}, error) { - return integerValueNode{v: toDecimal(c.text)}, nil + return ast.IntegerValueNode{V: toDecimal(c.text)}, nil } func (p *parser) callonInteger1() (interface{}, error) { @@ -6080,7 +6089,7 @@ func (p *parser) callonNonZeroLeadingInteger1() (interface{}, error) { } func (c *current) onDecimal1() (interface{}, error) { - return decimalValueNode(toDecimal(c.text)), nil + return ast.DecimalValueNode{V: toDecimal(c.text)}, nil } func (p *parser) callonDecimal1() (interface{}, error) { @@ -6110,7 +6119,7 @@ func (p *parser) callonHexString9() (interface{}, error) { } func (c *current) onHexString1(s interface{}) (interface{}, error) { - return bytesValueNode(hexToBytes(joinBytes(s))), nil + return ast.BytesValueNode{V: hexToBytes(joinBytes(s))}, nil } func (p *parser) callonHexString1() (interface{}, error) { @@ -6130,7 +6139,7 @@ func (p *parser) callonNormalString6() (interface{}, error) { } func (c *current) onNormalString1(s interface{}) (interface{}, error) { - return bytesValueNode(resolveString(joinBytes(s))), nil + return ast.BytesValueNode{V: resolveString(joinBytes(s))}, nil } func (p *parser) callonNormalString1() (interface{}, error) { @@ -6200,7 +6209,7 @@ func (p *parser) callonDescToken1() (interface{}, error) { } func (c *current) onNormalIdentifier1() (interface{}, error) { - return identifierNode(c.text), nil + return ast.IdentifierNode{Name: c.text}, nil } func (p *parser) callonNormalIdentifier1() (interface{}, error) { @@ -6220,7 +6229,7 @@ func (p *parser) callonStringIdentifier6() (interface{}, error) { } func (c *current) onStringIdentifier1(s interface{}) (interface{}, error) { - return identifierNode(resolveString(joinBytes(s))), nil + return ast.IdentifierNode{Name: resolveString(joinBytes(s))}, nil } func (p *parser) callonStringIdentifier1() (interface{}, error) { diff --git a/core/vm/sqlvm/grammar.peg b/core/vm/sqlvm/parser/grammar.peg index ac2f8928c..7f847b3c1 100644 --- a/core/vm/sqlvm/grammar.peg +++ b/core/vm/sqlvm/parser/grammar.peg @@ -1,12 +1,12 @@ { -package sqlvm +package parser } S <- _ x:Stmt? _ xs:( ';' _ s:Stmt? _ { return s, nil } )* EOF { return prepend(x, xs), nil } -/* statement */ +/* Statements */ Stmt = SelectStmt / UpdateStmt @@ -26,35 +26,35 @@ SelectStmt offset:( _ of:OffsetClause { return of, nil } )? { var ( - tableNode *identifierNode - whereNode *whereOptionNode - limitNode *limitOptionNode - offsetNode *offsetOptionNode + tableNode *ast.IdentifierNode + whereNode *ast.WhereOptionNode + limitNode *ast.LimitOptionNode + offsetNode *ast.OffsetOptionNode ) if table != nil { - t := table.(identifierNode) + t := table.(ast.IdentifierNode) tableNode = &t } if where != nil { - w := where.(whereOptionNode) + w := where.(ast.WhereOptionNode) whereNode = &w } if limit != nil { - l := limit.(limitOptionNode) + l := limit.(ast.LimitOptionNode) limitNode = &l } if offset != nil { - of := offset.(offsetOptionNode) - offsetNode = &of + o := offset.(ast.OffsetOptionNode) + offsetNode = &o } - return selectStmtNode{ - column: prepend(f, fs), - table: tableNode, - where: whereNode, - group: toSlice(group), - order: toSlice(order), - limit: limitNode, - offset: offsetNode, + return ast.SelectStmtNode{ + Column: prepend(f, fs), + Table: tableNode, + Where: whereNode, + Group: toSlice(group), + Order: toSlice(order), + Limit: limitNode, + Offset: offsetNode, }, nil } @@ -70,16 +70,16 @@ UpdateStmt where:( _ w:WhereClause { return w, nil } )? { var ( - whereNode *whereOptionNode + whereNode *ast.WhereOptionNode ) if where != nil { - w := where.(whereOptionNode) + w := where.(ast.WhereOptionNode) whereNode = &w } - return updateStmtNode{ - table: table.(identifierNode), - assignment: prepend(a, as), - where: whereNode, + return ast.UpdateStmtNode{ + Table: table.(ast.IdentifierNode), + Assignment: prepend(a, as), + Where: whereNode, }, nil } @@ -90,15 +90,15 @@ DeleteStmt where:( _ w:WhereClause { return w, nil } )? { var ( - whereNode *whereOptionNode + whereNode *ast.WhereOptionNode ) if where != nil { - w := where.(whereOptionNode) + w := where.(ast.WhereOptionNode) whereNode = &w } - return deleteStmtNode{ - table: table.(identifierNode), - where: whereNode, + return ast.DeleteStmtNode{ + Table: table.(ast.IdentifierNode), + Where: whereNode, }, nil } @@ -108,9 +108,9 @@ InsertStmt _ table:Identifier _ insert:( InsertWithColumnClause / InsertWithDefaultClause ) { - return insertStmtNode{ - table: table.(identifierNode), - insert: insert, + return ast.InsertStmtNode{ + Table: table.(ast.IdentifierNode), + Insert: insert, }, nil } @@ -130,9 +130,9 @@ CreateTableStmt )? _ ')' { - return createTableStmtNode{ - table: table.(identifierNode), - column: toSlice(column), + return ast.CreateTableStmtNode{ + Table: table.(ast.IdentifierNode), + Column: toSlice(column), }, nil } @@ -141,10 +141,10 @@ ColumnSchema _ t:DataType cs:( _ s:ColumnConstraint { return s, nil } )* { - return columnSchemaNode{ - column: i.(identifierNode), - dataType: t, - constraint: toSlice(cs), + return ast.ColumnSchemaNode{ + Column: i.(ast.IdentifierNode), + DataType: t, + Constraint: toSlice(cs), }, nil } @@ -166,24 +166,24 @@ CreateIndexStmt _ '(' _ i:Identifier is:( _ SeparatorToken _ x:Identifier { return x, nil } )* _ ')' { var ( - uniqueNode *uniqueOptionNode + uniqueNode *ast.UniqueOptionNode ) if unique != nil { - u := unique.(uniqueOptionNode) + u := unique.(ast.UniqueOptionNode) uniqueNode = &u } - return createIndexStmtNode{ - index: index.(identifierNode), - table: table.(identifierNode), - column: prepend(i, is), - unique: uniqueNode, + return ast.CreateIndexStmtNode{ + Index: index.(ast.IdentifierNode), + Table: table.(ast.IdentifierNode), + Column: prepend(i, is), + Unique: uniqueNode, }, nil } -/* clause */ +/* Clauses */ WhereClause = WhereToken _ e:Expr -{ return whereOptionNode{condition: e}, nil } +{ return ast.WhereOptionNode{Condition: e}, nil } OrderByClause = OrderToken @@ -197,10 +197,10 @@ OrderColumn s:( _ t:( AscToken / DescToken ) { return t, nil } )? n:( _ NullsToken _ l:( LastToken / FirstToken ) { return l, nil } )? { - return orderOptionNode{ - expr: i, - desc: s != nil && string(s.([]byte)) == "desc", - nullfirst: n != nil && string(n.([]byte)) == "first", + return ast.OrderOptionNode{ + Expr: i, + Desc: s != nil && string(s.([]byte)) == "desc", + NullsFirst: n != nil && string(n.([]byte)) == "first", }, nil } @@ -208,16 +208,16 @@ GroupByClause = GroupToken _ ByToken _ i:Expr - is:( _ SeparatorToken _ s:Expr { return groupOptionNode{expr: s}, nil } )* -{ return prepend(groupOptionNode{expr: i}, is), nil } + is:( _ SeparatorToken _ s:Expr { return ast.GroupOptionNode{Expr: s}, nil } )* +{ return prepend(ast.GroupOptionNode{Expr: i}, is), nil } OffsetClause = OffsetToken _ i:Integer -{ return offsetOptionNode{value: i.(integerValueNode)}, nil } +{ return ast.OffsetOptionNode{Value: i.(ast.IntegerValueNode)}, nil } LimitClause = LimitToken _ i:Integer -{ return limitOptionNode{value: i.(integerValueNode)}, nil } +{ return ast.LimitOptionNode{Value: i.(ast.IntegerValueNode)}, nil } InsertWithColumnClause = cs:( '(' @@ -230,46 +230,46 @@ InsertWithColumnClause _ v:InsertValue vs:( _ SeparatorToken _ y:InsertValue { return y, nil } )* { - return insertWithColumnOptionNode{ - column: toSlice(cs), - value: prepend(v, vs), + return ast.InsertWithColumnOptionNode{ + Column: toSlice(cs), + Value: prepend(v, vs), }, nil } InsertWithDefaultClause = DefaultToken _ ValuesToken -{ return insertWithDefaultOptionNode{}, nil } +{ return ast.InsertWithDefaultOptionNode{}, nil } PrimaryKeyClause = PrimaryToken _ KeyToken -{ return primaryOptionNode{}, nil } +{ return ast.PrimaryOptionNode{}, nil } NotNullClause = NotToken _ NullToken -{ return notNullOptionNode{}, nil } +{ return ast.NotNullOptionNode{}, nil } UniqueClause = UniqueToken -{ return uniqueOptionNode{}, nil } +{ return ast.UniqueOptionNode{}, nil } DefaultClause = DefaultToken _ e:Expr -{ return defaultOptionNode{value: e}, nil } +{ return ast.DefaultOptionNode{Value: e}, nil } ForeignClause = ReferencesToken _ t:Identifier _ '(' _ f:Identifier _ ')' { - return foreignOptionNode{ - table: t.(identifierNode), - column: f.(identifierNode), + return ast.ForeignOptionNode{ + Table: t.(ast.IdentifierNode), + Column: f.(ast.IdentifierNode), }, nil } AutoincrementClause = AutoincrementToken -{ return autoincrementOptionNode{}, nil } +{ return ast.AutoIncrementOptionNode{}, nil } -/* expression */ +/* Expressions */ Expr = LogicExpr @@ -308,7 +308,7 @@ LogicExpr1Op LogicExpr1In = n:( t:NotOperator _ { return t, nil } )? InToken _ '(' _ s:MultiExpr _ ')' { - op := opSetSubject(&inOperatorNode{}, s) + op := opSetSubject(&ast.InOperatorNode{}, s) if n != nil { return opSetTarget(n, op), nil } @@ -318,7 +318,7 @@ LogicExpr1In LogicExpr1Null = IsToken n:( _ t:NotOperator { return t, nil } )? _ NullToken { - op := opSetSubject(&isOperatorNode{}, nullValueNode{}) + op := opSetSubject(&ast.IsOperatorNode{}, ast.NullValueNode{}) if n != nil { return opSetTarget(n, op), nil } @@ -328,7 +328,7 @@ LogicExpr1Null LogicExpr1Like = n:( t:NotOperator _ { return t, nil } )? LikeToken _ s:Expr { - op := opSetSubject(&likeOperatorNode{}, s) + op := opSetSubject(&ast.LikeOperatorNode{}, s) if n != nil { return opSetTarget(n, op), nil } @@ -372,11 +372,11 @@ Operand TypeCast = CastToken _ '(' _ o:Expr _ AsToken _ s:DataType _ ')' -{ return opSetSubject(opSetObject(&castOperatorNode{}, o), s), nil } +{ return opSetSubject(opSetObject(&ast.CastOperatorNode{}, o), s), nil } FunctionCall = i:Identifier _ '(' _ r:FunctionArgs? _ ')' -{ return opSetSubject(opSetObject(&functionOperatorNode{}, i), r), nil } +{ return opSetSubject(opSetObject(&ast.FunctionOperatorNode{}, i), r), nil } FunctionArgs = a:AnyLiteral { return []interface{}{a}, nil } @@ -384,9 +384,9 @@ FunctionArgs Assignment = i:Identifier _ '=' _ e:ExprWithDefault -{ return opSetSubject(opSetObject(&assignOperatorNode{}, i), e), nil } +{ return opSetSubject(opSetObject(&ast.AssignOperatorNode{}, i), e), nil } -/* operator */ +/* Operators */ UnaryOperator = SignOperator @@ -395,59 +395,59 @@ SignOperator { switch string(c.text) { case "+": - return &posOperatorNode{}, nil + return &ast.PosOperatorNode{}, nil case "-": - return &negOperatorNode{}, nil + return &ast.NegOperatorNode{}, nil } return nil, errors.New("unknown sign") } NotOperator = NotToken -{ return ¬OperatorNode{}, nil } +{ return &ast.NotOperatorNode{}, nil } AndOperator = AndToken -{ return &andOperatorNode{}, nil } +{ return &ast.AndOperatorNode{}, nil } OrOperator = OrToken -{ return &orOperatorNode{}, nil } +{ return &ast.OrOperatorNode{}, nil } CmpOperator = ( "<=" / ">=" / "<>" / "!=" / [<>=] ) { switch string(c.text) { case "<=": - return &lessOrEqualOperatorNode{}, nil + return &ast.LessOrEqualOperatorNode{}, nil case ">=": - return &greaterOrEqualOperatorNode{}, nil + return &ast.GreaterOrEqualOperatorNode{}, nil case "<>": - return ¬EqualOperatorNode{}, nil + return &ast.NotEqualOperatorNode{}, nil case "!=": - return ¬EqualOperatorNode{}, nil + return &ast.NotEqualOperatorNode{}, nil case "<": - return &lessOperatorNode{}, nil + return &ast.LessOperatorNode{}, nil case ">": - return &greaterOperatorNode{}, nil + return &ast.GreaterOperatorNode{}, nil case "=": - return &equalOperatorNode{}, nil + return &ast.EqualOperatorNode{}, nil } return nil, errors.New("unknown cmp") } ConcatOperator = "||" -{ return &concatOperatorNode{}, nil } +{ return &ast.ConcatOperatorNode{}, nil } AddSubOperator = [+-] { switch string(c.text) { case "+": - return &addOperatorNode{}, nil + return &ast.AddOperatorNode{}, nil case "-": - return &subOperatorNode{}, nil + return &ast.SubOperatorNode{}, nil } return nil, errors.New("unknown add sub") } @@ -457,16 +457,16 @@ MulDivModOperator { switch string(c.text) { case "*": - return &mulOperatorNode{}, nil + return &ast.MulOperatorNode{}, nil case "/": - return &divOperatorNode{}, nil + return &ast.DivOperatorNode{}, nil case "%": - return &modOperatorNode{}, nil + return &ast.ModOperatorNode{}, nil } return nil, errors.New("unknown mul div mod") } -/* type */ +/* Types */ DataType = UIntType / IntType @@ -479,55 +479,66 @@ DataType UIntType = "UINT"i s:NonZeroLeadingInteger !NormalIdentifierRest -{ return intTypeNode{size: toInt(s.([]byte)), unsigned: true}, nil } +{ + return ast.IntTypeNode{ + Unsigned: true, + Size: toUint(s.([]byte)), + }, nil +} IntType = "INT"i s:NonZeroLeadingInteger !NormalIdentifierRest -{ return intTypeNode{size: toInt(s.([]byte))}, nil } +{ + return ast.IntTypeNode{ + Unsigned: false, + Size: toUint(s.([]byte)), + }, nil +} UFixedType = "UFIXED"i s:NonZeroLeadingInteger "X"i t:NonZeroLeadingInteger !NormalIdentifierRest { - return fixedTypeNode{ - integerSize: toInt(s.([]byte)), - fractionalSize: toInt(t.([]byte)), - unsigned: true, + return ast.FixedTypeNode{ + Unsigned: true, + Size: toUint(s.([]byte)), + FractionalDigits: toUint(t.([]byte)), }, nil } FixedType = "FIXED"i s:NonZeroLeadingInteger "X"i t:NonZeroLeadingInteger !NormalIdentifierRest { - return fixedTypeNode{ - integerSize: toInt(s.([]byte)), - fractionalSize: toInt(t.([]byte)), + return ast.FixedTypeNode{ + Unsigned: false, + Size: toUint(s.([]byte)), + FractionalDigits: toUint(t.([]byte)), }, nil } FixedBytesType = "BYTES"i s:NonZeroLeadingInteger !NormalIdentifierRest -{ return fixedBytesTypeNode{size: toInt(s.([]byte))}, nil } +{ return ast.FixedBytesTypeNode{Size: toUint(s.([]byte))}, nil } / "BYTE"i !NormalIdentifierRest -{ return fixedBytesTypeNode{size: 1}, nil } +{ return ast.FixedBytesTypeNode{Size: 1}, nil } DynamicBytesType = ( "BYTES"i !NormalIdentifierRest / "STRING"i !NormalIdentifierRest / "TEXT"i !NormalIdentifierRest ) -{ return dynamicBytesTypeNode{}, nil } +{ return ast.DynamicBytesTypeNode{}, nil } AddressType = "ADDRESS"i !NormalIdentifierRest -{ return addressTypeNode{}, nil } +{ return ast.AddressTypeNode{}, nil } BoolType = ( "BOOL"i !NormalIdentifierRest / "BOOLEAN"i !NormalIdentifierRest ) -{ return boolTypeNode{}, nil } +{ return ast.BoolTypeNode{}, nil } -/* value */ +/* Values */ Value = NumberLiteral / StringLiteral @@ -536,19 +547,19 @@ Value AnyLiteral = AnyToken -{ return anyValueNode{}, nil } +{ return ast.AnyValueNode{}, nil } DefaultLiteral = DefaultToken -{ return defaultValueNode{}, nil } +{ return ast.DefaultValueNode{}, nil } BoolLiteral = b:( TrueToken / FalseToken ) -{ return boolValueNode(string(b.([]byte)) == "true"), nil } +{ return ast.BoolValueNode{V: string(b.([]byte)) == "true"}, nil } NullLiteral = NullToken -{ return nullValueNode{}, nil } +{ return ast.NullValueNode{}, nil } NumberLiteral = &("0" "X"i) h:Hex { return h, nil } @@ -559,7 +570,7 @@ Sign Integer = [0-9]+ -{ return integerValueNode{v: toDecimal(c.text)}, nil } +{ return ast.IntegerValueNode{V: toDecimal(c.text)}, nil } NonZeroLeadingInteger = ( "0" / [1-9][0-9]* ) @@ -572,7 +583,7 @@ Fixnum Decimal = Fixnum ( "E"i Sign? Integer )? -{ return decimalValueNode(toDecimal(c.text)), nil } +{ return ast.DecimalValueNode{V: toDecimal(c.text)}, nil } Hex = "0" "X"i s:( [0-9A-Fa-f] )+ !NormalIdentifierRest @@ -584,13 +595,13 @@ StringLiteral HexString = ( "HEX"i / "X"i ) "'" s:([0-9a-fA-F][0-9a-fA-F] { return c.text, nil } )* "'" -{ return bytesValueNode(hexToBytes(joinBytes(s))), nil } +{ return ast.BytesValueNode{V: hexToBytes(joinBytes(s))}, nil } NormalString = "'" s:( ( [^'\r\n\\] / "\\" . ) { return c.text, nil } )* "'" -{ return bytesValueNode(resolveString(joinBytes(s))), nil } +{ return ast.BytesValueNode{V: resolveString(joinBytes(s))}, nil } -/* token */ +/* Tokens */ SelectToken = "SELECT"i !NormalIdentifierRest @@ -723,14 +734,14 @@ SeparatorToken AnyToken = "*" -/* identifier */ +/* Identifiers */ Identifier = NormalIdentifier / StringIdentifier NormalIdentifier = NormalIdentifierStart NormalIdentifierRest* -{ return identifierNode(c.text), nil } +{ return ast.IdentifierNode{Name: c.text}, nil } NormalIdentifierStart = [a-zA-Z@#_\u0080-\uffff] @@ -741,10 +752,10 @@ NormalIdentifierRest StringIdentifier = "\"" s:( ( [^"\r\n\\] / "\\" . ) { return c.text, nil } )* "\"" { - return identifierNode(resolveString(joinBytes(s))), nil + return ast.IdentifierNode{Name: resolveString(joinBytes(s))}, nil } -/* skip */ +/* Skip */ _ = ( Whitespace / Newline )* diff --git a/core/vm/sqlvm/parser.go b/core/vm/sqlvm/parser/parser.go index 0b284c0e3..19d5e7477 100644 --- a/core/vm/sqlvm/parser.go +++ b/core/vm/sqlvm/parser/parser.go @@ -1,10 +1,11 @@ -package sqlvm +package parser import ( "encoding/hex" "strconv" "strings" + "github.com/dexon-foundation/dexon/core/vm/sqlvm/ast" "github.com/shopspring/decimal" ) @@ -39,7 +40,7 @@ func hexToInteger(h []byte) interface{} { Mul(base.Pow(decimal.New(int64(l-idx-1), 0))), ) } - return integerValueNode{v: d, address: isAddress(h)} + return ast.IntegerValueNode{V: d, IsAddress: isAddress(h)} } func hexToBytes(h []byte) []byte { @@ -47,9 +48,9 @@ func hexToBytes(h []byte) []byte { return bs } -func toInt(b []byte) int32 { - i, _ := strconv.ParseInt(string(b), 10, 32) - return int32(i) +func toUint(b []byte) uint32 { + i, _ := strconv.ParseUint(string(b), 10, 32) + return uint32(i) } func toDecimal(b []byte) decimal.Decimal { @@ -70,30 +71,30 @@ func joinBytes(x interface{}) []byte { } func opSetSubject(op interface{}, s interface{}) interface{} { - x := op.(binaryOperator) - x.setSubject(s) + x := op.(ast.BinaryOperator) + x.SetSubject(s) return x } func opSetObject(op interface{}, o interface{}) interface{} { - x := op.(binaryOperator) - x.setObject(o) + x := op.(ast.BinaryOperator) + x.SetObject(o) return x } func opSetTarget(op interface{}, t interface{}) interface{} { - x := op.(unaryOperator) - x.setTarget(t) + x := op.(ast.UnaryOperator) + x.SetTarget(t) return x } func joinOperator(x interface{}, o interface{}) { - if op, ok := x.(unaryOperator); ok { - joinOperator(op.getTarget(), o) + if op, ok := x.(ast.UnaryOperator); ok { + joinOperator(op.GetTarget(), o) return } - if op, ok := x.(binaryOperator); ok { - op.setObject(o) + if op, ok := x.(ast.BinaryOperator); ok { + op.SetObject(o) return } } diff --git a/core/vm/sqlvm/parser_test.go b/core/vm/sqlvm/parser/parser_test.go index e7dc18e95..a81b1d22d 100644 --- a/core/vm/sqlvm/parser_test.go +++ b/core/vm/sqlvm/parser/parser_test.go @@ -1,4 +1,4 @@ -package sqlvm +package parser import ( "testing" diff --git a/core/vm/sqlvm/type.go b/core/vm/sqlvm/type.go deleted file mode 100644 index 890b5e6ee..000000000 --- a/core/vm/sqlvm/type.go +++ /dev/null @@ -1,408 +0,0 @@ -package sqlvm - -import ( - "fmt" - "reflect" - - "github.com/shopspring/decimal" -) - -type identifierNode string - -type valuer interface { - value() interface{} -} - -type boolValueNode bool - -func (n boolValueNode) value() interface{} { return bool(n) } - -type integerValueNode struct { - v decimal.Decimal - address bool -} - -func (n integerValueNode) value() interface{} { return n.v } -func (n integerValueNode) String() string { return n.v.String() } - -type decimalValueNode decimal.Decimal - -func (n decimalValueNode) value() interface{} { return decimal.Decimal(n) } -func (n decimalValueNode) String() string { return decimal.Decimal(n).String() } - -type bytesValueNode []byte - -func (n bytesValueNode) value() interface{} { return []byte(n) } -func (n bytesValueNode) String() string { return string(n) } - -type anyValueNode struct{} - -func (n anyValueNode) value() interface{} { return n } - -type defaultValueNode struct{} - -func (n defaultValueNode) value() interface{} { return n } - -type nullValueNode struct{} - -func (n nullValueNode) value() interface{} { return n } - -type intTypeNode struct { - size int32 - unsigned bool -} - -type fixedTypeNode struct { - integerSize int32 - fractionalSize int32 - unsigned bool -} - -type dynamicBytesTypeNode struct{} - -type fixedBytesTypeNode struct { - size int32 -} - -type addressTypeNode struct{} -type boolTypeNode struct{} - -type unaryOperator interface { - getTarget() interface{} - setTarget(interface{}) -} - -type binaryOperator interface { - getObject() interface{} - getSubject() interface{} - setObject(interface{}) - setSubject(interface{}) -} - -type unaryOperatorNode struct { - target interface{} -} - -func (n unaryOperatorNode) getTarget() interface{} { - return n.target -} - -func (n *unaryOperatorNode) setTarget(t interface{}) { - n.target = t -} - -type binaryOperatorNode struct { - object interface{} - subject interface{} -} - -func (n binaryOperatorNode) getObject() interface{} { - return n.object -} - -func (n binaryOperatorNode) getSubject() interface{} { - return n.subject -} - -func (n *binaryOperatorNode) setObject(o interface{}) { - n.object = o -} - -func (n *binaryOperatorNode) setSubject(s interface{}) { - n.subject = s -} - -type posOperatorNode struct{ unaryOperatorNode } -type negOperatorNode struct{ unaryOperatorNode } -type notOperatorNode struct{ unaryOperatorNode } -type andOperatorNode struct{ binaryOperatorNode } -type orOperatorNode struct{ binaryOperatorNode } - -type greaterOrEqualOperatorNode struct{ binaryOperatorNode } -type lessOrEqualOperatorNode struct{ binaryOperatorNode } -type notEqualOperatorNode struct{ binaryOperatorNode } -type equalOperatorNode struct{ binaryOperatorNode } -type greaterOperatorNode struct{ binaryOperatorNode } -type lessOperatorNode struct{ binaryOperatorNode } - -type concatOperatorNode struct{ binaryOperatorNode } -type addOperatorNode struct{ binaryOperatorNode } -type subOperatorNode struct{ binaryOperatorNode } -type mulOperatorNode struct{ binaryOperatorNode } -type divOperatorNode struct{ binaryOperatorNode } -type modOperatorNode struct{ binaryOperatorNode } - -type inOperatorNode struct{ binaryOperatorNode } -type isOperatorNode struct{ binaryOperatorNode } -type likeOperatorNode struct{ binaryOperatorNode } - -type castOperatorNode struct{ binaryOperatorNode } -type assignOperatorNode struct{ binaryOperatorNode } -type functionOperatorNode struct{ binaryOperatorNode } - -type optional interface { - getOption() map[string]interface{} -} - -type nilOptionNode struct{} - -func (n nilOptionNode) getOption() map[string]interface{} { return nil } - -type whereOptionNode struct { - condition interface{} -} - -func (n whereOptionNode) getOption() map[string]interface{} { - return map[string]interface{}{ - "condition": n.condition, - } -} - -type orderOptionNode struct { - expr interface{} - desc bool - nullfirst bool -} - -func (n orderOptionNode) getOption() map[string]interface{} { - return map[string]interface{}{ - "expr": n.expr, - "desc": n.desc, - "nullfirst": n.nullfirst, - } -} - -type groupOptionNode struct { - expr interface{} -} - -func (n groupOptionNode) getOption() map[string]interface{} { - return map[string]interface{}{ - "expr": n.expr, - } -} - -type offsetOptionNode struct { - value integerValueNode -} - -func (n offsetOptionNode) getOption() map[string]interface{} { - return map[string]interface{}{ - "value": n.value, - } -} - -type limitOptionNode struct { - value integerValueNode -} - -func (n limitOptionNode) getOption() map[string]interface{} { - return map[string]interface{}{ - "value": n.value, - } -} - -type insertWithColumnOptionNode struct { - column []interface{} - value []interface{} -} - -func (n insertWithColumnOptionNode) getOption() map[string]interface{} { - return map[string]interface{}{ - "column": n.column, - "value": n.value, - } -} - -type insertWithDefaultOptionNode struct{ nilOptionNode } -type primaryOptionNode struct{ nilOptionNode } -type notNullOptionNode struct{ nilOptionNode } -type uniqueOptionNode struct{ nilOptionNode } -type autoincrementOptionNode struct{ nilOptionNode } - -type defaultOptionNode struct { - value interface{} -} - -func (n defaultOptionNode) getOption() map[string]interface{} { - return map[string]interface{}{ - "value": n.value, - } -} - -type foreignOptionNode struct { - table identifierNode - column identifierNode -} - -func (n foreignOptionNode) getOption() map[string]interface{} { - return map[string]interface{}{ - "table": n.table, - "column": n.column, - } -} - -type selectStmtNode struct { - column []interface{} - table *identifierNode - where *whereOptionNode - group []interface{} - order []interface{} - limit *limitOptionNode - offset *offsetOptionNode -} - -func (n selectStmtNode) getOption() map[string]interface{} { - return map[string]interface{}{ - "column": n.column, - "table": n.table, - "where": n.where, - "group": n.group, - "order": n.order, - "limit": n.limit, - "offset": n.offset, - } -} - -type updateStmtNode struct { - table identifierNode - assignment []interface{} - where *whereOptionNode -} - -func (n updateStmtNode) getOption() map[string]interface{} { - return map[string]interface{}{ - "table": n.table, - "assignment": n.assignment, - "where": n.where, - } -} - -type deleteStmtNode struct { - table identifierNode - where *whereOptionNode -} - -func (n deleteStmtNode) getOption() map[string]interface{} { - return map[string]interface{}{ - "table": n.table, - "where": n.where, - } -} - -type insertStmtNode struct { - table identifierNode - insert interface{} -} - -func (n insertStmtNode) getOption() map[string]interface{} { - return map[string]interface{}{ - "table": n.table, - "insert": n.insert, - } -} - -type createTableStmtNode struct { - table identifierNode - column []interface{} -} - -func (n createTableStmtNode) getOption() map[string]interface{} { - return map[string]interface{}{ - "table": n.table, - "column": n.column, - } -} - -type columnSchemaNode struct { - column identifierNode - dataType interface{} - constraint []interface{} -} - -func (n columnSchemaNode) getOption() map[string]interface{} { - return map[string]interface{}{ - "column": n.column, - "data_type": n.dataType, - "constraint": n.constraint, - } -} - -type createIndexStmtNode struct { - index identifierNode - table identifierNode - column []interface{} - unique *uniqueOptionNode -} - -func (n createIndexStmtNode) getOption() map[string]interface{} { - return map[string]interface{}{ - "index": n.index, - "table": n.table, - "column": n.column, - "unique": n.unique, - } -} - -// PrintAST prints ast to stdout. -func PrintAST(n interface{}, indent string) { - if n == nil { - fmt.Printf("%snil\n", indent) - return - } - typeOf := reflect.TypeOf(n) - valueOf := reflect.ValueOf(n) - name := "" - if typeOf.Kind() == reflect.Ptr { - if valueOf.IsNil() { - fmt.Printf("%snil\n", indent) - return - } - name = "*" - valueOf = valueOf.Elem() - typeOf = typeOf.Elem() - } - name = name + typeOf.Name() - - if op, ok := n.(optional); ok { - fmt.Printf("%s%s", indent, name) - m := op.getOption() - if m == nil { - fmt.Printf("\n") - return - } - fmt.Printf(":\n") - for k := range m { - fmt.Printf("%s %s:\n", indent, k) - PrintAST(m[k], indent+" ") - } - return - } - if op, ok := n.(unaryOperator); ok { - fmt.Printf("%s%s:\n", indent, name) - fmt.Printf("%s target:\n", indent) - PrintAST(op.getTarget(), indent+" ") - return - } - if op, ok := n.(binaryOperator); ok { - fmt.Printf("%s%s:\n", indent, name) - fmt.Printf("%s object:\n", indent) - PrintAST(op.getObject(), indent+" ") - fmt.Printf("%s subject:\n", indent) - PrintAST(op.getSubject(), indent+" ") - return - } - if arr, ok := n.([]interface{}); ok { - fmt.Printf("%s[\n", indent) - for idx := range arr { - PrintAST(arr[idx], indent+" ") - } - fmt.Printf("%s]\n", indent) - return - } - if stringer, ok := n.(fmt.Stringer); ok { - fmt.Printf("%s%s: %s\n", indent, name, stringer.String()) - return - } - fmt.Printf("%s%s: %+v\n", indent, name, valueOf.Interface()) -} |