Documentation
¶
Overview ¶
Package parse is the hand-written recursive-descent port of the pinned grammar (internal/reference/gram.y, libpg_query 18.0.0). One parse* method per production, each with an attribution comment naming the gram.y rule it implements; the support functions at the bottom of gram.y live in gram_support.go with the same names.
Index ¶
- func Parse(input string) (res *ast.ParseResult, err *lexer.Error)
- func ParseTracked(input string) (res *ast.ParseResult, emptyStrings map[any]bool, err *lexer.Error)
- func ParseTypeName(input string) (res *ast.TypeName, err *lexer.Error)
- func ParseWithMode(input string, mode Mode) (res *ast.ParseResult, err *lexer.Error)
- func SystemFuncName(name string) []*ast.Node
- func SystemTypeName(name string) *ast.TypeName
- type Mode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Parse ¶
func Parse(input string) (res *ast.ParseResult, err *lexer.Error)
Parse is raw_parser for RAW_PARSE_DEFAULT: parse_toplevel/stmtmulti.
func ParseTracked ¶
ParseTracked is Parse plus the present-but-empty string set (see parser.emptyStrings) for the fingerprint walk.
func ParseTypeName ¶
ParseTypeName is raw_parser for RAW_PARSE_TYPE_NAME: parse_toplevel: MODE_TYPE_NAME Typename. The result is the bare TypeName (libpg_query's plpgsql support calls this through typeStringToTypeName).
func ParseWithMode ¶
ParseWithMode is raw_parser: parse_toplevel's MODE_* alternatives, each wrapping its result in a RawStmt exactly as the grammar actions do.
Types ¶
Source Files
¶
- cexpr.go
- ddl_alter_generic.go
- ddl_altertable.go
- ddl_create.go
- ddl_define.go
- ddl_dispatch.go
- ddl_extension.go
- ddl_foreign.go
- ddl_function.go
- ddl_grant.go
- ddl_object.go
- ddl_publication.go
- ddl_role.go
- ddl_rule.go
- ddl_trigger.go
- dml.go
- expr.go
- func.go
- gram_support.go
- modes.go
- names.go
- nodes.go
- parser.go
- select.go
- tablefuncs.go
- typename.go
- utility_maint.go
- utility_set.go
- utility_txn.go