pkombi

Crates.iopkombi
lib.rspkombi
version
sourcesrc
created_at2025-02-09 20:08:26.267276+00
updated_at2025-02-10 13:54:26.782516+00
descriptionParser combinator library
homepage
repositoryhttps://github.com/prodbysky/pkombi
max_upload_size
id1549245
Cargo.toml error:TOML parse error at line 17, column 1 | 17 | 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
(prodbysky)

documentation

README

PKombi - Parser combinator library in Rust

Why?

Well first of all because I can. Also because I want to understand Rust better, I want to understand how parser combinators work under the hood. Also this is quite the functional thingamabobo

Currently implemented parsers and their combinators

Parsers

  • char(c): matches a single character
  • digit(): matches a any ascii base 10 digit

Combinators

  • skip(): skips the matched input
  • maybe(): optional parse result
  • or(other): first tries the self parser and if it fails then tries other
  • and(other): tries to match both the self and the other parser
  • then_maybe(other): optional other parser match
  • many(): matches 0 or more elements
  • many1(): matches atleast 1 or more elements
  • choice(possibilities): matches against the provided parsers and returns the first valid match
Commit count: 8

cargo fmt