expr

Simple integer expression parser (by Timmmm)

Expr Alternatives

Similar projects and alternatives to expr

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better expr alternative or higher similarity.

expr reviews and mentions

Posts with mentions or reviews of expr. 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
    6 projects | news.ycombinator.com | 20 Jan 2024
    I had to write an expression parser recently and found the number of names for essentially the same algorithm very confusing. There's Pratt parsing, precedence climbing, and shunting yard. But really they're all the same algorithm.

    Pratt parsing and precedence climbing are the same except one merges left/right associativity precedence into a single precedence table (which makes way more sense). Shunting yard is the same as the others except it's iterative instead of recursive, and it seems like common implementations omit some syntax checking (but there's no reason you have to omit it).

    Here's what I ended up with:

    https://github.com/Timmmm/expr

    I had to write that because somewhat surprisingly I couldn't find an expression parser library that supports 64-bit integers and bools. Almost all of them only do floats. Also I needed it in C++ - that library was a prototype that I later translated into C++ (easier to write in Rust and then translate).

Stats

Basic expr repo stats
1
5
6.1
11 months ago

The primary programming language of expr is Rust.


Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com