p-( ㅅ ) — the inelegant parser

p-arse is a PEG parser library focused on readability and type safety • it follows the syntax from the original paper as closely as possible • the parsers are point-free (they're (mostly) variables, not functions), as opposed to nom's parsers which are functions or compositions of functions • this encourages the user to bind and name many intermediate parsers • it is similar to pest in this regard

warning: the project is in an early stage

example

```rust let parsehexdd = |s: &str| { u8::fromstrradix(s, 16).unwrap() }; let construct_color = |(r, g, b)| Color { r, g, b };

let hexd = ('0'.to('9')).or('a'.to('f')); let hexdd = (hexd, hexd).maps(parsehexdd); let color = ("#", hexdd, hexdd, hexdd).r0().map(constructcolor);

let (color, tail) = color.parse("#defec8").unwrap(); ```

check out other examples • i've some replicated examples from the other parser libaries, i.e. nom's hex color (mine), pest's ident list (mine) and pom's json (mine)

todo

reference

  1. https://bford.info/pub/lang/peg.pdf