abnf_def

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 2 Imported by: 0

README

abnf_def

Package abnf_def implements ABNF grammar rules defined in RFC 5234 and RFC 7405.

Documentation

Overview

Package abnf_def implements ABNF grammar rules defined in RFC 5234 and RFC 7405.

Rules are generated as ready to use operators.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Alternation

func Alternation(s []byte, ns abnf.Nodes) abnf.Nodes

Alternation rule: alternation = concatenation *(*c-wsp "/" *c-wsp concatenation)

func BinVal

func BinVal(s []byte, ns abnf.Nodes) abnf.Nodes

BinVal rule: bin-val = "b" 1*BIT [ 1*("." 1*BIT) / ("-" 1*BIT) ]

func CNl

func CNl(s []byte, ns abnf.Nodes) abnf.Nodes

CNl rule: c-nl = comment / CRLF

func CWsp

func CWsp(s []byte, ns abnf.Nodes) abnf.Nodes

CWsp rule: c-wsp = WSP / (c-nl WSP)

func CaseInsensitiveString

func CaseInsensitiveString(s []byte, ns abnf.Nodes) abnf.Nodes

CaseInsensitiveString rule: case-insensitive-string = [ "%i" ] quoted-string

func CaseSensitiveString

func CaseSensitiveString(s []byte, ns abnf.Nodes) abnf.Nodes

CaseSensitiveString rule: case-sensitive-string = "%s" quoted-string

func CharVal

func CharVal(s []byte, ns abnf.Nodes) abnf.Nodes

CharVal rule: char-val = case-insensitive-string / case-sensitive-string

func Comment

func Comment(s []byte, ns abnf.Nodes) abnf.Nodes

Comment rule: comment = ";" *(WSP / VCHAR) CRLF

func Concatenation

func Concatenation(s []byte, ns abnf.Nodes) abnf.Nodes

Concatenation rule: concatenation = repetition *(1*c-wsp repetition)

func DecVal

func DecVal(s []byte, ns abnf.Nodes) abnf.Nodes

DecVal rule: dec-val = "d" 1*DIGIT [ 1*("." 1*DIGIT) / ("-" 1*DIGIT) ]

func DefinedAs

func DefinedAs(s []byte, ns abnf.Nodes) abnf.Nodes

DefinedAs rule: defined-as = *c-wsp ("=" / "=/") *c-wsp

func Element

func Element(s []byte, ns abnf.Nodes) abnf.Nodes

Element rule: element = rulename / group / option / char-val / num-val / prose-val

func Elements

func Elements(s []byte, ns abnf.Nodes) abnf.Nodes

Elements rule: elements = alternation *WSP

func Group

func Group(s []byte, ns abnf.Nodes) abnf.Nodes

Group rule: group = "(" *c-wsp alternation *c-wsp ")"

func HexVal

func HexVal(s []byte, ns abnf.Nodes) abnf.Nodes

HexVal rule: hex-val = "x" 1*HEXDIG [ 1*("." 1*HEXDIG) / ("-" 1*HEXDIG) ]

func NumVal

func NumVal(s []byte, ns abnf.Nodes) abnf.Nodes

NumVal rule: num-val = "%" (bin-val / dec-val / hex-val)

func Option

func Option(s []byte, ns abnf.Nodes) abnf.Nodes

Option rule: option = "[" *c-wsp alternation *c-wsp "]"

func ProseVal

func ProseVal(s []byte, ns abnf.Nodes) abnf.Nodes

ProseVal rule: prose-val = "<" *(%x20-3D / %x3F-7E) ">"

func QuotedString

func QuotedString(s []byte, ns abnf.Nodes) abnf.Nodes

QuotedString rule: quoted-string = DQUOTE *(%x20-21 / %x23-7E) DQUOTE

func Repeat

func Repeat(s []byte, ns abnf.Nodes) abnf.Nodes

Repeat rule: repeat = 1*DIGIT / (*DIGIT "*" *DIGIT)

func Repetition

func Repetition(s []byte, ns abnf.Nodes) abnf.Nodes

Repetition rule: repetition = [repeat] element

func Rule

func Rule(s []byte, ns abnf.Nodes) abnf.Nodes

Rule rule: rule = rulename defined-as elements c-nl

func Rulelist

func Rulelist(s []byte, ns abnf.Nodes) abnf.Nodes

Rulelist rule: rulelist = 1*( rule / (*WSP c-nl) )

func Rulename

func Rulename(s []byte, ns abnf.Nodes) abnf.Nodes

Rulename rule: rulename = ALPHA *(ALPHA / DIGIT / "-")

Types

This section is empty.

Jump to

Keyboard shortcuts

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