tinyparse 0.2.3

A tiny combinator parser library.
Documentation
  • Coverage
  • 37.74%
    20 out of 53 items documented1 out of 33 items with examples
  • Size
  • Source code size: 17.16 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 4.19 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 10s Average build duration of successful builds.
  • all releases: 10s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Bitbot25/tinyparse
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Bitbot25

Tinyparse

A tiny library for parsing simple expressions.

Quickstart

use tinyparse::common;
use tinyparse::{Span, Parse};

let hello_or_int = common::literal("hello!").or(common::int());
// The parse functions return a result containing what's left of "10" and the actual result.
assert_eq!(hello_or_int.parse(Span::new("10")), Ok((Span::empty(), 10)));

Limitations

Some expressions need lookahead capability or something similar to be parsed. Unfortunately; this library does not include this.If you want lookahead capability, consider implementing your own parser using the Parse trait.

Note: This library is a work in progress. New things are getting added and breaking changes may occur.