[][src]Module abnf::types

This module contains a collection of all types in the ABNF crate. The types can also be used to manually construct new rules.

Example

use abnf::types::*;

let rule = Rule::new("test", Node::alternation(&[
    Node::rulename("A"),
    Node::concatenation(&[
        Node::rulename("B"),
        Node::rulename("C")
    ])
]));

println!("{}", rule); // prints "test = A / B C"

Structs

Repeat

An optionally lower and optionally upper bounded repeat value. Both bounds are inclusive.

Repetition

Struct to bind a Repeat value to a Node.

Rule

A single ABNF rule with a name, it's definition (implemented as Node) and a kind (Kind::Basic or Kind::Incremental).

Enums

Kind

Is a rule a basic rule or an incremental alternative? See https://tools.ietf.org/html/rfc5234#section-3.3

Node

A Node enumerates all building blocks in ABNF. Any rule is a composition of Nodes.

TerminalValues

Terminal created by numerical values.