anpa

Crates.ioanpa
lib.rsanpa
version0.10.0
created_at2024-02-26 04:38:10.711695+00
updated_at2025-07-05 06:46:53.008386+00
descriptionA generic monadic parser combinator library inspired by Haskell's parsec.
homepage
repositoryhttps://github.com/habbbe/anpa-rs
max_upload_size
id1153013
size129,569
(habbbe)

documentation

README

anpa

A generic monadic parser combinator library based on anpa which in turn is inspired by Haskell's parsec.

Features

All parsers and combinators, with the exceptions below, are allocation free and can be used with no_std when disabling the default features of this crate.

Allocating parsers:

  • many_to_vec, many_to_map_ordered: Require feature "alloc"

  • many_to_map: Requires feature "std"

Examples

See the provided test parsers

  • JSON parser: JSON DOM parser. It's only ~30 LOC and gives a good overview on how to use the library, including recursive parsers.
  • SemVer Parser: a parser for the SemVer format

These parsers can be enabled using the features "json" and "semver" respectively.

Dependencies

None

TODO

  • Add support for Read
  • More extensive test cases

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Commit count: 99

cargo fmt