v5

package
v0.0.0-...-969f932 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Code generated by goyacc -l -o v5/out.go v5/parser.y. DO NOT EDIT.

Index

Constants

View Source
const COMMA = 57351
View Source
const DQUOTE = 57359
View Source
const EQ = 57357
View Source
const LBRACE = 57350
View Source
const LBRACK = 57349
View Source
const LPAREN = 57348
View Source
const PERIOD = 57352
View Source
const QUOTE = 57358
View Source
const RBRACE = 57355
View Source
const RBRACK = 57354
View Source
const RPAREN = 57353
View Source
const SEMICOLON = 57356
View Source
const TILDE = 57360

Variables

This section is empty.

Functions

func Parse

func Parse()

Types

type ColumnStmt

type ColumnStmt struct {
	NameNode
	FieldTypeNode
	FieldOptsStmt
	CommentNode //comment
	// contains filtered or unexported fields
}

func (*ColumnStmt) Pos

func (cs *ColumnStmt) Pos() int

func (*ColumnStmt) Receive

func (cs *ColumnStmt) Receive(nod node, lexer yyLexer)

func (*ColumnStmt) String

func (cs *ColumnStmt) String() string

func (*ColumnStmt) Type

func (cs *ColumnStmt) Type() NodeType

type ColumnsStmt

type ColumnsStmt []*ColumnStmt

func (*ColumnsStmt) ExistF

func (cs *ColumnsStmt) ExistF(fn func(col *ColumnStmt) bool) bool

func (*ColumnsStmt) Receive

func (cs *ColumnsStmt) Receive(nod node, lexer yyLexer)

func (*ColumnsStmt) Sort

func (cs *ColumnsStmt) Sort()

func (*ColumnsStmt) String

func (cs *ColumnsStmt) String() string

func (*ColumnsStmt) Type

func (cs *ColumnsStmt) Type() NodeType

type CommentNode

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

func (CommentNode) String

func (cn CommentNode) String() string

func (CommentNode) Type

func (cn CommentNode) Type() NodeType

type CreateTableStmt

type CreateTableStmt struct {
	NameNode
	ColumnsStmt        *ColumnsStmt
	TableIndexListStmt *TableIndexListStmt
	TableOptsStmt      *TableOptsStmt
}

func (*CreateTableStmt) Receive

func (c *CreateTableStmt) Receive(nod node, s yyLexer)

func (*CreateTableStmt) String

func (c *CreateTableStmt) String() string

func (*CreateTableStmt) Type

func (c *CreateTableStmt) Type() NodeType

type Creator

type Creator CreateTableStmt

func ParseSql

func ParseSql(sql string) *Creator

func (*Creator) Create

func (c *Creator) Create() *ast.GenDecl

func (*Creator) PkFunc

func (c *Creator) PkFunc() *ast.FuncDecl

func (*Creator) Save

func (c *Creator) Save(wr io.Writer) error

func (*Creator) StructName

func (c *Creator) StructName() string

func (*Creator) TableFunc

func (c *Creator) TableFunc() *ast.FuncDecl

type ExprNode

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

type FieldDefaultNode

type FieldDefaultNode OptUnionNode

func (FieldDefaultNode) String

func (f FieldDefaultNode) String() string

func (FieldDefaultNode) Type

func (f FieldDefaultNode) Type() NodeType

type FieldOptNode

type FieldOptNode OptUnionNode

func (FieldOptNode) Pos

func (f FieldOptNode) Pos() int

func (FieldOptNode) String

func (f FieldOptNode) String() string

func (FieldOptNode) Type

func (f FieldOptNode) Type() NodeType

type FieldOptsStmt

type FieldOptsStmt []FieldOptNode

func (*FieldOptsStmt) Receive

func (f *FieldOptsStmt) Receive(nd node, lexer yyLexer)

func (*FieldOptsStmt) String

func (f *FieldOptsStmt) String() string

func (*FieldOptsStmt) Type

func (f *FieldOptsStmt) Type() NodeType

type FieldType

type FieldType string

type FieldTypeNode

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

func (FieldTypeNode) String

func (f FieldTypeNode) String() string

func (FieldTypeNode) Type

func (f FieldTypeNode) Type() NodeType

type IPos

type IPos interface {
	Pos() int
}

type IndexType

type IndexType int

type NameListStmt

type NameListStmt []NameNode

func (*NameListStmt) Receive

func (n *NameListStmt) Receive(nod node, lexer yyLexer)

func (*NameListStmt) String

func (n *NameListStmt) String() string

func (*NameListStmt) Type

func (n *NameListStmt) Type() NodeType

type NameNode

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

func (NameNode) String

func (nn NameNode) String() string

func (NameNode) Type

func (nn NameNode) Type() NodeType

type NodeType

type NodeType int

type OptUnionNode

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

type PosArray

type PosArray[T IPos] []T

func (PosArray[T]) Len

func (p PosArray[T]) Len() int

func (PosArray[T]) Less

func (p PosArray[T]) Less(i, j int) bool

func (PosArray[T]) Swap

func (p PosArray[T]) Swap(i, j int)

type StmtNode

type StmtNode interface {
	Receive(nod node, lexer yyLexer)
	// contains filtered or unexported methods
}

type TableIndexListStmt

type TableIndexListStmt []TableIndexStmt

func (*TableIndexListStmt) Find

func (*TableIndexListStmt) IsExist

func (t *TableIndexListStmt) IsExist(idx IndexType) bool

func (*TableIndexListStmt) Receive

func (t *TableIndexListStmt) Receive(nd node, lexer yyLexer)

func (*TableIndexListStmt) String

func (t *TableIndexListStmt) String() string

func (*TableIndexListStmt) Type

func (t *TableIndexListStmt) Type() NodeType

type TableIndexStmt

type TableIndexStmt struct {
	NameNode
	NameListStmt NameListStmt
	// contains filtered or unexported fields
}

func (*TableIndexStmt) Receive

func (t *TableIndexStmt) Receive(nd node, lexer yyLexer)

func (*TableIndexStmt) String

func (t *TableIndexStmt) String() string

func (*TableIndexStmt) Type

func (t *TableIndexStmt) Type() NodeType

type TableOptNode

type TableOptNode OptUnionNode

func (TableOptNode) Pos

func (t TableOptNode) Pos() int

func (TableOptNode) String

func (t TableOptNode) String() string

func (TableOptNode) Type

func (t TableOptNode) Type() NodeType

type TableOptsStmt

type TableOptsStmt []TableOptNode

func (*TableOptsStmt) Receive

func (t *TableOptsStmt) Receive(nd node, lexer yyLexer)

func (*TableOptsStmt) String

func (t *TableOptsStmt) String() string

func (*TableOptsStmt) Type

func (t *TableOptsStmt) Type() NodeType

Jump to

Keyboard shortcuts

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