62 releases (14 breaking)

0.16.0 Jul 17, 2024
0.14.1 Jun 18, 2024
0.12.1 Dec 15, 2023
0.11.7 Nov 6, 2023
0.1.16 Jul 31, 2023

#60 in Parser tooling

Download history 103/week @ 2024-06-20 3/week @ 2024-06-27 83/week @ 2024-07-04 65/week @ 2024-07-11 51/week @ 2024-07-18 76/week @ 2024-07-25 11/week @ 2024-08-01 1/week @ 2024-08-22 3/week @ 2024-08-29 41/week @ 2024-09-12 168/week @ 2024-09-19 110/week @ 2024-09-26 1/week @ 2024-10-03

320 downloads per month
Used in pest_typed_derive

MIT/Apache

81KB
2K SLoC

Statically Typed Pest

codecov

Pest provides a elegant and convenient way to implement a parser. However, it's not convenient to consume its output as the syntax tree is not statically tagged.

This motivates me to develop a statically typed version of pest based on current version of pest.

Usage

See our documentation for some notes.

Note

The main drawback of this crate is that it compiles much slower than pest.

So, if you are just to test your grammar, you can use pest in your parsing tests.

Maybe separate your codes into several crates, use a feature in the parser crate to control which one (pest or pest_typed) is used, and use pest when testing whether the parser can parse your test inputs.

Some Other Crates With Similar Aims

Before working on this project, I've searched for crates with similar aims. They're great, too.

name repository documentation
pest-ast https://github.com/pest-parser/pest_deconstruct https://docs.rs/pest-ast/
pest_consume https://github.com/Nadrieril/pest_consume https://docs.rs/pest_consume/

Dependencies

~2–2.8MB
~56K SLoC