static-regular-grammar 2.0.2

Derive macro for static regular grammar
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use static_regular_grammar::RegularGrammar;

/// IRI.
#[derive(RegularGrammar, PartialEq, Eq)]
#[grammar(
	file = "examples/iri.abnf",
	cache = "target/examples/iri.automaton.cbor",
	sized(IriBuf, derive(PartialEq, Eq)),
	serde
)]
pub struct Iri(str);

fn main() {
	Iri::new("https://www.rust-lang.org/foo/bar?query#frag").unwrap();
}