Skip to content

Instantly share code, notes, and snippets.

@dfhoughton
dfhoughton / pseudo_grammar.rs
Last active October 28, 2018 18:37
proof of concept grammar macro
// macro for converting a declarative expression such as
// grammar!{
// (?bBw)
// larry => <bob>{5} | <bar>{3,}
// larry -> ("this")? <bar>* ("that") <bob>+
// bob => r("foo")
// bar => (?i) [&v]
// };
// into a pidgin::Grammar
//