Crate pest [−] [src]
pest. Smart PEGs in Rust
pest is a parser generator that works with PEGs.
It relies exclusively on macros to create an efficient parser at compile-time.
impl_rdp!(MyRdp); impl MyRdp { grammar! { exp = { paren ~ exp | [""] } paren = { ["("] ~ exp ~ [")"] } } } let mut parser = MyRdp::new(Box::new(StringInput::new("(())((())())()"))); assert!(parser.exp()); assert!(parser.end());
Macros
grammar! |
A |
impl_rdp! |
A |
Structs
StringInput |
A |
Traits
Input |
A |
Parser |
A |
Rdp |
A |