extern crate frithu; use frithu::grammar; use frithu::parser; #[test] fn complex_empty_string_recogniser() { let mut builder = grammar::GrammarBuilder::new("A"); builder.rule("A").add(); builder.rule("A").nonterminal("B").add(); builder.rule("B").nonterminal("A").add(); let grammar = builder.build().expect("Could not build valid grammar?"); let parser = parser::Parser::new(&grammar).expect("Could not build valid parser?"); println!("{}", parser); }