minipratt
By matklad
PrattParse
Pratt parser builder in TypeScript (along with simple tokenizer) (by JacksonKearl)
minipratt | PrattParse | |
---|---|---|
2 | 1 | |
175 | 14 | |
- | - | |
10.0 | 0.0 | |
about 4 years ago | over 1 year ago | |
Rust | TypeScript | |
- | MIT License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
minipratt
Posts with mentions or reviews of minipratt.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2024-01-20.
-
Pratt Parsers: Expression Parsing Made Easy
Some time ago I went down a fascinating rabbit hole on Pratt parsers while writing a math expression evaluator. In addition to the OP and above-linked article, I found the following helpful.
- How Desmos Uses Pratt Parsers (2018) - TypeScript - https://engineering.desmos.com/articles/pratt-parser/ - Source: https://github.com/desmosinc/pratt-parser-blog-code
- Simple But Powerful Pratt Parsing (2020) - Rust - https://matklad.github.io/2020/04/13/simple-but-powerful-pra... - Source: https://github.com/matklad/minipratt
- Building a tiny little broken calculator with parser combinators
PrattParse
Posts with mentions or reviews of PrattParse.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-07-24.
-
Building a tiny little broken calculator with parser combinators
Those interested may find Pratt parsing compelling, it is easy to implement and works well for hobby parsers (production quality error messaging tends to require custom code). As an example here’s a quick and dirty expression evaluator I made a whole back that supports D&D-style die roll codes as literals/first class variables: https://github.com/JacksonKearl/RollDice-Discord
http://journal.stuffwithstuff.com/2011/03/19/pratt-parsers-e...
https://github.com/JacksonKearl/PrattParse
What are some alternatives?
When comparing minipratt and PrattParse you can also consider the following projects:
pratt-parser-blog-code - The code to illustrate the pratt parser blog post for the desmos engineering blog.
expr - Simple integer expression parser