yarpl
is Yet Another Parsing Library which uses declarative macros.
Each macro uses a modified function declaration syntax and will expand to a function with the type fn (&str, usize) -> Result<yarpl::core::Progress, yarpl::core::Done>
.
Usage
yarpl
macros will take an identifier, then a block containing that parser's one or more children.
For example to parse a simple terminal symbol you can use the just!
macro:
use just;
just!;
Then just call the function with a &str
and an index as arguments.
assert!;
Calling other parsers within a macro may be done with similarly Rust-like syntax:
use and;
and!;
assert!;
assert!;