pomelo 0.2.3

Implementation of the Lemon parser generator as a Rust procedural macro
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use pomelo::*;

pomelo! {
    %type One (i32, u8);
    %type Two String;

    //You can use irrefutable patterns in the LHS rules
    input ::= One((I, U)) Two(mut S) {
        let _i : i32 = I;
        let _u : u8 = U;
        S.push('x');
    }
    //You can ignore typed tokens in LHS rules
    input ::= Two One;
}