Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
gram_grep
Search text using a grammar, lexer, or straight regex. Chain searches for greater refinement.
-
regex
An implementation of regular expressions for Rust. This implementation uses finite automata and guarantees linear time matching on all inputs.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
I also took a look at https://github.com/rust-lang/regex and actually found the regex parsing code ('(', '{', '*', '?' etc.) so that is a good start too.
I wrote a lexer generator. It's pretty limited and poorly architected tbh, but feel free to have a look: https://github.com/dannymcgee/gramatika
Checkout https://github.com/zesterer/chumsky or https://github.com/rust-bakery/nom
Checkout https://github.com/zesterer/chumsky or https://github.com/rust-bakery/nom
Hi! For one of my projects I am currently using lalrpop (https://github.com/lalrpop/lalrpop/tree/master/doc/calculator/src), which is far from complete, but has the basic syntax I was looking for. I took some examples and worked around some lexer stuff but I’m currently happy with it. If you use it and have Intellij stuff installed, you can also use a plug-in for highlighting and SOMETIMES error checking. Otherwise, even VSCode had a great plug-in for highlighting!
Related posts
- Analogues of nom crate.
- Chumsky, a parser combinator crate that makes writing error-tolerant parsers with recovery easy and fun!
- Show HN: Matcheroni, a tiny C++20 header library for building lexers/parsers
- Is this a good way to free up some memory?
- What is the state of the art for creating domain-specific languages (DSLs) with Rust?