Question about lexer and parser generators in Rust

This page summarizes the projects mentioned and recommended in the original post on /r/rust

InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  1. lexertl14

    C++14 version of lexertl

  2. InfluxDB

    InfluxDB – Built for High-Performance Time Series Workloads. InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.

    InfluxDB logo
  3. parsertl14

    C++14 version of parsertl

  4. gram_grep

    Search text using a grammar, lexer, or straight regex. Chain searches for greater refinement.

  5. regex

    An implementation of regular expressions for Rust. This implementation uses finite automata and guarantees linear time matching on all inputs.

    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.

  6. gramatika

    A minimal toolkit for writing parsers with Rust

    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

  7. chumsky

    Write expressive, high-performance parsers with ease.

    Checkout https://github.com/zesterer/chumsky or https://github.com/rust-bakery/nom

  8. nom

    Rust parser combinator framework

    Checkout https://github.com/zesterer/chumsky or https://github.com/rust-bakery/nom

  9. SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  10. lalrpop

    LR(1) parser generator for Rust

    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!

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Analogues of nom crate.

    3 projects | /r/rust | 7 Feb 2022
  • Chumsky, a parser combinator crate that makes writing error-tolerant parsers with recovery easy and fun!

    14 projects | /r/rust | 28 Oct 2021
  • Parsing JSON in 500 lines of Rust

    8 projects | news.ycombinator.com | 18 Feb 2025
  • Nom parser combinators now released in version 8, with a new architecture

    1 project | news.ycombinator.com | 31 Jan 2025
  • Nom released 8.0: A byte-oriented, zero-copy, parser combinators Rust library

    1 project | news.ycombinator.com | 27 Jan 2025

Did you know that Rust is
the 5th most popular programming language
based on number of references?