#parser #parser-tools #compiler

no-std pigeon-core

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

1 unstable release

0.2.0 Aug 3, 2024

#1838 in Development tools

27 downloads per month
Used in pigeon-impl

MIT/Apache

10KB
216 lines

pigeon-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

~5–14MB
~156K SLoC