anpa

Crates.ioanpa
lib.rsanpa
version
sourcesrc
created_at2024-02-26 04:38:10.711695
updated_at2024-10-17 08:19:52.598568
descriptionA generic monadic parser combinator library inspired by Haskell's parsec.
homepage
repositoryhttps://github.com/habbbe/anpa-rs
max_upload_size
id1153013
Cargo.toml error:TOML parse error at line 25, column 1 | 25 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
(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 few exceptions (many_to_vec, many_to_map, many_to_map_ordered), are allocation free and can be used with no_std when disabling the default features of this crate.

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 examples in doc comments
  • 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: 67

cargo fmt