Macro dynparser::not

source ·
macro_rules! not {
    ($e:expr) => { ... };
}
Expand description

negate expression

example

#[macro_use]  extern crate dynparser;
use dynparser::parse;

fn main() {
    let rules = rules!{
       "main"   =>  and!(not!(lit!("b")), dot!())
    };

    assert!(parse("a", &rules).is_ok())
}

not! will not move the parsing position