#parser-tools #compiler #parser

no-std peggen-core

Generate recursive-descent & precedence climbing parsers. (traits)

4 releases

0.2.6 Sep 22, 2024
0.2.2 Aug 31, 2024
0.2.1 Aug 21, 2024
0.2.0 Aug 16, 2024

#736 in Programming languages

Download history 28/week @ 2024-09-28 7/week @ 2024-10-05 13/week @ 2024-10-12 13/week @ 2024-10-19 3/week @ 2024-10-26 5/week @ 2024-11-02 2/week @ 2024-11-16 1/week @ 2024-11-23 24/week @ 2024-12-07 4/week @ 2024-12-14

299 downloads per month
Used in 2 crates

MIT/Apache

15KB
354 lines

peggen-core

Two-phase Parsing w/o Memorization

In most PEG-based approaches, the target type is constructed during parsing. However, some of them might be discarded in the near future, causing unwanted allocation/deallocation. In this crate, we seperate parsing and type construction into two phases. In the first phase, syntax items are represented as tags, which are storage-agnostic. Then, an analysis pass run over the tags and generate a final result.

Dependencies

~3–11MB
~123K SLoC