Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlternationOperator ¶
type AlternationOperator struct {
// contains filtered or unexported fields
}
AlternationOperator represents an alternation node of a rule.
func (AlternationOperator) Key ¶
func (alt AlternationOperator) Key() string
type CharacterValueOperator ¶
type CharacterValueOperator struct {
// contains filtered or unexported fields
}
CharacterValueOperator represents a character value node of a rule.
func (CharacterValueOperator) Key ¶
func (value CharacterValueOperator) Key() string
type CodeGenerator ¶
type CodeGenerator struct { // PackageName of the generated file PackageName string // RawABNF syntax to parse RawABNF []byte // ExternalABNF reference to abnf syntax // e.g. ALPHA from github.com/elimity-com/abnf/core ExternalABNF map[string]ExternalABNF // contains filtered or unexported fields }
func (*CodeGenerator) GenerateABNFAsAlternatives ¶
func (g *CodeGenerator) GenerateABNFAsAlternatives(w io.Writer)
GenerateABNFAsAlternatives returns a *jen.File containing the given ABNF syntax as Go functions that return Alternatives.
func (*CodeGenerator) GenerateABNFAsOperators ¶
func (g *CodeGenerator) GenerateABNFAsOperators(w io.Writer)
GenerateABNFAsOperators returns a *jen.File containing the given ABNF syntax as Go Operator functions.
type ConcatenationOperator ¶
type ConcatenationOperator struct {
// contains filtered or unexported fields
}
ConcatenationOperator represents a concatenation node of a rule.
func (ConcatenationOperator) Key ¶
func (concat ConcatenationOperator) Key() string
type ExternalABNF ¶
type NumericValueOperator ¶
type NumericValueOperator struct {
// contains filtered or unexported fields
}
NumericValueOperator represents a numeric value node of a rule.
func (NumericValueOperator) Key ¶
func (value NumericValueOperator) Key() string
type Operator ¶
type Operator interface { // Key returns that key (name) of the operator.s Key() string // contains filtered or unexported methods }
Operator represents a node of a rule.
type OptionOperator ¶
type OptionOperator struct {
// contains filtered or unexported fields
}
OptionOperator represents an option node of a rule.
func (OptionOperator) Key ¶
func (opt OptionOperator) Key() string
type ParserGenerator ¶
type ParserGenerator struct { // RawABNF syntax to parse RawABNF []byte // ExternalABNF reference to abnf syntax // e.g. ALPHA from github.com/elimity-com/abnf/core ExternalABNF map[string]operators.Operator sync.WaitGroup // contains filtered or unexported fields }
func (*ParserGenerator) GenerateABNFAsOperators ¶
func (g *ParserGenerator) GenerateABNFAsOperators() map[string]operators.Operator
type RepetitionOperator ¶
type RepetitionOperator struct {
// contains filtered or unexported fields
}
RepetitionOperator represents a repetition node of a rule.
func (RepetitionOperator) Key ¶
func (rep RepetitionOperator) Key() string
type Rule ¶
type Rule struct {
// contains filtered or unexported fields
}
Rule represents an ABNF rule.
type RuleNameOperator ¶
type RuleNameOperator struct {
// contains filtered or unexported fields
}
RuleNameOperator represents a rule name node of a rule.
func (RuleNameOperator) Key ¶
func (name RuleNameOperator) Key() string