Awesome
Awesome Pest. The Elegant Parser
<img src="https://avatars.githubusercontent.com/u/26044607" align="right" width="100">
A curated list of resources, projects, and tools using or for the pest parser generator in Rust
pest is a general purpose parser written in Rust with a focus on accessibility, correctness, and performance. It uses parsing expression grammars (or PEG) as input, which are similar in spirit to regular expressions, but which offer the enhanced expressivity needed to parse complex languages.
Contributions welcome! Read the contribution guidelines first.
Contents
Resources
- Book - The recommended way to start parsing with pest is to read this official book.
- API reference on docs.rs
- fiddle editor on pest.rs - Play with grammars and share them on the official website (and format them!).
- Gitter
- Discord
- GitHub Discussions
Projects
Here are some example projects using pest:
- pest_meta - The pest itself is bootstrapped using pest.
- AshPaper - Rust Inpterpreter for Esopo language AshPaper conceived by William Hicks.
- cicada - An old-school bash-like Unix shell written in Rust.
- comrak - CommonMark + GFM compatible Markdown parser and renderer.
- elastic-rs - Convert bool expressions to Elasticsearch DSL in Rust.
- handlebars-rust - Rust templating with Handlebars.
- hexdino - A hex editor with vim like keybindings written in Rust.
- insta - A snapshot testing library for rust.
- jql - A JSON Query Language CLI tool.
- json5-rs - A Rust JSON5 serializer and deserializer which speaks Serde.
- mt940 - A MT940 parser in Rust.
- py_literal - Rust crate for parsing/formatting Python literals.
- rouler - An easy to use dice rolling library for Rust.
- RuSh - RuSh aims to be a bash compatible shell with candies, written in Rust.
- rs_pbrt - Rust crate to implement a counterpart to the PBRT book's (3rd edition) C++ code.
- stache - A Mustache template compiler.
- tera - A template engine for Rust based on Jinja2/Django.
- ZoKrates - A toolbox for zkSNARKs on Ethereum.
- Vector - A high-performance observability data pipeline.
- AutoCorrect - A linter and formatter to help you to improve copywriting, correct spaces, words, and punctuations between CJK (Chinese, Japanese, Korean).
- yaml-peg - PEG parser for YAML written in Rust.
- qubit - A handy calculator, based on Rust and WebAssembly.
- caith - A dice roller crate.
- Melody - Melody is a language that compiles to regular expressions and aims to be more easily readable and maintainable.
- PTA-Parser - A Plain Text Accounting parser built in Rust for Beancount, Ledger, and other PTA formats.
- Keadex Mina - Open Source, serverless IDE to code with C4-PlantUML and organize at a scale C4 model diagrams.
- Liquid Grammar - Generate
Pairs
and/orRules
for Shopify Liquid (hash-tags not-sponsored or affiliated) for use in consuming crates
Tooling
IDE Support
- pest IDE tools - A main repository with LSP server and VSCode extension.
- VSCode Extension
- IntelliJ IDEA Plugin
- pest.vim
- pest-fmt - It can help to format pest grammars.
- pest web debugger - Try it online.
Boilerplate reduction and testing
- pest-ast - It can help to reduce boilerplate when converting pest parse trees to abstract syntax trees.
- pest_consume - This crate can help with the parse tree traversing boilerplate.
- pest-test - It is a testing framework for pest grammars.
- pest_ascii_tree - Output
Pairs
in a tree on the console
CLI Debugger
- pest_debugger - It is a crate for debugging pest grammars. It can be used as a CLI tool or as a library. See instructions for using the CLI debugger.