Crates.io | ox_parser |
lib.rs | ox_parser |
version | 0.3.9 |
source | src |
created_at | 2021-08-30 14:51:42.10044 |
updated_at | 2022-02-20 15:06:15.87049 |
description | Parser combinator crate. Provides a simple parser combinator crate for Rust. |
homepage | |
repository | https://github.com/0xffset/parser-combinator |
max_upload_size | |
id | 444325 |
size | 25,856 |
Parser Combinator crate. Provides a simple parser crate library for Rust.
README is subject to change.
Look at the documentation for more examples.
let res = parse(
"Hello World",
map(
sequence!(string("Hello"), spaces(), string("World")),
|r| Ok(vec![r.val.join("")]),
),
);
assert_eq!(
res.unwrap().val,
vec!["Hello World".to_string()]
);