diff --git a/src/bnf.rs b/src/bnf.rs new file mode 100644 index 0000000..bb36eca --- /dev/null +++ b/src/bnf.rs @@ -0,0 +1 @@ +pub struct Bnf {} diff --git a/src/lib.rs b/src/lib.rs index ec1ccf1..0d43c51 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,11 +1,17 @@ #![feature(assert_matches)] #![allow(dead_code)] //TODO eventually turn this off +mod bnf; + +use bnf::Bnf; use std::rc::Rc; type ParseResult = Result<(O, I), E>; trait Parser { fn parse(&self, input: I) -> ParseResult; + fn bnf(&self) -> Option { + None + } fn map<'a, F, O2>(self, map_fn: F) -> BoxedParser<'a, I, O2, E> where