#parser #parser-combinator #val #vec #look #map #ok

yanked ox_parser

Parser combinator crate. Provides a simple parser combinator crate for Rust.

0.3.9 Feb 20, 2022
0.3.8 Feb 20, 2022
0.2.6 Feb 12, 2022
0.2.5 Aug 30, 2021

#10 in #val

Download history 62/week @ 2024-07-28 19/week @ 2024-09-22 11/week @ 2024-09-29

52 downloads per month

MIT license

20KB
225 lines

ox_parser

Parser Combinator crate. Provides a simple parser crate library for Rust.

Info

README is subject to change.

How to use

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()]
);

Dependencies

~2.2–3MB
~54K SLoC