pest-parser / pest3

WIP pest 3.0
Apache License 2.0
11 stars 4 forks source link

What are the Pest v3 goals? #12

Open chriskrycho opened 5 months ago

chriskrycho commented 5 months ago

Hey folks, started using Pest v2 yesterday, am quite happy with it, and saw this while poking around. I would love to know what the goals and motivations here are!

tomtau commented 5 months ago

@chriskrycho thanks for your interest! In short, its goals and motivations are to improve the areas that pest focuses on (accessibility, correctness, and performance).

See https://github.com/pest-parser/pest/discussions/1016 and https://github.com/pest-parser/pest/discussions/885 for more details.

Many years ago, the "original vision" for pest3 was two-fold:

  1. to have an improved simplified grammar. This new grammar should be easier to use, avoiding some pitfalls learned from pest2, as well as easier to optimize and analyze, thus allowing potentially faster code execution and more comprehensive error messages.
  2. to have an alternative API for the parser output that would better leverage Rust's type system (unlike the existing Pairs API), thus reducing boilerplate and avoiding unnecessary errors arising from Pairs API output processing without a need for a third-party crate, such as pest-ast.