uri

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

DO NOT EDIT: This file is autogenerated by https://github.com/0x51-dev/upeg.

Index

Constants

This section is empty.

Variables

View Source
var (
	URI          = op.Capture{Name: "URI", Value: op.And{Scheme, ':', HierPart, op.Optional{Value: op.And{'?', Query}}, op.Optional{Value: op.And{'#', Fragment}}}}
	HierPart     = op.Capture{Name: "HierPart", Value: op.Or{op.And{"//", Authority, PathAbempty}, PathAbsolute, PathRootless, PathEmpty}}
	URIReference = op.Capture{Name: "URIReference", Value: op.Or{URI, RelativeRef}}
	AbsoluteURI  = op.Capture{Name: "AbsoluteURI", Value: op.And{Scheme, ':', HierPart, op.Optional{Value: op.And{'?', Query}}}}
	RelativeRef  = op.Capture{Name: "RelativeRef", Value: op.And{RelativePart, op.Optional{Value: op.And{'?', Query}}, op.Optional{Value: op.And{'#', Fragment}}}}
	RelativePart = op.Capture{Name: "RelativePart", Value: op.Or{op.And{"//", Authority, PathAbempty}, PathAbsolute, PathNoscheme, PathEmpty}}
	Scheme       = op.Capture{Name: "Scheme", Value: op.And{ALPHA, op.ZeroOrMore{Value: op.Or{ALPHA, DIGIT, '+', '-', '.'}}}}
	Authority    = op.Capture{Name: "Authority", Value: op.And{op.Optional{Value: op.And{Userinfo, '@'}}, Host, op.Optional{Value: op.And{':', Port}}}}
	Userinfo     = op.Capture{Name: "Userinfo", Value: op.ZeroOrMore{Value: op.Or{Unreserved, PctEncoded, SubDelims, ':'}}}
	Host         = op.Capture{Name: "Host", Value: op.Or{IPLiteral, IPv4address, RegName}}
	Port         = op.Capture{Name: "Port", Value: op.ZeroOrMore{Value: DIGIT}}
	IPLiteral    = op.Capture{Name: "IPLiteral", Value: op.And{'[', op.Or{IPv6addressOperator{}, IPvFuture}, ']'}}
	IPvFuture    = op.Capture{Name: "IPvFuture", Value: op.And{'v', op.OneOrMore{Value: HEXDIG}, '.', op.OneOrMore{Value: op.Or{Unreserved, SubDelims, ':'}}}}
	IPv6address  = IPv6addressOperator{} // op.Capture{Name: "IPv6address", Value: op.Or{op.And{op.Repeat{Min: 6, Max: 6, Value: op.And{H16, ':'}}, Ls32}, op.And{"::", op.Repeat{Min: 5, Max: 5, Value: op.And{H16, ':'}}, Ls32}, op.And{op.Optional{Value: H16}, "::", op.Repeat{Min: 4, Max: 4, Value: op.And{H16, ':'}}, Ls32}, op.And{op.Optional{Value: op.And{op.Repeat{Max: 1, Value: op.And{H16, ':'}}, H16}}, "::", op.Repeat{Min: 3, Max: 3, Value: op.And{H16, ':'}}, Ls32}, op.And{op.Optional{Value: op.And{op.Repeat{Max: 2, Value: op.And{H16, ':'}}, H16}}, "::", op.Repeat{Min: 2, Max: 2, Value: op.And{H16, ':'}}, Ls32}, op.And{op.Optional{Value: op.And{op.Repeat{Max: 3, Value: op.And{H16, ':'}}, H16}}, "::", H16, ':', Ls32}, op.And{op.Optional{Value: op.And{op.Repeat{Max: 4, Value: op.And{H16, ':'}}, H16}}, "::", Ls32}, op.And{op.Optional{Value: op.And{op.Repeat{Max: 5, Value: op.And{H16, ':'}}, H16}}, "::", H16}, op.And{op.Optional{Value: op.And{op.Repeat{Max: 6, Value: op.And{H16, ':'}}, H16}}, "::"}}}
	H16          = op.Capture{Name: "H16", Value: op.Repeat{Min: 1, Max: 4, Value: HEXDIG}}
	Ls32         = op.Capture{Name: "Ls32", Value: op.Or{op.And{H16, ':', H16}, IPv4address}}
	IPv4address  = op.Capture{Name: "IPv4address", Value: op.And{DecOctet, '.', DecOctet, '.', DecOctet, '.', DecOctet}}
	DecOctet     = op.Capture{Name: "DecOctet", Value: op.Or{DIGIT, op.And{op.RuneRange{Min: 0x31, Max: 0x39}, DIGIT}, op.And{'1', op.Repeat{Min: 2, Max: 2, Value: DIGIT}}, op.And{'2', op.RuneRange{Min: 0x30, Max: 0x34}, DIGIT}, op.And{"25", op.RuneRange{Min: 0x30, Max: 0x35}}}}
	RegName      = op.Capture{Name: "RegName", Value: op.ZeroOrMore{Value: op.Or{Unreserved, PctEncoded, SubDelims}}}
	Path         = op.Capture{Name: "Path", Value: op.Or{PathAbempty, PathAbsolute, PathNoscheme, PathRootless, PathEmpty}}
	PathAbempty  = op.Capture{Name: "PathAbempty", Value: op.ZeroOrMore{Value: op.And{'/', Segment}}}
	PathAbsolute = op.Capture{Name: "PathAbsolute", Value: op.And{'/', op.Optional{Value: op.And{SegmentNz, op.ZeroOrMore{Value: op.And{'/', Segment}}}}}}
	PathNoscheme = op.Capture{Name: "PathNoscheme", Value: op.And{SegmentNzNc, op.ZeroOrMore{Value: op.And{'/', Segment}}}}
	PathRootless = op.Capture{Name: "PathRootless", Value: op.And{SegmentNz, op.ZeroOrMore{Value: op.And{'/', Segment}}}}
	PathEmpty    = op.Capture{Name: "PathEmpty", Value: op.Repeat{Min: 0, Max: 0, Value: Pchar}}
	Segment      = op.Capture{Name: "Segment", Value: op.ZeroOrMore{Value: Pchar}}
	SegmentNz    = op.Capture{Name: "SegmentNz", Value: op.OneOrMore{Value: Pchar}}
	SegmentNzNc  = op.Capture{Name: "SegmentNzNc", Value: op.OneOrMore{Value: op.Or{Unreserved, PctEncoded, SubDelims, '@'}}}
	Pchar        = op.Capture{Name: "Pchar", Value: op.Or{Unreserved, PctEncoded, SubDelims, ':', '@'}}
	Query        = op.Capture{Name: "Query", Value: op.ZeroOrMore{Value: op.Or{Pchar, '/', '?'}}}
	Fragment     = op.Capture{Name: "Fragment", Value: op.ZeroOrMore{Value: op.Or{Pchar, '/', '?'}}}
	PctEncoded   = op.And{'%', HEXDIG, HEXDIG}
	Unreserved   = op.Or{ALPHA, DIGIT, '-', '.', '_', '~'}
	Reserved     = op.Or{GenDelims, SubDelims}
	GenDelims    = op.Or{':', '/', '?', '#', '[', ']', '@'}
	SubDelims    = op.Or{'!', '$', '&', '\'', '(', ')', '*', '+', ',', ';', '='}
)

Functions

This section is empty.

Types

type IPv6addressOperator

type IPv6addressOperator struct{}

func (IPv6addressOperator) Match

func (I IPv6addressOperator) Match(_ parser.Cursor, p *parser.Parser) (end parser.Cursor, err error)

func (IPv6addressOperator) Parse

func (I IPv6addressOperator) Parse(p *parser.Parser) (end *parser.Node, err error)

func (IPv6addressOperator) String

func (I IPv6addressOperator) String() string

Jump to

Keyboard shortcuts

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