pomelo 0.2.3

Implementation of the Lemon parser generator as a Rust procedural macro
Documentation
use pomelo::*;

pomelo! {
    %fallback Fallback One Two Three;

    input ::= tokens;
    tokens ::= Fallback Two Fallback;
    tokens ::= Three Two One;
}

#[test]
fn fallback() -> Result<(), ()> {
    use parser::*;
    let mut p = Parser::new();
    p.parse(Token::One)?;
    p.parse(Token::Two)?;
    p.parse(Token::Three)?;
    p.end_of_input()?;
    Ok(())
}