noa-parser 0.7.4

Noa parser is an extensible general purpose framework parser allowing to parser any type of data without allocation.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use noa_parser::bytes::components::groups::GroupKind;
use noa_parser::peek::peek;

fn main() {
    let data = b"(2 * 3)";
    let mut scanner = noa_parser::scanner::Scanner::new(data);
    let result = peek(GroupKind::Parenthesis, &mut scanner)
        .expect("failed to parse")
        .expect("failed to peek");
    println!(
        "{}",
        String::from_utf8_lossy(result.peeked_slice()) // 2 * 3
    );
}